Need to convert a grayscale image to a binary (1s and 0s) image... [message #89064] |
Mon, 21 July 2014 16:40  |
idloop
Messages: 1 Registered: July 2014
|
Junior Member |
|
|
Any suggestions? I have a grayscale image that is going to get modified within the *excellent* windowimage function from coyotes library, and I need to save the final result out as a binary (just 1s and 0s) image.
Any idea? Do you just change the colortables? Would making a mask for all values greater than 0 (on the 0-255 grayscale image) effectively be producing the same result?
|
|
|
Re: Need to convert a grayscale image to a binary (1s and 0s) image... [message #89065 is a reply to message #89064] |
Mon, 21 July 2014 17:13  |
dg86
Messages: 118 Registered: September 2012
|
Senior Member |
|
|
On Monday, July 21, 2014 7:40:03 PM UTC-4, idloop wrote:
> Any suggestions? I have a grayscale image that is going to get modified within the *excellent* windowimage function from coyotes library, and I need to save the final result out as a binary (just 1s and 0s) image.
>
>
>
> Any idea? Do you just change the colortables? Would making a mask for all values greater than 0 (on the 0-255 grayscale image) effectively be producing the same result?
If your image is called "image", and the grayscale threshold between designations of "0" and "1" is called
"threshold", you might try
result = image gt threshold
TTFN,
David
|
|
|