How to reconstruct a original 2D image from the 1D matrix?

upto now I convert 2D image into 1D image matrix.I want to reconstruct into 2D image.I have a struggle on this.can you please help me?

1 Kommentar

A is your 1D image matrix
B= reshape(A,[size,size]); %size could be 256*256 or 512*512

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

KSSV
KSSV am 7 Feb. 2018

1 Stimme

You need to reshape your 1D vector into mXn matrix. Have a look on reshape function.

3 Kommentare

PLACEIUS NISHIGA G
PLACEIUS NISHIGA G am 7 Feb. 2018
Bearbeitet: PLACEIUS NISHIGA G am 7 Feb. 2018
yes sir,I have done the reshape function.finally I got the encoded image.I have a trouble on reconstruct it.
What trouble?
I dont't know how to reconstruct the encoded share.can you please give me the code for decode.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by