|
3 | 3 |
|
4 | 4 | """Functions for converting between color spaces.
|
5 | 5 |
|
6 |
| -Colorconv is copied from scikit-image to avoid an additional dependency on scikit-image |
7 |
| -in the matplotlib documentation. You should almost sertanly use the original module |
8 |
| -for any other use. This only contains the bare minumum functions needed for rgb2lab |
9 |
| -Utility functions copied from dtype.py |
| 6 | +Colorconv is copied from scikit-image to avoid an additional dependency on |
| 7 | +scikit-image in the matplotlib documentation. You should almost sertanly use |
| 8 | +the original module for any other use. This only contains the bare minumum |
| 9 | +functions needed for rgb2lab Utility functions copied from dtype.py |
10 | 10 |
|
11 | 11 | The "central" color space in this module is RGB, more specifically the linear
|
12 | 12 | sRGB color space using D65 as a white-point [1]_. This represents a
|
@@ -220,11 +220,7 @@ def rgb2xyz(rgb):
|
220 | 220 | ----------
|
221 | 221 | .. [1] http://en.wikipedia.org/wiki/CIE_1931_color_space
|
222 | 222 |
|
223 |
| - Examples |
224 |
| - -------- |
225 |
| - >>> from skimage import data |
226 |
| - >>> lena = data.lena() |
227 |
| - >>> lena_xyz = rgb2xyz(lena) |
| 223 | +
|
228 | 224 | """
|
229 | 225 | # Follow the algorithm from http://www.easyrgb.com/index.php
|
230 | 226 | # except we don't multiply/divide by 100 in the conversion
|
@@ -273,14 +269,6 @@ def xyz2lab(xyz, illuminant="D65", observer="2"):
|
273 | 269 | .. [1] http://www.easyrgb.com/index.php?X=MATH&H=07#text7
|
274 | 270 | .. [2] http://en.wikipedia.org/wiki/Lab_color_space
|
275 | 271 |
|
276 |
| - Examples |
277 |
| - -------- |
278 |
| - >>> from skimage import data |
279 |
| - >>> from skimage.color import rgb2xyz, xyz2lab |
280 |
| - >>> lena = data.lena() |
281 |
| - >>> lena_xyz = rgb2xyz(lena) |
282 |
| - >>> lena_lab = xyz2lab(lena_xyz) |
283 |
| -
|
284 | 272 | """
|
285 | 273 | arr = _prepare_colorarray(xyz)
|
286 | 274 |
|
@@ -331,13 +319,7 @@ def xyz2rgb(xyz):
|
331 | 319 | ----------
|
332 | 320 | .. [1] http://en.wikipedia.org/wiki/CIE_1931_color_space
|
333 | 321 |
|
334 |
| - Examples |
335 |
| - -------- |
336 |
| - >>> from skimage import data |
337 |
| - >>> from skimage.color import rgb2xyz, xyz2rgb |
338 |
| - >>> lena = data.lena() |
339 |
| - >>> lena_xyz = rgb2xyz(lena) |
340 |
| - >>> lena_rgb = xyz2rgb(lena_xyz) |
| 322 | +
|
341 | 323 | """
|
342 | 324 | # Follow the algorithm from http://www.easyrgb.com/index.php
|
343 | 325 | # except we don't multiply/divide by 100 in the conversion
|
|
0 commit comments