2

根据ARToolkit 网站上指南,默认标记边框厚度为 25%。我想将其更改为 20%,也可能更改为 15%。是否可以修改它?如果可能,那怎么做?

4

1 回答 1

2

由于您没有指定语言,我假设您在 C 中使用 ARToolKit。但是更改边框宽度的功能也适用于 Android 和 iOS。

- mk_patt can now train markers with non-standard border widths. The command line switch "-border=n" (n between 0 and 0.5 (not inclusive)) specifies the desired border width as a proportion of the marker width. The portion of the marker which will be used as the pattern is now indicated by mk_patt by outlining in blue. Note that in order to use markers with non-standard border widths, the border width must be specified in the application by using the arSetBorderSize() function (see reference documentation for more information.) (来源:https ://github.com/artoolkit/artoolkit5/blob/47d5796eef841e11f54e6d7040f389063c05b5a3/ChangeLog.txt ) 注意: arSetBorderSize() 已弃用,您应该arSetPatRatio()改用

这是您需要使用的函数的定义: https ://github.com/artoolkitx/artoolkit5/blob/47d5796eef841e11f54e6d7040f389063c05b5a3/include/AR/ar.h#L772

=== 编辑 1:===

正如@Angelo Joseph Salvador 现在指定他正在寻找 JSARToolKit 的解决方案,它可以使用这个函数来完成https://github.com/artoolkitx/jsartoolkit5/blob/master/js/artoolkit.api.js#L929

在现有的 ARController 对象上。

于 2018-01-08T05:37:35.980 回答