필터 지우기
필터 지우기

Image processing - frame to video

조회 수: 3 (최근 30일)
Sen
Sen 2011년 10월 4일
I want to display processed frames as a video.
Say I want to draw a box around a detected ball(on the realtime video) and display it.
I can grab frames from the webcam continuously(in a loop) and process it to display the box. But how do I display the processed frames as a continuous video? Something like this: http://www.youtube.com/watch?v=_FIU2rLs2mA

채택된 답변

Walter Roberson
Walter Roberson 2011년 10월 4일
The closest you are going to get within MATLAB itself is to use image() or imshow() to create an image object, and then for each frame, set() the CData property of that image object to the new contents. Remember to drawnow() afterwards to allow it to show up on the screen.

추가 답변 (1개)

Ebad Ahmadzadeh
Ebad Ahmadzadeh 2011년 10월 4일
You could show the grabbed images in a loop using imshow() function.
  댓글 수: 2
Walter Roberson
Walter Roberson 2011년 10월 4일
You _could_, but that would be unnecessarily slow and choppy compared to what I indicated in my answer where a single image display call is used and you then update MATLAB's notion of what the image's content is.
Ebad Ahmadzadeh
Ebad Ahmadzadeh 2011년 10월 25일
Cool! you're right Walter.

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by