We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have been checking the Zero-mean SSD equations in matcher.cpp:
// sum[ ((A-mean(A)) - (B-mean(B))^2 ] // = sum[ ((A-B) - (mean(A)-mean(B))^2 ] // = sum[ (A-B)^2 - 2(A-B)(mean(A)mean(B)) + (mean(A)-mean(B))^2 ] // = sum[ (A-B)^2 ] - 2(mean(A)mean(B))(sumA-sumB) + N(mean(A)-mean(B))^2 // = sum[ (A-B)^2 ] - N * (mean(A)-mean(B))^2 // = sum[ A^2-2AB-B^2 ] - 1/N * (sumA-sumB)^2 // = sumAA-2_sumAB-sumBB - 1/N * (sumA^2-2_sumA_sumB-sumB^2) *znssd = sumAA-2_sumAB-sumBB - (sumA_sumA - 2_sumA_sumB - sumB_sumB)/BOX_AREA;
This code seems to work but the equations are wrong, there are two mistakes:
(A-B)^2 -> A^2-2AB-B^2 ------------> A^2-2AB+B^2
(sumA-sumB)^2 -> sumA^2-2_sumA_sumB-sumB^2 -------------------------> sumA^2-2_sumA_sumB+sumB^2
So, znssd should be calculated this way:
_znssd = sumAA-2_sumAB+sumBB - (sumA_sumA - 2_sumA_sumB + sumB_sumB)/BOX_AREA;
Regards
The text was updated successfully, but these errors were encountered:
I AGREE.
Sorry, something went wrong.
No branches or pull requests
I have been checking the Zero-mean SSD equations in matcher.cpp:
// sum[ ((A-mean(A)) - (B-mean(B))^2 ]
// = sum[ ((A-B) - (mean(A)-mean(B))^2 ]
// = sum[ (A-B)^2 - 2(A-B)(mean(A)mean(B)) + (mean(A)-mean(B))^2 ]
// = sum[ (A-B)^2 ] - 2(mean(A)mean(B))(sumA-sumB) + N(mean(A)-mean(B))^2
// = sum[ (A-B)^2 ] - N * (mean(A)-mean(B))^2
// = sum[ A^2-2AB-B^2 ] - 1/N * (sumA-sumB)^2
// = sumAA-2_sumAB-sumBB - 1/N * (sumA^2-2_sumA_sumB-sumB^2)
*znssd = sumAA-2_sumAB-sumBB - (sumA_sumA - 2_sumA_sumB - sumB_sumB)/BOX_AREA;
This code seems to work but the equations are wrong, there are two mistakes:
(A-B)^2 -> A^2-2AB-B^2
------------> A^2-2AB+B^2
(sumA-sumB)^2 -> sumA^2-2_sumA_sumB-sumB^2
-------------------------> sumA^2-2_sumA_sumB+sumB^2
So, znssd should be calculated this way:
_znssd = sumAA-2_sumAB+sumBB - (sumA_sumA - 2_sumA_sumB + sumB_sumB)/BOX_AREA;
Regards
The text was updated successfully, but these errors were encountered: