In Matlab how do I resize the image using imresize function

In Matlab.

how do I resize the image using imresize function to make it \'x\' time bigger, and take the resized image and crop it to it the original size using imcrop function?

Please provide a sample code.

Solution

%* Scaling Gray level images by matrices processing method!* %* (Reducing an image size to half) ! (for example) * %* Program Name: * o u = \'y\'; while ( u == \' Y\' ) | | (u == \' y \' ) clc a = input (\'Enter file name: \'s\'); a = imread (a) ; a = rgb2gray (a) ; size (a) [ r , c ] = size (a); i =1; j =1; s = zeros (r/2, c/2); for x = 1 : 2 : r for y =1 : 2 : c s (i, j) = a (x,y) ; j = j+i; end i = i + 1; j =i; end imshow (a); title (\'Full image\'); figure, imshow (s/255); title (\'Half image!\'); figure, imagesc (s); colormap (gray); title (\'Rescaled new image!\'); u = input (\'Do you want to Continue (Y/N) ? \', f s\'); close all end
In Matlab. how do I resize the image using imresize function to make it \'x\' time bigger, and take the resized image and crop it to it the original size using

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site