pixelation

17 visualizaciones (últimos 30 días)
maha sandhya
maha sandhya el 24 de Feb. de 2012
Respondida: DGM el 2 de Mayo de 2022
how to apply pixelation of image in matlab

Respuestas (1)

DGM
DGM el 2 de Mayo de 2022
It can be simple enough:
inpict = imread('peppers.png');
sz = size(inpict);
blocksize = [10 10];
outpict = imresize(inpict,round(sz(1:2)./blocksize));
outpict = imresize(outpict,sz(1:2),'nearest');
imshow(outpict)
What if you want to only pixellize a part of the image?
inpict = imread('peppers.png');
% extract sample region
sample = inpict(142:255,192:324,:);
sz = size(sample);
% blockify it
blocksize = [10 10];
sample = imresize(sample,round(sz(1:2)./blocksize));
sample = imresize(sample,sz(1:2),'nearest');
% insert it back into the image
outpict = inpict;
outpict(142:255,192:324,:) = sample;
imshow(outpict)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by