フィルターのクリア

how to access first subimage from mat2cell when it is divided into 8x8 images?

1 回表示 (過去 30 日間)
ramya
ramya 2018 年 3 月 15 日
編集済み: ramya 2018 年 3 月 15 日
suppose we have image which is split into 8x8 subimages by using mat2cell. now i have to access first subimage from this 8x8 cells. how to do this.suggest some code
  2 件のコメント
Birdman
Birdman 2018 年 3 月 15 日
Can you share your code?
ramya
ramya 2018 年 3 月 15 日
編集済み: ramya 2018 年 3 月 15 日
a=VideoReader('test.mp4 ');
b = read(a,1 );
c=rgb2gray(b );
nframe=a.NumberOfFrames ;
for i=115
prev_frame =read(a,i-1 );
e=rgb2gray(prev_frame );
figure
imshow(e );
pause(0.2)
current_frame =read(a,i);
h=rgb2gray(current_frame );
figure
imshow(h);
rows = 8 ;
columns = 8 ;
[H,W,~] = size(c );
szH = [repmat(fix(H/rows),1,rows )];
szW = [repmat(fix(W/columns),1,columns )]; //to split into window size of 8x8 as per my algorithm
C = mat2cell(e, szH, szW )';
D = mat2cell(h, szH, szW )';
figure
for j=1:rows*columns
subplot(rows,columns,j), imshow( C{j } ) //to plot above cells
end
figure
for j=1:rows*columns
subplot(rows,columns,j), imshow( D{j } )
end
end
here is the code now i have to access C{1},C{2} and so on to perform std on each subimage

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeScripts についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by