reducing the size of image

10 views (last 30 days)
kash
kash on 8 Feb 2012
Edited: Cedric on 5 Oct 2013
i have a code for corner detection
i = imread('door.jpg');
%Make image greyscale
if length(size(i)) == 3
im = double(i(:,:,2));
else
im = double(i);
end
cs = fast_corner_detect_9(im, 30);
size(im)
im1=imresize(im,.5);
cs1 = fast_corner_detect_9(im1, 30);
image(im/6)
axis image
colormap(gray)
hold on
axis off
plot(cs(:,1), cs(:,2), 'r.'),title('Corner Detection')
figure,imshow(uint8(im)),title('Original Image ')
the size of image is 272x185
i have reseized the image using
imresize(im,.5)
but the reseized image is not displaying,plz help to display both images

Answers (2)

Jan
Jan on 8 Feb 2012
I guess, that the conversion by uint8 let all information disappear. Please try this:
imshow(uint8(im * 255))
or
imshow(im)
  1 Comment
kash
kash on 8 Feb 2012
Jan i think u did not understand my question
for my code
plot(cs(:,1), cs(:,2), 'r.'),title('Corner Detection')
for reseized image,the image is not displaying

Sign in to comment.


Image Analyst
Image Analyst on 8 Feb 2012
Instead of
image(im/6)
Try this:
imshow(im1, []);
The problem was that your resized image was called im1 and you never passed that to imshow().
  4 Comments
Image Analyst
Image Analyst on 8 Feb 2012
Did you post your image to tinypic.com so people can try your code? I do not have fast_corner_detect_9() either.
Walter Roberson
Walter Roberson on 8 Feb 2012
http://www.mathworks.com/matlabcentral/fileexchange/13006-fast-corner-detector

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!