[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: imread image sizing
From: |
JD Cole |
Subject: |
Re: imread image sizing |
Date: |
Tue, 09 Mar 2004 23:40:22 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
Hi Ross,
I've come across this before too. If you follow the trail of
functions that 'imshow' actually uses, you'd see that after it creates a
colormap and an indexed image from the r/g/b parameters, it uses the
'image' command to display them. 'image' takes a scale parameter, but
in this case, imshow doesn't pass one, in the case of no scale
parameter, 'image' decides to make a scaled image, hence, your 320x240.
You got a couple of choices, you could create you're own version of
'imshow' and add a scale parameter, something like this
imshow (a1, a2, a3, scale)
....
....
image (a1, scale)
....
....
or at the very least
....
image (a1, 1)
....
This problem bothers me often too, but I'm not sure what the mainstream
solution would be since changing the definition for 'imshow', as
distributed with octave, would break from compatibility with other
numerical programs which shall remain un-named.
Maintainers have any thoughts?
JD
Ross Vandegrift wrote:
Hello everyone,
I'm working on an image analysis project, and am using imread to
read in a color 640x480 JPEG file and sample some points.
Oddly though, when read in and displayed, the graphic is
displayed as 320x240. If I manually run "display eye.jpg", the image is
loaded as 640x480. I've tried setting "-size 640x480" and "-sample
640x480" in the options, neither one helps.
Here's how I'm loading/displaying my image:
[red, green, blue] = imread('jpg:eye.jpg', ["-size 640x480";]);
red = red / 255;
blue = blue / 255;
green = green / 255;
imshow(red, green, blue)
It's not a critical problem or anything - I'm still able to work
on the project at 320x240, but is there something I can do to get
640x480?
Thanks!
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------