[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] VideoBuffer.get_frame() returns VideoFrame of different s

From: Qi Pan
Subject: [Toon-members] VideoBuffer.get_frame() returns VideoFrame of different size to the VideoBuffer
Date: Tue, 19 Jan 2010 15:52:51 +0000

Currently it appears that VideoBuffer.get_frame() can return a VideoFrame of a different size compared to the VideoBuffer. This problem occurs if the default resolution is not used. VideoBuffer.get_frame() always seems to return a frame of the default res (which for my pointgrey cam is unfortunately 752x480), even if VideoBuffer.size() is the right size (as defined by the string passed to openvideosource). This only seems to be a problem when using Firewire or Firewire via usb cameras (e.g. pointgrey).
This has the nasty side effect that specifying a 320x240 imagesize actually just crops the image (the top left portion) when using the tutorial code (modified version included) and gives image size problems due to obtaining VideoFrames of an unexpected size in other code (e.g. using image_convert() ).

The output of the tutorial code is that video_buffer->size() is 640x480 and frame->size() is 752x480.

I'll try to dig through the code but am not really experienced, so if anyone can think of a quick fix or point me in the correct direction to fix this that would be great!

Qi Pan
MCR President
Fitzwilliam College,
Cambridge, CB3 0DG
Tel: +44 (0) 1223 477061

Attachment: main.cpp
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]