Ask Your Question

SB's profile - activity

2019-01-09 20:33:26 -0600 received badge  Popular Question (source)
2016-09-28 11:55:45 -0600 commented question errors on running FAST algorithm on corner detection

It works after changing it as below:

print "Threshold: ", fast.getThreshold()

Thanks

2016-09-28 11:50:59 -0600 commented question errors on running FAST algorithm on corner detection

I do comment out all print. The original issue is about drawKeypoints. After fixing the issue about drawKeypoints. It is observed that several function from FastFeatureDetector_create, such as getInt() and setBool() does not work.

Let me know if you have some ideas about it.

Thanks

2016-09-28 11:23:32 -0600 commented question errors on running FAST algorithm on corner detection

Thanks Berak,

I run the example from the link you provided. There is a issue on print out threshold. Below is the error: AttributeError: 'cv2.FastFeatureDetector' object has no attribute 'getInt'

Could you kindly let me know the solution?

2016-09-28 01:41:11 -0600 asked a question errors on running FAST algorithm on corner detection

Could any one provide a example python script to test FAST algorithm on corner detection?

When I run below example python script from opencv-python tutorial, I get a error "TypeError: Required argument 'outImage' (pos 3) not found"

import numpy as np
import cv2
from matplotlib import pyplot as plt

img = cv2.imread('Penguins.jpg',0)

# Initiate FAST object with default values
fast = cv2.FastFeatureDetector_create()

# find and draw the keypoints
kp = fast.detect(img,None)
img2 = cv2.drawKeypoints(img, kp, color=(255,0,0))

# Print all default params
print "Threshold: ", fast.getInt('threshold')
print "nonmaxSuppression: ", fast.getBool('nonmaxSuppression')
print "neighborhood: ", fast.getInt('type')
print "Total Keypoints with nonmaxSuppression: ", len(kp)

cv2.imwrite('fast_true.png',img2)

# Disable nonmaxSuppression
fast.setBool('nonmaxSuppression',0)
kp = fast.detect(img,None)

print "Total Keypoints without nonmaxSuppression: ", len(kp)

img3 = cv2.drawKeypoints(img, kp, color=(255,0,0))

cv2.imwrite('fast_false.png',img3)
2016-09-28 01:41:11 -0600 asked a question python script issues on FAST algorithm for corner detection from openCV-PYthon tutoria

I tried to run the example python script issue on FAST algorithm for corner detection from openCV-PYthon tutorial. There are several errors while running it. With some minor changes, I solved couple errors. However there is still one error: AttributeError: 'cv2.FastFeatureDetector' object has no attribute 'getInt' Could anyone provide solution for this issue?

Below is the running python script: import numpy as np import cv2 from matplotlib import pyplot as plt

img = cv2.imread('Penguins.jpg',0)

Initiate FAST object with default values

fast = cv2.FastFeatureDetector_create()

find and draw the keypoints

kp = fast.detect(img,None) img2 = cv2.drawKeypoints(img, kp, None, color=(255,0,0), flags=0)

Print all default params

print "Threshold: ", fast.getInt('threshold') print "nonmaxSuppression: ", fast.getBool('nonmaxSuppression') print "neighborhood: ", fast.getInt('type') print "Total Keypoints with nonmaxSuppression: ", len(kp)

cv2.imwrite('fast_true.png',img2)

Disable nonmaxSuppression

fast.setBool('nonmaxSuppression',0) kp = fast.detect(img,None)

print "Total Keypoints without nonmaxSuppression: ", len(kp)

img3 = cv2.drawKeypoints(img, kp, None, color=(255,0,0), flags=0)

cv2.imwrite('fast_false.png',img3)