t-oster / VisiCam

A Java application, that turns a webcam into a VisiCut compatible network camera with marker detection and perspective correction. Uses OpenCV through JavaCV
Other
36 stars 12 forks source link

OpenCV Capture or Webcam Capture ? #1

Closed peteruithoven closed 10 years ago

peteruithoven commented 10 years ago

I'd like to get VisiCam working. Preferably on a as simple as possible computer, probably a raspberry pi. (A TP-link MR3020 with OpenWRT would be even nicer, but that's probably not possible) I see you have a branch where you're using webcam feature using the following library. https://github.com/sarxos/webcam-capture Which branch should I pick? What is the status of the webcam capture branch?

t-oster commented 10 years ago

The VisiCam project is pre-alpha I fear. The webcam-capture branch is only one commit ahead, which just includes the library and replaces the capture-call. I don't know anymore if it worked, so you will have to try. I think the simplest solution would be to use an external command for the webcam-capture, like "fswebcam" or "uvcapture". You can enter that command in the web-interface.

I would still vote for a re-implementation of VisiCam either with a RaspberryPi and the PiCam, or as a android/iOS app. But as always, time is the enemy

t-oster commented 10 years ago

If I recall correctly, the native openCV capture didn't work... but try both branches.

peteruithoven commented 10 years ago

I think that would be interesting, because of the nice camera module it's a very solution. I found and improved an enclosure for a raspberry pi and a camera module: http://www.thingiverse.com/thing:178628

peteruithoven commented 10 years ago

Didn't work specifically on Raspberry Pi's or in general?

t-oster commented 10 years ago

I think it didn't work in general. How do you access the PiCam? Maybe there is a tool for capturing a hi-res picture and saving it to jpeg? This can be used by VisiCam...

peteruithoven commented 10 years ago

You're right, there is a nice commandline tool for this; raspistill http://www.raspberrypi.org/camera

I did found the custom command configuration, so I was hoping I could do something like that.

t-oster commented 10 years ago

Unfortunately I do not have a camera module yet, so I cannot test. But it should be easy. VisiCam still requires four round markers in the corners (circles in circles). But I was planning to make just a generic edge-detection and use assume they are perpendicular and thus use their corners for the homography...

peteruithoven commented 10 years ago

So, when you use the custom capture command you don't use opencv capture or the webcam capture library? I did quite some computer vision projects, but all in openFrameworks (framework for artists in c++), and dragging that into this project feels wrong. Maybe if I can't get this to work I'll try something in basic c / c++.

t-oster commented 10 years ago

Nope... I just use the custom command and expect the JPEG file to be present after. I still use OpenCV for the marker-detection and homography. I wanted to avoid c/c++ to prevent the deployment and dependency-hell. If we only use the raspberry pi however, It would be just an sd-card image, so c++ would be ok. On the other hand, most of the features are available as pure-java libraries like boof-cv etc. This would then be creating just one jar and run it on all platforms...