jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

Marker Training produces invalid .patt files... #424

Closed CML-ecraft closed 5 years ago

CML-ecraft commented 6 years ago

Do you want to request a feature or report a bug? Report a bug.

What is the current behavior? New values generated by the Marker Training create inaccurate values, and values that differ from working .patt files:

https://jeromeetienne.github.io/AR.js/three.js/examples/marker-training/examples/generator.html

If the current behavior is a bug, please provide the steps to reproduce. Working .patt file: https://jeromeetienne.github.io/AR.js/three.js/examples/marker-training/examples/pattern-files/pattern-arjs.patt Examining the values of the working pattern files in the R channel show: The area in (R:C) 45:13 to 48:16 show: '157 0 38 222 157 185 0 222 157 0 0 222 222 222 222 222' The area in (R:C) 82:13 to 85:16 show: '222 222 222 222 38 0 0 222 0 185 0 222 157 157 157 222' This is the same values rotated 90° CCW, as expected.

Generating a new .patt file using the AR.js image that is there by default with ratio of 0.9 to match the working file generates: The area in (R:C) 45:13 to 48:16 show: '111 139 96 188 83 140 115 158 89 159 115 162 119 211 208 216' The area in (R:C) 82:13 to 85:16 show: '192 158 166 218 98 115 115 212 135 140 157 214 114 88 94 125' The values for the first pass does not match the other 3. Passes 2-4 values match each other, but none match the first pass. Also the values appear to be gamma corrected or otherwise boosted compared to the working one.

What is the expected behavior? New pattern data should match the existing pattern data, which works as expected with AR.js custom markers. If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Operating System and Device Name Browser: Chrome Version 69.0.3497.100 (Official Build) (64-bit) OS: Windows 10 1607 (Build 14393.2551)

commentatorboy commented 5 years ago

I did mention that as long as the pattern is VERY simple it is possible. I am not sure that the trainer can produce a pattern file using complex pictures. Look here: https://github.com/jeromeetienne/AR.js/issues/437#issuecomment-446974868