资源简介
java语言实现SURF算法,能够运行,效果不错,可以借鉴,都是学习,欢迎大家下载
代码片段和文件信息
import java.awt.Image;
import java.util.ArrayList;
/**
* A standard implementation of the IDetector interface. FastHessian builds an
* Hessian Matrix for each different scale. Then it thresholds the results and
* performs a non-maximal suppression in order to localize the Interest Points
* in the scale space.
*
* @author Alessandro Martini Claudio Fantacci Mite Mitreski
*/
public class FastHessian implements IDetector {
private IIntegralImage integralImage;
private int imgHeight;
private int imgWidth;
private float balanceValue;
private float threshold;
private int octaves;
private IGAUSSconvolution gaussConvolution;
private ArrayList> hessianDeterminantsByOctaves;
private ArrayList interestPoints;
private Image parent;
/**
* Constructor of FastHessian.
*
* @param integralImage
* @param imgWidth
* @param imgHeight
* @param balanceValue
* Value used to calculate the Laplacian of Gaussian response.
* @param threshold
* Value used to filter the Laplacian of Gaussian.
* @param octaves
* Number of octaves that you want to compute.
* @param parent
* Papplet where you display your video output.
*/
public FastHessian(IIntegralImage integralImage int imgWidth
int imgHeight float balanceValue float threshold int octaves
Image parent) {
this.integralImage = integralImage;
this.threshold = threshold;
this.octaves = octaves;
this.gaussConvolution = new GAUSSconvolution(integralImage);
interestPoints = new ArrayList();
hessianDeterminantsByOctaves = new ArrayList>(octaves);
this.parent = parent;
this.imgWidth = imgWidth;
this.imgHeight = imgHeight;
}
/**
* After building all the determinants matrix at each octaves at each
* scale FastHessian thresholds the results and then apply a
* non-maximal suppression in order to detect the Interest Points.
*/
public ArrayList generateInterestPoints() {
buildDet();
threshold();
nonMaximalSuppression();
return interestPoints;
}
private void buildDet() {
float Dxx;
float Dyy;
float Dxy;
float balancaValueSquared=balanceValue * balanceValue;
int center;
int filterArea;
int filterIncrease = 3;
int firstFiltersizeOfTheOctave = 9;
for (int k = 0; k < octaves; k++) {
ArrayList hessianDeterminantsOfAScale = new ArrayList();
filterIncrease = 2 * filterIncrease;
for (int filtersize = firstFiltersizeOfTheOctave;
filtersize < (firstFiltersizeOfTheOctave +
(3 * filterIncrease) + 1); filtersize += filterIncrease) {
/*
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 446 2012-06-19 14:39 SURF\.classpath
文件 285 2012-06-19 14:39 SURF\.myme
文件 1061 2012-06-19 14:39 SURF\.project
文件 330 2012-06-19 14:39 SURF\.settings\org.eclipse.jdt.core.prefs
文件 8512 2012-06-19 14:39 SURF\src\FastHessian.java
文件 4586 2012-06-19 14:39 SURF\src\GAUSSconvolution.java
文件 2008 2012-06-19 14:39 SURF\src\HAARConvolution.java
文件 452 2012-06-19 14:39 SURF\src\IDesc
文件 382 2012-06-19 14:39 SURF\src\IDetector.java
文件 1373 2012-06-19 14:39 SURF\src\IGAUSSconvolution.java
文件 1050 2012-06-19 14:39 SURF\src\IHAARconvolution.java
文件 962 2012-06-19 14:39 SURF\src\IIntegralImage.java
文件 2656 2012-06-19 14:39 SURF\src\IntegralImage.java
文件 3867 2012-06-19 14:39 SURF\src\InterestPoint.java
文件 1943 2012-06-19 14:39 SURF\src\ISURFfactory.java
文件 4418 2012-06-19 14:39 SURF\src\SURF.java
文件 4441 2012-06-19 14:39 SURF\src\SURFdesc
文件 2459 2012-06-19 14:39 SURF\src\Test.java
文件 829 2012-06-19 14:39 SURF\WebRoot\index.jsp
文件 36 2012-06-19 14:39 SURF\WebRoot\me
文件 4736 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\FastHessian.class
文件 1695 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\GAUSSconvolution.class
文件 1010 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\HAARConvolution.class
文件 142 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\IDesc
文件 221 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\IDetector.class
文件 211 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\IGAUSSconvolution.class
文件 178 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\IHAARconvolution.class
文件 182 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\IIntegralImage.class
文件 1459 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\IntegralImage.class
文件 3926 2012-06-19 14:39 SURF\WebRoot\WEB-INF\classes\InterestPoint.class
............此处省略18个文件信息
- 上一篇:张孝祥高清Java视频教程
- 下一篇:图像特征提取算法java实现
评论
共有 条评论