Acessing two webcam and show data same time and in same window Using Netbeans [closed]

asked 2014-08-14 09:58:57 -0600

anoop gravatar image

I am using following codes to get image from webcam :

CvCapture capture=opencv_highgui.cvCreateCameraCapture(1);

        opencv_highgui.cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT, 768);
         opencv_highgui.cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH, 1388);
          IplImage grabb=null;
          CanvasFrame f=new CanvasFrame("Wabcam");

          while( (f.isVisible()) &&  ((grabb=opencv_highgui.cvQueryFrame(capture))!=null) )



and it work nicely but it shows in a new window i have two webcam and i want to see data from both webcam at same time and in same window Some thing like:

|     -------------------               ------------------------    |
|    |  Video 1         |               |    Video2             |   |
|    |                  |               |                       |   |
|    --------------------                -----------------------    |
|                                                                   |
|       Some other Controls like record and flip etc here           |
|                                                                   |

I had create same design in netbeans now i want to that CanvasFrame only supports showImage(grabb);. is there any other node in netbeans which can be used for showing image from webcam .

Please help me.

Thank You.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-19 15:45:12.115826


what kind of java wrapper are you using there ? (this does not look like opencv's own java bindings)

berak gravatar imageberak ( 2014-08-14 10:11:37 -0600 )edit


anoop gravatar imageanoop ( 2014-08-14 13:06:43 -0600 )edit

i want to know how can i show 2 videos same time from two webcams

anoop gravatar imageanoop ( 2014-08-14 13:07:48 -0600 )edit

usually, you just open 2 VideoCaptures with different ids.

btw, why aren't you using opencv's own java api ?

berak gravatar imageberak ( 2014-08-14 13:21:03 -0600 )edit

I got this code from a youtube tutorial Is there some other way please tell me if you have an example

anoop gravatar imageanoop ( 2014-08-14 15:07:59 -0600 )edit

i google for access wabcam and i found that video . If you can provide me right way to code for accessing wabcam that will be a great help for me. and I have just programing from few months so i am not much experienced about all such thing.

anoop gravatar imageanoop ( 2014-08-14 15:38:27 -0600 )edit