The invention discloses an image focusing measurement realization method based on block PCA, which belongs to the field of information processing technology. Firstly, the image is preprocessed, then the processed image is divided into blocks and PCA calculation is carried out for each sub-image, and the eigenvalues corresponding to the principal component vectors of the corresponding sub-image are obtained. Then, the sharpness of the sub-image is constructed by the above eigenvalues. Finally, the variance of the set of all sub-image sharpness is obtained, and the variance is used as the focus measure of the whole image. The method adopts image partitioning and PCA to extract image detail information, which has the advantages of simple principle and low computational complexity. At the same time, through the implementation of the above steps, the interference of noise to image detail information is reduced, especially under the condition of low contrast imaging, the noise robustness is strong. This method is suitable for the passive imaging system of the camera and has high popularization and application value.
【技术实现步骤摘要】
一种基于分块PCA的图像聚焦测度实现方法
本专利技术属于信息处理
,具体涉及一种基于分块PCA的图像聚焦测度实现方法。
技术介绍
日常生活中的拍照设备,例如单反相机、具有照相功能的手机以及路口的监控抓拍系统等都可以获得清晰的图像。然而清晰图像的获取是依赖于拍照设备的自动聚焦性能实现的。目前,市场上的拍照设备主要采用被动成像的自动聚焦技术。其核心是设计一个用于评价图像清晰度的聚焦测度,通过聚焦测度来选择最清晰的图像并保存。因此,一个性能优良的聚焦测度实现方法直接影响到所拍摄图像的质量。目前使用较为广泛的图像聚焦测度方法是基于图像细节信息来构建的,例如基于图像边缘提取的聚焦测度。典型的方法有图像一阶高斯导数方法、二阶导数方法、一阶偏导数方法、梯度求和方法以及拉普拉斯求和方法等。此类方法的本质是构造一个尺寸为3×3或者5×5卷积模板,用该模板与整幅图像进行卷积运算。卷积运算的结果是提取出图像的边缘信息,然后采用取绝对值或者平方求和的形式来构造整幅图像的聚焦测度。此类构造聚焦测度的方法存在如下两个主要缺点。首先是卷积运算复杂度高,需要对整幅图像的所有像素点进行遍历操 ...
【技术保护点】
1.一种基于分块PCA的图像聚焦测度实现方法,其特征在于:具体步骤如下:步骤S1:将原始图像像素的行数和列数均调整为2
【技术特征摘要】
1.一种基于分块PCA的图像聚焦测度实现方法,其特征在于:具体步骤如下:步骤S1:将原始图像像素的行数和列数均调整为2n的整数倍,其中n为正整数,得到图像f(x,y),图像f(x,y)的行数和列数分别用M和N表示;步骤S2:对图像f(x,y)进行分块处理,得到大小为2n×2n像素的子图像Si(x,y),其中i=1,2,...,M×N/22n;子图像Si(x,y)的变量取值为:x=0,1,...,2n-1,y=0,1,...,2n-1;步骤S3:计算每一幅子图像Si(x,y)的PCA,得到相应子图像的主成分分析,记主成分向量对应的特征值为λ=[λ1,λ2,…,λk],其中k=2n;步骤S4:对于每一幅子图像,由特征值来构造子图像的清晰度并标记为Fi;步骤S5:将所有子图像清晰度Fi所构成的集合记为{Fi|i=1,2,....
【专利技术属性】
技术研发人员:刘恋,郭立强,吴自万,
申请(专利权)人:淮阴师范学院,
类型:发明
国别省市:江苏,32
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。