flowdriveai / flowpilot

flow-pilot is an openpilot based driver assistance system that runs on linux, windows and android powered machines.
GNU General Public License v3.0
1.62k stars 238 forks source link

how to support USB webcam or wifi cam? #3

Open WJayWJay opened 1 year ago

WJayWJay commented 1 year ago

have any idea ?

RaghavPrabhakar66 commented 1 year ago

@WJayWJay If you are able to setup flowpilot on PC running with recorded video. Then all you need to change is tmp to 0 for Webcam and <url of image feed> for WiFi Cam. https://github.com/flowdriveai/flowpilot/blob/162251cdaeb1f1b4207f2b95103c4463c36f5458/selfdrive/sensord/java/ai.flow.sensor/camera/CameraManager.java#L42

WJayWJay commented 1 year ago

I mean running it on android device ,not using embedded cam. can realize it or have any tech questions? @RaghavPrabhakar66

MankaranSingh commented 1 year ago

Using external cam on android is not really on our roadmap. But if you can get the external camera image buffer, in either of the c++/python/java side, it should be easy enough and can guide you.

MankaranSingh commented 1 year ago

external cam can be added like this: https://discord.com/channels/976146733648191558/1022930526522331146/1083360322410254356

vasyl91 commented 1 month ago

Any news or updates? My head unit doesn't have built-in camera and external one connected via USB doesn't work with flowpilot (works with app provided by manufacturer).

@WJayWJay If you are able to setup flowpilot on PC running with recorded video. Then all you need to change is tmp to 0 for Webcam and <url of image feed> for WiFi Cam.

https://github.com/flowdriveai/flowpilot/blob/162251cdaeb1f1b4207f2b95103c4463c36f5458/selfdrive/sensord/java/ai.flow.sensor/camera/CameraManager.java#L42

Is there any way to update this file without installing Flowpilot from the scratch if I change this line capture = new VideoCapture("/storage/emulated/0/Android/data/ai.flow.android/files/tmp"); with url from USB camera?