<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241004</link>
    <title>MATLAB Central Newsreader - problem in getting point coordinates in gui</title>
    <description>Feed for thread: problem in getting point coordinates in gui</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 14 Dec 2008 14:11:41 -0500</pubDate>
      <title>problem in getting point coordinates in gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241004#616934</link>
      <author>shailesh gupta</author>
      <description>Hi&lt;br&gt;
I am trying to make a Gui in which i load image in axes. User has to&lt;br&gt;
click anywhere in the image and i have to know where he clicked. i.e I&lt;br&gt;
want to get co-ordinates of the point of mouse-click.&lt;br&gt;
I tried it out. I am getting points without image i.e. on blank axes.&lt;br&gt;
But with image, nothing happens..&lt;br&gt;
Can anyone help me out with what to do..&lt;br&gt;
&lt;br&gt;
thanking in advance...</description>
    </item>
    <item>
      <pubDate>Sun, 14 Dec 2008 16:47:02 -0500</pubDate>
      <title>Re: problem in getting point coordinates in gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241004#616971</link>
      <author>Dave Brackett</author>
      <description>shailesh gupta &amp;lt;sha.gupta.88@gmail.com&amp;gt; wrote in message &amp;lt;7613d61e-d2a3-4f28-95be-428eb314332a@w24g2000prd.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi&lt;br&gt;
&amp;gt; I am trying to make a Gui in which i load image in axes. User has to&lt;br&gt;
&amp;gt; click anywhere in the image and i have to know where he clicked. i.e I&lt;br&gt;
&amp;gt; want to get co-ordinates of the point of mouse-click.&lt;br&gt;
&amp;gt; I tried it out. I am getting points without image i.e. on blank axes.&lt;br&gt;
&amp;gt; But with image, nothing happens..&lt;br&gt;
&amp;gt; Can anyone help me out with what to do..&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanking in advance...&lt;br&gt;
&lt;br&gt;
It works fine for me. Check that your code is similar to this:&lt;br&gt;
&lt;br&gt;
h=imread('image_file.jpg');&lt;br&gt;
figure&lt;br&gt;
image(h)&lt;br&gt;
[x,y]=ginput(5)&lt;br&gt;
&lt;br&gt;
where 5 is the number of points. if you use ginput you can take unlimited points, but the user has to press enter after the last point. also note, that you won't get the coordinates until all of the points have been taken (as far as I'm aware).</description>
    </item>
    <item>
      <pubDate>Sun, 14 Dec 2008 16:58:03 -0500</pubDate>
      <title>Re: problem in getting point coordinates in gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241004#616974</link>
      <author>Dave Brackett</author>
      <description>&quot;Dave Brackett&quot; &amp;lt;davebrackett@hotmail.com&amp;gt; wrote in message &amp;lt;gi3da6$ig9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; shailesh gupta &amp;lt;sha.gupta.88@gmail.com&amp;gt; wrote in message &amp;lt;7613d61e-d2a3-4f28-95be-428eb314332a@w24g2000prd.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi&lt;br&gt;
&amp;gt; &amp;gt; I am trying to make a Gui in which i load image in axes. User has to&lt;br&gt;
&amp;gt; &amp;gt; click anywhere in the image and i have to know where he clicked. i.e I&lt;br&gt;
&amp;gt; &amp;gt; want to get co-ordinates of the point of mouse-click.&lt;br&gt;
&amp;gt; &amp;gt; I tried it out. I am getting points without image i.e. on blank axes.&lt;br&gt;
&amp;gt; &amp;gt; But with image, nothing happens..&lt;br&gt;
&amp;gt; &amp;gt; Can anyone help me out with what to do..&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; thanking in advance...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It works fine for me. Check that your code is similar to this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; h=imread('image_file.jpg');&lt;br&gt;
&amp;gt; figure&lt;br&gt;
&amp;gt; image(h)&lt;br&gt;
&amp;gt; [x,y]=ginput(5)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; where 5 is the number of points. if you use ginput you can take unlimited points, but the user has to press enter after the last point. also note, that you won't get the coordinates until all of the points have been taken (as far as I'm aware).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
sorry just realised that you wanted it in a GUI. it is basically the same, but replaces 'figure' in the second line with 'axes(handles.axes1)' or whatever your axes tag is.</description>
    </item>
  </channel>
</rss>

