bugGNU Octave - Bugs: bug #48111, ginput does not display cross...

 
 

bug #48111: ginput does not display cross hairs and crashes whe mouse clicked

Submitted by:  None
Submitted on:  Fri 03 Jun 2016 09:55:11 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Mike WilsherOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Fri 03 Jun 2016 01:08:35 PM UTC, comment #7:

Hi Pantxo
Sorry I did not understand.

The image class is uint8

Which I know has been a problem.

Many Thanks
Mike

Mike Wilsher <mikewilsher>
Fri 03 Jun 2016 12:58:57 PM UTC, comment #6:

The result of the test I asked only depends on the class of the image you load, not on Octave version. Anyway, I'll close this report.

Pantxo Diribarne <pantxo>
Project Member
Fri 03 Jun 2016 12:29:34 PM UTC, comment #5:

Hi Pantxo

Thanks for the reply. I have actually in uninstalled 4.0.0 and have confirmed the ginput issue is working on 4.0.2, so I can't easily check.

But I think you can close the bug report as it is working in 4.0.2 and as you say it looks like the cross hairs is not implemented.

Many thanks for the support
Mike

Mike Wilsher <mikewilsher>
Fri 03 Jun 2016 12:25:00 PM UTC, comment #4:

@Mike: what does "class (Test)" return. If it is an integer image then I think this is due to bug #45372 which has been fixed in 4.0.1 and I'll close this report.

About the crosshair mouse pointer it is actually not implemented. The corresponding figure property "pointer" is present but currently does nothing. If you care enough, you can file a separate bug report about this missing functionality.

Pantxo Diribarne <pantxo>
Project Member
Fri 03 Jun 2016 11:28:18 AM UTC, comment #3:

Hi Markus

which sleep....
'sleep' is a built-in function from the file libinterp/corefcn/sysdep.cc

But I have just loaded the 4.0.2 version to check and you are correct the mouse select seems to now work on this.

The fail was a bit random, sometimes the image was left up, sometimes not, you always got the error, most of the time it would just quit out of the program back to Octave, but sometimes Octave would quit as well.

I still don't get the matlab style cross hairs but at least the position input seems to be fixed.

Regards
Mike Wilsher BSc(Hons) CEng MIET

Mike Wilsher <mikewilsher>
Fri 03 Jun 2016 11:08:48 AM UTC, comment #2:

Wrt to the crosshairs: I can't see these either and do not seem to be implemented in Octave.

Markus Mützel <mmuetzel>
Project Member
Fri 03 Jun 2016 11:01:06 AM UTC, comment #1:

This works for me. Could you please check the result of the following:

You might have a function of that name somewhere in your search path that behaves differently from expected.

Other than that, I do not know why the unwind_protect_cleanup does fail for you. Did the figure close when you clicked it?

Markus Mützel <mmuetzel>
Project Member
Fri 03 Jun 2016 09:55:11 AM UTC, original submission:

Hi
I have a simple code snippet that displays an image on screen and should put up cross hairs about the mouse location and should, when the mouse is clicked returns the mouse position on the image. MatLab works fine but you get no cross hairs on octive and a mouse click causes the program to crash.

Did I miss something ??

% Select Image File
[i_filename, i_pathname, i_filterindex] = uigetfile('*.tif','Select Image');

%Open file
image_file = strcat(i_pathname, i_filename);

% read tiff image
Test = imread(image_file);

%Display Image
image(Test);

%Get mouse click position
[x1,y1] = ginput(1)

Octive Command Window Output:

>> pkg load image
>> pkg load control
>> pkg load signal
>> pkg list

Package Name | Version | Installation directory
--------------+---------+-----------------------
control *| 3.0.0 | C:\Octave\Octave-4.0.0\share\octave\packages\control-3.0.0
image *| 2.4.1 | C:\Octave\Octave-4.0.0\share\octave\packages\image-2.4.1
signal *| 1.3.2 | C:\Octave\Octave-4.0.0\share\octave\packages\signal-1.3.2

>> TestInput

error: invalid conversion of uint8 matrix to Matrix
error: called from
ginput at line 85 column 7
TestInput at line 14 column 8
error: invalid conversion of uint8 matrix to Matrix
error: called from
ginput at line 98 column 5
TestInput at line 14 column 8
error: invalid handle
error: called from
ginput at line 98 column 5
TestInput at line 14 column 8
error: set: expecting graphics handle as first argument
error: called from
ginput at line 98 column 5
TestInput at line 14 column 8

Anonymous

 

(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 pantxo (Posted a comment)
  • -unavailable- added by mikewilsher (Posted a comment)
  • -unavailable- added by mmuetzel (Posted a comment)
  • -unavailable- added by None (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Jun 2016 12:59:14 PM UTCpantxoStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1