> On Wed, 16 Feb 2011 13:29:35 -0800
> magick-users-boun...@imagemagick.org wrote:
> | Hello All,
> | 
> | I've written many manipulation algorithms for our software using IM for
> | things like scaling, enhancing, binarizing, and rotation, all based on
> | pre-set thresholds.  Works great, thanks for all the work in IM!
> | 
> | But, now I'm at a point where I need to rotate a binarized image to be
> | square, without having any kind of pre-set thresholds.
> | 
> | Is there anything like this, an auto-rotation mechanism within IM???
> | 
> | If not, can anybody point me in the direction of C++ code that might come
> | close to what I need to do?
> | 
> 
> 
> 
> Do you mean something like a 'deskew'?  That is 'straighten crooked
> rectangles'
> 
> There is an option of -deskew  and Fred Weinhaus has a script that also
> provides other deskew methods in "unrotate" script
>    http://www.fmwconcepts.com/imagemagick/unrotate/

I should have done a much better job describing what I need to do.  In
developing computer vision algorithms I'm using IM++ for rotation and
enhancements (dilation, erosion, etc.).  Until now, all the algorithms have
had preset thresholds for rotation.  In other words, I already know exactly
how much rotation is on the image I need to look at and can give IM a preset
static value for rotating that image back to be square, right side up.

In this particular case, we're dealing with an image of a label.  This is a
2D barcode label with a human-readable serial number at the bottom.  These
labels are hand-placed and thus, the rotation and exact location is
different on each label.

My edge finding algo is doing an alright (but not perfect) job of finding
the edges of the window for the area of interest, but, I still do not know
how much this area is rotated nor do I know how much I need to rotate the
image to get it to be right-side up, sqaure.

I'm hoping to find something along these lines in IM++, as opposed to coding
my own from scratch.  If there was good edge finding, that would be good
too; but, to be able to take a 2D barcode and rotate it back square is what
I'm really after.

And, as a side note, I don't really care if it's right-side up or not
(although that's nice) because my barcode decode algo will read it at any
%90 orientation.

Thanks,

-brian

_______________________________________________
Magick-users mailing list
Magick-users@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to