Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

feeding feature vector from surf detector in neural network

I want to implement Surf feature detector in neural network with python version of opencv.

What I did?

surf feature detector

detector = cv2.SURF(400, 5, 5)

feature detection

k1, d1 = detector.detectAndCompute(img1, None) k2, d2 = detector.detectAndCompute(img2, None)

shape of feature vectors

d1 : 119 x 128

d2 : 129 x 128

neural network creation

nn = cv2.ANN_MLP(np.array([128, 128, 128, 4]), cv2.ANN_MLP_SIGMOID_SYM)

Now, I don't know how to use this varying number of rows in feature vector for different images.Also, do I have to normalize the feature vector before feeding into the neural network?

click to hide/show revision 2
the 1010101 button, it's your friend !

updated 2013-08-17 00:53:58 -0500

berak gravatar image

feeding feature vector from surf detector in neural network

I want to implement Surf feature detector in neural network with python version of opencv.

What I did?

surf
#surf feature detector

detector detector = cv2.SURF(400, 5, 5)

5)

feature detection

#feature detection k1, d1 = detector.detectAndCompute(img1, None) k2, d2 = detector.detectAndCompute(img2, None)

None)

shape #shape of feature vectors

d1 vectors #d1 : 119 x 128

d2 128 #d2 : 129 x 128

128

neural #neural network creation

creation nn = cv2.ANN_MLP(np.array([128, 128, 128, 4]), cv2.ANN_MLP_SIGMOID_SYM)

cv2.ANN_MLP_SIGMOID_SYM)

Now, I don't know how to use this varying number of rows in feature vector for different images.Also, do I have to normalize the feature vector before feeding into the neural network?