Surface and contour plots

5 ビュー (過去 30 日間)
Hamid MF
Hamid MF 2012 年 12 月 19 日
回答済み: Paul 2014 年 2 月 22 日
  • Hi again
  • %F(u,v)=fft2(rgbIM)
  • I have one RGB image and I want to Surface and contour plots of the magnitude F(u,v) , with labeled axes, in hsv colormap
  • I writed this way but it didn't work
  • anyone can help me ?
f=imread('im.jpg');
f=rgb2hsv(f);
h=fft2(f);
DFT_abs_tmp=log(1+abs(h));
max_DFT_abs = max(max(DFT_abs_tmp));
min_DFT_abs = min(min(DFT_abs_tmp));
DFT_abs_out = 255.*(DFT_abs_tmp - min_DFT_abs.*(ones(size(DFT_abs_tmp))))./(max_DFT_abs -min_DFT_abs);
surfc(DFT_abs_out);
colormap hsv
axis equal;

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 12 月 19 日
f=rgb2hsv(f); is going to give you a 3D array - x, y, and h/s/v. You then fft2() that 3D array and your code obviously expects the result to be a 2D array.
Perhaps you only wanted to work with one of the color planes, such as hue, f(:,:,1) ?

Paul
Paul 2014 年 2 月 22 日
Hello,
I am trying to use this program to detect depth. Is this possible that I can do so with surface and contour plots.

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by