Does not recognize some idmarkers

All things relating to the ARToolKit Javascript port and its use and development.
alexisdle
Posts: 11
Joined: Sat Jul 22, 2017 7:22 pm

Does not recognize some idmarkers

Postby alexisdle » Thu Aug 17, 2017 7:22 pm

Hi all,

I generate some markers using this script https://archive.artoolkit.org/community/forums/viewtopic.php?f=29&t=28306
but for any reason reads some markers with the right ID and the others markers does not read with the correct id.

This is part of my code!

Code: Select all

window.ARThreeOnLoad = function() {

   ARController.getUserMediaThreeScene({
      maxARVideoSize: 640,
      cameraParam: 'Data/camera_para-iPhone_5_rear_640x480_1.0m.dat',
      onSuccess: function(arScene, arController, arCamera) {

         document.body.className = arController.orientation;

         //arController.setPatternDetectionMode(artoolkit.AR_TEMPLATE_MATCHING_COLOR_AND_MATRIX);
            arController.setPatternDetectionMode(artoolkit.AR_MATRIX_CODE_DETECTION);
            arController.setMatrixCodeType(artoolkit.AR_MATRIX_CODE_4x4);
         var renderer = new THREE.WebGLRenderer({antialias:true});
         if (arController.orientation === 'portrait') {
            var w = (window.innerWidth / arController.videoHeight) * arController.videoWidth;
            var h = window.innerWidth;
            renderer.setSize(w, h);
            
            renderer.domElement.style.paddingBottom = (w-h) + 'px';
         } else {
            if (/Android|mobile|iPad|iPhone/i.test(navigator.userAgent)) {
            alert('entra a portrait');
               renderer.setSize(window.innerWidth, (window.innerWidth / arController.videoWidth) * arController.videoHeight);
            } else {
               renderer.setSize(arController.videoWidth, arController.videoHeight);
               document.body.className += ' desktop';
            }
         }
         renderer.setPixelRatio(window.devicePixelRatio);
         renderer.setSize( window.innerWidth, window.innerHeight );
         renderer.domElement.style.zIndex = 1;
         renderer.domElement.style.top = 0;
         document.body.insertBefore(renderer.domElement, document.body.firstChild);
           
           



thank to all in advance!

alexisdle
Posts: 11
Joined: Sat Jul 22, 2017 7:22 pm

Re: Does not recognize some idmarkers

Postby alexisdle » Tue Aug 22, 2017 6:58 pm

Hi to all!!!...


Any help pls!!1


Return to “JSARToolKit”

Who is online

Users browsing this forum: No registered users and 2 guests