필터 지우기
필터 지우기

Integrating webcam into GUI

조회 수: 7 (최근 30일)
Nathaniel Wolff
Nathaniel Wolff 2020년 9월 24일
댓글: Image Analyst 2023년 12월 23일
Im writing code for a robot which when it comes into contact with a wall (which I can alrady do) it stops and asks for for a user prompt. The prompt would check the webcam for a color then either go backwards or turn left/right. I think I need to use inputdlg or listdlg. I don't know how to make my integrated webcam an option for an input.

답변 (2개)

Manas Meena
Manas Meena 2020년 9월 28일
Webcam can be connected to MATLAB using the Image Acquisition Toolbox. Please refer to the document link below to learn how to use the Image Acquisition Toolbox.
The PREVIEW function has input arguments which allow you to specify a handle graphics image object where the video will be displayed.
If you want to achieve this without the Image Acquisition Toolbox you can use the USB Webcam Preview function, refer to the link below to learn how to use it.
You can call upon preview in your code from a GUI callback.
  • Create an axes of the appropriate size and position (the preview has to be inside an axes).
  • Then create an image() of the appropriate size within that axes.
  • Pass the image object to preview.

bintang dwi
bintang dwi 2023년 12월 23일
how to make gui using camera and can idtentified something
  댓글 수: 1
Image Analyst
Image Analyst 2023년 12월 23일
See attached webcam capture. No segmentation is done, only image capture.
To learn fundamental concepts, invest 2 hours of your time here:

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by