regarding reconstruction of image from complex double

9 views (last 30 days)
I need a help from complex double to unit8 image. i need to reconstruct the image using complex double to image. kindly help me.

Answers (1)

Meet
Meet on 4 Apr 2023
Edited: Meet on 4 Apr 2023
Based on the description of your query, It is quite unclear what you are trying to achieve. But i am assuming that you are having an array of double complex type which you want to convert into unit8 type and then you want to generate image using that array.
  • So firstly you need to convert complex double to double, so you need to decide whether you want the real part, the imaginary part or the absolute value of the compelx number and based on that you can use real, imag or abs functions respectively.
  • Then you need to scale this array so that the values are in the range of [0,1] by subtracting the minimum value and dividing by the total range.
  • Once you have that you can use the uint8 function to convert the array to uint8 type.
  • After that you can generate image using the image function.
So the overall summary is :
  1. Let I be the array of complex double type
  2. Convert I to double type : I=real(I) or I=imag(I) or I=abs(I)
  3. Scale the converted array : I = (I - min(I,[],"all")) / (max(I,[],"all") - min(I,[],"all"));
  4. Convert to unit8 type : U8 = uint8(round(I));
  5. Generate image : image(U8)

Categories

Find more on Images 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!