Hello,
I am trying this image conversion. I read an image using matlab's command data = double(imread('image.jpg')); which gives me a 3D image of size(data) = 60, 50 and 3. When I plot using imshow('data') it gives me the exact same figure I have. Then, I convert this into 2D by using: data_matrix_1 = data(:,:,1); data_matrix_2 = data(:,:,2); data_matrix_3 = data(:,:,3);
The problem is how can I reconstruct the figure from the 2D data. I used the following but it didn't work: recovered_data = cat(3, data_matrix_1, data_matrix_2, data_matrix_3); imshow(recovered_data)
Please help me solve this simple issue. Thank you.
Best Answer