help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OctDev] Image package (imread problem)


From: Carnë Draug
Subject: Re: [OctDev] Image package (imread problem)
Date: Mon, 5 Nov 2012 13:10:17 +0000

On 5 November 2012 07:05, Lucas Sá <address@hidden> wrote:
> Today I noticed that the image package treats indexed images differently in
> functions within the module.
>
> Using [X, map] = imread will give me a matrix X with values from 0 to n-1,
> while all other image package functions expect index mapping from 1 to n,
> such as imshow, ind2rgb, ind2gray.
>
> This fact makes the execution of a simple imshow('some_file.gif') to show
> something different from the original image. imshow(X+1, map) would show it
> fine as well.
>
> The function ind2rgb, for example, even has a validation for indices less
> than 1 in line 43 of ind2rgb.m:
>
>   ## Check if X is an indexed image.
>   if (ndims (x) != 2 || any (x(:) != fix (x(:))) || min (x(:)) < 1)
>     error ("ind2rgb: X must be an indexed image");
>
>
> Is it normal that I am receving 0 values in X matrix? I am using octave
> 3.6.2 and graphicsmagick 1.3.16.

Hi Lucas

imshow, ind2rgb and ind2gray do not belong to the image package, they
belong to octave core. I'm CC'ing the octave core mailing list.

If you believe this to be a bug, please report at at
http://savannah.gnu.org/bugs/?func=additem&group=octave

Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]