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 encountered an error that happened during Flann feature matching. The reason is one of the feature descriptors for one specific image has all nan values. After further investigation, the problem is caused by the raw feature descriptor being all zeros, based on how root_feature is calculated, there will be a zero division and cause nan value.
This happens rarely and mostly probably due to a feature point having all 0 intensity pixels around it, here is an example dumped in the middle of the feature extraction (the problematic feature point is at the under-exposed dark area at the left side). It can be reproduced by reading the raw gray image and using the below function call to reproduce
from opensfm import features
import cv2
image = cv2.imread("path_to_image", 0) # read gray image
features.extract_features_sift(image, {'sift_edge_threshold':10.0, 'sift_peak_threshold':0.066, 'feature_root':True}, 16000)
I guess the solution is adding an epsilon value or checking if s is zero. But I'm not sure if keeping all-zero features is reasonable, maybe discarding them is better.
The text was updated successfully, but these errors were encountered:
I encountered an error that happened during Flann feature matching. The reason is one of the feature descriptors for one specific image has all nan values. After further investigation, the problem is caused by the raw feature descriptor being all zeros, based on how root_feature is calculated, there will be a zero division and cause nan value.
OpenSfM/opensfm/features.py
Lines 282 to 288 in 2211a49
This happens rarely and mostly probably due to a feature point having all 0 intensity pixels around it, here is an example dumped in the middle of the feature extraction (the problematic feature point is at the under-exposed dark area at the left side). It can be reproduced by reading the raw gray image and using the below function call to reproduce
I guess the solution is adding an epsilon value or checking if
s
is zero. But I'm not sure if keeping all-zero features is reasonable, maybe discarding them is better.The text was updated successfully, but these errors were encountered: