Posts

Showing posts from August, 2019
Image
Installing  mySQL connector to  connect python  with php myAdmin in Raspberry Pi . To run mySQL with python we need to establish connection between mySQL and python in Raspberry pi. We already install mysql with php myadmin . (if phpmyadmin is not install in your raspberrypi then visit  : https://aiworldofjuhi.blogspot.com/2019/02/how-to-install-mysql-on-raspberry-pi-3b.html ). now, go to command prompt or terminal in raspberry pi and install bellow library. Step 1 : $sudo apt-get update Step 2 : $sudo apt-get upgrade Step 3 : $sudo apt-get -y install python-mysql.connector After installing python-mysql.connector python is ready to work with mysql. here, An example of inserting data in php myadmin using python-mysql.coonector. Way: 1 import mysql.connector mydb=mysql.connector.connect(host='localhost',user='raspberry',passwd='juhi',database='chanchala') print ("working") mycursor=mydb.cursor() #mycursor.ex
Image
Drawing Virtual Shapes on Live video through mouse click using Python+openCV+mySQL(Raspberry pi 3B+)        In this OpenCV Python Tutorial blog, I will be covering various aspects of Computer Vision using OpenCV in Python. OpenCV   provides many drawing functions to draw geometric shapes and write text on images, But drawing virtual geometric shapes using Mouse click become more easier and its also dost not need any fix 3D coordinates to draw shape. In this blog i will describe how to draw virtual shapes on live video frame. here i am using raspberry pi 3b+ as processor and pycam to capture live video. Whole  flow divided in to three step. in 1st step i initialize all require libraries for live video capture, creating table in mysql , inserting the coordinates of each mouse click and after import every coordinate. 2nd step code describe  how to draw virtual line by using last 2 coordinate of mouse click.and in last step my code says that how any particular closed ge