Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Geoff Hayes
Geoff Hayes il 29 Gen 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.

Più risposte (0)

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by