Open pablopalma opened 5 years ago
It is possible to load Texture2D preset in the Inspector as a pattern image by changing the code as follows.
/// <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 ();
--------------
}
Thanks a lot! I'm very happy with this library, i'll check this and then i'll mark as resolved the issue.
this works for WebGL?
This issue can be resolved (i don't see the option) i did another issue referred to this: https://github.com/EnoxSoftware/MarkerLessARExample/issues/8
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.
Hello!
I need set a custom image marker texture but without a camera capture. (i.e: vuforia) It's possible make this? there's some way o example?
Cheers.