regarding reconstruction of image from complex double

8 次查看(过去 30 天)
I need a help from complex double to unit8 image. i need to reconstruct the image using complex double to image. kindly help me.

回答(1 个)

Meet
Meet 2023-4-4
编辑:Meet 2023-4-4
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)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by