comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Need to convert a grayscale image to a binary (1s and 0s) image...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Need to convert a grayscale image to a binary (1s and 0s) image... [message #89064] Mon, 21 July 2014 16:40 Go to next message
idloop is currently offline  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 Go to previous message
dg86 is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Case Insensitive Hash but still preserve cases of original keys
Next Topic: Maxwell equation solver in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:32:24 PDT 2025

Total time taken to generate the page: 0.00466 seconds