Page 1 of 1

Deskew in C++

Posted: 2013-12-13T06:14:59-07:00
by banuj
Hello,

In my project, I use Magick++ API for some operations(autocropping, BW images) on scanned images. Now, I want to support also auto-deskewing images using Magick++ API, but there is no deskew function in Image API. However, there is a MagickDeskewImage function in WAND API (http://www.imagemagick.org/api/magick-i ... eskewImage)

So, my question is how to support deskew function in C++.

Thank you,

Re: Deskew in C++

Posted: 2013-12-13T06:36:40-07:00
by dlemstra
deskew has been added to Magick++ in version 6.8.6-8. You should consider upgrading to the latest version, quite a lot of new methods have been added this year.

Re: Deskew in C++

Posted: 2013-12-15T10:04:07-07:00
by banuj
Thank you for your answer, and now my question is where I find the documentation for this version?
On the official documentation (http://www.imagemagick.org/Magick++/Image.html), there is no such deskew function.

LE: Actually, there is no documentation for this function in the HTML functions, but in Image.h, which is available in source files, there is a description of this function.

// Removes skew from the image. Skew is an artifact that occurs in scanned
// images because of the camera being misaligned, imperfections in the
// scanning or surface, or simply because the paper was not placed
// completely flat when scanned. The value of threshold_ ranges from 0
// to QuantumRange.
void deskew(const double threshold_);