
以下文章来源于微信公众号:天眼观视界
编辑:小白学视觉
链接:https://mp.weixin.qq.com/s/ZKb5xdb6FR8YuwLjH3wW7w
本文仅用于学术分享,如有侵权,请联系后台作删文处理

图像清晰度是衡量图像质量的一个重要指标,对于相机来说,其一般工作在无参考图像的模式下,所以在拍照时需要进行对焦的控制。对焦不准确,图像就会变得比较模糊不清晰。相机对焦时通过一些清晰度评判指标,控制镜头与CCD的距离,使图像成像清晰。一般对焦时有一个调整的过程,图像从模糊到清晰,再到模糊,确定清晰度峰值,再最终到达最清晰的位置。
//方差法
region_to_mean(ImageReduced, Image, ImageMean)
convert_image_type(ImageMean, ImageMean, 'real')
convert_image_type(Image, Image, 'real')
sub_image(Image, ImageMean, ImageSub, 1, 0)
mult_image(ImageSub, ImageSub, ImageResult, 1, 0)
intensity(ImageResult, ImageResult, Value, Deviation)
//拉普拉斯梯度函数
laplace(Image, ImageLaplace4, 'signed', 3, 'n_4')
laplace(Image, ImageLaplace8, 'signed', 3, 'n_8')
add_image(ImageLaplace4, ImageLaplace4, ImageResult1, 1, 0)
add_image(ImageLaplace4, ImageResult1, ImageResult1, 1, 0)
add_image(ImageLaplace8, ImageResult1, ImageResult1, 1, 0)
mult_image(ImageResult1, ImageResult1, ImageResult, 1, 0)
intensity(ImageResult, ImageResult, Value, Deviation)
//能量梯度函数
crop_part(Image, ImagePart00, 0, 0, Width-1, Height-1)
crop_part(Image, ImagePart01, 0, 1, Width-1, Height-1)
crop_part(Image, ImagePart10, 1, 0, Width-1, Height-1)
convert_image_type(ImagePart00, ImagePart00, 'real')
convert_image_type(ImagePart10, ImagePart10, 'real')
convert_image_type(ImagePart01, ImagePart01, 'real')
sub_image(ImagePart10, ImagePart00, ImageSub1, 1, 0)
mult_image(ImageSub1, ImageSub1, ImageResult1, 1, 0)
sub_image(ImagePart01, ImagePart00, ImageSub2, 1, 0)
mult_image(ImageSub2, ImageSub2, ImageResult2, 1, 0)
add_image(ImageResult1, ImageResult2, ImageResult, 1, 0)
intensity(ImageResult, ImageResult, Value, Deviation)
//Brenner梯度法
crop_part(Image, ImagePart00, 0, 0, Width, Height-2)
convert_image_type(ImagePart00, ImagePart00, 'real')
crop_part(Image, ImagePart20, 2, 0, Width, Height-2)
convert_image_type(ImagePart20, ImagePart20, 'real')
sub_image(ImagePart20, ImagePart00, ImageSub, 1, 0)
mult_image(ImageSub, ImageSub, ImageResult, 1, 0)
intensity(ImageResult, ImageResult, Value, Deviation)
//Tenegrad梯度法
sobel_amp(Image, EdgeAmplitude, 'sum_sqrt', 3)
min_max_gray(EdgeAmplitude, EdgeAmplitude, 0, Min, Max, Range)
threshold(EdgeAmplitude, Region1, 20, 255)
region_to_bin(Region1, BinImage, 1, 0, Width, Height)
mult_image(EdgeAmplitude, BinImage, ImageResult4, 1, 0)
mult_image(ImageResult4, ImageResult4, ImageResult, 1, 0)
intensity(ImageResult, ImageResult, Value, Deviation)
推荐阅读

AIHIA | AI人才创新发展联盟2023年盟友招募

AIHIA | AI人才创新发展联盟2023年盟友招募

AI融资 | 智能物联网公司阿加犀获得高通5000W融资

AI融资 | 智能物联网公司阿加犀获得高通5000W融资

Yolov5应用 | 家庭安防告警系统全流程及代码讲解

江大白 | 这些年从0转行AI行业的一些感悟

Yolov5应用 | 家庭安防告警系统全流程及代码讲解

江大白 | 这些年从0转行AI行业的一些感悟

《AI未来星球》陪伴你在AI行业成长的社群,各项福利重磅开放:
(1)198元《31节课入门人工智能》视频课程;
(2)大白花费近万元购买的各类数据集;
(3)每月自习活动,每月17日星球会员日,各类奖品送不停;
(4)加入《AI未来星球》内部微信群;
还有各类直播时分享的文件、研究报告,一起扫码加入吧!

大家一起加油!
内容中包含的图片若涉及版权问题,请及时与我们联系删除
评论
沙发等你来抢