Posts

Image
Real Time Face Detection using Haar Cascade Algorithm and cloning detected face. Haar  Cascade is a machine learning object detection algorithm used to identify objects in an image or video and based on the concept of  ​ ​  features proposed by Paul Viola and Michael Jones in their paper "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. It is a machine learning based approach where a cascade function is trained from a lot of positive and negative images.   It is then used to detect objects in other images. The algorithm has four stages: Haar  Feature Selection Creating    Integral Images Adaboost  Training Cascading Classifiers OpenCV comes with a trainer as well as detector. If you want to train your own classifier for any object like car, planes etc. you can use OpenCV to create one. Its full details are given here:  Cascade Classifier Training . Here we will deal with detection. OpenCV already contains many pre-tra
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
Image
Creating table and inserting data in MySQL using python (Raspberry Pi 3B+) This article demonstrates how to  execute INSERT Query from python to add a new row to the MySQL database table . I’ve written multiple examples in Python that shows how to INSERT rows into MySQL table. Goal of this lesson: 1) Creating database 2) Create table for query 3) Create rows and columns     4) Insert data  5) fetch data again python creating table and inserting data in mysql process Prerequisite Before moving further, Please make sure you have the following in place: – Username  and  password  that you need to connect MySQL MySQL database table name  in which you want to insert data code: import MySQLdb mydb=MySQLdb.connect("localhost", "juhi ","juhi") # connect MySQL with phpmyadmin cur=mydb.cursor() #Cursor is a object that communicate the entire mysql server through out we'll able to create our database cur.execu
Image
Survey  on AI self-driving cars around the world What’s the future of personal transportation? Well, you’ll likely be spending a lot less time behind the wheel, for one. The rise of self-driving cars means that some scenes out of science-fiction flicks (movie: Total Recall  or  I, Robot ) are now reality—and even more will be available soon. What is self-drive car? Self-driving vehicles are cars or trucks in which human drivers are never required to take control to safely operate the vehicle. Also known as autonomous or “driverless” cars, they combine sensors and software to control, navigate, and drive the vehicle. An autonomous car is a vehicle that is capable of sensing its environment and navigating without human input. Autonomous cars combine a variety of techniques to perceive their surroundings, including radar, laser light, GPS, odometry, and computer vision. In August 1961, Popular Science reported on the Aeromobile 35B, an air-cushion vehicle (ACV) that was inven