Deskew in C++

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
banuj
Posts: 2
Joined: 2013-12-13T06:01:35-07:00
Authentication code: 6789

Deskew in C++

Post 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,
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Deskew in C++

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
banuj
Posts: 2
Joined: 2013-12-13T06:01:35-07:00
Authentication code: 6789

Re: Deskew in C++

Post 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_);
Post Reply