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?