camserver and CamHandler
in order to stream the video on a browser , I add this camserver object that it takes care to pass the last available image.
Consider this webserver is working on port 9094, You can easily test it by run:
sudo python camera.py
than typing on a browser:
and (you need to close the previous page first)
They are respectively the last image with result of ball tracking and the result of the filters before search for the contors.
This can help to define which values of HSV are correct to look for green color.This part can be quite tricky, so I created also a html page that can help me by moving slides on it.You can open it in the browser but for the moment it does not apply the change on the mask (this will work only when I will introduce also the server.py and the rc.py -remotecontrol- in the future posts).
In my github you can find now the upload of this part of the code.
PS: Note that now there is a bug that I did not yet solved: since in the camHandler.do_GET there is an infinite loop continuously updating image, you can not open two pages connected to the same server.You need first to close a webpage than open the new one.