I am working on a plugin that obtains an image/video from the webcam feed, performs some operations on it in python specifically using opencv,numpy, TensorFlow, and sends it back the result to the front end.
My question is how do I get the image/webcam URL link from the user into the python function in init.py and how do I send the result back to the front end?
My initial approach was to use OpenCV js and perform the operations using a function in JS and display the result there itself. However, I couldn't find a way to include the OpenCV js library in the script.
Tried using the below lines in the jinja2 file but it did not work.
<scriptasync src="opencv.js" >
I am fairly new to plugin development so these questions might feel redundant. If this has already been discussed before, kindly provide the link of the same.
Thanks in advance