AR-js-org / AR.js

Image tracking, Location Based AR, Marker tracking. All on the Web.
MIT License
5.43k stars 925 forks source link

AR.js Marker training, bug pattern ratio #117

Closed VoltereFr closed 4 years ago

VoltereFr commented 4 years ago

Do you want to request a feature or report a bug? Bug

What is the current behavior? I noticed a bug in the AR.js Marker training system. When I try to change the ratio of the pattern to reduce (or increase) the black borders, it doesn't affect the pattern. It works fine with the image in the middle but the .patt generated doesn't take in account this ratio, and it always keep the default ratio: 0.5 when I test it. I have tested multiple times with multiple images, and the .patt generated for an image is always the same.

If the current behavior is a bug, please provide the steps to reproduce. Upload an image on the website Generate the default .patt Change the pattern ratio and generate a new .patt For me the two files generated are the same, you can check by opening it You can also try to implement the marker with the modified ratio in an app, it will not recognize it, but will recognize the 0.5 ratio instead.

Please mention other relevant information such as the browser version, Operating System and Device Name I'm on windows, with google chrome.

What is the expected behavior? Take in account the ratio changes.

If this is a feature request, what is motivation or use case for changing the behavior?

VoltereFr commented 4 years ago

Okay nevermind, the website is just made for generating your image. To change the ratio of your pattern in your project, you just need to include it in your scene parameters like : <a-scene embedded arjs="sourceType: webcam; patternRatio: 0.80"></a-scene>