|
|
Re: How to convert RGB image into a binary image ? [message #87414 is a reply to message #87411] |
Fri, 31 January 2014 17:58  |
dg86
Messages: 118 Registered: September 2012
|
Senior Member |
|
|
On Friday, January 31, 2014 6:22:07 PM UTC-5, Hassan wrote:
> Hi everybody,
>
>
>
> I need to convert a RGB image into a binary format image. I would be grateful if any one could help me.
>
>
>
> With best regards,
>
> Hassan
I'm guessing that you want to threshold the image's intensity. If, so, then you can use COLOR_CONVERT to transform your RGB image into an HSV image. The V channel is the intensity, to which you can apply a threshold. For instance, if A is your RGB image and THRESHOLD is your threshold value, then
IDL> color_convert, a, b, /rgb_hsv
IDL> intensity = reform(b[2,*,*]) ; V = intensity
IDL> result = intensity gt threshold
All the best,
David
|
|
|