Gaussian Splatting + Blender is AWESOME !

Gaussian Splatting 目前unity中已经支持
unreal中有一个收费的插件

blender中有一个免费的插件,https://github.com/ReshotAI/gaussian-splatting-blender-addon

教程如下
https://www.youtube.com/watch?v=yKz7OfomyCo

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
.octave); int x = keyPoint.x / w; int y = keyPoint.y / w; double theta = 2 * Math.PI - keyPoint.angle; double cosTheta = Math.cos(theta); double sinTheta = Math.sin(theta); for (int j = -WINDOW_SIZE; j <= WINDOW_SIZE; j++) { for (int k = -WINDOW_SIZE; k <= WINDOW_SIZE; k++) { int x2 = (int) Math.round(x + j * cosTheta + k * sinTheta); int y2 = (int) Math.round(y - j * sinTheta + k * cosTheta); if (x2 < 0 || x2 >= width / w || y2 < 0 || y2 >= height / w) { continue; } double dx = (scalespace[keyPoint.octave][keyPoint.interval][y2 * width / w + x2 + 1] - scalespace[keyPoint.octave][keyPoint.interval][y2 * width / w + x2 - 1]) / 2.0; double dy = (scalespace[keyPoint.octave][keyPoint.interval][(y2 + 1) * width / w + x2] - scalespace[keyPoint.octave][keyPoint.interval][(y2 - 1) * width / w + x2]) / 2.0; double mag = Math.sqrt(dx * dx + dy * dy); double angle = Math.atan2(dy, dx); int bin = (int) Math.floor((angle + Math.PI) * 8.0 / Math.PI); vec[(j + WINDOW_SIZE) * (WINDOW_SIZE * 2 + 1) + k + WINDOW_SIZE] += mag * gaussian(j, 0) * gaussian(k, 0) * gaussian(bin, 0); } } double norm = 0.0; for (int j = 0; j < DESC_LENGTH; j++) { norm += vec[j] * vec[j]; } norm = Math.sqrt(norm); for (int j = 0; j < DESC_LENGTH; j++) { vec[j] /= norm; } for (int j = 0; j < DESC_LENGTH; j++) { descriptors.add(vec[j]); } } return descriptors; } private static double gaussian(double x, double sigma) { return Math.exp(-x * x / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI)); } private static class KeyPoint { int x; int y; int octave; int interval; double value; double angle; KeyPoint(int x, int y, int octave, int interval, double value) { this.x = x; this.y = y; this.octave = octave; this.interval = interval; this.value = value; this.angle = calculateAngle(); } private double calculateAngle() { int w = (int) Math.pow(2, octave); int x = this.x / w; int y = this.y / w; double dx = (dog[octave][interval][(y + 1) * WINDOW_SIZE + x] - dog[octave][interval][(y - 1) * WINDOW_SIZE + x]) / 2.0; double dy = (dog[octave][interval][y * WINDOW_SIZE + x + 1] - dog[octave][interval][y * WINDOW_SIZE + x - 1]) / 2.0; return Math.atan2(dy, dx) + Math.PI; } } } ``` 该代码实现了SURF算法,并可以从指定的图片中提取特征点描述子。调用 `extractFeatures` 方法即可得到特征点描述子,返回值是一个包含512个元素的List<Double>。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值