Prev: Homework Solutions Help
Next: what's the best way to find the number of consecutive blocks in an array?
From: Peng Swee Yap on 26 Jan 2010 16:13 I have a GUI which has a button to capture an image via webcam. I used 'imwrite' to store the graphic in a folder on my personal computer. But i do not know how to display the image on the GUI that i have created. Can anyone help me? Thank.
From: Jan Simon on 26 Jan 2010 16:27 Dear Peng! > I have a GUI which has a button to capture an image via webcam. I used 'imwrite' to store the graphic in a folder on my personal computer. But i do not know how to display the image on the GUI that i have created. Can anyone help me? help image Kind regards, Jan
From: Husam Aldahiyat on 26 Jan 2010 20:46 "Peng Swee Yap" <impengswee(a)gmail.com> wrote in message <hjnlt0$q2e$1(a)fred.mathworks.com>... > I have a GUI which has a button to capture an image via webcam. I used 'imwrite' to store the graphic in a folder on my personal computer. But i do not know how to display the image on the GUI that i have created. Can anyone help me? > > Thank. You need to creat an axes on the GUI to put your picture on. If you're using GUIDE, pick the axes shape on from the left and put it. If you're noy using GUIDE, use the command axes(). Then, use image() to put the picture on the axes, like this: i = imread('pic.jpg'); image(i) axis image axis off OR if you have the image processing toolbox, use imshow(), better. i = imread('pic.jpg'); imshow(i)
From: Peng Swee Yap on 27 Jan 2010 04:53
> You need to creat an axes on the GUI to put your picture on. If you're using GUIDE, pick the axes shape on from the left and put it. If you're noy using GUIDE, use the command axes(). > Then, use image() to put the picture on the axes, like this: > > i = imread('pic.jpg'); > image(i) > axis image > axis off > > OR if you have the image processing toolbox, use imshow(), better. > > i = imread('pic.jpg'); > imshow(i) I got it. Thank you very much. Currently when i call to preview webcam, the webcam will preview in another screen, if i wanted to preview webcam on the same GUI, i need to use the axes to call the webcam? |