acmerobotics / ftc-dashboard

React-based web dashboard designed for FTC
https://acmerobotics.github.io/ftc-dashboard
Other
168 stars 125 forks source link

Stream camera view not with vuforia #30

Closed adamrubinfeld closed 3 years ago

adamrubinfeld commented 3 years ago

Hi I mentor team and contently we work on vision recognition and we need to test the pipeline and that very hard the see the camera view from robot control that any way we can send the camera view to the dashboard (we using easyOpenCV)

rbrott commented 3 years ago

Yes, you can pass an instance of EOCV OpenCvCamera to dash FtcDashboard#startCameraStream().

adamrubinfeld commented 3 years ago

Can you send me example?

rbrott commented 3 years ago

Take any EOCV example and just add FtcDashboard.getInstance().startCameraStream(...); with the appropriate arguments. For instance, take this example and add FtcDashboard.getInstance().startCameraStream(phoneCam, 0) on line 98.

adamrubinfeld commented 3 years ago

I will try tomorrow I tried that before 4 days and that does a error of network or something

Windwoes commented 3 years ago

I tried that before 4 days and that does a error of network or something

So..... yeah... about that.... due to an oversight on my part, the internal camera v1 implementation actually runs on the UI thread, and Android will crash your app on purpose if you do network on the UI thread. Try switching to the EOCV camera v2 implementation.

adamrubinfeld commented 3 years ago

@FROGbots-4634 And if I working with webcam?

Windwoes commented 3 years ago

@adamrubinfeld webcams should not pose an issue.

adamrubinfeld commented 3 years ago

Ok tnx I will try tomorrow and give answer of that work

adamrubinfeld commented 3 years ago

Work Tank you very much guys