How to get an image from webcam in simulimk?
조회 수: 3 (최근 30일)
이전 댓글 표시
I use usb webcam and I need to get snapshot, someone know how can I do it in simulink?
댓글 수: 2
Eamon Gekakis
2022년 6월 24일
This needs a bit more clarification, do you want simulink to actuate a usb webcam snapshot and then display in simulink? Or do you just need to display a snapshot image in simulink. For the latter, you can try displaying the image in an annotation, let me know if this helps.
답변 (1개)
Pravarthana P
2022년 6월 27일
Hi Dekel Mashiah,
I understand that you are trying to capture images from a webcam and use that in a MATLAB function. You can try the two possible steps:
- Use can capture the images through webcam directly to MATLAB using the Webcam Image Acquisition using the function snapshot. For the same you can refer the following documentations:
Webcam Image Acquisition: Webcam Image Acquisition - MATLAB & Simulink (mathworks.com)
Snapshot function : Acquire single image frame from a webcam - MATLAB snapshot (mathworks.com)
- If you need to use Simulink to capture the images you can try changing the property Read all frames of From video block as mentioned in the documentation to capture the latest image frame that is available: Capture live image data from image acquisition device - Simulink (mathworks.com)
Hope the above provided information helps you!!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!