You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
imageproc currently has 2 template matching methods, sum of squared errors (SQDIFF) and cross correlation (CCORR), as opposed to OpenCV's 3 methods, which also has correlation coefficient (CCOEFF).
Saying it outright, this feature is mostly pointless.
From my own work, it's obvious that without using FFT and the work being done purely on the CPU this method is way too slow to be used for any practical purpose, especially when OpenCV already exists.
However I would like to share the math, because frankly speaking, OpenCV documentation and source code are unreadable.
I would also like to use this as a way to ask if anyone knows how is OpenCV able to make its OpenCL so fast despite seemingly suboptimal code.
As mean of the template is constant and sum over image window can be computed with an integral image we're left with the pairwise multiplication of image window over template for every pixel in the output image.
This is obviously not very good and I don't see a way around it without FFT convolution because even on the GPU with GLSL, it's way too slow.
Hello.
imageproc
currently has 2 template matching methods, sum of squared errors (SQDIFF) and cross correlation (CCORR), as opposed to OpenCV's 3 methods, which also has correlation coefficient (CCOEFF).Saying it outright, this feature is mostly pointless.
From my own work, it's obvious that without using FFT and the work being done purely on the CPU this method is way too slow to be used for any practical purpose, especially when OpenCV already exists.
However I would like to share the math, because frankly speaking, OpenCV documentation and source code are unreadable.
I would also like to use this as a way to ask if anyone knows how is OpenCV able to make its OpenCL so fast despite seemingly suboptimal code.
So here's the math.
As mean of the template is constant and sum over image window can be computed with an integral image we're left with the pairwise multiplication of image window over template for every pixel in the output image.
This is obviously not very good and I don't see a way around it without FFT convolution because even on the GPU with GLSL, it's way too slow.
Here's what the Rust code would look like
The text was updated successfully, but these errors were encountered: