"Image Algorithm" image features: three methods of extracting salient regional features of images

Source: Internet
Author: User

"Image Algorithm" image features: three methods of extracting salient regional features of images

Skyseraph 11st Hqu

Email:[email protected] qq:452728574

Latest Modified Date:aug 11st hqu

--------------------------------------------------------------------------------------------------------------- ----------------

"The first method:

principle : frequency-tuned Salient Region detection.cvpr.2009

Defined:

Brief description :

Three steps, filter + color space conversion + calculation Saliencymap (see source)

effect :

Test Diagram (rear)

Result 1: (Original author code test result)

Result 2: (I test the result with OpenCV rewrite code)

Result 3: (My improvement test (different spatial selection))

source code (MATLAB):

123456789101112131415161718192021222324 %---------------------------------------------------------% Read image and blur it with a 3x3 or 5x5 Gaussian filter%---------------------------------------------------------img = imread(‘input_image.jpg‘);%Provide input image pathgfrgb = imfilter(img, fspecial(‘gaussian‘, 3, 3), ‘symmetric‘‘conv‘);%---------------------------------------------------------% Perform sRGB to CIE Lab color space conversion (usingD65)%---------------------------------------------------------cform = makecform(‘srgb2lab‘‘whitepoint‘, whitepoint(‘d65‘));lab = applycform(gfrgb,cform);%---------------------------------------------------------% 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(mean(l));a = double(lab(:,:,2)); am = mean(mean(a));b = double(lab(:,:,3)); bm = mean(mean(b));%---------------------------------------------------------% Finally compute the saliency map and display it.%---------------------------------------------------------sm = (l-lm).^2 + (a-am).^2 + (b-bm).^2;imshow(sm,[]);%--------------------------------------------------------

--------------------------------------------------------------------------------------------------------------- ---------------

"The second method:

Principle:

Y. Zhai and M. Shah. Visual attention detection in video sequences using spatiotemporal cues. In ACM multimedia, pages 815–824. acm,2006.

Defined:

Effect:

--------------------------------------------------------------------------------------------------------------- ---------------

"The third method:

Principle: http://www.klab.caltech.edu/~xhou/projects/spectralResidual/spectralresidual.html

source code (MATLAB):

1234567891011121314151617 clearclc %% Read image from fileinImg = 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 EffectsaliencyMap = mat2gray(imfilter(saliencyMap, fspecial(‘gaussian‘, [10, 10], 2.5)));imshow(saliencyMap);

Effect:

--------------------------------------------------------------------------------------------------------------- ---------------

Author:skyseraph

Email/gtalk: [email protected] qq:452728574

from:http://www.cnblogs.com/skyseraph/

This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.

"Image Algorithm" image features: three methods of extracting salient regional features of images

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.