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

Transparent images #47

Closed
Carnaux opened this issue Aug 27, 2021 · 5 comments
Closed

Transparent images #47

Carnaux opened this issue Aug 27, 2021 · 5 comments

Comments

@Carnaux
Copy link

Carnaux commented Aug 27, 2021

Hey, @hiukim how do images, that are mostly transparent backgrounds, work on mind-ar? On JsArtoolkit5 the background becomes black and then there are issues tracking the image on white or bright backgrounds.

@hiukim
Copy link
Owner

hiukim commented Aug 27, 2021

@Carnaux that's an interesting question. I don't have a certain answer top of my head, coz I haven't really tried that. The first step is to convert to grayscale, so depends on the pixel value of the conversion.

Is there any particular reason you want to track image with transparent background? The image will still have some solid background later anyway depends on whether you place it?

@Carnaux
Copy link
Author

Carnaux commented Aug 27, 2021

The image will still have some solid background later anyway depends on whether you place it?

Exactly that, background color independent marker, so I can use in any surface unless Mind-Ar already does that.

@akhrarovsaid
Copy link

My recommendation would then be to crop the marker such that none of the transparency is in the cropped version. Then you track the cropped version instead and use the original (uncropped) target image as you intended.

@hiukim
Copy link
Owner

hiukim commented Aug 29, 2021

I think @akhrarovsaid is right. that's also what I would do if cropping is possible.

I know there are cases where cropping is not possible. For example, your target is in circular shape, or your transparency background is in an inside area.

I think the simple answer to the original question is that the library didn't handle that. It will just turn them into a single color (maybe white or black, I'm not certain).

@Carnaux
Copy link
Author

Carnaux commented Aug 29, 2021

Yeah, that should solve and I tried that too, but in my case, most images fall back to what @hiukim said.

Depending on the tracking algorithm I think gray would be better. I'm currently using black on the NFT-Marker-Creator and that is part of the issue.

I have this proposal on JsArtoolkit5, I will test it today and maybe it can be applied to Mind-Ar too.

If you are interested I will keep you updated on the matter. Thanks, guys!

@Carnaux Carnaux closed this as completed Aug 29, 2021
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