OpenCV using Python to Detect any Object

asked 2018-12-05 08:10:37 -0600

Ameer Usman gravatar image

updated 2018-12-07 01:47:37 -0600

First timer here! :)

So ill keep it short. The objective is to detect any object placed on a black belt (can be grocery items, toys, pencils, well anything in the super store) while the belt will also be moving the objects with the camera placed on top at a 45 degree angle at the start of the belt. That's it, detect any object if it is on the belt.

Edit Major Addition: Here is something to go on, I took an image when the belt was empty and now ill just compare the image of the empty belt with the current image of the belt. What can i do to compare the images. I have used sobel filter followed by matchtemplate function but that isnt giving me very reliable belts as i have to keep the threshold very tight which will cause it to be a bit unreliable incase of slight variation.

res = cv2.matchTemplate(img_w,Template_Final,method) #match template function

min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res) #minimum and max values

(img_w the current image of the belt and Template_Final is picture of empty belt and method i am using is cv2.TM_CCOEFF)

I am checking the max_val and setting a threshold to see if the image has changed. (max_val values are like 3.5+e7)

This is one method but I believe there are better ones out there or somehow ways to tune this method by changing the values.

edit retag flag offensive close merge delete

Comments

this won't work, like you want it.

instead of "asking around" like you do now, you should do some research on "pick & place" technologies, do some online courses in computer-vision, read books, etc.

all ideas are welcome.

great, but where would you get the (obviously lacking) knowledge to evaluate them ?

we can help you, once you have an actual opencv related problem, unfortunately, right now, it's more like "hot air", no ?

berak gravatar imageberak ( 2018-12-05 08:23:13 -0600 )edit

you'll also quickly find out, that there's no such thing as "any object" ;)

have a walk through the tutorials , and come back with a more refined question, please.

berak gravatar imageberak ( 2018-12-05 08:28:12 -0600 )edit

I didnt post this question to hear your s* remarks, dont have anything productive to add keep yourself out

Ameer Usman gravatar imageAmeer Usman ( 2018-12-05 23:49:34 -0600 )edit

@berak there on your demand

Ameer Usman gravatar imageAmeer Usman ( 2018-12-07 01:46:19 -0600 )edit