フィルターのクリア

image matrix to a row vector

3 ビュー (過去 30 日間)
vaishali
vaishali 2014 年 11 月 20 日
編集済み: vaishali 2014 年 11 月 21 日
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

回答 (1 件)

Mark
Mark 2014 年 11 月 20 日
編集済み: Mark 2014 年 11 月 20 日
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 件のコメント
vaishali
vaishali 2014 年 11 月 21 日
編集済み: vaishali 2014 年 11 月 21 日
For Eg.. I have an colour image 512*512*3 of unit8 type. I want to encrypt that image in such a way that I should split that image into blocks of row vectors containing 16 elements in it. Each element is a byte of pixel value.so in a row vector totally 16 elements of each one byte means 16 bytes(128bits).then each block I need to encrypt and then finally combine..so which commands I can use to achieve this?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by