how to detect blurred images in a dataset.

I have one thousand frames converted from a video taken from a particular location using gopro camera. From that dataset, I need to detect the blurred images and segregate that alone, how to do that???

 Accepted Answer

Perhaps you can take the fft of the image and check if the energy in the higher frequencies is not very high.

5 Comments

I'm Getting the fft like this, how to check the frequency level.
the code i used is this,
clear all;
close all;
clc
I=imread('E:\ak\6.jpg');
figure (1); imshow(I); title('Input Image');
I=rgb2gray(I);
figure (2); imshow(I); title('gray Image');
F=fft2(I);
s=abs(F);
figure (3); imshow(s,[]); title('FFT of Image');
Fsh=fftshift(F);
figure (4); imshow(abs(Fsh),[]); title('centered fft');
s2=log(1+abs(Fsh));
figure (5); imshow(s2,[]); title('log transformed Image');
% F=ifftshift(Fsh);
% f=ifft2(F);
% figure (6); imshow(f,[]); title('reconstruted Image');
Just sum up the energy outside some box or circle like I said. Something like
[rows, columns] = size(s2)
mask = true(rows, columns);
row1 = round(0.4*rows)
row2 = round(0.6*rows)
col1 = round(0.4*columns)
col2 = round(0.6*columns)
mask(row1:row2, col1:col2) = false; % Make a hole in the middle of the mask image so we won't count that area.
sumOfEnergy = sum(s2(mask))
Vimal Raj
Vimal Raj on 1 Jul 2022
Edited: Vimal Raj on 4 Jul 2022
Thank you sir, but could you please share some reference material or can you describe elaborately with code.
Just do a web search on "Fourier filtering image" and I'm sure you'll find lots of stuff to look at.
Ok sir, thank you.

Sign in to comment.

More Answers (0)

Asked:

on 29 Jun 2022

Edited:

on 4 Jul 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!