<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207</link>
    <title>MATLAB Central Newsreader - How to handle uploaded image in Gui</title>
    <description>Feed for thread: How to handle uploaded image 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>Wed, 13 May 2009 02:24:01 -0400</pubDate>
      <title>How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649392</link>
      <author>Pulkit </author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I have created a GUI &amp; I use it to display images using imshow in the axes object.&lt;br&gt;
I am unable to get the handle of this image &amp; manipulate this image, ie performing colour space transfroms etc.&lt;br&gt;
&lt;br&gt;
Thanx for help in advance.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Pulkit.</description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 09:25:47 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649452</link>
      <author>vedenev</author>
      <description>When you open image you use&lt;br&gt;
[X, map] = imread(...)&lt;br&gt;
Work with this X.&lt;br&gt;
When you show image:&lt;br&gt;
hi=imshow(X,map,'Parent',ha);&lt;br&gt;
where ha is handle to axis (usualy &quot;handles.axes1&quot;)&lt;br&gt;
now &quot;hi&quot; is handle to image object.&lt;br&gt;
&lt;br&gt;
------------------------------------&lt;br&gt;
Maxim Vedenev, Matlab freelancer&lt;br&gt;
vedenev@ngs.ru&lt;br&gt;
&lt;a href=&quot;http://simulations.narod.ru/&quot;&gt;http://simulations.narod.ru/&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 10:11:01 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649462</link>
      <author>Pulkit </author>
      <description>Hey, thnx a lot for tht.&lt;br&gt;
I could manipulate with the image, but not with the individual pixels, like displaying the pixel value, the RGB value of a pixel etc.&lt;br&gt;
Could you help me out with that ??&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Pulkit&lt;br&gt;
&lt;br&gt;
vedenev &amp;lt;vedenev.maxim@gmail.com&amp;gt; wrote in message &amp;lt;93a98eeb-81dc-408e-8640-3142cc4542ac@u10g2000vbd.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; When you open image you use&lt;br&gt;
&amp;gt; [X, map] = imread(...)&lt;br&gt;
&amp;gt; Work with this X.&lt;br&gt;
&amp;gt; When you show image:&lt;br&gt;
&amp;gt; hi=imshow(X,map,'Parent',ha);&lt;br&gt;
&amp;gt; where ha is handle to axis (usualy &quot;handles.axes1&quot;)&lt;br&gt;
&amp;gt; now &quot;hi&quot; is handle to image object.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ------------------------------------&lt;br&gt;
&amp;gt; Maxim Vedenev, Matlab freelancer&lt;br&gt;
&amp;gt; vedenev@ngs.ru&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://simulations.narod.ru/&quot;&gt;http://simulations.narod.ru/&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 12:41:01 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649495</link>
      <author>Image Analyst</author>
      <description>&quot;Pulkit &quot; &amp;lt;pulkit.audacious1.remove1tomail@gmail.com&amp;gt; wrote in message &amp;lt;gue6bl$cla$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey, thnx a lot for tht.&lt;br&gt;
&amp;gt; I could manipulate with the image, but not with the individual pixels, like displaying the pixel value, the RGB value of a pixel etc.&lt;br&gt;
&amp;gt; Could you help me out with that ??&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; Pulkit&lt;br&gt;
------------------------------------------------------------------------------------------&lt;br&gt;
Can you explain why not?  You have the matrix of pixel values, so what's the problem????  There are lots of ways of displaying the value of the pixel in text form including disp(), sprintf(), just typing it on the command line, sending it to a text control on a GUI, msgbox(), etc.  Similarly there are lots of ways of displaying the pixel value in intenstiy form such as image(), imagesc(), imshow().  What do you need help with????&lt;br&gt;
&lt;br&gt;
And what do you mean by saying you &quot;could manipulate the image but not with individual pixels&quot;?  I have no idea what this means.  Do you mean that you can manipulate it by doing something to the whole array at a time, such as X = X/2?  Well you can do individual pixels too, just do something like X(132, 419) = X(137,419) / 2 to &quot;manipulate&quot; the pixel at location (137,419).  Why can't you do this?&lt;br&gt;
-ImageAnalyst</description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 12:44:01 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649498</link>
      <author>Ben </author>
      <description>&quot;Pulkit &quot; &amp;lt;pulkit.audacious1.remove1tomail@gmail.com&amp;gt; wrote in message &amp;lt;gue6bl$cla$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey, thnx a lot for tht.&lt;br&gt;
&amp;gt; I could manipulate with the image, but not with the individual pixels, like displaying the pixel value, the RGB value of a pixel etc.&lt;br&gt;
&amp;gt; Could you help me out with that ??&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; Pulkit&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Is this what you mean?&lt;br&gt;
&lt;br&gt;
colorData= get(hi,'CData');&lt;br&gt;
%Manipulate colorData as necessary&lt;br&gt;
% after manipulating the matrix colorData send the changes back to the image.&lt;br&gt;
set(hi,'CData',colorData) </description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 13:00:19 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649502</link>
      <author>Pulkit </author>
      <description>Hi Ben,&lt;br&gt;
