Lab colorspace - clipping
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Lab colorspace - clipping
Can you upload your image somewhere like dropbox.com (public folder), so I can download it and check things out?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Lab colorspace - clipping
probably due to the colors in your Paint file being sRGB and -colorspace changing them to linear RGB. Try using -colorspace sRGB in your command.
to be honest, I am still confused about why you are changing to linear RGB. In what colorspace is your input data? Were you not starting with LAB data or just trying to convert to LAB from sRGB.
to be honest, I am still confused about why you are changing to linear RGB. In what colorspace is your input data? Were you not starting with LAB data or just trying to convert to LAB from sRGB.
Re: Lab colorspace - clipping
At the end, I will be starting with an RGB digital image from my camera, then converting the digital image to Lab space so I can compare tge Lab values a control image which I have had the Lab values determined with a colorimeter.
As for sending the file, I will try e-mailing it to you and if that doesn't work, I'll place it on a dropbox public folder, but I'll need to set one up, unless you are aware of a public folder already.
As for sending the file, I will try e-mailing it to you and if that doesn't work, I'll place it on a dropbox public folder, but I'll need to set one up, unless you are aware of a public folder already.
Re: Lab colorspace - clipping
Fmw42,
The color swatch I have been processing can be down loaded from:
mgur.com/LYHz9bE
and url is case sensitive.
The color swatch I have been processing can be down loaded from:
mgur.com/LYHz9bE
and url is case sensitive.
Re: Lab colorspace - clipping
Fmw42,
You were right about the colorspace converting correctly. Hopefully this does not cause issues in converting to Lab space; I'll try that next.
As always, thank you for your help.
You were right about the colorspace converting correctly. Hopefully this does not cause issues in converting to Lab space; I'll try that next.
As always, thank you for your help.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Lab colorspace - clipping
The web site cannot be found.jwtrexler wrote:Fmw42,
The color swatch I have been processing can be down loaded from:
mgur.com/LYHz9bE
and url is case sensitive.
When you say you are starting with RGB, I think you really mean sRGB. Most tools create sRGB images and IM assumes them to be sRGB unless told otherwise. If you are on a current version of IM, -colorspace RGB will convert to linear RGB, which will be darker. Older IM systems had sRGB and RGB swapped in -colorspace. see viewtopic.php?f=4&t=21269
So if you have created an image with r,g,b values in Paint, I would assume they were sRGB. Thus -colorspace sRGB can be added with no effect, but it can be left off. If you want to be sure, and you know it is sRGB, then just use -set colorspace sRGB (before any other colorspace conversion).
Code: Select all
convert rgbimage -set colorspace sRGB -colorspace LAB -separate +channel labimage_%d.png
or try these for testing
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -format "%[fx:mean.r] %[fx:mean.g] %[fx:mean.b]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB -format "%[fx:mean.r] %[fx:mean.g] %[fx:mean.b]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB -format "%[fx:u.r] %[fx:u.g] %[fx:u.b]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -format "%[pixel:u.p{0,0}]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB -format "%[pixel:u.p{0,0}]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB txt:
0,0: (100%,0%,0%) #FFFF00000000 red
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB txt:
0,0: (53.2311%,31.4168%,26.36%) #8845506D437B cielab(53.2311%,31.4168%,26.36%)
Seems still to be a bug. The values for LAB from txt:, do not agree with the others.
convert -version
Version: ImageMagick 6.8.9-6 Q16 x86_64 2014-07-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib cairo fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib
Re: Lab colorspace - clipping
Is there a similar way to apply your suggestion using mean.r, mean.g, and mean.b to other statistical parameters, such as maxima, standard_deviation and kurtosis? I tried the identical approach (e.g. fx: maxima.r) with the first couple statistics and did not have success.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Lab colorspace - clipping
Works fine for me with IM 6.8.9.6 Q16 Max OSX. Note there is only one pixel. So min and max will be the same and std will be zero.
1 0 0
1 0 0
0 0 0
Try with two appended pixels of different colors
1 0 1
0 0 0
0.5 0 0.5
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -format "%[fx:maxima.r] %[fx:maxima.g] %[fx:maxima.b]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -format "%[fx:minima.r] %[fx:minima.g] %[fx:minima.b]\n" info:
Code: Select all
convert -size 1x1 xc:red -set colorspace sRGB -format "%[fx:standard_deviation.r] %[fx:standard_deviation.g] %[fx:standard_deviation.b]\n" info:
Try with two appended pixels of different colors
Code: Select all
convert -size 1x1 xc:red xc:blue +append -set colorspace sRGB -format "%[fx:maxima.r] %[fx:maxima.g] %[fx:maxima.b]\n" info:
Code: Select all
convert -size 1x1 xc:red xc:blue +append -set colorspace sRGB -format "%[fx:minima.r] %[fx:minima.g] %[fx:minima.b]\n" info:
Code: Select all
convert -size 1x1 xc:red xc:blue +append -set colorspace sRGB -format "%[fx:standard_deviation.r] %[fx:standard_deviation.g] %[fx:standard_deviation.b]\n" info: