Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker Labeling Mode #599

Closed
dantist90 opened this issue Oct 6, 2019 · 5 comments
Closed

Marker Labeling Mode #599

dantist90 opened this issue Oct 6, 2019 · 5 comments

Comments

@dantist90
Copy link

dantist90 commented Oct 6, 2019

Hello. How to change marker border color? From black to white?

Ar.js file contain function "setLabelingMode" and comment:
"ARToolKit's labelling algorithm can work with both black-bordered markers on a white background (AR_LABELING_BLACK_REGION) or white-bordered markers on a black background (AR_LABELING_WHITE_REGION)."

I use "a-frame" for ar.js
Maybe you have example with a white marker? Or documentation? Thanks!

@nicolocarpignoli
Copy link
Collaborator

nicolocarpignoli commented Oct 8, 2019

You cannot use a light color for the border. It has to be a dark one, and with high contrast with the background of the marker.

To change that, you could create your own pattern with this tool (on the left, you can change border color from black to another darker one)

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

@dantist90
Copy link
Author

So may be to add such an opportunity in the AR.JS if ARToolKit supports it?

@nicolocarpignoli
Copy link
Collaborator

ArtoolKit does not support it. There is work to try to port on Artoolkit a stable NFT and then port that version of artoolkit on AR.js.

See: #544

@umutto
Copy link
Contributor

umutto commented Jan 20, 2020

Sorry to bump an old issue, but just seen this. I've used white-bordered markers (literally inverse colors of a normal barcode marker) on a different project with a modified version of AR.js 1.6.2.

I needed to use it for barcodes on black desks, black border markers didn't work without a white buffer zone outside the borders and that didn't seem pretty.

Modifications were minimal and should work with the current version without breaking anything. I can update it for the current and create a pull request some time this week if it would be beneficial.

Here is a sample white bordered barcode marker for reference, black border equivalent can be seen here (I've added a black buffer zone for github, it's not needed):

000
4x4_BCH_13_9_3 Barcode marker with value 0

I believe I've used this tool to create the white bordered barcodes but may be mistaken.

@dantist90
Copy link
Author

If i understand correctly, then you created a white marker on a black background. Yes, it will be very useful. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants