Opening IP camera with openbr

279 views
Skip to first unread message

Eric Offermann

unread,
Nov 19, 2014, 11:24:06 AM11/19/14
to openb...@googlegroups.com
I am trying to view an ip camera with openbr, as an example to see if I can get the stream to open, I am using a public duke ip camera.  Here is my command:

br -gui -algorithm PerFrameDetection -enroll http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg

I am going to start stepping through the code now, but I was not sure if there was some trick to IP streams.

This is the output I get:

Set algorithm to PerFrameDetection
100.00%  ELAPSED=00:00:00  REMAINING=00:00:00  COUNT=1

I did see this in the code:
openbr/plugins/stream.cpp
...
// We can open either files (well actually this includes addresses of ip cameras
// through ffmpeg), or webcams. Webcam VideoCaptures are created through a separate
// overload of open that takes an integer, not a string.
// So, does this look like an integer?

Opencv seems to be installed correctly with FFMPEG and I have opened the webcam in VLC successfully on that machine.

Charles Otto

unread,
Nov 19, 2014, 11:40:59 AM11/19/14
to Eric Offermann, openb...@googlegroups.com
It should work if you edit this line:

and replace:
            video.open(getAbsolutePath(input.file.name));
with:
            video.open(input.file.name.toStdStr());

You may also have to put the camera address in a .txt file (i.e. as the only line in a .txt file, and enroll that), although I was able to stream the camera after just making the above source code change.


--
You received this message because you are subscribed to the Google Groups "Open Source Biometric Recognition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openbr-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Offermann

unread,
Nov 19, 2014, 1:16:00 PM11/19/14
to openb...@googlegroups.com, ejo...@gmail.com
That did the trick, thanks!  It is toStdString() for those who also have this issue.

David Yu

unread,
Nov 26, 2014, 11:01:30 AM11/26/14
to Eric Offermann, openb...@googlegroups.com
On Thu, Nov 20, 2014 at 2:16 AM, Eric Offermann <ejo...@gmail.com> wrote:
That did the trick, thanks!  It is toStdString() for those who also have this issue.
Did the same but got the same error still.
I installed opencv (2.4.10 though) from http://openbiometrics.org/doxygen/latest/linux_gcc.html
I followed those instructions (except for the opencv version) and I'm not sure if I still need to install something?
I'm on Ubuntu 13.04 x64 



--
When the cat is away, the mouse is alone.
- David Yu

Charles Otto

unread,
Nov 26, 2014, 11:55:01 AM11/26/14
to David Yu, openb...@googlegroups.com
I would try following this note from the build instructions, and see if that resolves the issue:


David Yu

unread,
Nov 27, 2014, 8:20:10 AM11/27/14
to Charles Otto, openb...@googlegroups.com
On Thu, Nov 27, 2014 at 12:54 AM, Charles Otto <otto...@gmail.com> wrote:
I would try following this note from the build instructions, and see if that resolves the issue:
Thanks.  That works! 
Reply all
Reply to author
Forward
0 new messages