Skip to main content

Object Detection using opencv in python

Object Detection using Opencv in python



What is object detection?

Object detection is commonly referred to as a method that is responsible for discovering and identifying the existence of objects of a certain class. An extension of this can be considered as a method of image processing to identify objects from digital images.

object-detection-opencv-haar

Aim of this project

Our project aims at identifying real time object in a controlled environment and tracks its motion dynamically with hardware support.

Requirements:

1. PYTHON 2.7 
2. OPENCV 
3. WEB CAMERA
4. CASCADES OF OBJECTS PRE-TRAINED



OPEN CV ??

OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real-time computer vision.

The goals of the project opencv were described as:

Advance vision research by providing not only open but also optimized code for basic vision infrastructure. No more reinventing the wheel.

Disseminate vision knowledge by providing a common infrastructure that developers could build on, so that code would be more readily readable and transferable.

Advance vision-based commercial applications by making portable, performance-optimized code available for free with a license that did not require code to be open or free itself.

more about opencv : http://opencv.org/

HAAR FEATURES

Haar-like features are digital image features used in object recognition. 
They owe their name to their intuitive similarity with Haar wavelets and were
 used in the first real-time face detector.








THE SOURCE

The source code is provided github: https://github.com/techweed/object-detection

The only function that concerns a casual user is the CascadeClassifier::detectMultiScale
About which is given below:

CascadeClassifier::detectMultiScale
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

In Python: cv2.CascadeClassifier.detectMultiScale(image[, scaleFactor[, minNeighbors[, flags[, minSize[, maxSize]]]]]) → objects

The parameters are:

Image – Matrix of the type CV_8U containing an image where objects are detected.

Objects – Vector of rectangles where each rectangle contains the detected object.

scaleFactor – Parameter specifying how much the image size is reduced at each image scale.

minNeighbors – Parameter specifying how many neighbors each candidate rectangle should have to retain it.

flags – Parameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.

minSize – Minimum possible object size. Objects smaller than that are ignored.

maxSize – Maximum possible object size. Objects larger than that are ignored.

OUTPUT:

opencv-object-detection
opencv object detection



opencv-objectdetection
wall clock detection





Comments

Post a Comment

Popular posts from this blog

Offline Instagram gallery

 Download photos & videos through Instagram Share raw content with your friends over any platform. Instagram copy urls are not raw image/video urls that you can access without instagram or a browser. The copy urls looks like this  https://www.instagram.com/p/B7yMq4Jpg2t/?igshid=1dbhlycdh88ic Here this link leads to a page where the actual image is hidden, where a simple search of the resource url associated with the page will return us with the actual image/video. Anyway if you are not bothered about how its done, enjoy what it has to offer. Download from Google Play  here . Then there is another thing, you can also download profile pictures of any user irrespective of the profile is public or not. So there is that. If you think it is kinda invading private users privacy please let me know. For downloading images from a particular user or tag read:  here

Instagram easy download with python

instagami         DOWNLOAD INSTAGRAM [PYTHON] Ever wondered how to download those wonderful instagram images you come across everyday, well there are ways .... Check out this option, just type in the username or tag from which you want to download images   then click download 20-30 recent images of that particular user or tag is downloaded. yes its that simple to download bulk images from an instagram account. Just make sure the profile is public, or else only the profile picture and details will be retrived. Install python 2.7 : https://www.python.org/downloads/  To use the gui version you need to install Tkinter, if you are good with the console one just run instagami.py. PythonSource:  https://github.com/techweed/instagami/ The easy way to download all the python modules is to install pip which is the python package installer. There are many methods for getting Pip installed, but my preferred method is the following:  Download  ge