Index>Robot Kit>Alter All in One Kit for RPi>Lesson 38 OpenCV Function Development Preparation
No related product information!

Lesson 38 OpenCV Function Development Preparation

949


        The real-time video transmission function comes from the open source project of Github the MIT open source agreement flask-video-streaming.

When you want to develop a certain OpenCV function, you need to do some preparatory work. First, you need to prepare two .py files in the same folder in the Raspberry Pi, one is app.py, the other is base_camera.py, and you need to put the corresponding camera_opencv.py in the same folder as app.py and base_camera.py, and then run app.py in the Raspberry Pi console.When you use the follow-up tutorial to develop a certain OpenCV related function, you only need to put the corresponding camera_opencv.py in the same folder as this app.py and base_camera.py, and then run it in the Raspberry Pi console.There are several sample codes in the alter folder provided by us. You need to find them in the alter/01SoftwarePackage/server directory, if you need to use or edit these code programs.

image.png


After running app.py, we use a device in the same local area network as the Raspberry Pi to open Google Chrome. We enter the IP address of the Raspberry Pi and port 5000 in the address bar.The address entered in the address bar is shown in the figure below. 192.168.3.146 is the IP address of the Raspberry Pi (the IP address of each Raspberry Pi is different).5000 is the port number that must be filled in, and you will see an "Adeept Bot Contorller" after opening it.

image.png