Ask Your Question

Recognition of several similar objects on the image

asked 2016-07-14 06:49:49 -0500

Semyon gravatar image

Hello. I have a lot of photos. Each photo contains many similar items. An example on the photo. I need to find the boundaries of each such item. For now I'm searching rectangular boxes of goods. At first I find the logos on the photos, then for each logo I'm trying to find the boundary box which contain that logo. I'm using the Hough Trasform algorigthm for searching and selection lines. My code (using OpenCV) currently allocates about 20% of the boxes. Data (recognized boxes) is not a lot that does not allow normal to teach statistical algorithms (eg neural networks). Tell me, please, how to select the boxes, especially with regard to their similarity. image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-14 07:30:58 -0500

Tetragramm gravatar image

My suggestion is to do something like THIS tutorial or use a line segment detector or HoughLinesP to extract just the horizontal and vertical lines. Then search to find the ones that make boxes. If they are within a certain range of aspect ratios, they could be the sides of one of your boxes.

Resize and warp the resulting box face so it's a square image of a consistent size, say 256x256. Then use cv::moments and cv::HuMoments to calculate a descriptor and if the moments are similar, they're probably the same box.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-07-14 06:49:49 -0500

Seen: 222 times

Last updated: Jul 14 '16