jeromeetienne / AR.js

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

Unable to scan custom markers #172

Closed strappvivek closed 5 years ago

strappvivek commented 7 years ago

Hi, I have tried the steps here: https://aframe.io/blog/arjs/#personalize-your-ar-content to create own markers. I have been able to generate the .patt file and also included the path. But on scan, nothing happens. Anyone facing the same issue and found a solution?

sloschi commented 7 years ago

I have a similar problem with the threejs version. See: #164

wimvdc commented 7 years ago

Should be fixed in PR #168

strappvivek commented 7 years ago

I did try that - but doesnt recognise the custom marker yet.. no error though..

wimvdc commented 7 years ago

Can you provide your .patt file and an image of your marker?

kumarahir commented 7 years ago

Hi @wimvdc please find the code below and attached is patt file with marker. This isn't working for me !

<!-- include A-Frame obviously -->
<script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
<!-- include ar.js for A-Frame -->
<script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>
<body style='margin : 0px; overflow: hidden;'>
  <a-scene embedded arjs>
    <a-marker-camera type='pattern' patternUrl='kum.patt'>
        <a-box position='0 0 0' material='color: red;'></a-box>
    </a-marker-camera>
  </a-scene>
</body>

kum.pdf kum.zip

strappvivek commented 7 years ago

Sure, patt file: http://flippar.com/samples/webar/pattern-marker.patt.zip marker image: http://flippar.com/samples/webar/rs.png

thank you

wimvdc commented 7 years ago

@strappvivek Doesn't work with my PR either. Your marker seems quite complicated though and when checking the .patt file, I can't seem to find much resemblance to your marker image. You should try something simpler (something like the Hiro marker)

strappvivek commented 7 years ago

Let me try it out with a simpler marker...

Is there a limitation with the type of markers that can be used?

thanks

wimvdc commented 7 years ago

The level of detail is definitively limited. When you checkout the Hiro as example (image), you can see that the .patt file (see here) has a structure (at the top) where could read 'Hiro' (you need to look really close). So I would suggest start from the Hiro image but replace Hiro with a simple word or black/white image.

sonalranjit commented 7 years ago

The marker generator resizes the image to 16px x 16px so if you want an idea of how the pattern will look like you can see how strong it is by resizing and see if the pattern has strong anchors to be considered a "strong" anchor. See below example of how the Hiro Pattern is resized: Original: inner-hiro

Resized: screen shot 2017-08-30 at 10 15 31 am

gitinthehole commented 7 years ago

Curious: Why does the engine use such a seemingly limited pattern? Other engines seem to prefer to have more details in their markers.

marijae commented 7 years ago

Will it ever be possible to use completely custom markers (photos, shapes) and not being limited with the big black frame, low detail shapes inside and no overlap over the black frame of the marker?

It would be awesome to have more freedom with the marker - to interplay with the actual surfaces. Should I open this as a separate thread?

javismiles commented 6 years ago

Hi there, I have the same issues, all works perfect with Hiro marker, but none of my custom markers work, no one of them, it doesn't matter if they have detail, less detail, simple, less simple, etc, etc nothing works except the hiro marker, any tips?

vin-ni commented 6 years ago

I made it work with these instructions: https://github.com/jeromeetienne/AR.js/issues/164#issuecomment-332065686

saurabh183 commented 6 years ago

After following steps mentioned in #164, I am still not able to scan custom markers.

Website - https://sadigitaldiaries.com/

I opened above website in mobile and tried to scan below images one by one. Blue box is appearing one marker is hiro. But, it is facing in the case of customer marker (dd).

Markers - ar

Output - ar

Kindly assist.

nicolocarpignoli commented 5 years ago

if still interested, try to use a pixeled text on that 'D D' marker. Use pixeled font.

@saurabh183