Prev: How to build a exponentially weighted moving average covariance matrix?
Next: how to make available a variable to two callbacks?
From: Enigma Enlist on 21 Mar 2010 10:59 the user needs to crop the image himself a/c to the coding u suggested...if a user wants to crop half or three fourth of the original image automatically wt wud b the changing then?
From: ImageAnalyst on 21 Mar 2010 11:50
On Mar 21, 10:59 am, "Enigma Enlist" <dynamic-l...(a)hotmail.com> wrote: > the user needs to crop the image himself a/c to the coding u suggested...if a user wants to crop half or three fourth of the original image automatically wt wud b the changing then? ------------------------------------------------------------------- What code are you referring to? Perhaps you should just start your own brand new thread. Or maybe the following will answer your question. % Read in standard MATLAB demo image. grayImage = imread('cameraman.tif'); subplot(1,2, 1); imshow(grayImage, []); title('Original Grayscale Image'); set(gcf, 'Position', get(0,'Screensize')); % Maximize figure. [rows columns numberOfColorBands] = size(grayImage); height = int32(3/4 * rows); croppedImage = imcrop(grayImage, [1 1 columns height]); subplot(1,2, 2); imshow(croppedImage, []); title('Grayscale Image cropped at 3/4 the height of the original'); |