Object Here instead of summing up all the

Object detection :Objectdetection is commonly referred to as a method that is responsible fordiscovering and identifying the existence of objects of a certain class. Anextension of this can be considered as a method of image processing to identifyobjects from digital images or videos.  Haar-like Feature detection: We use a algorithm that tracks down animals in the wildlife.

Thedetection algorithm is based on human face detection algorithm which detectsfaces using Haar like features and Adaboost. Haar-like features are digitalimage featuress used in object recognition. Theyowe their name to their intuitive similarity with Haar wavelets and were usedin the first real-time face detector. This detection system for animals is based upon anapproach for human upright facial detection introduced by Viola and Jones.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now

Thisalgorithm consists of four main steps:1)Haarfeatures2)Integralimage3)Adaboost4)Cascading                  The algorithm needs a lot of positive pictures and negative pictures totrain the classifier. For this, Haar features shown in above images are used.Each feature is a single value obtained by subtracting sum of pixels underwhite rectangle from sum of pixels under black rectangle.

We apply each and every feature onall the training images. For each feature, it finds the best threshold whichwill classify to positive and negative. Weselect the features with minimum error rate. Haar features are calculated all over the imagewhich will has many features per image. Summing up the entire image pixel andthen subtracting them to get a single value is not efficient in real timeapplications.

This can be reduced by using Ada boost classifier. Ada boostreduces the redundant features. Here instead of summing up all the pixels theintegral image is used. One of the contributions of Violaand Jones was to use summed area tables which they called  Integral images.Thsi can be defined as two-dimensional looked up tables in the form of a matrix with the same size of the originalimage. Adaboost classifies relevant features and irrelevantfeatures. After identifying relevant features and irrelevant features theAdaboost assigns a weight to all of them. It constructs a strong classifier asa linear combination of Weak classifiers.

 One of the contributions of Viola and Jones was tous summed area tables, which they called integral images. Integral images can be defined astwo-dimensional lookup tables in the formof a matrix with the same size of the original image. Each element of the integralimage contains the sum of all pixels located on the up-left region of theoriginal image (in relation to the element’s position). This allows to computesum of rectangular areas in the image, at any position or scale, using onlyfour lookups:                                          sum=I(C)+I(A)-I(B)-I(D) where points {displaystyle A,B,C,D}A,B,C,D belong to the integralimage {displaystyle I}I.Each Haar-like feature may need more than fourlookups, depending on how it was defined. Viola and Jones’s 2-rectanglefeatures need six lookups, 3-rectangle features need eight lookups, and4-rectangle features need nine lookups. The cascade classifier consistsof a list of stages, where each stage consists of a list of weak learners. Thesystem detects objects in question by moving a window over the image.

Eachstage of the classifier labels the specific region defined by the currentlocation of the window as either positive or negative – positive meaning thatan object was found or negative means that the specified object was not found inthe image. If the labelling yields a negative result, then the classificationof this specific region is hereby complete and the location of the window ismoved to the next location. If the labelling gives a positive result, then theregion moves of to the next stage of classification.

The classifier yields afinal verdict of positive, when all the stages, including the last one, yield aresult, saying that the object is found in the image. A true positive meansthat the object in question is indeed in the image and the classifier labels itas such – a positive result. A false positive means that the labelling processfalsely determines, that the object is located in the image, although it isnot. A false negative occurs when the classifier is unable to detect the actualobject from the image and a true negative means that a non-object was correctlyclassifier as not being the object in question. In order to work well, eachstage of the cascade must have a low false negative rate, because if the actualobject is classified as a non-object, then the classification of that branchstops, with no way to correct the mistake made. However, each stage can have arelatively high false positive rate, because even if the nth stage classifiesthe non-object as actually being the object, then this mistake can be fixed inn+1-th and subsequent stages of the classifier.                                                             Stages of the cascade classifier   This strong classifier is used tocreate a cascading sheet which consists of all the mathematical calculationsrequired to detect the targeted animals from the given training dataset.

Thiscascading sheet is in a XML format which is used by opencv to detect animals inreal time. By this algorithm we can detect the species of the animal by thetrained dataset eliminating physical human power. This algorithm detects thecolour and shape of the targeted animal. This does not give a perfect detectionrate but this could be improved by providing images that are taken of thesubject in different scenarios which is not present in the training dataset.This helpsto detect the targeted animal by capturing frames from the camera module whenthe IR sensor is disrupted.    Deers are detected using thetrained data throughOpenCv and Python             2)K-nearest neighbors algorithmfor classification of animals:                      The K-nearest neighbors algorithm is a versatile classifier thatis often used as a benchmark for more complex classifiers such as ArtificialNeural Networks and Support Vector Machines. KNN can be more powerfulclassifier and can be used in a variety of applications such as economicforecasting, data compression and genetics.                              It comesunder supervised learning of algorithms.

