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

1 visualización (últimos 30 días)
ramya
ramya el 15 de Mzo. de 2018
Editada: ramya el 15 de Mzo. de 2018
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 comentarios
ramya
ramya el 15 de Mzo. de 2018
Editada: ramya el 15 de Mzo. de 2018
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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Display Image en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by