I'm trying to get a guitar pedal interfaced with a computer. This webMIDI interface almost works but doesn't know how to work with a few effects, and I'm trying to clean that up. My goal is to manually set an effect with the pedal's button, then over the USB interface ask the system for its info and record the effect-info pair. To save me from having to manually record what effect is selected, I'm using a webcam to take a picture of the effect on the pedal's screen so I can match it to one of the ~200 64x64 pictures in the above project's repository. The problem is the image matching. I can take a pretty clear webcam image, crop it to this, and I've tried thresholding it; but I can't get python to match the right 64x64 image (upscaled 3x) to it. This example apparently matches Bass Squeak better than Comp My code is for file in files: features = 10 img = cv2.imread(effect_image_folder + file, 0) scaled_img = cv2.resize(img, None, fx=1, fy=1, interpolation=cv2.INTER_CUBIC) orb = cv2.ORB_create() kp_effect, des_effect = orb.detectAndCompute(scaled_img, None) kp_pedal, des_pedal = orb.detectAndCompute(template_gray, None) bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck = True) matches = bf.match(des_effect, des_pedal) matches = sorted(matches, key=lambda x:x.distance) # img3 = cv2.drawMatches(scaled_img, kp_effect, template_gray, kp_pedal, matches[:features], None, flags = cv2.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS) # plt.imshow(img3) # plt.show() total_dist = 0 for cv_match in matches[0:features]: total_dist = total_dist + cv_match.distance # print(total_dist) confidences = confidences + [total_dist] and then whatever confidence is lowest is the winner. Anyone have any suggestions on how I can do this better? I'm new to CV so for all I know this is a bad algorithm for the task. I tried template matching at first but decided it was too sensitive to scaling and rotation, and likely other factors. Continue reading...