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

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

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;
           grabb=opencv_highgui.cvQueryFrame(capture);
          CanvasFrame f=new CanvasFrame("Wabcam");

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

          {
          f.showImage(grabb);

          }

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 close merge delete

Comments

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 -0500 )edit

means?????

anoop gravatar imageanoop ( 2014-08-14 13:06:43 -0500 )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 -0500 )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 -0500 )edit

I got this code from a youtube tutorial https://www.youtube.com/watch?v=0mE0LuXi9b8 Is there some other way please tell me if you have an example

anoop gravatar imageanoop ( 2014-08-14 15:07:59 -0500 )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 -0500 )edit