You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have discovered, that VINS-Fusion-gpu detects less feature points in frames with local high contrast areas. Few feature points are detected in such areas, while the rest of the frame lacks feature points (see the attachment ). After disabling GPU in config file the feature points are detected with a uniform distribution over the whole frame (see the attachment ).
After digging into problem I found out that function cv::goodFeaturesToTrack() considers the input mask region to compute threshold value for the eigenvalues of the corners to be detected. This mask excludes circle regions around the features which are currently being tracked thus allowing threshold to be computed over the rest low-contrast areas. However the GPU-accelerated equivalent function cv::cuda::GoodFeaturesToTrackDetector::detect() does not take the input mask into account when it computes the eigenvalue threshold.
This issue can be easily fixed by adding the fourth parameter mask to the function cuda::minMax() call inside the function cv::cuda::GoodFeaturesToTrackDetector::detect().
In current release of OpenCV 3.4.14 one should modify line 111 of the source file https://github.com/opencv/opencv/blob/3.4.14/modules/cudaimgproc/src/gftt.cpp:
cuda::minMax(eig_, 0, &maxVal);
in the following way:
cuda::minMax(eig_, 0, &maxVal, _mask);
You should initiate a pull request to the OpenCV repository.
Thank you for your work. You have developed an awesome piece of software!
The text was updated successfully, but these errors were encountered:
I have discovered, that VINS-Fusion-gpu detects less feature points in frames with local high contrast areas. Few feature points are detected in such areas, while the rest of the frame lacks feature points (see the attachment ). After disabling GPU in config file the feature points are detected with a uniform distribution over the whole frame (see the attachment ).
After digging into problem I found out that function cv::goodFeaturesToTrack() considers the input mask region to compute threshold value for the eigenvalues of the corners to be detected. This mask excludes circle regions around the features which are currently being tracked thus allowing threshold to be computed over the rest low-contrast areas. However the GPU-accelerated equivalent function cv::cuda::GoodFeaturesToTrackDetector::detect() does not take the input mask into account when it computes the eigenvalue threshold.
This issue can be easily fixed by adding the fourth parameter mask to the function cuda::minMax() call inside the function cv::cuda::GoodFeaturesToTrackDetector::detect().
In current release of OpenCV 3.4.14 one should modify line 111 of the source file https://github.com/opencv/opencv/blob/3.4.14/modules/cudaimgproc/src/gftt.cpp:
cuda::minMax(eig_, 0, &maxVal);
in the following way:
cuda::minMax(eig_, 0, &maxVal, _mask);
You should initiate a pull request to the OpenCV repository.
Thank you for your work. You have developed an awesome piece of software!
The text was updated successfully, but these errors were encountered: