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

Wrong palm print comprasion computation #36

Open
IoNaNO opened this issue May 21, 2024 · 0 comments
Open

Wrong palm print comprasion computation #36

IoNaNO opened this issue May 21, 2024 · 0 comments

Comments

@IoNaNO
Copy link

IoNaNO commented May 21, 2024

while (lhs_md_cur_ptr < lhs_md_end_ptr) {
uint8_t distance = *(uint8_t*)lhs_md_cur_ptr ^ *(uint8_t*)rhs_md_cur_ptr;
if (distance == 0x00) { // same d, s.
acc += 2;
} else if (distance < 0x10) { // same d, diff s.
acc += 0;
}

Based on the matching stage's math definition
$$M\left(X,Y\right)=\frac{1}{2N^2}\sum_{i=1}^{N}\sum_{j=1}^{N}\left[\left(C_X\left(i,j\right)==C_Y\left(i,j\right)\right)+\left(C_X\left(i,j\right)==C_Y\left(i,j\right)\right)\cap\lnot\left(Cs_X\left(i,j\right)\oplus C s_Y\left(i,j\right)\right)\right]$$

When the variable $d$ is the same but the variable $s$ is different, the acc variable should be increased by 1.

In addition, if the variable $d$ is the same but the variable $s$ is different, the distance should yield a specific value of 0x10. It is not recommended to use a comparison expression for this simple operation; instead, an equality expression should be used.

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

1 participant