摘要 |
本发明公开了一种校正手持设备拍摄的透视图像的方法,包括如下步骤:手持设备拍摄时,检测摄像头与水平方向的水平夹角 <img file="201310101765X100004dest_path_image002.GIF" wi="16" he="16" />;将手持设备拍摄得到的原始照片以第一边缘<img file="dest_path_image004.GIF" wi="24" he="16" />为转轴从第一平面旋转所述水平夹角<img file="69637dest_path_image002.GIF" wi="16" he="16" />到达第二平面,与第一边缘<img file="580253dest_path_image004.GIF" wi="24" he="16" />对应的第二边缘<img file="dest_path_image006.GIF" wi="24" he="16" />在第一平面的垂直投影为投影直线<img file="dest_path_image008.GIF" wi="8" he="16" />;计算放缩角<img file="dest_path_image010.GIF" wi="16" he="22" />的大小:<img file="dest_path_image012.GIF" wi="64" he="22" />,其中k为摄像头镜头视角畸变系数;在原始照片上确定放缩角<img file="969777dest_path_image010.GIF" wi="16" he="22" />的位置,放缩角<img file="99407dest_path_image010.GIF" wi="16" he="22" />的顶点在第一边缘<img file="648200dest_path_image004.GIF" wi="24" he="16" />的中垂线上,放缩角<img file="814871dest_path_image010.GIF" wi="16" he="22" />的两条边分别经过第二边缘<img file="816325dest_path_image006.GIF" wi="24" he="16" />的第一端点<img file="dest_path_image014.GIF" wi="16" he="16" />和第二端点<img file="dest_path_image016.GIF" wi="16" he="16" />,放缩角<img file="811963dest_path_image010.GIF" wi="16" he="22" />的两条边分别与投影直线<img file="825049dest_path_image008.GIF" wi="8" he="16" />相交于第三端点<img file="dest_path_image018.GIF" wi="20" he="22" />和第四端点<img file="dest_path_image020.GIF" wi="21" he="21" />;将原始照片收缩至四边形<img file="dest_path_image022.GIF" wi="54" he="22" />内形成新照片。 |