myR: The Pi Camera p2

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:

http://192.168.0.10:9094/image.mjpg

Cam4

and (you need to close the previous page first)

http://192.168.0.10:9094/mask.mjpg

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).

Cam3

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.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s