guineawheek / endercv

Yo! This project has run it's course. Try [this](https://github.com/OpenFTC/EasyOpenCV) instead!
Other
0 stars 0 forks source link

USB webcam support #4

Closed dadosch closed 5 years ago

dadosch commented 6 years ago

Would this support USB webcams when you use JavaCamera2View in CustomCameraView?

Camera2 API should support it: https://source.android.com/devices/camera/external-usb-cameras

We currently don't have a webcam yet, could anyone test this? Would be very appreciated.

guineawheek commented 5 years ago

this could possibly work, but i don't have the phones or the webcams to test it. It wouldn't be too hard to do, to edit a few lines here and there It would likely break zte speed compatibility.

minerharry commented 5 years ago

What in total would be required to do this? I would like to hook one up for our team this year, but I don't know enough about ender/opencv/camera2 interfaces to know what to change

Windwoes commented 5 years ago

@dadosch @minerharry FYI, EasyOpenCV provides essentially identical functionality, and supports USB webcams.

guineawheek commented 5 years ago

use easyopencv

EnderCV was designed and developed in the summer of 2017 before webcams were even legal. pretty much the entire codebase was made around the assumption that the internal camera would be used.

That said, EasyOpenCV's OpenCVPipeline is almost exactly identical to EnderCV's OpenCVPipeline to the point where this example blue object tracking pipeline will work almost verbatim with EasyOpenCV (just need to edit the first line of processFrame to be public Mat processFrame(Mat rgba))