C++实验:灰度直方图含实验报告

上传者: 56870342 | 上传时间: 2023-12-07 21:46:24 | 文件大小: 138.47MB | 文件类型: ZIP
适用于吉林大学信息工程专业。本资源不含OpenCV,OpenCV只用来转灰度图(可以删掉相关代码)其余画直方图是自己写的函数。 实验任务 统计灰度图像的直方图 (1)以二进制方式读取一幅 bmp、jpeg 或 png 格式图像的数据,并判断其是否为灰度图像,如果不 是,则将其转换为灰度图像数据。 (2)提示输入一个灰度值区间数(在 1~256 之间的整数)。然后遍历整幅图像,根据区间数,统计每个区间内灰度值的总个数,并将所有统计结果归一化后乘以 100。 (3)画出图像的直方图:用行表示灰度值所在区间,在列上用“*”表示直方图数据,“*”的个数即为 对应区间内的像素值统计结果,数据为 0 的不显示。 完成情况:对查找得到的代码进行研读理解并小幅度修改。 2. 基本思路 (1)创建图片文件,读取文件信息 (2)读取 RGB 图像素并转换为灰度值 (3)输入区间并绘制直方图

文件下载

资源详情

[{"title":"( 39 个子文件 138.47MB ) C++实验:灰度直方图含实验报告","children":[{"title":"灰度直方图","children":[{"title":".vs","children":[{"title":"灰度直方图","children":[{"title":"v16","children":[{"title":"Browse.VC.db <span style='color:#111;'> 47.02MB </span>","children":null,"spread":false},{"title":".suo <span style='color:#111;'> 44.50KB </span>","children":null,"spread":false},{"title":"ipch","children":[{"title":"AutoPCH","children":[{"title":"eacf8b1453ddec03","children":[{"title":"源.ipch <span style='color:#111;'> 145.81MB </span>","children":null,"spread":false}],"spread":true},{"title":"ba274a077b35c926","children":[{"title":"MAIN.ipch <span style='color:#111;'> 145.81MB </span>","children":null,"spread":false}],"spread":true},{"title":"36a26d4362e8d8ee","children":[{"title":"BMP.ipch <span style='color:#111;'> 145.75MB </span>","children":null,"spread":false}],"spread":true},{"title":"d741ea2fa4bcf124","children":[{"title":"BMP.ipch <span style='color:#111;'> 145.75MB </span>","children":null,"spread":false}],"spread":true},{"title":"c863764cfba11dc8","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"灰度直方图.sln <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false},{"title":"灰度直方图","children":[{"title":"bmp.cpp <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"gray.bmp <span style='color:#111;'> 356.19KB </span>","children":null,"spread":false},{"title":"灰度直方图.vcxproj.user <span style='color:#111;'> 168B </span>","children":null,"spread":false},{"title":"x64","children":[{"title":"Debug","children":[{"title":"灰度直方图.log <span style='color:#111;'> 768B </span>","children":null,"spread":false},{"title":"vc142.pdb <span style='color:#111;'> 1.96MB </span>","children":null,"spread":false},{"title":"bmp.obj <span style='color:#111;'> 636.04KB </span>","children":null,"spread":false},{"title":"main.obj <span style='color:#111;'> 355.33KB </span>","children":null,"spread":false},{"title":"灰度直方图.tlog","children":[{"title":"CL.write.1.tlog <span style='color:#111;'> 978B </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 128.69KB </span>","children":null,"spread":false},{"title":"灰度直方图.lastbuildstate <span style='color:#111;'> 176B </span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'> 3.60KB </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 612B </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 4.29KB </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 3.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"灰度直方图.ilk <span style='color:#111;'> 1.32MB </span>","children":null,"spread":false},{"title":"源.obj <span style='color:#111;'> 355.33KB </span>","children":null,"spread":false},{"title":"灰度直方图.exe.recipe <span style='color:#111;'> 319B </span>","children":null,"spread":false},{"title":"vc142.idb <span style='color:#111;'> 1011.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"main.cpp <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"polarlight.bmp <span style='color:#111;'> 1.04MB </span>","children":null,"spread":false},{"title":"bmp.h <span style='color:#111;'> 342B </span>","children":null,"spread":false},{"title":"灰度直方图.vcxproj.filters <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"灰度直方图.log <span style='color:#111;'> 438B </span>","children":null,"spread":false},{"title":"vc142.pdb <span style='color:#111;'> 229.50KB </span>","children":null,"spread":false},{"title":"灰度直方图.tlog","children":[{"title":"unsuccessfulbuild <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"灰度直方图.lastbuildstate <span style='color:#111;'> 198B </span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false}],"spread":false},{"title":"vc142.idb <span style='color:#111;'> 40.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"灰度直方图.vcxproj <span style='color:#111;'> 7.19KB </span>","children":null,"spread":false}],"spread":true},{"title":"灰度直方图实验报告.docx <span style='color:#111;'> 18.01KB </span>","children":null,"spread":false},{"title":"x64","children":[{"title":"Debug","children":[{"title":"灰度直方图.pdb <span style='color:#111;'> 3.36MB </span>","children":null,"spread":false},{"title":"灰度直方图.exe <span style='color:#111;'> 170.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Debug","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明