Re: 2nd: Stigmation plugin or filter

Posted by Gabriel Landini on
URL: http://imagej.273.s1.nabble.com/2nd-Stigmation-plugin-or-filter-tp5023104p5023105.html

On Friday, 27 March 2020 19:54:50 GMT you wrote:
> Meaning, I want to preferentially blur an image in the horizontal (X)
> direction.
> If that is possible, then I would also like to do that in the vertical (Y)
> direction.

Hi,
You could make a stack where each slice is filtered with an increasingly
larger 1D convolution filter.
For example:
//--------------------
setBatchMode(true);
run("Boats (356K)");
for (i=0;i<50;i++){
  run("Duplicate...", "title="+i);
  selectWindow(i);
 run("Convolve...", "text1=[ 0 0 1 0 0\n0 0 1 0 0\n0 0 1 0 0\n0 0 1 0 0\n0 0 1
0 0] normalize");
}
run("Images to Stack", "name=Stack title=[] use");
setBatchMode(false);
//--------------------

So the stack slider should act like a "blurring control".
And do the same for a horizontal blur:

//--------------------
setBatchMode(true);
run("Boats (356K)");
for (i=0;i<50;i++){
 run("Duplicate...", "title="+i);
 selectWindow(i);
run("Convolve...", "text1=[ 0 0 0 0 0\n0 0 0 0 0\n1 1 1 1 1\n0 0 0 0 0\n0 0 0
0 0] normalize");
}
run("Images to Stack", "name=Stack title=[] use");
setBatchMode(false);
//--------------------

Mind the line brakes that the mailer imposes.

Cheers

Gabriel

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