I am using sift algorithm from python extra modules for some feature matching. Although one thing I did not understand is the concept behind the normType passed to the BFMatcher. i.e Which ones have to be used in what case?
Any help will be invaluable
cv2 (old interface in old OpenCV versions was named as cv ) is the name that OpenCV developers chose when they created the binding generators. This is kept as the import name to be consistent with different kind of tutorials around the internet.
cv2 is the module import name for opencv-python, "Unofficial pre-built CPU-only OpenCV packages for Python". The traditional OpenCV has many complicated steps involving building the module from scratch, which is unnecessary. I would recommend remaining with the opencv-python library.
ConvertScaleAbs Method. Scales, computes absolute values and converts the result to 8-bit.
The addWeighted function is a function that helps in adding two images and also blending those by passing the alpha, beta and gamma values. In order to analyse images, this helps in adjusting the gradients and in the processing of the image.
From WolframAlpha NormL1 and NormL2:
Given a vector:
Norm L1 is the taxicab (or manhattan) distance (sum of absolute values):
while Norm L2 is the euclidean distance (square root of sum of squares):
The type of norm tells the BFMatcher
how to compute the distances between every two features.
The NORM L1 is in general much faster to compute (mostly because you don't compute the square root). The NORM L2 is more accurate.
You can find a nice comparison here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With