# goodFeaturesToTrack : only detecting bright features

**URL:** <https://forum.opencv.org/t/goodfeaturestotrack-only-detecting-bright-features/8901>\
**Category:** C++\
**Tags:** features2d, feature-detection\
**Created:** [May 25, 2022, 7:38am UTC](https://forum.opencv.org/t/goodfeaturestotrack-only-detecting-bright-features/8901 "2022-05-25T07:38:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixn](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@felixn](https://forum.opencv.org/u/felixn)\
**Post date:** [May 25, 2022, 7:38am UTC](https://forum.opencv.org/t/goodfeaturestotrack-only-detecting-bright-features/8901/1 "2022-05-25T07:38:25Z")

</div>

Hi,  
I’m trying to use “goodFeaturesToTrack” to detect features in my image.

As far as I understand, it is supposed to look for corner-like features.

However, I’ve got the impression that it is mainly detecting bright “points” (and I haven’t found any dark point being detected). Is this normal behaviour, or is this specific to my images?

A sample image :  
 ![good features to track](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/9/9b6c655995bc5f3c41c9f61afa7c08532eb67194.png)

Thanks a lot in advance  
Felix

---

<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:** [May 25, 2022, 10:27am UTC](https://forum.opencv.org/t/goodfeaturestotrack-only-detecting-bright-features/8901/2 "2022-05-25T10:27:15Z")

</div>

you could try inverting the picture. if it still detects the same points, it’s invariant to the sign of these peaks.

---

<div class="post-metadata">

**Author:** ![felixn](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@felixn](https://forum.opencv.org/u/felixn)\
**Post date:** [May 25, 2022, 11:33am UTC](https://forum.opencv.org/t/goodfeaturestotrack-only-detecting-bright-features/8901/3 "2022-05-25T11:33:32Z")

</div>

Thanks a lot.  
When inverting the picture, it’s now the black points that are detected.  
So it’s not the algorithm itself that favors one color, but my image that had “sharper features” in bright than in dark.

I will however still have to work on why it is detecting mainly isolated dots, that are probably not the most reliable features to track (but that might be due to the noise of the image, and the fact that there aren’t many nice corners with straight lines at bigger scales
