I am required to read an image and generate an 8×8 mosaic using the average color of each block. This is my work so far, however the output is black and white. I need help to get the colors. Thank you.
smashpic = imread('PA6_smashing.png');myfun = @(block_struct) mean2(block_struct.data) *...ones(size(block_struct.data),class(block_struct.data));mosaic = blockproc(smashpic,[8 8],myfun);imshow(mosaic);
Best Answer