Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laplacian of Gaussian in openCV, how to find zero crossings?

There is Laplacian function in openCV which directly calculate the double derivative. But this doesn't mean I will get the edges right? Because in the output there are many negative values. I go through this link and realized that after that also I had to find zero-crossings. I don't get how to find zero crossings. Can somebody help me ?

like image 856
user3747190 Avatar asked Oct 20 '25 09:10

user3747190


1 Answers

A zero crossing will occur when

  • a value equals 0, or
  • two adjacent values have opposite signs

If you have something like

Laplacian(src, dst, CV_16S);

You just need to scan dst looking for those two cases

like image 171
Bull Avatar answered Oct 22 '25 01:10

Bull



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!