How to use an image having imaginary values for further processing like binarization in MATLAB?

329 Views Asked by At

I have a gray image on which I have applied homomorphic filtering. The result of this filtering gives me an image which has some complex numbers as it's pixel values. When I viewed imaginary image and real image separately, then I realized I need only imaginary image for further processing. But I am unable to use it as I am unable to binarize the imaginary image for further processing. If anyone has any solution or suggestion regarding this then kindly let me know.

Here is the whole process image:enter image description here

complex image: enter image description here

real image: enter image description here

original gray image: enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Like m7913d says, you can take the imaginary part of each pixel by using imag:

Ex:

imaginary_img = imag(complex_img);

Besides that, a good technique to binarize is set the threshold using the mean of image.

threshold = mean(mean(imaginary_img));
binarized_img = imbinarize(imaginary_img,threshold);