This means that we are given alabelled dataset consiting of training observations (x,y)(x,y) and would liketo capture the relationship between xx and yy. More formally, our goal is tolearn a function h:X?Yh:X?Y so that given anunseen observation xx, h(x)h(x) can confidently predict the correspondingoutput yy. This consist of two learning algorithms namely:1)Non-parametric2)Instancebased·             Non-parametricmeans it makes no explicit assumptions about the functional form of h, avoidingthe dangers of mismodeling the underlying distribution of the data. Forexample, suppose our data is highly non-Gaussian but the learning model wechoose assumes a Gaussian form. In that case, our algorithm would makeextremely poor predictions.·             Instance-basedlearning means that our algorithm doesn’t explicitly learn a model.

Instead, itchooses to memorize the training instances which are subsequently used as”knowledge” for the prediction phase. Concretely, this means that only when aquery to our database is made (i.e. when we ask it to predict a label given aninput), will the algorithm use the training instances to spit out an answer.

                                                                         EuclideanDistance Formula The K-nearest neighbour forms a majority between the K most similarinstances to a given “unseen” observation. Similarity is defined according to adistance metric between two data points.This algorithm uses Euclideandistance formula to calculate the nearest neighbors around our target. The Kvalue should be larger to classify the object more effectively.The algorithm for computing theK-nearest neighbors is as follows: ·             First determine the parameter K where K is the nearest number ofneighbors·             Calculate the distance between the query-instance and all the trainingsamples.

For distance estimation, Euclidean distance method is used. ·             Sort the distance for all the training samples and determine the nearestneighbor based on the K-th minimum distance. ·             Get all the categories of the training data for the sorted value whichfalls under K. ·             Use the majority of nearest neighbors as the prediction value                                                                                                                                                                                                                                                       KNNclassification plot     This algorithm is used to classify our targeted animal to a species.This can help to classify a animal depending upon its features such as itscolor,hair,size,etc.

Generally the Haar algorithm can only detect the shape andcolour of the targeted object. A wild cat with leopard spots can be detected asa leopard. To overcome this problem we will be K-nearest neighbors algorithmfor classification of animals. This cascade classifier consists of theclassified classes of the required animals to detect the species.     Controller: A controller is nothing but the user interface between the user and themodule. The role of the controller is to access the module and control itremotely. The modules controller provides many functionalities to improve theinterface and help the user. A list of animals are given in a tabular form sothat the module could detect the only specified animals.

This is done throughserver-client approach. The instructions are passed down to the module whenspecific animals are selected from the given one. It does not only send theinformation but also receives information from the RPI module. Various data issent to and fro from the controller and the module.

The controller hasfunctionality to broadcast live videos from the module to monitor the targetedanimals actions too. This creates a modular system that could be accessed andcontrolled remotely. The functionalities of the controller include:1.          Displaying various options to the user2.

          Alerts users when the target is detected or if thereis a fire.3.          Displaying the live video broadcast4.          Data Visualization5.          Video Storage6.

          Controlling the module7.          Status of the moduleThe Controller is developed with the help of python using tkinter forthe interface. This is a toolkit for Python which helps in GUI programming.

This is the most commonly used for developing programmable interfaces for theuser. This also uses many packages such as sockets,smtp,etc for connecting andcontrolling the module. Creating the tkinter GUI application involes thefollowing steps:1.          Import Tkinter module2.          Create the required window for GUI3.

          Add the required widgets to the application4.          Assign main event loop when a action triggers event  A  message is sent from the moduleto the controller when the system detects a activity and alerts the user. Theuser then could live stream and store activity recorded through the videostored and broadcasted. The data obtained from the various algorithms iscollected and calculated to know the information about the animals in thatarea. The data visualization is done through plotting graphs on the controllerby the program. The status of module can be displayed to  the user by the controller. The RPI moduleacts as a server and the controller acts as a client in order to control themodule and to protect the user machine from external attacks when the module iscompromised.


I'm Simon!

Would you like to get a custom essay? How about receiving a customized one?

Check it out