问题标签 [ransac]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
matlab - 具有仿射变换的RANSAC + matlab
我需要在 matlab 中实现 RANSAC 算法以实现图像拼接。我在 bestMatches 矩阵 (2 x 500) 中有两个图像的最佳匹配点现在我需要实现 RANSAC,这是我到目前为止所做的。我已经对需要做的事情发表了评论,任何人都可以帮我实现它作为一个整体。我已经努力了好几天来做到这一点,但没有成功。请帮忙。
python - 灰度帧上的 numpy.where(),错误的索引?
我正在尝试实现一个基本的 RANSAC 算法来检测灰度图像中的圆圈。
问题是,在我对图像进行阈值处理并搜索非零像素后,我得到了正确的形状,但是这些点以某种方式从原始位置离域:
我在这里想念什么?
matlab - 通过 RANSAC 查找正弦曲线
我有一组点,我需要使用它们与各自正弦线的附近进行分组。我尝试使用标准霍夫变换来确定线条,但这并不能解决问题(仅检测到几条线)。
我想测试一下 RANSAC 是否能更好地检测各种 sin 曲线。你有类似算法的例子吗?
我知道 RANSAC 不是查找多行的最佳工具,所以我要做的是 a) 找到适合大多数点的函数;b) 迭代搜索,只考虑剩余的搜索。
c++ - 如何检索单应性计算的 findHomography 和 RANSAC 的点?
我是 OpenCV 的新手。我注意到这条线
有助于H
使用 RANSAC 找到单应性。
但是,我需要 RANSAC 之后“纯化”匹配点的位置,但我根本找不到可以使用的功能。我需要一个使用 RANSAC 并在 RANSAC 之后返回匹配点位置的函数。
opencv - OpenCV RANSAC 每次都返回相同的转换
我对如何使用 OpenCVfindHomography
方法来计算最佳变换感到困惑。
我的使用方式如下:
无论我运行多少次,我都会得到相同的转换矩阵。我认为 RANSAC 应该随机选择一个点子集来进行拟合,那为什么每次都返回相同的变换矩阵呢?它与一些随机数初始化有关吗?我怎样才能使这种行为实际上是随机的?
其次,如何调整此设置中的 RANSAC 迭代次数?通常迭代次数基于内部比率和类似的东西。
matlab - 使用 3D RANSAC 估计 3D 仿射变换
我正在尝试注册两个体积图像(img1
和img2
)。的大小img1
是40x40x24
。的大小img2
是64 x64x11
。到目前为止,我已经提取了它们的特征(vol1
和vol2
,与图像大小相同),然后匹配它们。
现在,我在两个特征体积中有一组对应点,它们成对存储,它是一个大小矩阵100x6
(每一行对是[x, y, z, X, Y, Z]
其中(x,y,z)
的体素坐标vol1
,[X Y Z]
是对应体素的坐标vol2
)。
现在,我正在尝试使用 RANSAC 算法来估计 3D 仿射变换 T。我编写了下面的代码,但我认为它存在问题,因为当我得到输出变换 T 并将其乘以样本体素坐标时从 vol1,我得到了一些负坐标!!!
下面是我对 3D RANSAC 算法的实现。我在这个链接中使用了 2D RANSAC 实现。如果您发现任何问题,请告诉我。
pattern-matching - 如何在点云中检测平面背景上的平面物体
我有一个点云场景,其中一张“卡片”放在桌面上。它可以是普通的名片或银行卡。如何检测场景中是否存在卡片?如果存在卡片,构成卡片边界的点集是什么?
我正在使用平面分割并能够完全聚类出“桌面”。
点云位于http://pastebin.com/bqdjgdgc(PCD格式)。
opencv - 如何对齐(注册)和合并点云以获得完整的 3d 模型?
我想获得一些真实单词对象的 3d 模型。我有两个网络摄像头,使用 openCV 和 SBM 进行立体对应,我得到了场景的点云,通过 z 过滤,我只能得到对象的点云。我知道 ICP 对这个目的有好处,但它需要点云最初很好地对齐,所以它与 SAC 结合以获得更好的结果。但是我的 SAC 体能分数太大了,像 70 或 40,而且 ICP 也没有给出好的结果。
我的问题是:如果我只是旋转相机前面的物体以获得点云,ICP可以吗?必须旋转什么角度才能达到好的效果?或者也许有更好的方法来拍摄物体以获得 3d 模型?如果我的点云会有一些洞,可以吗?良好 ICP 的 SAC 最大可接受适应度得分是多少,良好 ICP 的最大适应度得分是多少?
我的点云文件示例: https ://drive.google.com/file/d/0B1VdSoFbwNShcmo4ZUhPWjZHWG8/view?usp=sharing
c++ - Implementation of feature detection algorithm
I'm fairly new to programming and would like to know how to start implementing the following algorithm in C++,
Given a binary image where pixels with intensity 255 show edges and pixels with intensity 0 show the background, find line segments longer than n
pixels in the image. t
is a counter showing the number of iterations without finding a line, and tm
is the maximum number of iterations allowed before exiting the program.
- Let
t=0
. - Take two edge points randomly from the image and find equation of the line passing through them.
- Find
m
, the number of other edge points in the image that are within distance d pixels of the line. If
m > n
, go to Step 5.Otherwise (
m ≤ n
), incrementt
by 1 and ift < tm
go to Step 2, and ift ≥ tm
exit program.- Draw the line and remove the edge points falling within distance
d
pixels of it from the image. Then, go to Step 1
Basically, I just want to randomly pick two points from the image, find the distance between them, and if that distance is too small, I would detect a line between them.
I would appreciate if a small code snippet is provided, to get me started. this is more like a RANSAC parametric line detection. I would also keep this post updated if I get it done.
c++ - 使用 RANSAC 估计两组点之间的二维变换
据我所知,OpenCV 使用 RANSAC 来解决问题,findHomography
它返回一些有用的参数,如homograph_mask
.
但是,如果我只想估计 2D 变换,这意味着仿射矩阵,有没有办法使用findHomography
使用 RANSAC 的相同方法并返回该掩码?