Git Product home page Git Product logo

Comments (5)

EnoxSoftware avatar EnoxSoftware commented on July 17, 2024

It is possible to load Texture2D preset in the Inspector as a pattern image by changing the code as follows.

https://github.com/EnoxSoftware/MarkerLessARExample/blob/master/Assets/MarkerLessARExample/WebCamTextureMarkerLessARExample/WebCamTextureMarkerLessARExample.cs#L165-L197

        /// <summary>
        /// The pattern texture.
        /// </summary>
        public Texture2D patternTexture;


        void Start ()
        {

----------------
 
         Mat patternMat = new Mat (patternTexture.height, patternTexture.width, CvType.CV_8UC4);
            
         Utils.texture2DToMat (patternTexture, patternMat);
         Debug.Log ("patternMat dst ToString " + patternMat.ToString ());

         pattern = new Pattern ();
         patternTrackingInfo = new PatternTrackingInfo ();
                
         patternDetector = new PatternDetector (null, null, null, true);
                
         patternDetector.buildPatternFromImage (patternMat, pattern);
         patternDetector.train (pattern);


          #if UNITY_ANDROID && !UNITY_EDITOR
          // Avoids the front camera low light issue that occurs in only some Android devices (e.g. Google Pixel, Pixel2).
          webCamTextureToMatHelper.avoidAndroidFrontCameraLowLightIssue = true;
          #endif
          webCamTextureToMatHelper.Initialize ();


--------------

         }

from markerlessarexample.

pablopalma avatar pablopalma commented on July 17, 2024

Thanks a lot! I'm very happy with this library, i'll check this and then i'll mark as resolved the issue.

from markerlessarexample.

pablopalma avatar pablopalma commented on July 17, 2024

this works for WebGL?

from markerlessarexample.

pablopalma avatar pablopalma commented on July 17, 2024

This issue can be resolved (i don't see the option) i did another issue referred to this: #8

from markerlessarexample.

pablopalma avatar pablopalma commented on July 17, 2024

There's some way to change the confidentiality of the matches? If i use a texture of a brand that it's a
wine bottle label. If i focus a printed paper the matches works fine, but if i focus the bottle label, this doesn't work.

from markerlessarexample.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.