Human Detection and show presence count detect using SIFT and ORB algorithms. continuously capturing the images from the webcam stream and then capturing the corresponding height and width of the webcam frame, and after then define the parameters of the region of interest (ROI) box in which our object can fit in by taking the corresponding height and width of the webcam frame. And then we draw the rectangle from the ROI parameters that we had defined above. Then finally crop the rectangle out and feed it into the SWIFT detector part of the code.
Now the SIFT detector basically have two inputs, one is the cropped image and the other is the image template that we previously defined and then it gives us some matches, so matches are basically the number of objects or keypoints which are similar in the cropped image and the target image. Then we define a threshold value for the matches, if the matches value is greater than the threshold, we put image found on our screen with green color of ROI rectangle.