欢迎来到天天文库
浏览记录
ID:29077696
大小:808.89 KB
页数:7页
时间:2018-12-16
《改变图像的对比度和亮度.docx》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、西安工业大学OpenCV实验报告学号:101001116姓名:王兵指导老师:刘建伟完成时间:2013/9/11改变图像的对比度和亮度一、实验目标:•访问像素值•用0初始化矩阵•学习saturatecast二、实验原理:对图片中每个像素点的值进行变换,其变换公式为: g(i,j)=contrast*f(i,j)+brightness. 其中g(i,j)为变换后第i行第j列像素点值,f(i,j)为变换前对应点的值。三、实验环境:Opencv:2.3.1版本MicrosoftVisualStudio2008(简称:vs2008)OS:WinXP位系统。四、实验步骤:1.新建
2、工程,命名为:addTwoImages.2.编写代码(参考附录中的源代码)3.选择SolutionExplorer里的opencvhello项目,点击鼠标右键,选Properties:在[链接器LINKER]的[输入INPUT]中,为项目的Debug配置增加[附加依赖项AdditionalDependencies]:opencv_calib3d231d.libopencv_contrib231d.libopencv_core231d.libopencv_features2d231d.libopencv_flann231d.libopencv_gpu231d.libopen
3、cv_highgui231d.lib;opencv_imgproc231d.libopencv_legacy231d.libopencv_ml231d.libopencv_objdetect231d.libopencv_ts231d.libopencv_video231d.lib1.单击,右键项目名称:按Rebuild。如果在控制台出现如下代码则程序正确,通过调试。1>------RebuildAllstarted:Project:twoImages,Configuration:DebugWin32------1>Deletingintermediateandoutput
4、filesforproject'twoImages',configuration'Debug
5、Win32'1>Compiling...1>stdafx.cpp1>Compiling...1>twoImages.cpp1>d:opcvopencvbuildmyinstallincludeopencv2flannlogger.h(66):warningC4996:'fopen':Thisfunctionorvariablemaybeunsafe.Considerusingfopen_sinstead.Todisabledeprecation,use_CRT_
6、SECURE_NO_WARNINGS.Seeonlinehelpfordetails.1>d:vs2008vcincludestdio.h(237):seedeclarationof'fopen'1>d:opcvopencvbuildmyinstallincludeopencv2flannflann.hpp(233):warningC4996:'cv::flann::Index_':wasdeclareddeprecated1>d:opcvopencvbuildmyinstallincludeopencv2flannfla
7、nn.hpp(278):seereferencetoclasstemplateinstantiation'cv::flann::Index_'beingcompiled1>Compilingmanifesttoresources...1>Microsoft(R)Windows(R)ResourceCompilerVersion6.0.5724.01>Copyright(C)MicrosoftCorporation.Allrightsreserved.1>Linking...1>LINK:D:vsprojecttwoImagesDebugtwoImages.e
8、xenotfoundornotbuiltbythelastincrementallink;performingfulllink1>Embeddingmanifest...1>Microsoft(R)Windows(R)ResourceCompilerVersion6.0.5724.01>Copyright(C)MicrosoftCorporation.Allrightsreserved.1>Buildlogwassavedat"file://d:vsprojecttwoImagestwoImagesDebugBuil
此文档下载收益归作者所有