フィルターのクリア

How can I display a complex image matrix in Matlab?

44 ビュー (過去 30 日間)
Agustin
Agustin 2017 年 2 月 8 日
編集済み: John 2023 年 10 月 20 日
Hi, I have two complex image matrices of size 1001 x 1001 and I want to display them in Matlab. I tried using the image() and imshow() commands and using the abs, fft and real commands to be able to display them but I keep getting errors. Can somebody help me how can I do this?

回答 (3 件)

KSSV
KSSV 2017 年 2 月 8 日
編集済み: KSSV 2017 年 2 月 8 日
You can separate the real part and imaginary part using real, imag respectively.
clear all
N = 1001 ;
I = rand(N,N,3) + 1i*rand(N,N,3) ; % some complex random data
image(real(I)) ; % real parts
image(imag(I)) ; % imaginary parts
image(abs(I)) ; % absolute
  1 件のコメント
Agustin
Agustin 2017 年 2 月 8 日
I tried this example and I get an error with image(abs(I)); The Error message is as follows: Error using image TrueColor CData contains element out of range 0.0 <= value <= 1.0
I also tried it with my image and what I get is a blue image and I don't see the targets that I measured on the radar.

サインインしてコメントする。


ali alizadeh
ali alizadeh 2022 年 9 月 14 日
Hi dear
try this!
clear all
N=1001
N = 1001
I=rand(N,N,3)+1i*rand(N,N,3);
imshow(I,[])
Warning: Displaying real part of complex input.

John
John 2023 年 10 月 20 日
編集済み: John 2023 年 10 月 20 日
AFAIK there's no native support for a pseudo-complex colormap, so I implemented it, here. Usage is simple:
x = randn(100, 100) + i*randn(100, 100);
imagesc(colorize_complex(x));
Applied example (see link for code):

Community Treasure Hunt

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

Start Hunting!

Translated by