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

ch8 optical_flow.cpp bias, jacobian calculate issue #299

Open
jhengyilin opened this issue Jan 24, 2024 · 1 comment
Open

ch8 optical_flow.cpp bias, jacobian calculate issue #299

jhengyilin opened this issue Jan 24, 2024 · 1 comment

Comments

@jhengyilin
Copy link

optical_flow.cpp .......

At line 229 and 238, calculate the Jacobian using central difference for derivative and times -1 for the opposite direction of gradient for iterative minimizing is fine to understand.
However, at line 246, bias is computed with b += -error * J; which is weird since already added the negative sign when defining Jacobian.

If we delete the -1 for Jacobian definition, the bias calculation would be correct.

Is it typo or anything I am missing about the math behind all this Gauss-Newton thing?

Thanks in advance for any help!

@jhengyilin
Copy link
Author

New findings......

Is the Jacobain adding a negate sign, i.e. -1.0 because of the reason stating in book ch7.7.3 (page 187) such that the error is defined as "observation - prediction" rather than "prediction - observation".

If the above statement is true, it will self-explained the issue I suppose in the previous comment.

Thanks for any relevant help in advance!

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