Login  Register

change white into transparent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

change white into transparent

marie louise
2 posts
Hi,

I would like to gather the grey scale distubution of an area using Analyze>Plot profile, However there are certain spots (which are white, 255,255,255 in the file) which i like to exclude from this analysis, so to not take them into account. Is there  a way to do this? Can i for example change all the white in my image to transparent?
Any hints are welcome!
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: change white into transparent

Tiago Ferreira-2
81 posts
On 2013.03.01, at 08:52 , marie louise wrote:

> Hi,
>
> I would like to gather the grey scale distubution of an area using
> Analyze>Plot profile, However there are certain spots (which are white,
> 255,255,255 in the file) which i like to exclude from this analysis, so to
> not take them into account. Is there  a way to do this? Can i for example
> change all the white in my image to transparent?
> Any hints are welcome!

Assuming you are dealing with grayscale values (you seem to be working with
RGB images[*]) perhaps the easiest way would be:

1) Convert to 32-bit (Image>Type>32-bit)
2) Apply a 0-254 threshold using Image>Adjust>Threshold...
3) Tick "Set Background Pixels to NaN" in the prompt

From that moment, 255 pixels should not appear in the profile plot as they
are set to NaN, "Not a Number"

[*] The ImageJ documentation pages should have a description of Image Types,
e.g.,<http://imagej.net/docs/guide/146-7.html>

-tiago

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html