# Discard tiny elements detected with findContours

**URL:** <https://forum.opencv.org/t/discard-tiny-elements-detected-with-findcontours/3751>\
**Category:** C++\
**Tags:** imgproc\
**Created:** [June 8, 2021, 8:42pm UTC](https://forum.opencv.org/t/discard-tiny-elements-detected-with-findcontours/3751 "2021-06-08T20:42:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_Dopico](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/javier_dopico/32/453_2.png) [@Javier\_Dopico](https://forum.opencv.org/u/Javier_Dopico)\
**Post date:** [June 8, 2021, 8:42pm UTC](https://forum.opencv.org/t/discard-tiny-elements-detected-with-findcontours/3751/1 "2021-06-08T20:42:29Z")

</div>

Hi,  
well, pretty easy issue, but IDK if it is already solved or… Dont know where is it solved.

I have an image, with a big shape well detected with findContours in the middle of the screen (OK) but in one of the corners there are 2 tiny detected bodies that I coudnt discard with any kind of morfology and I would like to discard with this findContours function.  
There is any function that might help me to discard the tiny bodies? thank you!

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [June 8, 2021, 10:46pm UTC](https://forum.opencv.org/t/discard-tiny-elements-detected-with-findcontours/3751/2 "2021-06-08T22:46:49Z")

</div>

look up `contourArea`, discard contours that are small by that measure.

here’s an example: [OpenCV: Image Moments](https://docs.opencv.org/master/d0/d49/tutorial_moments.html)
