image matrix to a row vector
Mostrar comentarios más antiguos
Hello..
I Want to convert an image matrix of size m*n into blocks of row-vectors of 16 byte elements. Using which command I can do this?
Thanks
Respuestas (1)
Could you please clarify your question? What do you mean by '16 byte elements'? How do you want to split up you data?
If you have an array consisting of doubles, a '16-byte element' is two entries (a double is 8 bytes). So you could reshape your array to have two columns:
imageMatrix = rand( m, n );
reshapedImageMatrix = reshape( imageMatrix, prod(size(imageMatrix))/2, 2 );
Of course, in this example, m*n should be even.
Mark
1 comentario
Categorías
Más información sobre Neighborhood and Block Processing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!