フィルターのクリア

Capture an image from webcam

2 ビュー (過去 30 日間)
nghia nguyen
nghia nguyen 2011 年 4 月 22 日
Hi! I have a webcam.I want to capture an image from webcam and the save that picture into some type of image (*.jpg,*.png...).Can you tell me how can I do that.Thanks a lot

回答 (1 件)

Chirag Gupta
Chirag Gupta 2011 年 4 月 22 日
The Image Acquisition Toolbox should be able to help you achieve that. The commands are straightforward.
The command would just be:
vidobj = videoinput('winvideo');
snapshot = getsnapshot(vidobj);
imagesc(snapshot)
  2 件のコメント
nghia nguyen
nghia nguyen 2011 年 4 月 25 日
Hi,I have something to ask you about this again.I have an image with a large rectangle and inside that rectangle there are a red circle and a green circle.And I want to locate the center of red circle with the origin-coordinate is one of the corners of rectangle.Everything has been finished with an image I draw in power point.But when I draw that image on a real paper and using a webcam to capture that image,I cann't do the same things as I do with ppt image.When I convert the real image to binary,the rectangle,in some parts,is not separated with background and some areas of background dont't have the same color(black or white) with others.I try to reduce threshold but it is still bad.I just want to separate the rectangle with background to "label" it and then I do anything I do with ppt image.Can you tell me how can I do that.Sorry because my bad english.
Chirag Gupta
Chirag Gupta 2011 年 4 月 25 日
You could post this as a separate question with a title like image processing. This way you could get the Image Processing gurus to step in

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by