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.
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);