Borrar filtros
Borrar filtros

I have converted image into 16*16 block. How can i convert these block into video?

1 visualización (últimos 30 días)
my code is
I=imread(image);
img=rgb2gray(I);
[col, row] = find(img<250);
imout = I(min(col):max(col), min(row):max(row));
imshow(imout);
[rows columns numberOfBands]=size(imout);
blockSizeR = 16;
blockSizeC = 16;
wholeBlockRows = floor(rows / blockSizeR);
wholeBlockCols = floor(columns / blockSizeC);
blockNumber=1;
for row = 1 : blockSizeR : rows
for col = 1 : blockSizeC : columns
row1 = row;
row2 = row1 + blockSizeR - 1;
row2 = min(rows, row2);
col1 = col;
col2 = col1 + blockSizeC - 1;
col2 = min(columns, col2);
block=imout(row1:row2, col1:col2);
subplot(16,16,blockNumber);
imshow(block);
blockNumber = blockNumber + 1;
end
end

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 29 de En. de 2015
Vidya - consider using the videowriter to write each of your block images to file. See the examples in the provided link to get an idea on what you can try.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by