[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37681] imread function when used with indexed
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #37681] imread function when used with indexed images returns a matrix with 0 values, that are not accepted by other image funcs |
Date: |
Tue, 06 Nov 2012 17:12:16 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 |
URL:
<http://savannah.gnu.org/bugs/?37681>
Summary: imread function when used with indexed images
returns a matrix with 0 values, that are not accepted by other image funcs
Project: GNU Octave
Submitted by: None
Submitted on: Tue 06 Nov 2012 05:12:15 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Lucas Sa
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.2
Operating System: GNU/Linux
_______________________________________________________
Details:
Using <b>[X, map] = imread</b> will give me a matrix X with values from 0 to
n-1, while all other image functions expect index mapping from 1 to n, such as
imshow, ind2rgb, ind2gray.
This fact makes the execution of a simple <b>imshow('some_file.gif')</b> to
show something different from the original image. imshow(<b>X+1</b>, 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(:))) || <b>min (x(:)) < 1</b>)
error ("ind2rgb: X must be an indexed image");
To replicate the error, you can imread any indexed image (such as GIF) and try
to use the referred functions with the results.
Is it normal to receive 0 values in X matrix? I am using octave 3.6.2 and
graphicsmagick 1.3.16.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37681>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37681] imread function when used with indexed images returns a matrix with 0 values, that are not accepted by other image funcs,
anonymous <=