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
|