Computer Vision video frames result on react with django

Viewed 510

I want to show image frames generated from OpenCV on react, I am using Django as server-side. I get a single frame from each request when I send requests from react to Django, so it constitutes a large number of requests at a time.

For now, I am just sending a request to API again and again which I think is not a proper way. I need resources like a tutorial , articles to learn the best way to achieve this thing.

I have seen like WebSockets will be good but I researched a lot but can't found a proper resource.

Can someone suggest to me or can share a good resource to learn?

1 Answers

I don't have much knowledge of react. But if I were to do the same task on a webpage then I would read images/frames from webcam using javascript. Here is an example of it: Read image from webcam using javascript.

After retrieving the image, you could send frames from js to Django and perform the OpenCV task there.

Related