On 03/07/2014 08:51 AM, Violette BERTRAND wrote:
Hi,

I have pictures (.png) of the shape of many entrances of woodpeckers’ cavities, 
coloured in black. I want that R takes these pictures and stacks (superimposes) 
all the shapes to determine the tendency of the shape of cavities for each 
species of woodpecker.

I currently use the package EBImage which determine the mean radius of the 
shape of entrances (the shape is divided in 8 parts, and the package measure 
the mean radius for each part). So this package uses only the mean radius for 
each part of the shape.

But, I would like that R use the real shape of cavities. Is another package 
exists, which will use the real shape of my pictures ?

Hi Violette,
I think that this is more of a graphics manipulation. You can get the outline of the woodpecker hole by:

1) loading your image into the GIMP
2) duplicating it
3) scaling the duplicate down by about 2.5%
4) select the area using "similar colors"
5) bucket fill the selected area with white
6) copy the selected area
7) paste it onto the original image

You will then have the outline as in the image attached. I don't know whether the GIMP will do it, but there are image compositing functions that will produce an average of many images. There you have your average woodpecker hole.

Jim

<<attachment: woodpecker_outline.png>>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to