[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Colour scaling in imshow
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Colour scaling in imshow |
Date: |
Sun, 16 Jan 2011 14:16:58 -0600 |
There's currently a bug in imshow where
x =rand(100:
imshow(x);
figure;
imshow(x,[0,255]);
produces two identical images, whereas the second one should be almost
black. Attached is a patch that seems to fix this. I'm not sure this
is the right fix, so I won't push it right away. Notice that I also
had to ensure that display_range was a double despite the warnings in
the code that it was wrong to do. Without it, the scaling operations
that use display_range were not working properly, due to the vagaries
of integer division.
I'm not completely sure the attached patch is the correct one, so I'll
wait for review before pushing it.
- Jordi G. H.
imshow.patch
Description: Text Data
- Colour scaling in imshow,
Jordi Gutiérrez Hermoso <=
- Colour scaling in imshow, John W. Eaton, 2011/01/16
- Re: Colour scaling in imshow, Jordi Gutiérrez Hermoso, 2011/01/17
- Re: Colour scaling in imshow, John W. Eaton, 2011/01/17
- Re: Colour scaling in imshow, Jordi Gutiérrez Hermoso, 2011/01/20
- Re: Colour scaling in imshow, Jordi Gutiérrez Hermoso, 2011/01/20
- Re: Colour scaling in imshow, Søren Hauberg, 2011/01/20
- Re: Colour scaling in imshow, John W. Eaton, 2011/01/20
- Re: Colour scaling in imshow, Jordi Gutiérrez Hermoso, 2011/01/21
- Re: Colour scaling in imshow, John W. Eaton, 2011/01/21