Pixel count via RGB range

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Gus
Reply | Threaded
Open this post in threaded view
|

Pixel count via RGB range

Gus
Hello,

I'd like to use this software for digital vegetation profiles. The idea is
to place a 0.5m x 0.5m white background (drop cloth, poster board,etc.) in a
field plot and take a picture of it from a certain distance. I'd then crop
out just the half meter square area to analyze.

I suspect that the leaves and twigs would have a fairly small RGB range, as
compared to the white background, that I could specify and then have ImageJ
count the pixels in that range. All that's left is to divide by that number
by the total pixels to get a percent cover of vegetation.

If someone could point me in the right direction on how to do this with
ImageJ I would be very grateful.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Pixel count via RGB range

komal_asrani
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Gus
Reply | Threaded
Open this post in threaded view
|

Re: Pixel count via RGB range

Gus
Hi Komal,

Thanks, that suggestion helped a lot. I converted the image to binary so
that now there are only 2 values: 0 (background) and 255 (vegetation).

I've been using the 'Analyze Particles' tool but the results aren't exactly
what I expected. For example, the total number of pixels in the report
doesn't match that given in the image info. I've asked it to include holes
and not to exclude edge, which to me should mean that it's analyzing every
pixel.

Seems straight forward at this point considering there are only 2 values.
All I need is the count for each.



On Thu, Sep 9, 2010 at 2:39 AM, komal asrani <[hidden email]>wrote:

> Hello
>
> I have implemented the concept of pixel count for binary images. I think in
> regard to your query, is it possible to work in binary?Otherwise, collect
> the values for each band and then compare
>
>
>
>
>
>
>
> On Thu, 09 Sep 2010 05:17:16 +0530  wrote
>
> >Hello,
>
>
>
>
>
>
>
> I'd like to use this software for digital vegetation profiles. The idea is
>
>
>
> to place a 0.5m x 0.5m white background (drop cloth, poster board,etc.) in
> a
>
>
>
> field plot and take a picture of it from a certain distance. I'd then crop
>
>
>
> out just the half meter square area to analyze.
>
>
>
>
>
>
>
> I suspect that the leaves and twigs would have a fairly small RGB range, as
>
>
>
> compared to the white background, that I could specify and then have ImageJ
>
>
>
> count the pixels in that range. All that's left is to divide by that number
>
>
>
> by the total pixels to get a percent cover of vegetation.
>
>
>
>
>
>
>
> If someone could point me in the right direction on how to do this with
>
>
>
> ImageJ I would be very grateful.
>
>
>
>
>
>
>
> Thanks!
>
>
>
>
>
> With regards
>
> Komal Asrani
>
Reply | Threaded
Open this post in threaded view
|

Re: Pixel count via RGB range

Michael Schmid
In reply to this post by Gus
Hi John,

one option might be the Versatile Wand

http://imagejdocu.tudor.lu/doku.php?
id=plugin:segmentation:versatile_wand:start

(the link should be one line).

Use Connectedness 'Non-Contiguous', Gradient Tolerance off (0),  
Include Holes off.

If you select the tool, click on a pixel with the typical color and  
then open the Versatile Wand Options (dobule click the tool icon).  
You can use preview and play with the tolerance and Color sliders to  
get the best result.
Then, Analyze>Measure will give you the area selected (make sure that  
'Area' is selected in Set Measurements).

Michael
________________________________________________________________

On 8 Sep 2010, at 23:46, John Carpenter wrote:

> Hello,
>
> I'd like to use this software for digital vegetation profiles. The  
> idea is
> to place a 0.5m x 0.5m white background (drop cloth, poster  
> board,etc.) in a
> field plot and take a picture of it from a certain distance. I'd  
> then crop
> out just the half meter square area to analyze.
>
> I suspect that the leaves and twigs would have a fairly small RGB  
> range, as
> compared to the white background, that I could specify and then  
> have ImageJ
> count the pixels in that range. All that's left is to divide by  
> that number
> by the total pixels to get a percent cover of vegetation.
>
> If someone could point me in the right direction on how to do this  
> with
> ImageJ I would be very grateful.
>
> Thanks!
Gus
Reply | Threaded
Open this post in threaded view
|

Re: Pixel count via RGB range

Gus
Thanks Michael, that worked great. I'd love to automate this process but I
imagine that would be difficult because the user has to select the pixel?

