Camera capture for ZGE

Use of external libraries (DLLs) from ZGE.

Moderator: Moderators

Post Reply
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Camera capture for ZGE

Post by Rado1 » Sun May 01, 2016 12:12 pm

During my regular updating of external libraries, I also tried to update ZgeCV, to the latest OpenCV library v3.1. After compilation I observed that the resulting DLL is about 19MB and still has memory leaks while detecting shapes. I was disappointed, and tried to implement smaller DLL for capturing camera for ZGE.

ZgeCam is the result. It is based on videoInput library and uses DirectShow as the underlying technology. Thanks to this it has only 29KB. It is also faster in video capturing than OpenCV.

It works on my PC, but I'm not sure about how it could work on other laptops or PCs with external cameras. I would be thankful, if you could test it for me on your machine. Thanks in advance!

Comments are welcome.

Attached you will find the library and two demo projects. The first one captures the camera and uses a simple shader to add some effects. Press keys 1-5 to activate effect (1 - no effect, 2 - grayscale, 3 - distorting mirror, 4 - water surface, 5 - edge detection). Mouse X and Y positions control effect parameters. The second demo uses the captured image as a dynamic texture for cube.
scr1.png
screenshots
scr1.png (56.67 KiB) Viewed 7045 times
Attachments
ZgeCam01Demos.zip
demo projects
(23.13 KiB) Downloaded 299 times

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Camera capture for ZGE

Post by Rado1 » Sun May 01, 2016 12:35 pm

Ville, in FL ZGE Visualizer, you are able to capture WebCam by (I think) MediaVideoDecoder. Do you think that ZgeCam is still useful?

Imerion
Posts: 198
Joined: Sun Feb 09, 2014 4:42 pm

Re: Camera capture for ZGE

Post by Imerion » Sun May 01, 2016 1:46 pm

Very cool! Not sure I would use it, but it would be cool to do a Wario Ware/Eye Toy-like game sometime. :)

Post Reply