how to detect proto objects in a saliency map?
古いコメントを表示
In sum, given an image I(x), we have: A(f) = ℜ(fft(I(x))), P(f) = ℑ(fft(I(x))), L(f) = log (A(f)), R(f) = L(f) − h(f) ∗ L(f), S(x) = g(x) ∗ ifft(exp (R(f) + P(f)))^2 where fft and ifft denote the Fourier Transform and Inverse Fourier Transform, respectively. A(f), P(f), L(f), R(f) denotes the amplitude spectrum, phase spectrum, log spectrum and spectral residual of the image.
Given S(x) of an image, the object map O(x) is obtained: O(x) = 1 if S(x) > threshold, 0 otherwise. Empirically, we set threshold = E(S(x)) × 3, where E(S(x)) is the average intensity of the saliency map. The selection of threshold is a trade-off problem between false alarm and neglect of objects. Please help me with the matlab code for the above object map.
The code that i used to find saliency map is given below: %% Read image from file inImg = imread('img.jpg'); inImg = im2double(rgb2gray(inImg)); inImg = imresize(inImg, [64, 64], 'bilinear'); %% Spectral Residual myFFT = fft2(inImg); myLogAmplitude = log(abs(myFFT)); myPhase = angle(myFFT); mySmooth = imfilter(myLogAmplitude, fspecial('average', 3), 'replicate'); mySpectralResidual = myLogAmplitude - mySmooth; saliencyMap = abs(ifft2(exp(mySpectralResidual + i*myPhase))).^2; %% After Effect saliencyMap = imfilter(saliencyMap, fspecial('disk', 3)); saliencyMap = mat2gray(saliencyMap); imshow(saliencyMap, []);
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Category Classification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!