资源描述:
《数字图像处理实验报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、数字图像处理实验报告专业:计算机科学与技术学号:11101115姓名:王晓东otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch
2、,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersand实验一数字图像的读入与显示实验目的了解opencv的开发环境设置读取并显示一幅图像,掌握Imread,imwrite,imshow的使用掌握opencv中图像的表示及其属性的含
3、义实验内容配置visualstudio2010的opnecv开发环境使用opencv的函数读入一幅图像并显示出来实验步骤#include"stdafx.h"#includeusingnamespacecv;usingnamespacestd;voidtest1(){Matimage=imread("..\image\book\beach.jpg",0);cvNalinyuWindow("test");imshow("test",image);waitKey();}int_tmain(intargc,_TCHAR*ar
4、gv[]){Test1();return0;}实验心得本次实验让我了解了图像读入与显示的具体过程。otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryoft
5、helongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersand实验二数字图像像素的访问实验目的掌握opencv开发环境中对灰度图像及彩色图像中的像素的访问方法并理解mat数据结构掌握opencv中对图像进行处理的基本
6、过程实验内容:(1)打开一幅灰度图像,对其进行线性灰度变换(直线方程的参数为k,b),并显示变换前、后的图像。;调整K值,分别取>1,<1,=1,以及-1,比较不同K值时的图像增强效果。(2)打开一幅彩色图像,对每个像素进行访问,分别令R、G、B的值为0,查看处理后的图像,并比较原图像的差异。重点和难点:掌握灰度图像和彩色图像的像素的值的访问方法。实验步骤:#include"stdafx.h"#includeusingnamespacecv;usingnamespacestd;voidlinear_tran(ucharmi
7、n_org,ucharmax_org,ucharmin_new,ucharmax_new){Matimage=imread("..\image\book\beach.jpg",0);Matgray(image.size().height,image.size().width,CV_8UC1,Scalar(0));floatk=(float)(max_new-min_new)/(max_org-min_org);cout<<"k="<8、.ptr(