Login  Register

Re: Morphometric Batch Analysis using Fish Photos

Posted by Aryeh Weiss on Apr 10, 2019; 6:47am
URL: http://imagej.273.s1.nabble.com/Morphometric-Batch-Analysis-using-Fish-Photos-tp5022039p5022040.html

Here is a macro that finds the fish in your posted image.


selectWindow("2019.01.15-16.11.54-2.08.jpg");  // assumes your image is
open and so named
run("Split Channels");
close("2019.01.15-16.11.54-2.08.jpg (green)");
close("2019.01.15-16.11.54-2.08.jpg (blue)");
selectWindow("2019.01.15-16.11.54-2.08.jpg (red)");
makeRectangle(6, 244, 2028, 980);   // work on the black area only.
run("Crop");
run("3D Hysteresis Thresholding", "high=128 low=50 labelling");
setAutoThreshold("MaxEntropy dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Fill Holes");
run("Find Edges");   // now just show that it works
run("Merge Channels...", "c1=[HystLabel_2019.01.15-16.11.54-2.08.jpg
(red)] c4=[2019.01.15-16.11.54-2.08.jpg (red)] create keep");

Once you have that you should be able to make any morphological
measurements that you need.

The hysteresis thresholding is part of the mcib 3D-suite, and you
shouldbe able to get it by setting the appropriate update site in Fiji,
or manually from
http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_ij_suite:start

Hope this helps
--aryeh

On 10/04/2019 7:20, Lourdes Lastra Díaz wrote:

> Hi!
> I am very new to the software, using it to do a morphometric analysis of
> Fish photos. We collected a great amount of this type of photos, but image
> J or Fiji doesn't quite recognize any type of fish in a binary mode. I was
> looking to run a Macro, but I can't run a batch sequence to measure the
> length of the different types of fish we collected since the program
> doesn't quite recognize the surface or different types of scales and colors
> of the Fish. I have run many possibilities if there are any suggestions it
> will be very helpful.
>
> Lourdes Lastra
> [image: 2019.01.15-16.11.54-2.08.jpg][image: Screen Shot 2019-04-10 at
> 12.03.18 AM.png]
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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