From: Bhuvan on 17 Apr 2010 07:02 i want to crop a region of the image by using it's rows and columns.. i use the following code... e=imread('w.jpg'); h=30; i=e(60:520,30:490); imshow(i); the original image is coloured but after i crop the image i is will be in greyscale why is it so...and i don't want to use imcrop function... thanking you.....
From: Walter Roberson on 17 Apr 2010 11:26 Bhuvan wrote: > i want to crop a region of the image by using it's rows and columns.. > i use the following code... > > e=imread('w.jpg'); > h=30; > i=e(60:520,30:490); > imshow(i); > > the original image is coloured but after i crop the image i is will be in greyscale why is it so...and i don't want to use imcrop function... 'e' is probably a 3 dimensional variable, and you are only selecting on two of its dimensions, which would have the effect of selecting only from the first pane -- as if you had specified e(60:520, 30:490, 1) . If you want to retain the colour, use i = e(60:520, 30:490, :) ;
From: Bhuvan on 17 Apr 2010 09:33 thanks a lot....it's awesome
|
Pages: 1 Prev: Converting ROC Curve Next: how to overlay multiple images |