Class ShiTomasiOp
java.lang.Object
cloud.opencode.base.image.feature.ShiTomasiOp
Shi-Tomasi Corner Detector (Good Features To Track)
Shi-Tomasi 角点检测器(良好跟踪特征)
Implements the Shi-Tomasi corner detection algorithm, which improves upon Harris by using the minimum eigenvalue of the structure tensor as the corner response. This provides more stable and intuitive corner detection.
实现 Shi-Tomasi 角点检测算法,通过使用结构张量的最小特征值作为角点响应来改进 Harris 算法。 这提供了更稳定和直观的角点检测。
Features | 主要功能:
- Shi-Tomasi corner detection using minimum eigenvalue - 使用最小特征值的 Shi-Tomasi 角点检测
- Quality level filtering relative to strongest corner - 相对于最强角点的质量级别过滤
- Top-N corner selection with non-maximum suppression - 带非极大值抑制的 Top-N 角点选择
Usage Examples | 使用示例:
// Detect with custom parameters
List<double[]> corners = ShiTomasiOp.detect(image, 50, 0.01);
for (double[] corner : corners) {
System.out.printf("Corner at (%d, %d) quality=%.4f%n",
(int) corner[0], (int) corner[1], corner[2]);
}
// Detect with defaults (maxCorners=100, qualityLevel=0.01)
List<double[]> corners = ShiTomasiOp.detect(image);
Performance | 性能特性:
- Time complexity: O(w * h * k) where k is kernel size - 时间复杂度: O(w * h * k),k 为卷积核大小
- Space complexity: O(w * h) for gradient and eigenvalue arrays - 空间复杂度: O(w * h) 用于梯度和特征值数组
Security | 安全性:
- Thread-safe: Yes (stateless) - 线程安全: 是(无状态)
- Null-safe: No - 空值安全: 否
- Since:
- JDK 25, opencode-base-image V2.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Details
-
detect
- Parameters:
raster- the source raster | 源 rastermaxCorners- maximum number of corners | 最大角点数qualityLevel- minimum quality level (0.0-1.0) | 最小质量级别 (0.0-1.0)- Returns:
- list of [x, y, minEigenvalue], sorted by response descending | [x, y, minEigenvalue] 列表(按响应降序)
- Throws:
ImageOperationException- if parameters are invalid | 参数无效时抛出- Since:
- opencode-base-image V1.0.4
-
detect
Detect Shi-Tomasi corners on aRasterwith default parameters (maxCorners=100, qualityLevel=0.01). 使用默认参数(maxCorners=100, qualityLevel=0.01)在Raster上检测 Shi-Tomasi 角点。- Parameters:
raster- the source raster | 源 raster- Returns:
- list of [x, y, minEigenvalue] | 角点列表
- Throws:
NullPointerException- if raster is null | 当 raster 为 null 时抛出- Since:
- opencode-base-image V1.0.4
-