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

Avoid Ghost Touch On Android Devices

IS THE GHOST BOTHERING YOU!  AVOID GHOST TOUCH!! To all moto g4 and g4 plus users who are experiencing ghost touch issues,  here are some ways to avoid it.. This is a crazy big problem i'm facing right now on my moto, so i can understand the frustration let me give you some tips ,this is no solution but helps to understand and stay away from what is causing it: The major reason of  phone malfunctioning is the screen getting heated up by any means.  Which is quite common to the moto as the phone gets quite heated up during turbo charging so.. Tip 1:  Do not use the phone while charging with turbo power charger. It is  recommended to use a normal charger for casual use. Although ghost touches are not observed too much during charging. Tip 2: Never use the phone in direct sunlight because it will go crazy when the screen gets hot. Tip 3:  Always use the phone on the least possible brightness level....

Find fake followers on instagram

unfollow the fake followers  on instagram INSTAHACKS [WITH PYTHON 2] Wondered why the instagram follower following ratio decreases day by day!  Main reason is that, there are certain strange people who follows you and most probably you will follow them back after a while these smartasses unfollows you, most probably using automated scripts on thousands of people globally. This shouldn't be entertained so here is simple and easy way to identify and unfollow them without using any api. This technique is not purely automated, i will explain, 1 . Sign in to your instagram account on your desktop. 2. Go to the followers tab(click on followers), now scroll down to the end of the followers list, it is very important that you scroll down to the the end of the list. 3. Inspect element on the current followers window and you may get a number of  lines of code dont worry do a search (Cntrl+F) on the inspect element window for " data-reactro...