Posted by
Gabriel Landini on
Sep 20, 2010; 3:15pm
URL: http://imagej.273.s1.nabble.com/Filter-a-color-tp3686882p3686885.html
On Monday 20 Sep 2010 16:06:30 AnnaKlaus <
[hidden email]> wrote:
> At the end of the filter I want to have the area which is covered by the
> pink colour, seperated from the background!
I would use the transmittance method:
Keep a copy of your image, then
Process a Max filter of size 4 or so to it,
Process a Min filter of size 4 or so to the above (this is greyscale closing)
Now the result should be an image with no pink ring (or almost).
Now use the Calculator_Plus (not the Image calculator!!) to Divide the
original by the closed image. Use the value of 255 in the first box
a macro to do this is:
run("Duplicate...", "title=closed");
run("Maximum...", "radius=4");
run("Minimum...", "radius=4");
run("Calculator Plus", "i1=Colour0010.png i2=closed operation=[Divide: i2 =
(i1/i2) x k1 + k2] k1=255 k2=0 create");
Now edit the image and paint everything which is not the pink ring with white.
You could use that image to remove the ring from other images (assuming that
the ring does not move in the other images by doing this:
run("Calculator Plus", "i1=Colour0010.png i2=Result operation=[Divide: i2 =
(i1/i2) x k1 + k2] k1=255 k2=0 create");
I attached the result I get with that.
Regards
Gabriel