videoinput object dimensions in custom GUI

조회 수: 2 (최근 30일)
Yogi
Yogi 2014년 3월 15일
댓글: Image Analyst 2014년 3월 15일
Hi,
I am trying to acquire and process video frame by frame. So far I am able to achieve the task but my problem about setting dimension/size of videoinput object.
I am creating it as follows-
obj = videoinput('winvideo', deviceId, 'RGB24_640x480','ReturnedColorSpace','rgb');
triggerconfig(obj, 'manual');
set(obj, 'Tag', appTitle, 'FramesAcquiredFcnCount', 1, ... 'TimerFcn', @localFrameCallback, 'TimerPeriod', 0.01);
start(obj);
it opens the live video streaming and starts grabbing frames and does the necessary job in localFrameCallback.
Even if I try as follows-
obj = videoinput('winvideo', deviceId, 'RGB24_2592x1944','ReturnedColorSpace','rgb'); still the video streaming opens in same size/dimensions.
Can anybody please suggest how can I manipulate/ change videoinput object size/dimensions?
Note: I am using peekdata to grab frame.

채택된 답변

Image Analyst
Image Analyst 2014년 3월 15일
It should not. It should be created with the new size. Make sure you call delete() or clear() on the obj to make sure it's completely blown away before you try to create it anew.
  댓글 수: 1
Image Analyst
Image Analyst 2014년 3월 15일
Can you use preview() instead of start?

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

추가 답변 (2개)

Yogi
Yogi 2014년 3월 15일
Thanks for reply. Yes I am calling delete() and clear as well to clear that obj completely, like this - delete(obj); clear obj;
As soon as I restart with different resolution it still shows in same size.I am not getting any clue.

Yogi
Yogi 2014년 3월 15일
Please note I am using Matlab R2011b 32-bit.

Community Treasure Hunt

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

Start Hunting!

Translated by