Skip to content

optflow(rlof): fix uninitialized variable #2728

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

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

alalek
Copy link
Member

@alalek alalek commented Oct 27, 2020

Nightly build.

relates #1940

@@ -1620,7 +1620,6 @@ class TrackerInvoker : public cv::ParallelLoopBody
nextPt += halfWin;
Point2f prevDelta(0,0);

float c[8];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main problem is here.
Scope of this variable is unclear. See code near line 1800:

                if(hasSolved == false)
                {
                    delta = Point2f( c[0] * ab + c[1] * a + c[2] * b + c[3],
                                     c[4] * ab + c[5] * a + c[6] * b + c[7]);

/cc @tsenst

@alalek
Copy link
Member Author

alalek commented Oct 28, 2020

👍

@opencv-pushbot opencv-pushbot merged commit c53cdfd into opencv:master Oct 28, 2020
@alalek alalek mentioned this pull request Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants