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

Instance ID encoding discrepancy #34

Open
johnwlambert opened this issue Apr 16, 2020 · 1 comment
Open

Instance ID encoding discrepancy #34

johnwlambert opened this issue Apr 16, 2020 · 1 comment

Comments

@johnwlambert
Copy link

Hi, question:
Here I read:

The RGB encoding used is ID = R * 256 * G + 256 * 256 + B.

However, in the code, a different encoding is used:

return color[:, :, 0] + 256 * color[:, :, 1] + 256 * 256 * color[:, :, 2]

Which is correct? Thanks!

@marcos-mc
Copy link

I think that's a typo. As you can read here, the correct formula is :

ids=R+G*256+B*256^2

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

2 participants