フィルターのクリア

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

1 回表示 (過去 30 日間)
vidya naveen
vidya naveen 2015 年 1 月 29 日
回答済み: Geoff Hayes 2015 年 1 月 29 日
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

採用された回答

Geoff Hayes
Geoff Hayes 2015 年 1 月 29 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by