How can I display a complex image matrix in Matlab?
Show older comments
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?
Answers (3)
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
Hi dear
try this!
clear all
N=1001
I=rand(N,N,3)+1i*rand(N,N,3);
imshow(I,[])
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):

Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!