L_ManualPerspectiveDeskew

# include“ltimgcor.h”

L_LTIMGCOR_APIL_INTL_ManualPerspectiveDeskew (pBitmap InPoints ppOutBitmap)

纠正了视图的角度。

参数

pBITMAPHANDLEpBitmap

位图句柄指针引用被转换的位图。

pMANUALPERSPECTIVEDESKEWPOINTSInPoints

指针ManualPerspectiveDeskewPoints结构,包含一个点,将列表转换为匹配映射点的位置列表

pBITMAPHANDLE* ppOutBitmap

指针的指针包含抗扭斜位图处理图像。

返回

价值 意义
成功 函数是成功的。
< 1 一个错误发生。指返回代码

评论

L_ManualPerspectiveDeskew可以改变指定的图像。保持原始图像不变,使用这个函数在一个副本。

一般来说,这个函数是用来从数码相机图像预处理时迈出的一步。它改变了图像基于视图的角度方程,考虑对象的深度以及它们的相对尺寸。

最好是选择输入点远离对方。

使用L_ManualPerspectiveDeskew,L_Keystone,或L_PerspectiveDeskew如果有一个函数平面变形沿三个轴。使用L_UnWarp如果有一个圆柱形的变形函数。使用L_DeskewBitmap函数是否存在变形在x - y轴。

这个函数只能处理整个图像。它不支持区域。

这个函数支持24 - 36位彩色图像和8 - 16位灰度图像。

该命令支持签署/无符号图像。

必需的dll和库

平台

Win32 x64, Linux。

另请参阅

功能

主题

例子

这个示例加载位图和应用手册角度抗扭斜过滤器。

L_INT ManualPerspectiveDeskewFilterBitmapExample (L_VOID){L_INT nRet;BITMAPHANDLE LeadBitmap;/ *加载位图句柄保存图像。* // *加载位图,保持文件的比特每像素* /nRet = L_LoadBitmap (MAKE_IMAGE_PATH(文本(“cannon.jpg”&LeadBitmap)),运算符(BITMAPHANDLE), 0 ORDER_BGR空,空);如果(nRet ! =成功)返回nRet;int宽度= LeadBitmap。宽度;int身高= LeadBitmap。高度;/ *手动角度抗扭斜过滤器适用于向下移动图像的右上角一半高度* /MANUALPERSPECTIVEDESKEWPOINTS manual3ddeskewpoints;manual3ddeskewpoints.InputPoints [0]。x = 0;manual3ddeskewpoints.InputPoints [0]。y = 0;manual3ddeskewpoints.InputPoints [1]。x =宽度;manual3ddeskewpoints.InputPoints [1]。y = 0;manual3ddeskewpoints.InputPoints [2]。x = 0;manual3ddeskewpoints.InputPoints [2]。y =高为1;manual3ddeskewpoints.InputPoints [3]。x =宽度;manual3ddeskewpoints.InputPoints [3]。y =高为1;manual3ddeskewpoints.MappingPoints [0]。x = 0;manual3ddeskewpoints.MappingPoints [0]。y = 0;manual3ddeskewpoints.MappingPoints [1]。x =宽度;manual3ddeskewpoints.MappingPoints [1]。y =身高/ 2;manual3ddeskewpoints.MappingPoints [2]。x = 0;manual3ddeskewpoints.MappingPoints [2]。y =高为1;manual3ddeskewpoints.MappingPoints [3]。x =宽度;manual3ddeskewpoints.MappingPoints [3]。y =高为1;pBITMAPHANDLE pOutBitmap =零;nRet = L_ManualPerspectiveDeskew (&LeadBitmap &manual3ddeskewpoints &pOutBitmap);如果(nRet ! =成功){/ /免费的位图如果(LeadBitmap.Flags.Allocated)L_FreeBitmap (&LeadBitmap);返回nRet;}nRet = L_SaveBitmap (MAKE_IMAGE_PATH(文本(“Result.BMP”))、pOutBitmap FILE_BMP, 24岁,0,NULL);L_FreeManualPerspectiveDeskewBitmap (pOutBitmap);/ /免费的位图如果(LeadBitmap.Flags.Allocated)L_FreeBitmap (&LeadBitmap);返回nRet;}

LEADTOOLS光栅成像C API的帮助
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。