{"id":21195040,"url":"https://github.com/plusk01/opencv-gftt-score","last_synced_at":"2025-07-23T11:34:39.043Z","repository":{"id":82488772,"uuid":"161408197","full_name":"plusk01/opencv-gftt-score","owner":"plusk01","description":"Modified cv::goodFeaturesToTrack to return detection score","archived":false,"fork":false,"pushed_at":"2018-12-15T16:30:02.000Z","size":553,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T10:41:36.783Z","etag":null,"topics":["feature-detection","goodfeaturestotrack","opencv","robotics","vio","vision"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plusk01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-12-11T23:49:35.000Z","updated_at":"2025-02-26T15:16:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"94b5cf6e-6a40-40d5-9a03-13ef3087c335","html_url":"https://github.com/plusk01/opencv-gftt-score","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/plusk01/opencv-gftt-score","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fopencv-gftt-score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fopencv-gftt-score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fopencv-gftt-score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fopencv-gftt-score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plusk01","download_url":"https://codeload.github.com/plusk01/opencv-gftt-score/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fopencv-gftt-score/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264522588,"owners_count":23622392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feature-detection","goodfeaturestotrack","opencv","robotics","vio","vision"],"created_at":"2024-11-20T19:25:47.257Z","updated_at":"2025-07-23T11:34:39.020Z","avatar_url":"https://github.com/plusk01.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"OpenCV Good Features To Track with Scores\n=========================================\n\nThis code returns a `std::vector\u003cfloat\u003e` of detection scores from `cv::goodFeaturesToTrack`.\n\nAn interactive example is provided. The color changes between green (normalized score of 1.00) and red (normalized score of 0.00). Use `+`/`-` keys to choose the `n`-th greatest feature score to normalize by. Below is shown with `n=1`.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\".github/detections_n1.png\" /\u003e\n\u003c/p\u003e\n\n## Background\n\nUnder the hood, `cv::goodFeaturesToTrack` runs the following core code:\n\n```c++\nif( useHarrisDetector )\n    cornerHarris( image, eig, blockSize, gradientSize, harrisK );\nelse\n    cornerMinEigenVal( image, eig, blockSize, gradientSize );\n\ndouble maxVal = 0;\nminMaxLoc( eig, 0, \u0026maxVal, 0, 0, _mask );\nthreshold( eig, eig, maxVal*qualityLevel, 0, THRESH_TOZERO );\ndilate( eig, tmp, Mat());\n\n// ...\n\nstd::sort( tmpCorners.begin(), tmpCorners.end(), greaterThanPtr() );\n```\n\nThis code first calculates the minimum eigenvalue of the gradient each block (i.e., 3x3 neighborhood of image), as required for finding a [Shi-Tomasi / Harris corner](https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_shi_tomasi/py_shi_tomasi.html). If this minimum eigenvalue is above some threshold, then the pixel where the block was centered is considered as a feature. Note that the magnitude of an eigenvalue corresponds with how good of a feature that pixel is.\n\nHowever, since a desired `qualityLevel` was requested, the next block of code thresholds every eigenvalue response below `maxVal*qualityLevel` to 0, where `maxVal` is the *greatest* minimum eigenvalue from the entire image.\n\nSince there are only so many features that can be selected (`maxCorners`), the next code block then sorts the features by their associated eigenvalue response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusk01%2Fopencv-gftt-score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplusk01%2Fopencv-gftt-score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusk01%2Fopencv-gftt-score/lists"}