How can I display image binary data to image in variables dct_img1 and

x = ImageData[Import[“ExampleData/lena.tif”]] // MatrixForm
()
x2 = NumberForm[x, 1]
Image[x2, ColorSpace → “RGB”] (
)

(* DCT *)
dct1 = FourierDCTMatrix[8] // MatrixForm
dct2 = Transpose[FourierDCTMatrix[8]] // MatrixForm
dct_td1 = dct2.x.dct1 // MatrixForm
dct_img1 = Image[ dct_td1, ColorSpace -> "RGB"]
(*DCT[x_?MatrixQ] :=dct2.x.dct1*)
(* IDCT *)
dct3 = FourierDCTMatrix[8, 3] // MatrixForm
dct4 = Transpose[FourierDCTMatrix[8, 3]] // MatrixForm
(*IDCT[x_?MatrixQ]:=dct4.x.dct3*)
dct_td2 = dct4.x.dct3 // MatrixForm
dct_img2 = Image[ dct_td2, ColorSpace -> "RGB"]

Welcome to Wolfram! There are a few language problems in your notebook.

  1. MatrixForm is useful for looking at data in a notebook. But it should not be used for subsequent evaluations.
  2. Don’t use “_” on in symbol names.
  3. Semicolons are your friend for large outputs.

That said, here are some inputs that do what you want (I think):

x2 = ImageData[Import["ExampleData/lena.tif"]];
Image[x2, ColorSpace -> "RGB"] 

Below, you are trying to do some matrix evaluations with incompatible sized matrices. I’m not sure what you’re trying to do here, so I’ll leave that problem for someone else.

In[56]:= Dimensions@x2

Out[56]= {116, 150, 3}

dct1 = FourierDCTMatrix[8];
In[57]:= Dimensions@dct1

Out[57]= {8, 8}

One more thing, Mathematica has a built in function called FourierDCTFilter. If you’d rather use your own implementation (you seem to want 88 matrices rather than the 1616 matrices used there), the documentation page provides some guidance about how it is implemented:

Local DCT thresholding is applied to all overlapping 16*16 partitions of image. The value of each output pixel is the average of the corresponding pixel in all partitions that include the pixel.

thank you