Is there any way to build an attribute table for the image? I've done this
with a licensed GIS software but I'd rather use something that is open
source.


On Fri, Sep 10, 2010 at 4:05 AM, Michael Schmid <[hidden email]>wrote:

> Hi John,
>
> one option might be the Versatile Wand
>
>
> http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:versatile_wand:start
>
> (the link should be one line).
>
> Use Connectedness 'Non-Contiguous', Gradient Tolerance off (0), Include
> Holes off.
>
> If you select the tool, click on a pixel with the typical color and then
> open the Versatile Wand Options (dobule click the tool icon). You can use
> preview and play with the tolerance and Color sliders to get the best
> result.
> Then, Analyze>Measure will give you the area selected (make sure that
> 'Area' is selected in Set Measurements).
>
> Michael
> ________________________________________________________________
>
>
> On 8 Sep 2010, at 23:46, John Carpenter wrote:
>
>  Hello,
>>
>> I'd like to use this software for digital vegetation profiles. The idea is
>> to place a 0.5m x 0.5m white background (drop cloth, poster board,etc.) in
>> a
>> field plot and take a picture of it from a certain distance. I'd then crop
>> out just the half meter square area to analyze.
>>
>> I suspect that the leaves and twigs would have a fairly small RGB range,
>> as
>> compared to the white background, that I could specify and then have
>> ImageJ
>> count the pixels in that range. All that's left is to divide by that
>> number
>> by the total pixels to get a percent cover of vegetation.
>>
>> If someone could point me in the right direction on how to do this with
>> ImageJ I would be very grateful.
>>
>> Thanks!
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Pixel count via RGB range

Michael Schmid
Hi John,

ok, I see. I have uploaded a new version of the Versatile Wand that  
can use the foreground (eyedropper) color instead of the color of a  
given pixel.

-- Attribute table: this question is a different topic.
Anyhow, if you save the image as tiff or zip (i.e., zipped tiff), the  
image properties (including the info) are saved with it. There you  
can also store your own data. Is this what you are looking for?
Otherwise, please start a separate thread in the discussion for it.

Michael
________________________________________________________________

On 10 Sep 2010, at 18:14, John Carpenter wrote:

> Thanks Michael, that worked great. I'd love to automate this  
> process but I
> imagine that would be difficult because the user has to select the  
> pixel?
>
> Is there any way to build an attribute table for the image? I've  
> done this
> with a licensed GIS software but I'd rather use something that is open
> source.
>
>
> On Fri, Sep 10, 2010 at 4:05 AM, Michael Schmid  
> <[hidden email]>wrote:
>
>> Hi John,
>>
>> one option might be the Versatile Wand
>>
>>
>> http://imagejdocu.tudor.lu/doku.php?
>> id=plugin:segmentation:versatile_wand:start
>>
>> (the link should be one line).
>>
>> Use Connectedness 'Non-Contiguous', Gradient Tolerance off (0),  
>> Include
>> Holes off.
>>
>> If you select the tool, click on a pixel with the typical color  
>> and then
>> open the Versatile Wand Options (dobule click the tool icon). You  
>> can use
>> preview and play with the tolerance and Color sliders to get the best
>> result.
>> Then, Analyze>Measure will give you the area selected (make sure that
>> 'Area' is selected in Set Measurements).
>>
>> Michael
>> ________________________________________________________________
>>
>>
>> On 8 Sep 2010, at 23:46, John Carpenter wrote:
>>
>>  Hello,
>>>
>>> I'd like to use this software for digital vegetation profiles.  
>>> The idea is
>>> to place a 0.5m x 0.5m white background (drop cloth, poster  
>>> board,etc.) in
>>> a
>>> field plot and take a picture of it from a certain distance. I'd  
>>> then crop
>>> out just the half meter square area to analyze.
>>>
>>> I suspect that the leaves and twigs would have a fairly small RGB  
>>> range,
>>> as
>>> compared to the white background, that I could specify and then have
>>> ImageJ
>>> count the pixels in that range. All that's left is to divide by that
>>> number
>>> by the total pixels to get a percent cover of vegetation.
>>>
>>> If someone could point me in the right direction on how to do  
>>> this with
>>> ImageJ I would be very grateful.
>>>
>>> Thanks!
>>>
>>