Can any one help me to find the Open CV c++
code for Mexican hat operator. I need the code for detecting the license plate. Please help me.
Asked
Active
Viewed 1,969 times
0

Rugmangathan
- 3,186
- 6
- 33
- 44

user3559863
- 1
- 2
2 Answers
2
You can obtain a LoG (Mexican Hat) -filtered image by decomposing the operation as:
Mat mhFiltered; // resulting (MHat-filtered image)
Mat gaussianBlurredImage;
GaussianBlur(image, gaussianBlurredImage,Size(5,5),1.5); // First apply the gaussian operator
Laplacian(gaussianBlurredImage,mhFiltered,CV_32F,3); // Then the Laplacian
Notice that the parameters of GaussianBlur
and Laplacian
will alter the final result. Read the OpenCV reference to learn how they work!

Яois
- 3,838
- 4
- 28
- 50
1
It's simpler to use Difference of Gaussians (DoG) filter it is an approximation of Mexican Hat filter. And it's just a difference of two images blurred with different sigmas.

Ginés Hidalgo
- 717
- 9
- 20

Andrey Smorodov
- 10,649
- 2
- 35
- 42