Image functions no longer return images

Michael Goffioul michael.goffioul at gmail.com
Fri Feb 1 03:30:00 CST 2008


On Thu, Jan 31, 2008 at 12:28 AM, J Heeris <jason.heeris at gmail.com> wrote:
> Sorry, I meant "imagesc".
>
> If these functions return image handles, how do I use them with, say,
> "imwrite"? The documentation for "imwrite" doesn't seem to have changed to
> detail this. Now I just get "error: expecting integer index, found
> -6.139061" when trying to use the results of "imagesc" with "imwrite".

I have the impression you're mixing different stuffs. "imagesc" is for
displaying
an image, "imwrite" is for saving an image into a specified format.
Both functions
take the same kind of input: an image (usually represented by a matrix). The
handle returned by imagesc is for manipulating the *displayed* image
(by using "set(handle, ...)"). If you want to retrieve the image data from a
handle (provided the handle points to an image graphics object), you can
still use "get(handle,...)".

Michael.


More information about the Help-octave mailing list