#include "Ltimgcor.h"
L_LTIMGCOR_API L_INT L_UnWarp(pInputBitmap, pOutputBitmap, pPoints, uFlags)
pBITMAPHANDLE pInputBitmap; |
pointer to a bitmap handle |
pBITMAPHANDLE pOutputBitmap; |
pointer of a pointer to a bitmap handle |
L_POINT pPoints; |
pointer to an array of structures |
L_UINT uFlags; |
flags |
Removes the distortion in an image of a cylindrical object, as if removing a label from off of the cylinder and flattening it out.
Parameter |
Description |
pInputBitmap |
Pointer to the input bitmap handle |
pOutputBitmap |
Pointer of a pointer to the output bitmap handle |
pPoints |
Pointer to an array of L_POINT structures that represents the locations of the input points on the distorted image |
uFlags |
Reserved for future use |
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Typically, this function is used in preprocessing images from digital cameras. This function requires an array of 8 points. An Invalid Parameters Exception will be thrown if no array of 8 points is passed. The following image shows the use of this function to flatten a label from a pill bottle. The numbers on the label represent the points in the array. The four corners (1, 2, 3, and 4) are fixed points. The interior points on the label (5, 6, 7, and 8) are the ones that are moved to flatten the image.
Use the L_UnWarp function if the image contains a distortion of a cylindrical object. Use the L_ManualPerspectiveDeskew, L_PerspectiveDeskew, or L_Keystone function if there is a planar deformation along all three axes. Use the L_DeskewBitmap function if there is deformation along both the x- and y- axes.
This function supports 24- and 36-bit color images, 8-bit grayscale images, and 1-bit binarized images.
This function supports signed/unsigned images.
Required DLLs and Libraries
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. |
Win32, x64, Linux.
Functions: | L_PerspectiveDeskew, L_Keystone, L_ManualPerspectiveDeskew |
Topics: | Raster Image Functions: Doing Geometric Transformations |
Processing an Image |
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET