Ask Your Question
1

video capture crossbar

asked 2013-05-31 01:30:37 -0500

po gravatar image

Hi there!

Since the VideoInput has been merged to OpenCv it's possible to get a list of cameras. I spend a good day but didn't find how to do it. Well that is not really important because I can always use a DirectShow for that. What is more important for me is how can i set the input crossbar for a capture device? I'm pretty sure that it's possible due to a cap_dshow.cpp file in sources.

The best scenario would be if I got the VideoInpit access from a CvCapture.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-01-08 22:53:58 -0500

corruptblack gravatar image

As of 4.0.1 you can set CAP_PROP_CHANNEL property. This is the switch case for the property:

void videoInput::setPhyCon(int id, int conn){

    switch(conn){

        case 0:
            VDList[id]->connection = PhysConn_Video_Composite;
            break;
        case 1:
            VDList[id]->connection = PhysConn_Video_SVideo;
            break;
        case 2:
            VDList[id]->connection = PhysConn_Video_Tuner;
            break;
        case 3:
            VDList[id]->connection = PhysConn_Video_USB;
            break;
        case 4:
            VDList[id]->connection = PhysConn_Video_1394;
            break;
        default:
            return; //if it is not these types don't set crossbar
        break;
    }

    VDList[id]->storeConn    = conn;
    VDList[id]->useCrossbar    = true;
}

https://github.com/opencv/opencv/pull... Note: CAP_CROSSBAR_INPIN_TYPE has been changed to CAP_PROP_CHANNEL

edit flag offensive delete link more
0

answered 2016-06-09 06:42:18 -0500

trial_22 gravatar image

Hello. I have the same problem. Did you find the solution for that? Thanks..

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-05-31 01:30:37 -0500

Seen: 293 times

Last updated: May 31 '13