LBitmap::PerspectiveDeskew

#include "ltwrappr.h"

virtual L_INT LBitmap::PerspectiveDeskew()

Detects and automatically deskews a 3D document image.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

For the best detection results, the document's boundaries should be inside the captured view and have a different background color than the background of the captured view.

This function can change the specified image. To keep the original image unchanged, use this function on a copy.

Use this function if there is depth (z-axis) deformation as well as deformation along the x- and y- axes. Use the LBitmap::Deskew to fix 2D orientation.

Unlike the LBitmap::Deskew, this function does not look at the content of the captured document.

If the function fails to correct the skew, the original image is not changed.

This function can only process entire images. It does not support regions.

This function supports 24 and 32-bit color images.

Required DLLs and Libraries

LTDIS
LTFIL
LTIMGCOR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

LBitmap::ManualPerspectiveDeskew, LBitmap::Deskew, LBitmap::AlignImages, LBitmap::Keystone, Class Members

Example

This example loads a bitmap and applies perspective deskew filter.

L_INT LBitmap__PerspectiveDeskewFilterBitmapExample(L_VOID) 
{ 
    L_INT nRet ; 
    LBitmap LeadBitmap ; 
 
    nRet = LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("PerspectiveDeskew.jpg")), 0,ORDER_BGR); 
    if(nRet !=SUCCESS) 
        return nRet; 
 
    /* Apply a perspective deskew filter*/ 
    nRet = LeadBitmap.PerspectiveDeskew(); 
 
    return nRet ; 
} 

Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help