- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
几何变换配套课件数字图像处理—编程框架、理论分析、实例应用和源码实现数字图像处理1几何变换几何变换,就是一个像素的值保持不变,但它的位置发生改变,并且这种改变符合一定的几何数学特性。不同的几何数学特性,就决定了几何变换的类型,例如简单的几何变换包括平移、旋转、镜像、转置、缩放和切变,而复杂的几何变换包括仿射变换、投影变换和非刚体变换。数字图像处理2向前/向后映射数字图像处理3简单几何变换数字图像处理4平移旋转镜像转置切变缩放平移数字图像处理5xy0s(x,y)t(x,y)(xs,ys)(xt,yt)dxdy平移向前映射向后映射数字图像处理6数字图像处理7CTMatrixRGB_TRIPLECImageProcessing::Image_translation(constCTMatrixRGB_TRIPLEcolor_image,longdelta_x,longdelta_y){ longimage_height=color_image.Get_height(); longimage_width=color_image.Get_width(); longnew_height=image_height+abs(delta_y); longnew_width=image_width+abs(delta_x); CTMatrixRGB_TRIPLEtranslated_image(new_height,new_width); for(introw=0;rownew_height;row++) for(intcolumn=0;columnnew_width;column++) { introw_mapped=row; if(delta_y0) { row_mapped=row-delta_y; } intcolumn_mapped=column; if(delta_x0) { column_mapped=column-delta_x; } if(color_image.Is_point_valid(CImagePoint(row_mapped,column_mapped))) { translated_image[row][column]=color_image[row_mapped][column_mapped]; } else { translated_image[row][column]=RGB_TRIPLE(128,128,128); } } returntranslated_image;}平移数字图像处理8voidCDigitalImageProcessingDoc::OnGeometrytransformImagetranslation(){ //TODO:Addyourcommandhandlercodehere if(m_image.IsColorImage()) { longdelta_x=60; longdelta_y=30; CTMatrixRGB_TRIPLEtranslated_image=CImageProcessing::Image_translation(m_image.Get_color_image(),delta_x,delta_y); m_image.ImportFrom(translated_image); UpdateAllViews(NULL); }}平移数字图像处理9旋转向前映射向后映射数字图像处理10旋转数字图像处理11xy0s(x,y)t(x,y)(xs,ys)(xt,yt)旋转数字图像处理12镜像数字图像处理13镜像向前映射向后映射数字图像处理14数字图像处理15CTMatrixRGB_TRIPLECImageProcessing::Image_mirror(constCTMatrixRGB_TRIPLEcolor_image,boolis_horizontal){ longimage_height=color_image.Get_height(); longimage_width=color_image.Get_width(); CTMatrixRGB_TRIPLEdest_image(image_height,image_width); for(longrow=0;rowimage_height;row++) for(longcolumn=0;columnimage_width;column++) { longsource_row=row; longsource_column=column; if(is_horizontal==true) source_col
文档评论(0)