Login  Register

Re: spatial filter help

Posted by Michael Schmid on Apr 24, 2017; 8:24am
URL: http://imagej.273.s1.nabble.com/spatial-filter-help-tp5018585p5018598.html

H Fulano,

if your upper contour (the surface) is contiguous (no holes in it) you
could use the Wand Tool on the area above it, then Edit>Selection>Make
Inverse to select the water and clear (or Process>Math>Set) everything
below.

In your sample image, the 'surface' contour has quite a few gaps (also
rather large ones, so methods like binary close won't close the gaps.
I guess that you would need either better preprocessing or segmentation.
you could try trainable Weka Segmentation [1] in ImageJ2/Fiji or
(simpler, but less likely to work) the Versatile Wand plugin with
gradient detection [2].
Alternatively, if possible, have better illumination; e.g. if you record
the waves at the front side of an aquarium-like tank, you could have a
light source illuminating only the water from behind and maybe a wall
from frosted glass (then, total reflection will make sure that only the
water appears bright).

Concerning your original question:
I am not aware of such a plugin or macro. If you write one, I would
recommend a plugin (Java) or Javascript (the latter only if you have
Java 1.8). Otherwise it will be rather slow, because the code will be
interpreted, not compiled, and processing a video might take ages.


Michael

[1] http://imagej.net/Trainable_Weka_Segmentation
[2]
http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:versatile_wand:start
________________________________________________________________
On 21/04/2017 17:58, fulano wrote:

> Hello!
>
> I'm new using Imagej. I want to measure the points in the surface of water
> waves with a video (it's a two dimensional fluid, the water has dye so I can
> observe only the surface), but my final video (after filtering and make
> binary) has a lot of noise under the surface, so i need a filter that takes
> every x coordinate and eliminate all the activated pixels in the y
> coordinate that are under the surface (I managed to completly eliminate the
> noise over the surface, so the maximun activated value of y its the
> corresponded to surface) for each frame.
>
> It's there an Imagej funtion that do that?  It's posible to program a macro
> for that?. I already made a filter in matlab but is increidbly slow, and i
> want to implementate others imagej filters after this.
>
> Sorry for my bad english, thanks in advance.
>
> In the image a semifiltered frame of the vids.
>
> <http://imagej.1557.x6.nabble.com/file/n5018585/dupi.png>

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