bugGNU Octave - Bugs: bug #30033, Image shown upside down when used...

 
 

bug #30033: Image shown upside down when used in conjunction with "hold on"

Submitter:  Beat Fasel <tuxo>
Submitted:  Wed 02 Jun 2010 10:16:06 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Tuxo Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 14 Jun 2010 06:29:48 PM UTC, comment #4: 

Fixed with changeset (10704:0bcd17cad9d1)

Rik <rik5>
Group administrator
Thu 03 Jun 2010 05:12:01 AM UTC, comment #3: 

The problem is in image.m which is called from imshow.m.  The troublesome lines begin at 140

  if (strcmp (get (ca, "nextplot"), "replace"))
    set (ca, "ydir", "reverse");
  endif

For, normal images we set the x and y axes limits but then reverse the direction of the axis for y.  This is odd.  It also fails when hold is set because the value of "nextplot" is "add" rather than "replace"

Rik <rik5>
Group administrator
Wed 02 Jun 2010 07:08:48 PM UTC, comment #2: 

Confirmed with the development branch (10678:35338deff753) on a GNU/Linux system.

Rik <rik5>
Group administrator
Wed 02 Jun 2010 11:48:47 AM UTC, comment #1: 

I further note. Images are only shown upside down after "hold on" when not previously displayed. For example

1) Starting octave
2) Executing the following commands

im=imread('myimage.pgm');
imshow(im)
hold on
imshow(im)

Will show the image correctly, also after the "hold on" command.
However

1) Starting octave
2) Executing the following commands
im=imread('myimage.pgm');
hold on
imshow(im)

will show the image upside down.

Beat Fasel <tuxo>
Wed 02 Jun 2010 10:16:06 AM UTC, original submission:  

Normal behavior:

im=imread('myimage.pgm');
imshow(im)

Result: image shown correctly.

Abnormal behavior:

im=imread('myimage.pgm');
hold on
imshow(im)
hold off

Result: Image is shown upside down. For verification I tried this in Matlab where it the image is shown correctly.


Workaround: Issuing imshow(flipud(im)) after "hold on" shows the image correctly.

Beat Fasel <tuxo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by tuxo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-14 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2010-06-02 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code