Skip to content

GFFTDetector and goodFeaturesToTrack do not return intensity of the corner #16462

@WisdomPill

Description

@WisdomPill
System information (version)
  • OpenCV => should be all of them, from at least 2.4
  • Operating System / Platform => not relevant
  • Compiler => not relevant
Detailed description

GFFTDetector and goodFeaturesToTrack do not fill the response field in keypoints returned from detect method.
Other detectors such as FastFeatureDetector fill that field.

Steps to reproduce
import cv2
capture = cv2.VideoCapture('video.mp4')

# detector = cv2.GFTTDetector_create(60, 0.01, 22, 5)
detector = cv2.FastFeatureDetector_create(threshold=90)

stop = False

while not stop:
    try:
        raw = capture.read()

        if raw is None:
            break

        raw = cv2.resize(raw, (480, 640))
        gray = cv2.cvtColor(raw, cv2.COLOR_BGR2GRAY)

        kp = detector.detect(gray, None)
        frame = cv2.drawKeypoints(raw, kp, None, color=(255, 255, 255))

        print("Total Keypoints with nonmaxSuppression: {}".format(len(kp)))

        cv2.imshow('fast_true', frame)

        key = cv2.waitKey(1) & 0xFF

        if key == ord('q'):
            stop = True

    except KeyboardInterrupt:
        break

cv2.destroyAllWindows()

using

set(k.size for k in kp)
set(k.response for k in kp)
set(k.octave for k in kp)
set(k.angle for k in kp)

you can prove that.

As far as I know in my company we maintain a version of opencv to return the intensity of the corner in the method goodFeaturesToTrack, in case I can help to fix this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions