komp
(Ed Komp)
February 17, 2014, 3:03pm
1
I’m using RegionBinarize on a number of images, but occasionally it does nothing.
These image always have
ColorSpace->ColorProfileData[<>,Description->sRGB IEC61966-2.1,DeviceColorSpace->RGB,IndependentColorSpace->XYZ]
Why does RegionBinarize not operate on this image?
And,/or how can I convert it to a image with ColorSpace-> RGB?
ImageColorConvert [img, “RGB”] does not do the job.
This will work,
ColorConvert[ ColorConvert[img, "XYZ"], "RGB"]
but why?
I will attach a small image here, the sequence of tests I’ve performed.
Thanks in advance,
Ed Komp
komp
(Ed Komp)
February 17, 2014, 3:08pm
2
I have had some trouble attaching the short bit of Mathematica code,
so I will try putting it into a reply
Sorry,
Ed Komp
Print [ "*** Original Image"]
img
ImageColorSpace[img]
Options [img, ColorSpace]
RegionBinarize[img, { {50, 100}} , .2]
Print ["*** Image after ColorConvert to RGB"]
img1 = ColorConvert[img, "RGB"]
ImageColorSpace[img1]
Options [img1, ColorSpace]
RegionBinarize[img1, { {50, 100}} , .2]
Print ["*** Image after ColorConvert to XYZ and back to RGB"]
img2 = ColorConvert[ ColorConvert[img, "XYZ"], "RGB"]
ImageColorSpace[img2]
Options [img2, ColorSpace]
RegionBinarize[img2, { {50, 100}} , .2]
brucem
(Bruce Miller)
February 17, 2014, 5:53pm
3
Sorry for the inconvenience. This is a known problem for which a correction is in the works.
komp
(Ed Komp)
February 17, 2014, 6:19pm
4
Bruce,
Thanks for the information.
At least I have something of workaround for now.
I will close this discussion.
Ed