Object detection.,

I want to make a object detection model in which it(the camera from robot)will only detect that some objects are there no need to detect what objects are they but only that somethings are there and its size(object size )then the i will select the object from all objects (from the camera)then there is an robotic arm on the robot which will pick the selected object from all the objects and will place it to placing space automatically(making automatic trajectories), there is nothing on google for my above type of object detection , please help me and guide i am too much jumbled

Hello @Sanand,

If you look for “object detection” you will most likely get results for convolutional neural networks that perform Object Recognition → Image classification / Object localization → Object detection (and these models are trained for specific classes, or can be custom trained for specific classes). However, as you mentioned you don’t want to know what objects are present I’d suggest looking for image segmentation techniques like edge/contours detection, maybe even based on color, or if your background is always the same you could use background subtraction/foreground detection.

Now, if you need the size of the objects in pixels that should be fairly easy, but if you want the actual size (let’s say in cm) you’ll need to know your camera’s intrinsic parameters or you could place a reference object and do something similar to this:

I hope that helps!

1 Like

Thanku so much and I want to ask that the background will not be same anytime because. The robot may be anywhere , means I will also able to know the background at the time of using robot suppose I drove it to any place which I don’t know that how it looks like inside ,which colour etc ,so in that case what’s the solution

Hello @Sanand!

Oh, what I meant by “your background is always the same” is that the background doesn’t change (too much) over time (your camera won’t move between frames). In other words, you could start the algorithm by estimating the background (not assuming it will always be the same) and then applying other techniques to detect the foreground objects. For example:

The temporal average filter is a method that was proposed at the Velastin. This system estimates the background model from the median of all pixels of a number of previous images. The system uses a buffer with the pixel values of the last frames to update the median for each image.

To model the background, the system examines all images in a given time period called training time. At this time we only display images and will find the median, pixel by pixel, of all the plots in the background this time.

After the training period for each new frame, each pixel value is compared with the input value of funds previously calculated. If the input pixel is within a threshold, the pixel is considered to match the background model and its value is included in the pixbuf. Otherwise, if the value is outside this threshold pixel is classified as foreground, and not included in the buffer.

image
https://docs.opencv.org/master/d1/dc5/tutorial_background_subtraction.html

A simpler method would be frame differencing (which is basically subtracting the frames from a reference frame). You could even use a feature detector with the background and then use the outliers from the frames to get an estimate of the “new” objects in the frame (look for motion estimation if you’re interested in that).

You could even achieve this with a moving camera but it will definitely be more complicated because you won’t have a stable background reference, it is just a matter of searching for the “right” terms, as looking for object detectors will likely result in deep learning methods which are not what you’re looking for since you don’t need to know the class of the object.

There are so many options that it really depends on your application and what you want to use (you can find more information about some of the techniques here). Once you know which technique would suit your application I suggest looking at how to do it using OpenCV.