Is there a way to detect if an image is blurry?

后端 未结 12 1913
予麋鹿
予麋鹿 2020-11-22 14:48

I was wondering if there is a way to determine if an image is blurry or not by analyzing the image data.

12条回答
  •  爱一瞬间的悲伤
    2020-11-22 15:11

    i implemented it use fft in matlab and check histogram of the fft compute mean and std but also fit function can be done

    fa =  abs(fftshift(fft(sharp_img)));
    fb = abs(fftshift(fft(blured_img)));
    
    f1=20*log10(0.001+fa);
    f2=20*log10(0.001+fb);
    
    figure,imagesc(f1);title('org')
    figure,imagesc(f2);title('blur')
    
    figure,hist(f1(:),100);title('org')
    figure,hist(f2(:),100);title('blur')
    
    mf1=mean(f1(:));
    mf2=mean(f2(:));
    
    mfd1=median(f1(:));
    mfd2=median(f2(:));
    
    sf1=std(f1(:));
    sf2=std(f2(:));
    

提交回复
热议问题