How to recombine a color image divided into blocks?

2 ビュー (過去 30 日間)
yashi gautam
yashi gautam 2015 年 12 月 1 日
回答済み: Walter Roberson 2015 年 12 月 1 日
Dear sir, i used the following code to divide a color image into 4 blocks:
img4x4 = mat2cell( org_img, size(org_img,1)/2 * ones(1,2), size(org_img,2)/2 * ones(1,2), size(org_img,3) );
Kindly tell m e how to reconstruct original image from the 4 different blocks?

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 12 月 1 日
img2x2 = mat2cell( org_img, size(org_img,1)/2 * ones(1,2), size(org_img,2)/2 * ones(1,2), size(org_img,3) );
reconstructed = cell2mat(img2x2);

Community Treasure Hunt

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

Start Hunting!

Translated by