简体   繁体   English

BoofCV / Java-用高斯卷积构造图像的Hessian矩阵

[英]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: 我正在使用BoofCV ,我发现了一个计算一阶的函数:

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). 我正在使用“ sigma”(标准偏差)作为输入参数。 Is there a function, or an other way, to calculate the second order derivatives using as input sigma and a grayscale image? 是否有一种函数或其他方式可以使用输入sigma和灰度图像来计算二阶导数?

I'm open to other Java CV library suggestions. 我愿意接受其他Java CV库建议。

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 灰色可以是ImageFloat32或ImageUInt8派生可以是ImageFloat32或ImageSInt16

The latest SNAPSHOT has an example, but it should work on older versions too: 最新的SNAPSHOT包含一个示例,但它也应适用于较旧的版本:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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