Switching between multiple Cameras using Emgu CV

I have a quick question: I need to switch between the two camera on a tablet. Front and Back. By default, the Front camera is always used by Emgu CV.


-------------Problems Reply------------

Ok. There is a different constructor. I was building upon the 7 line demo for Emgu CV.

Using the correct overloaded constructor, this is what did the trick for me:

private Capture _capture;

private void InitCapture(Int32 _camIndex) {
try {
if (_capture != null) {
Application.Idle -= ProcessFrame;

_capture = new Capture(_camIndex);
Application.Idle += ProcessFrame;
catch (NullReferenceException excpt) {

private void ProcessFrame(object sender, EventArgs arg) {
Image<Bgr, Byte> frame = _capture.QueryFrame();
ImageBoxCapture.Image = frame;

private void CharmsBarBase_ButtonTop01Click(object sender, EventArgs e) {

private void CharmsBarBase_ButtonTop02Click(object sender, EventArgs e) {


Category:winforms Views:0 Time:2011-10-02

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.146 (s). 11 q(s)