Reducing Size of image Algorithm in Matlab

Algorithm
25 Downloads
Updated 13 Mar 2018

View License

%% Algorithm for minimizing the size of the object
clc
clear all
a=imread('3.png');
imshow(a)
[r,c]=size(a);
i=1;j=1;
c=c/3;
b=zeros(floor(r/2),floor(c/2));
for x=1:2:r
for y=1:2:c
b(i,j)=a(x,y);
j=j+1;
end
i=i+1;
j=1;

end
figure
imshow(b/255),colormap(colorcube)
figure
imagesc(b/255),colormap(gray)
impixelinfo

Cite As

ABHILASH SINGH (2024). Reducing Size of image Algorithm in Matlab (https://www.mathworks.com/matlabcentral/fileexchange/66470-reducing-size-of-image-algorithm-in-matlab), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Images in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0