Research Article

Restoration of Partial Blurred Image Based on Blur Detection and Classification

Algorithm 2

Blur classification algorithm.
Input: sample images (), blurred image
Output: blur class of
Step Feature Extraction
;   % Gradient feature extraction
 FT = (1 + fftshift(abs(Fourier()))); % Fourier transformation
= Radon(FT);  % Radon transformation feature
edge = Canny(FT);    % Compute the edge of FT
= Houghline(edge);  % Extract the line feature
= Houghcirle(edge):  % Extract the circle feature
 Feature normalization;
Step SVM Traning
 SVM1 = Svmtrain(, ); % SVM1 Training
 SVM2 = Svmtrain(, );    % SVM2 Training
Step Classification
 Feature Extraction of y as Step ;
defocus = SVM1(, ); % SVM1 prediction
  If defocus = 1
   c = defocus;
   exit;
  Else
   motion = SVM2(, ); % SVM2 prediction
   If motion = 1
    c = motion;
   exit;
   Else
    c = blend;
   exit;
   End If
  End If