Manual size treshold in ImageJ macro -


i using macro measure proportion of images in directory specific color. allows manual adaptation of color treshold.

macro "soil cover batch [b]" {   run("clear results");   dir1 = getdirectory("choose source directory ");           // select directory   dir2  = file.getparent(dir1);   dirname1 = file.getname(dir1)   dirname = file.getname(dir2)   list = getfilelist(dir1);     run("clear results");   row = 0;    (i=0; i<list.length; i++) {      if (endswith(list[i], "live.jpg")){ showprogress(i, list.length);      open(dir1+list[i]);         // opens each image in directory open(dir1+list[i]);     print(list[i]);     setoption( "blackbackground", false);     img = getimageid();     run( "color threshold..." );       waitforuser( "set threshold , click ok." );     // interactive color treshold     selectimage(img);     run( "make binary" );        // turns binary     run( "measure" );            // measures total area selected     setresult("label", row, list[i]);      row = row +1;       close();     close();}   }  setoption("showrownumbers", false);   updateresults;   path = 'path/to/results';   saveas("results", path); close(); close(); } 

however of particles obtain using method either small or big , not correspond want measure.

is possible have interactive size threshold, see on image areas measured depending on threshold ? size threshold in 'analyze particles...' apparently not allow visualisation.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -