05-20-2016 10:15 AM
I am trying to locate products on a table. The products are of mixed sizes and shapes. They will be scattered in a random location.
The products shapes are known and can be taught ahead of time. The artwork and labels will change, so the system must be insensitive to the writing, logo's, etc.
Attached is an image of what the system might see.
The goal is to locate an object (to be picked by a robot) in under a second.
I can set a threshold and get a binary image:
I have (quickly) tried several filters such as morphology, low pass, Distance+Watershed (from example), Separate Particles... to try and improve the image and create some separation between the objects. Perhaps it would be benfeicial to use the edges in the original image to try and create borders in the binary image, although I can only offer that as a conceptual idea as I do not know how to implement such a thing.
I have tried detecting the objects using Pattern Match, Geometric Pattern Match, Detect Shapes, and Shape Match.
Pattern Match - takes several seconds to complete for only one object (the largest square)
Geometric Pattern Match - works faily well and takes a bit less than one second. I'm not sure how long multiple matched will take. I feel that using this tool on a binary image is costing time and not really using the algorithm as intended, but it does work.
Detect Shapes - Very fast, but gets thrown off by lines that are not crisp and straight (as can be seen on the largest square in the image)
Shape Match - works well unless the objects are touching eachother (which they will often be).
I'm open to any and all suggesstions on how to best develop this application! Thanks for taking a look.
05-23-2016 04:10 PM
HI Jbenderjb,
Taking a look at your images it looks like you are likely doing everything correctly. Do you currently have a working application and just need it to be faster? If that is the case then it seems like you are doing this mostly correct. I would recommend trying to narrow down where the object could be by other factors first before you do whatever pattern match works for you. Also can you be sure that no objects overlap? That could cause you some troubles identifying because they will not have the expected pattern.
05-23-2016 04:32 PM