CVD::V4LBuffer<yuv422> Logitech web 9000 cam control help

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

 



Hi people,my name is Camilo im student of Systems Engineering at Universidad
Catolica de Colombia  http://mi.eng.cam.ac.uk/~er258/cvd/ , im currently
working on a project based on PTAM http://www.robots.ox.ac.uk/~gk/PTAM/, im
tryng to have control of my cam but i can not do it, there is the following
code to control video source using v4l2 like this (the project use this
libraries in here for computer vision http://mi.eng.cam.ac.uk/~er258/cvd/)

// Copyright 2008 Isis Innovation Limited
#include "VideoSource.h"
#include <cvd/Linux/v4lbuffer.h>
#include <cvd/colourspace_convert.h>
#include <cvd/colourspaces.h>
#include <gvars3/instances.h>

namespace PTAMM {

using namespace CVD;
using namespace std;
using namespace GVars3;

VideoSource::VideoSource()
{
  cout << "  VideoSource_Linux: Opening video source..." << endl;
  string QuickCamFile = GV3::get<string>("VideoSource.V4LDevice",
"/dev/video0");
  ImageRef irSize = GV3::get<ImageRef>("VideoSource.Resolution",
ImageRef(1600,1200));
  int nFrameRate = GV3::get<int>("VideoSource.Framerate", 30);
  V4LBuffer<yuv422>* pvb = new V4LBuffer<yuv422>(QuickCamFile, irSize, -1,
false, nFrameRate);
  mirSize = pvb->size();
  mptr = pvb;
  cout << "  ... got video source." << endl;
};
ImageRef VideoSource::Size()
{
  return mirSize;
};

void VideoSource::GetAndFillFrameBWandRGB(Image<byte> &imBW, Image<Rgb<byte>
> &imRGB)
{
  V4LBuffer<yuv422>* pvb = (V4LBuffer<yuv422>*) mptr;
  VideoFrame<yuv422> *pVidFrame = pvb->get_frame();
  convert_image(*pVidFrame, imBW);
  convert_image(*pVidFrame, imRGB);
  pvb->put_frame(pVidFrame);
}}

but i dont have control of camera paremeters i change resolution but i dont
get any result, im beginner with this so im kind of lost, this app start
video using opengl window, but when i try to maximize window i lose
resolution, do you have any ideas so i can control cam paremeters, camera
has a lot of features as you can see in here
http://www.logitech.com/en-us/webcam-communications/webcams/devices/6333,
thanks for any help you people can give me, please forgive me for poor
details on specifications for what i need, but i dont know what else to
explain about my situation, i was tryng to read methods for
V4LBuffer<yuv422>, but i dont find a way to change camera parameters.


thanks in advance

att: Camilo Soto
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list


[Index of Archives]     [Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Linux Kernel]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Util Linux]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [DVB Maintainers]     [Linux USB]     [Yosemite Information]
  Powered by Linux