Login  Register

Re: Croping images with border equal to zero

Posted by Gabriel Landini on Jun 11, 2015; 3:32pm
URL: http://imagej.273.s1.nabble.com/TrakEM2-segmentation-with-polygon-ROI-not-working-Bug-tp5013118p5013125.html

On Thursday 11 Jun 2015 17:06:50 CARL Philippe wrote:
> I have some issues with selecting and cropping a part of my images.
> The pictures I have look like the following ones:
> run("Blobs (25K)");
> run("Canvas Size...", "width=276 height=274 position=Center zero");

Hi,
There is an auto crop plugin in Fiji.
Alternatively you could write a macro that just scans the image borders by
rows and columns, going towards the centre and stops when a row or column has
non-zero pixels. Then use those coordinates to define a rectangular region and
then use the Crop command.

Cheers

Gabriel

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