简体   繁体   中英

BoofCV / Java - Constructing Hessian matrix of an image with Gaussian convolution

I want to build a Hessian matrix of a grayscale image but I need to calculate the second order derivatives. I'm working with BoofCV and I found out a function that calculates the first order:

ImageGradient_Gaussian<ImageUInt8,ImageFloat32> gaussian1 = new ImageGradient_Gaussian<ImageUInt8,ImageFloat32>(sigma, -1, ImageUInt8.class, ImageFloat32.class);
gaussian1.process(grayscaleImage, derivX, derivY);

I'm using as an input parameter "sigma" (standard deviation). Is there a function, or an other way, to calculate the second order derivatives using as input sigma and a grayscale image?

I'm open to other Java CV library suggestions.

You want to do something like:

GImageDerivativeOps.sobel(grey, derivX, derivY, BorderType.EXTENDED);
GImageDerivativeOps.hessianSobel(derivX, derivY, derivXX, derivXY, derivYY, BorderType.EXTENDED);

grey can be ImageFloat32 or ImageUInt8 deriv can be ImageFloat32 or ImageSInt16

The latest SNAPSHOT has an example, but it should work on older versions too:

https://github.com/lessthanoptimal/BoofCV/blob/master/examples/src/boofcv/examples/imageprocessing/ExampleImageDerivative.java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM