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

1 次查看(过去 30 天)
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 个评论
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 CenterFile Exchange 中查找有关 Display Image 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by