Trim White Space and Unrotate?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Trim White Space and Unrotate?

KwkDenver
Hello There,

I am new to the forum and forgive me if this is a repeat/common knowledge question, but I am searching for a plugin that will do either of the following;

Unrotate - Take a skewed image and straighten it out again. Basically line up based on shapes or as compared to an existing (base) image.

Trim White Space - A plugin that will look for rows and columns that do not contain marks and remove them until it hits a mark, color, or object.

Any help this forum can provide is greatly appreciated.

- Kyle
Reply | Threaded
Open this post in threaded view
|

Re: Trim White Space and Unrotate?

EHB2010
hi Kyle,

I'm afraid I don't have an extensive knowledge of all the plugins available so can't say if it already exists. I however have some experience of dealing with ROIs. I think you could solve this problem yourself quite simply by writing a plugin. I would approach it by drawing a line on the image and then turning the image so that is it vertical or whatever angle you wanted: for instance you could draw a line along the side of a rectangle and then the picture could be turned so that line is vertical. Or to compare one image to another you could draw a line on the first and then a line on the second and rotate the images so the lines have the same axis.

To get rid of white areas I would just calculate the margins by checking how many columns or rows at each edge are all completely white and then copy the image, excluding the white margins to a new image.

The methods provided in the ImageJ API would make that approach reasonably simple. There may of course be cleverer ways to go about it.

BW