I am working (or lets call it playing) with the different ways of converting a color image to black and white.
It seems to me that there might be a problem with the saturation transformation.
- I started with a 48-bit color image
- with the Monochrome Transformation I extract the HSV-V chanel and get a 16-bit black and white image
- with the Saturation Transformation I reduce the color to zero and get a 48-bit color image
- with the Extract Chanel Transformation I extract the HSV-V chanel and get a 16-bit black and white image
So far everything works as expected, but counting the number of different colors shows quite a difference.
It seemes that the result of the Saturation Transforamtion is just a 24 bit file in reality.
Please have a look at the screen-shot.
Problem/Question with Saturation Transformation
Moderator: jsachs
-
- Posts: 240
- Joined: June 18th, 2010, 4:27 pm
- What is the make/model of your primary camera?: Pentax K1
Problem/Question with Saturation Transformation
- Attachments
-
- Number_of_Colors.jpg (112.34 KiB) Viewed 1745 times
Winfried
-----
migrated to Windows 10 in Nov. 2019
PWP Pro 64
CUDA not available
-----
migrated to Windows 10 in Nov. 2019
PWP Pro 64
CUDA not available
Re: Problem/Question with Saturation Transformation
The transformations are correct, but the problem is in the Count Colors command. The output of the Saturation transformation is a 48-bit color image while the output of Extract Channel is a 16-bit black and white image. The count colors command, for performance reasons, counts the number of 24-bit colors for 48-bit color images while it gives the correct answer for 16-bit black and white. If you convert the Saturation result to 16-bit B&W, then Count Colors gives the same answer as for the Extract Channels version.
Jonathan Sachs
Digital Light & Color
Digital Light & Color
-
- Posts: 240
- Joined: June 18th, 2010, 4:27 pm
- What is the make/model of your primary camera?: Pentax K1
Re: Problem/Question with Saturation Transformation
Thanks for the the explanation.
Winfried
-----
migrated to Windows 10 in Nov. 2019
PWP Pro 64
CUDA not available
-----
migrated to Windows 10 in Nov. 2019
PWP Pro 64
CUDA not available
Re: Problem/Question with Saturation Transformation
For the next release, I implemented a different and far more efficient algorithm for counting unique colors that works for 48-bit color images as well as the other types.
Jonathan Sachs
Digital Light & Color
Digital Light & Color