octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #30509] 'imshow' doesn't reverse 'ydir' of axi


From: Søren Hauberg
Subject: [Octave-bug-tracker] [bug #30509] 'imshow' doesn't reverse 'ydir' of axis
Date: Fri, 23 Jul 2010 07:54:58 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; da-DK; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6

Follow-up Comment #5, bug #30509 (project octave):

I think your interpretation of "doing the right thing" is misguided. Matlab
reverses the 'ydir' on images for a *very* good reason.

If you work on image processing you often have a work-flow where some you
have an algorithm that detects certain points in an image (like the eyes in a
face). Since we represent images as matrices, these detected points are
represented as (row, column). Now, if you show an image and then want to plot
the detected points on top of the image (for verification purposes), you
simply do this

  imshow (im)
  hold on
  plot (column, row, '*')
  hold off

You can do this because the 'ydir' is reversed. Had that not been the case,
you would have to do something like

  imshow (im)
  hold on
  plot (column, size (im, 1) - row, '*')
  hold off

or something like that. This would be a terrible working process.

My point is just that 'ydir' is reversed on purpose.

Now to answer your questions:

1) The line goes from upper left to lower right as it should.

2) Your commands return

>> children = get(gcf, 'children')

children =

  173.0011

>> get (children, 'type')

ans =

axes

3) The command doesn't work

>> handles = get(gca);
>> get(handles, 'ydata') 
??? Error using ==> get
Conversion to double from struct is not possible.

I don't know how to test what you wanted to test so I cannot do that. Sorry
:-(


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30509>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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