필터 지우기
필터 지우기

how to find object map from saliency map of an image?????

조회 수: 3 (최근 30일)
Sansri Basu
Sansri Basu 2014년 3월 14일
댓글: Prof M S Prasad 2024년 1월 13일
The codings that i used to find the saliency map of an image is given below:
%%Read image from file
inImg = im2double(rgb2gray(imread('13.jpg')));
inImg = imresize(inImg, [64, 64], 'bilinear');
subplot(1,2,1);
imshow(inImg);title('Original Image');
%%Spectral Residual
FFT = fft2(inImg);
LogAmplitude = log(abs(FFT));
Phase = angle(FFT);
SpectralResidual = LogAmplitude - imfilter(LogAmplitude, fspecial('average', 3), 'replicate');
saliencyMap = abs(ifft2(exp(SpectralResidual + i*Phase))).^2;
%%After Effect
saliencyMap = mat2gray(imfilter(saliencyMap, fspecial('disk', 3)));
subplot(1,2,2);
imshow(saliencyMap, []);title('Saliency Map');
After getting the saliency map, i need to find the object map of the given input image which i am not able to. Please help!!!!!!!!!!
  댓글 수: 4
Prof M S Prasad
Prof M S Prasad 2023년 12월 23일
its an old problem . take histogram then select max value as threshold. then 1 sigma value. one of them would produce good result.
Prof M S Prasad
Prof M S Prasad 2024년 1월 13일
hope you got the result.
threshold selection is based on Histogram. analyse one or we can set it 2 sigma.
i think it will give results.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2014년 3월 26일
It looks like it was just thresholded:
objectMap = saliencyMap > someThresholdValue;
I don't know what someThresholdValue might be. It's possible it might change on an image by image basis.
  댓글 수: 2
Sansri Basu
Sansri Basu 2014년 3월 26일
I tried using this code:
t=graythresh(saliencyMap); bw=im2bw(saliencyMap,t); imshow(bw);
But there was a blank output
Image Analyst
Image Analyst 2014년 3월 26일
Maybe that didn't pick the correct threshold. Try it the way I suggested. You can use the interactive thresholding app in my File Exchange if you want. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by