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

 
 

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

Submitted by:  Beat Fasel <tuxo>
Submitted on:  Wed 02 Jun 2010 10:16:06 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: TuxoOpen/Closed: Closed
Release: 3.2.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed with changeset (10704:0bcd17cad9d1)

Rik <rik5>
Project 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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Jun 2010 06:29:48 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 02 Jun 2010 07:08:48 PM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1