unnivm / javacv

Automatically exported from code.google.com/p/javacv
0 stars 0 forks source link

cvCalcOpticalFlowPyrLK method will cause fatal error #306

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I must use cvCalcOpticalFlowPyrLK to track points, but sometimes it will 
work, and sometimes it will produce fatal error that I cannot handle. I have 
attached the source code as well as the error document generated.
2. I have checked that the arguments used in the cvCalcOpticalFlowPyrLK are 
correct.

What is the expected output? What do you see instead?
The expected output is that it will never produce fatal error.

What version of the product are you using? On what operating system?
I use javacv 0.3, opencv 2.4.3, jdk1.6.0_43,eclipse with VE

Please provide any additional information below.

Original issue reported on code.google.com by Tai.Sun....@gmail.com on 19 Apr 2013 at 1:34

Attachments:

GoogleCodeExporter commented 8 years ago
The problem with your code is that we need to call `points1.position(0)`, 
`points2.position(0)`, and `pointsFB.position(0)` before calling 
`cvCalcOpticalFlowPyrLK()`, as explained in the README.txt. That should take 
care of the crash.

If you have any additional questions, please post them on the mailing list if 
possible, and not here, thank you!

Original comment by samuel.a...@gmail.com on 27 Apr 2013 at 5:37

GoogleCodeExporter commented 8 years ago
Dear Samuel,

Thank you very much for your help. Now it will not crash and run normally.

Original comment by Tai.Sun....@gmail.com on 27 Apr 2013 at 7:40