Reputation: 67
This is a follow-up question to the previously posted question about using OpenCVs dense sift implementation in python (OpenCV-Python dense SIFT).
Using the suggested code for a dense sift
dense=cv2.FeatureDetector_create("Dense")
kp=dense.detect(imgGray)
kp,des=sift.compute(imgGray,kp)
I have the following questions:
Thanks!
Upvotes: 2
Views: 2598
Reputation: 11028
You can see current (default) options with the following:
dense = cv2.FeatureDetector_create('Dense')
f = '{} ({}): {}'
for param in dense.getParams():
type_ = dense.paramType(param)
if type_ == cv2.PARAM_BOOLEAN:
print f.format(param, 'boolean', dense.getBool(param))
elif type_ == cv2.PARAM_INT:
print f.format(param, 'int', dense.getInt(param))
elif type_ == cv2.PARAM_REAL:
print f.format(param, 'real', dense.getDouble(param))
else:
print param
Then you'd get an output like the following:
featureScaleLevels (int): 1
featureScaleMul (real): 0.10000000149
initFeatureScale (real): 1.0
initImgBound (int): 0
initXyStep (int): 6
varyImgBoundWithScale (boolean): False
varyXyStepWithScale (boolean): True
You can alter the options as the following:
dense.setDouble('initFeatureScale', 10)
dense.setInt('initXyStep', 3)
Upvotes: 3