# Algorithm to find identical shapes/objects in image

**URL:** https://forum.opencv.org/t/algorithm-to-find-identical-shapes-objects-in-image/8559
**Category:** Uncategorized
**Tags:** object-detection
**Created:** [April 27, 2022, 9:23am UTC](https://forum.opencv.org/t/algorithm-to-find-identical-shapes-objects-in-image/8559 "2022-04-27T09:23:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![skrippsta](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@skrippsta](https://forum.opencv.org/u/skrippsta)
#### Post date: [April 27, 2022, 9:23am UTC](https://forum.opencv.org/t/algorithm-to-find-identical-shapes-objects-in-image/8559/1 "2022-04-27T09:23:06Z")

</div>

Hey,  
I’m currently stuck on the problem that I want to mark objects that appear multiple times in an image (for example for two identical circles or two identical triangles). I want the initial image to mark the objects that are identical and leave the rest of the image as they were in the initial image.  
Are there any specific algorithms for this?

---

<div class="post-metadata">

### Author: ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)
#### Post date: [April 27, 2022, 1:38pm UTC](https://forum.opencv.org/t/algorithm-to-find-identical-shapes-objects-in-image/8559/2 "2022-04-27T13:38:41Z")

</div>

most shape algorithms are contour based, so you should [start with that](https://docs.opencv.org/4.x/df/d0d/tutorial_find_contours.html)  
then, there’s [matchShapes](https://docs.opencv.org/4.x/d3/dc0/group __imgproc__ shape.html#gaadc90cb16e2362c9bd6e7363e6e4c317), a whole [shape module](https://docs.opencv.org/4.x/d1/d85/group__shape.html) or even [fourier descriptors](https://docs.opencv.org/4.x/dd/ddc/group__ximgproc__fourier.html#gac929d241e37cc33fdb59969d1b197dd2)