&lt;br&gt;
Thnx for that.&lt;br&gt;
I meant that, as I move my mouse pointer over the image, i want to get pixel data point by point &amp; then I want to save these data values at certain pixels for future use.&lt;br&gt;
&lt;br&gt;
The problem is how do I get the handle of the image in the GUI.&lt;br&gt;
Once I use imshow()  to display the image in the axes , the Buttondownfcn of the axes no longer works, thus i am unable to detect the current location of my mouse pointer on the image.&lt;br&gt;
&lt;br&gt;
Thnx for the help.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Pulkit&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Ben &quot; &amp;lt;bta7905.nospam@msn.com&amp;gt; wrote in message &amp;lt;guefah$h41$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Pulkit &quot; &amp;lt;pulkit.audacious1.remove1tomail@gmail.com&amp;gt; wrote in message &amp;lt;gue6bl$cla$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hey, thnx a lot for tht.&lt;br&gt;
&amp;gt; &amp;gt; I could manipulate with the image, but not with the individual pixels, like displaying the pixel value, the RGB value of a pixel etc.&lt;br&gt;
&amp;gt; &amp;gt; Could you help me out with that ??&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Regards,&lt;br&gt;
&amp;gt; &amp;gt; Pulkit&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is this what you mean?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; colorData= get(hi,'CData');&lt;br&gt;
&amp;gt; %Manipulate colorData as necessary&lt;br&gt;
&amp;gt; % after manipulating the matrix colorData send the changes back to the image.&lt;br&gt;
&amp;gt; set(hi,'CData',colorData) </description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 13:59:16 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649522</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Pulkit &quot; &amp;lt;pulkit.audacious1.remove1tomail@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:gueg93$jj1$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hi Ben,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thnx for that.&lt;br&gt;
&amp;gt; I meant that, as I move my mouse pointer over the image, i want to get &lt;br&gt;
&amp;gt; pixel data point by point &amp; then I want to save these data values at &lt;br&gt;
&amp;gt; certain pixels for future use.&lt;br&gt;
&lt;br&gt;
I think from this description that you want either IMPROFILE or IMPIXEL from &lt;br&gt;
Image Processing Toolbox.&lt;br&gt;
&lt;br&gt;
&amp;gt; The problem is how do I get the handle of the image in the GUI.&lt;br&gt;
&amp;gt; Once I use imshow()  to display the image in the axes , the Buttondownfcn &lt;br&gt;
&amp;gt; of the axes no longer works, thus i am unable to detect the current &lt;br&gt;
&amp;gt; location of my mouse pointer on the image.&lt;br&gt;
&lt;br&gt;
Take a look at these documents from the support website:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/support/solutions/en/data/1-3K8R2L/&quot;&gt;http://www.mathworks.com/support/solutions/en/data/1-3K8R2L/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/support/solutions/en/data/1-1B03X/&quot;&gt;http://www.mathworks.com/support/solutions/en/data/1-1B03X/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Wed, 13 May 2009 18:09:02 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#649610</link>
      <author>Ben </author>
      <description>&quot;Steven Lord&quot; &amp;lt;slord@mathworks.com&amp;gt; wrote in message &amp;lt;guejni$c08$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Pulkit &quot; &amp;lt;pulkit.audacious1.remove1tomail@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:gueg93$jj1$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; Hi Ben,&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thnx for that.&lt;br&gt;
&amp;gt; &amp;gt; I meant that, as I move my mouse pointer over the image, i want to get &lt;br&gt;
&amp;gt; &amp;gt; pixel data point by point &amp; then I want to save these data values at &lt;br&gt;
&amp;gt; &amp;gt; certain pixels for future use.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I think from this description that you want either IMPROFILE or IMPIXEL from &lt;br&gt;
&amp;gt; Image Processing Toolbox.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The problem is how do I get the handle of the image in the GUI.&lt;br&gt;
&amp;gt; &amp;gt; Once I use imshow()  to display the image in the axes , the Buttondownfcn &lt;br&gt;
&amp;gt; &amp;gt; of the axes no longer works, thus i am unable to detect the current &lt;br&gt;
&amp;gt; &amp;gt; location of my mouse pointer on the image.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Take a look at these documents from the support website:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/support/solutions/en/data/1-3K8R2L/&quot;&gt;http://www.mathworks.com/support/solutions/en/data/1-3K8R2L/&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/support/solutions/en/data/1-1B03X/&quot;&gt;http://www.mathworks.com/support/solutions/en/data/1-1B03X/&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
I have seen something very similar to the GUI that you are describing.  It was either a demo or on the user community.  Unfortunately I could not find it but essentially you could mouse over an image and the RGB values of your current mouse position were displayed in 3 text boxes below the image.  I believe it used the window motion function with a call back that gets the current mouse position over the axis (something like &quot;gpos&quot; in the file exchange) then it used the current mouse position as an X, and Y index into CData returning the 3 RGB values.&lt;br&gt;
&lt;br&gt;
Hope that helps.</description>
    </item>
    <item>
      <pubDate>Tue, 30 Jun 2009 16:42:34 -0400</pubDate>
      <title>Re: How to handle uploaded image in Gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251207#661569</link>
      <author>Kate</author>
      <description>On May 13, 5:25 am, vedenev &amp;lt;vedenev.ma...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; When you open image you use&lt;br&gt;
&amp;gt; [X, map] = imread(...)&lt;br&gt;
&amp;gt; Work with this X.&lt;br&gt;
&amp;gt; When you show image:&lt;br&gt;
&amp;gt; hi=imshow(X,map,'Parent',ha);&lt;br&gt;
&amp;gt; where ha is handle to axis (usualy &quot;handles.axes1&quot;)&lt;br&gt;
&amp;gt; now &quot;hi&quot; is handle to image object.&lt;br&gt;
Huge thanks for that - I was working on a medical imaging project&lt;br&gt;
today and needed the GUI to set up an analysis for non-programmers.&lt;br&gt;
This advice is exactly what I needed.  Really appreciate your time in&lt;br&gt;
typing it in.</description>
    </item>
  </channel>
</rss>

