Click here to Skip to main content
15,897,518 members
Articles / Desktop Programming / MFC

Detect image skew angle and deskew image

,
Rate me:
Please Sign up or sign in to vote.
4.95/5 (41 votes)
13 Feb 2013CPOL8 min read 233.3K   17K   137  
Deskew an image by converting it to grayscale + edges and rotating by the detected skew angle.
#pragma once

#ifdef SKEWMANAGER_DLL
#define SKEWMANAGER_API __declspec(dllexport)
#else
#define SKEWMANAGER_API __declspec(dllimport)
#endif

extern "C" SKEWMANAGER_API BOOL SkewManOpenFile(LPCTSTR pszFileName);

extern "C" SKEWMANAGER_API double SkewManGetImageSkewAngle();

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead Kotha Technologies
Bangladesh Bangladesh
If you are not in - you are out !
- Chapter 1

Written By
Network Administrator
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions