Stream with a IP Basler camera.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Stream with a IP Basler camera.

opencv-users mailing list
I'm tryed to conect using opencv with a IP basler câmera BIP2-1280 without success.

I'm trying with this code.

#include <stdio.h>
#include <opencv2/opencv.hpp>

int main(){

CvCapture *camera = cvCaptureFromFile("http://192.168.1.13:80/mpeg4?buffer=0&mode=live");
if (camera == NULL)
{
printf("camera is null\n");
system("PAUSE");
}
else
printf("camera is not null");
cvNamedWindow("img");
while (cvWaitKey(10) != 27){
double t1 = (double)cvGetTickCount();
IplImage *img = cvQueryFrame(camera);
/*if(img){
cvSaveImage("C:/opencv.jpg",img);
}*/
double t2 = (double)cvGetTickCount();
printf("time: %gms fps: %.2g\n", (t2 - t1) / (cvGetTickFrequency()*1000.), 1000. / ((t2 - t1) / (cvGetTickFrequency()*1000.)));

cvShowImage("img", img);
}
cvReleaseCapture(&camera);
}

But I Always receive:
warning: Error opening file (../../modules/highgui/src/cap_ffmeg_impl.hpp:545)
câmera is null

How do I connect with a Basler câmera? I already several path  like this page:
http://www.ispyconnect.com/man.aspx?n=Basler to make a stream.



Marcus Renê Giannetti
http://lattes.cnpq.br/0431160327535046
Contato (31) 8827-4864 (oi)






































   
Reply | Threaded
Open this post in threaded view
|

Re: Stream with a IP Basler camera.

opencv-users mailing list
HI
    May be your FFMPEG library was not built properly or you are using pre
built library , you need to re configured for your decoding algorithm for
network streaming, but still there is some limitation, if you describe your
camera details then I can help you asap.

Thanks
Somnath




   Thanks & Regards
  Somnath Mukherjee
[hidden email]

On Fri, Apr 24, 2015 at 7:54 PM, Marcus Rene [hidden email] [OpenCV] <
[hidden email]> wrote:

>
>
> I'm tryed to conect using opencv with a IP basler câmera BIP2-1280 without
> success.
>
> I'm trying with this code.
>
> #include <stdio.h>
> #include <opencv2/opencv.hpp>
>
> int main(){
>
> CvCapture *camera = cvCaptureFromFile("
> http://192.168.1.13:80/mpeg4?buffer=0&mode=live");
> if (camera == NULL)
> {
> printf("camera is null\n");
> system("PAUSE");
> }
> else
> printf("camera is not null");
> cvNamedWindow("img");
> while (cvWaitKey(10) != 27){
> double t1 = (double)cvGetTickCount();
> IplImage *img = cvQueryFrame(camera);
> /*if(img){
> cvSaveImage("C:/opencv.jpg",img);
> }*/
> double t2 = (double)cvGetTickCount();
> printf("time: %gms fps: %.2g\n", (t2 - t1) /
> (cvGetTickFrequency()*1000.), 1000. / ((t2 - t1) /
> (cvGetTickFrequency()*1000.)));
>
> cvShowImage("img", img);
> }
> cvReleaseCapture(&camera);
> }
>
> But I Always receive:
> warning: Error opening
> file (../../modules/highgui/src/cap_ffmeg_impl.hpp:545)
> câmera is null
>
> How do I connect with a Basler câmera? I already several path  like this
> page:
> http://www.ispyconnect.com/man.aspx?n=Basler to make a stream.
>
>
>
> Marcus Renê Giannetti
> http://lattes.cnpq.br/0431160327535046
> Contato (31) 8827-4864 (oi)
>
>
>
>
>    
>
Reply | Threaded
Open this post in threaded view
|

RE: Stream with a IP Basler camera.

opencv-users mailing list
HI,

How I built and configure a FFMPEG library to use with IP câmeras?,





Marcus Renê Giannetti




To: [hidden email]
From: [hidden email]
Date: Sun, 26 Apr 2015 13:13:41 +0530
Subject: Re: [OpenCV] Stream with a IP Basler camera.












































   

      HI
    May be your FFMPEG library was not built properly or you are using pre built library , you need to re configured for your decoding algorithm for network streaming, but still there is some limitation, if you describe your camera details then I can help you asap.


Thanks
Somnath

           Thanks & Regards  Somnath Mukherjee
[hidden email]


On Fri, Apr 24, 2015 at 7:54 PM, Marcus Rene [hidden email] [OpenCV] <[hidden email]> wrote:











































 





I'm tryed to conect using opencv with a IP basler câmera BIP2-1280 without success.

I'm trying with this code.

#include <stdio.h>
#include <opencv2/opencv.hpp>

int main(){

CvCapture *camera = cvCaptureFromFile("http://192.168.1.13:80/mpeg4?buffer=0&mode=live");
if (camera == NULL)
{
printf("camera is null\n");
system("PAUSE");
}
else
printf("camera is not null");
cvNamedWindow("img");
while (cvWaitKey(10) != 27){
double t1 = (double)cvGetTickCount();
IplImage *img = cvQueryFrame(camera);
/*if(img){
cvSaveImage("C:/opencv.jpg",img);
}*/
double t2 = (double)cvGetTickCount();
printf("time: %gms fps: %.2g\n", (t2 - t1) / (cvGetTickFrequency()*1000.), 1000. / ((t2 - t1) / (cvGetTickFrequency()*1000.)));

cvShowImage("img", img);
}
cvReleaseCapture(&camera);
}

But I Always receive:
warning: Error opening file (../../modules/highgui/src/cap_ffmeg_impl.hpp:545)
câmera is null

How do I connect with a Basler câmera? I already several path  like this page:
http://www.ispyconnect.com/man.aspx?n=Basler to make a stream.



Marcus Renê Giannetti
http://lattes.cnpq.br/0431160327535046
Contato (31) 8827-4864 (oi)


























































   

































































     
Reply | Threaded
Open this post in threaded view
|

RE: Stream with a IP Basler camera.

keghn
 I changed the code to work with my webcam on my laptop and it did not work. It just generated a empty white window.
 
 Can this program work on a pc that has a monitor with a camera on it? I just saying because i have not used a rig in years.
 If you got a built in webcam, try the code out, and then do the ip camera.