[WIP] Webcam Plugin

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.

Re: [WIP] Webcam Plugin

Postby thejesusbr » Fri Aug 26, 2011 8:44 pm

I depared with the same problem, so I wrote a entire new implementation using OpenCV. It is not difficult to try your own. I am finishing my master degree dissertation, so I don't have time to make a plugin, but I can give you the class that I developed. You have to solve the dependencies on your own, but with my code you will have a starting point. I also implement it with pthreads, so the rendering loop will not be limited by the frame rate of the cam. It needs a more elegant implementation of frame buffers, but it fits my needs right now. The code was developed with Ogre 1.7.2, so you may have to adaptate it in order to run with your version. The comments are in portuguese and you will need pthreads and OpenCV >= 2.2, but with these two libraries it can be done. As a bonus, I am working with Kinect and since the OpenCV has support for it, you can use it too! To use the library, simply include the codes and instantiate the VideoManager class. It renders the video source to a dynamic texture associated with it. You must call the update method to renew the texture each frame. There are a trigger that signal the arrive of a new frame, preventing crossed accessess to the texture.
Attachments
VideoManager.zip
Video Manager for Ogre. Tested with 1.7.2 version.
(3.2 KiB) Downloaded 87 times
User avatar
thejesusbr
Gnoblar
 
Posts: 15
Kudos: 0
Joined: 03 Feb 2011
Location: Campinas, SP Brasil

Re: windows7 problems with Webcam Plugin

Postby mars_wei » Mon Aug 29, 2011 10:18 am

In windows7 use WebcamPlugin.
WebcamPlugin plug in the phrase code mCvCapture = cvCreateCameraCapture (0);.
cvCreateCameraCapture (0) returns an empty value, no significant visual images. looking for a long time could not find the problem.
help me. Thank you
mars_wei
Gnoblar
 
Posts: 1
Kudos: 0
Joined: 29 Aug 2011

Re: [WIP] Webcam Plugin

Postby Muxi21 » Wed Feb 13, 2013 1:19 pm

thejesusbr wrote:Does anyone able to make the plugin work in linux? I even managed to compile and load, but the demo does not compile. Or does anyone have any other solution to have the webcam working? I intend to do a project with augmented reality.

Thanks!


No problem :)

You can try to set plugin.expose_full_path to true in about:config and then enter about:plugins in the location (address) bar to check the path and versions being used/detected. Hopefully this would provide some insight.

Thanks
Muxi21
Gnoblar
 
Posts: 1
Kudos: 0
Joined: 13 Feb 2013

Previous

Return to Using OGRE in practice

Who is online

Users browsing this forum: No registered users and 5 guests