Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

alpha channel #11

Closed
traceypooh opened this issue Oct 1, 2017 · 1 comment
Closed

alpha channel #11

traceypooh opened this issue Oct 1, 2017 · 1 comment

Comments

@traceypooh
Copy link

If I have a png w/ an alpha channel (eg: periphery pixels would like to ignore)
for DCT phash, is it better to leave alpha, convert to white, or convert to black?
(for example, a bunch of "circular" imagery, where are trying to "best match")

Or, due to DCT transform, does it not matter because there are contiguous groups of pixels the same?

thanks for this awesome code, BTW!
I'm evolving an AR iOS app to match camera image to pre-photographed clay statues and send the user the best match.

In testing, pHash DCT is beating dHash and more brute force/simpler MAE, MSE and RMSE comparisons, too :)

@ameingast
Copy link
Owner

ameingast commented Jul 27, 2018

You shouldn't have to do anything. The library greyscales the image automatically (ignoring alpha values) for DCT hashing. See greyscale_pixels_rgba_32_32 in OSFastGraphics.m for implementation details.

Sorry for the late reply ;)

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

No branches or pull requests

2 participants