Bytes -------------------------------------------------------------------------------------------------------------------------------
[ImageAlgorithm] Image features: Feature Extraction Methods for three significant regions of the image
Skyseraph Aug 11st 2011 hqu
Email:Zgzhaobo@gmail.comQQ: 452728574
Latest modified Date: Aug 11st 2011 hqu
Bytes -------------------------------------------------------------------------------------------------------------------------------
Method 1:
Principle: Frequency-tuned salient region detection. cvpr.2009
Definition:
Brief Introduction:
Step 3: Filter + color space conversion + calculate saliencymap (see source code)
Effect:
Attempt to be tested (later)
Result 1: (original author)CodeTest results)
Result 2: (I used opencv to rewrite the code)
Result 3: (my improvement test (different space options ))
Source code (MatLab ):
% Inputs % read image and blur it with a 3x3 or 5x5 Gaussian filter % incluimg = imread('input_image.jpg '); % provide input image pathgfrgb = imfilter (IMG, fspecial ('gaussian ', 3, 3), 'canonical', 'conv'); % signature % perform sRGB to cie lab color space conversion (using D65) % export cform = makecform ('srgb2lab ', 'whitepoint', whitepoint ('d65'); lab = applycform (gfrgb, cform ); % tags % compute lab average values (note that in the paper this % average is found from the unblurred original image, but % the results are quite similar) % ----------------------------------------------------- L = double (Lab (:,:, 1); Lm = mean (l); a = double (Lab (:,:, 2 )); AM = mean (a); B = double (Lab (:,:, 3); Bm = mean (B )); % ----------------------------------------------------------- % finally compute the saliency map and display it. % ----------------------------------------------------------- Sm = (L-lm ). ^ 2 + (A-Am ). ^ 2 + (B-BM ). ^ 2; imshow (SM, []); % --------------------------------------------------------
Bytes ------------------------------------------------------------------------------------------------------------------------------
Method 2:
Principle:
Y. Zhai and M. Shah. Visual Attention detection in video sequences using spatiotemporal cues. In ACM multimedia, pages 815-824. ACM, 2006.
Definition:
Effect:
Bytes ------------------------------------------------------------------------------------------------------------------------------
method 3:
principle: http://www.klab.caltech.edu /~ Xhou/projects/spectralresidual/spectralresidual.html
Source code (MatLab ):
Clearclc % read image from file inimg = im2double(rgb2gray(imread('yourimage.jpg '); inimg = imresize (inimg, 64/size (inimg, 2 )); % spectral residualmyfft = fft2 (inimg); mylogamplitude = Log (ABS (myfft); myphase = angle (myfft); myspectralresidual = mylogamplitude-imfilter (mylogamplitude, fspecial ('average', 3), 'replicate'); saliencymap = ABS (ifft2 (exp (myspectralresidual + I * myphase ))). ^ 2; % after using tsaliencymap = mat2gray (imfilter (saliencymap, fspecial ('gaussian ', [10, 10], 2.5); imshow (saliencymap );
Effect:
Bytes ------------------------------------------------------------------------------------------------------------------------------
Author:Skyseraph
Email/Gtalk:Zgzhaobo@gmail.comQQ: 452728574
From:Http://www.cnblogs.com/skyseraph/
The copyright of this article is shared by the author and the blog. You are welcome to repost this article, but you must keep this statement without the author's consent andArticleThe original text connection is clearly displayed on the page. Otherwise, the legal liability is retained.
Bytes -----------------------------------------------------------------------------------------------------------------------------