You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sometimes camshfit get the invalid width of return (RotatedRect) #9152
sometimes when you use camshift to get the rectangle of object,you may get a invaild value of the rectangle's width,the vaule is -1.#IND. Obviously,there is some wrong with it.
when i view the source code of camshift, i find the place that the wrong may be happen.
file: sources\modules\video\src\camshift.cpp
line:171
code:
double width = std::sqrt( rotate_c * inv_m00 ) * 4;
if we put a negative number in sqrt , the return must be -1.#IND.
first inv_m00 can't be a negative number, because m00 is determined in line 150,
so the only mistake should be rotate_c .
i can't find out the reason can cause this situation,but if we can judge the rotate_c is a negative number may fix it.
@sovrasov sorry, I tested the example used camera directly, so I don't have the video which use to reproduce the bug.
as you say, this bug is hard to find, I will try my best to reproduce it and write the video file at same time.
Activity
sovrasov commentedon Jul 13, 2017
@vvck this bug is probably hard to reproduce since nobody report it before. Could you please share a test video?
vvck commentedon Jul 14, 2017
@sovrasov sorry, I tested the example used camera directly, so I don't have the video which use to reproduce the bug.
as you say, this bug is hard to find, I will try my best to reproduce it and write the video file at same time.
vvck commentedon Jul 14, 2017
@sovrasov the video had been saved, but It's size is up to 270MB. How can i send to you? email or other ways?
sovrasov commentedon Jul 14, 2017
You can upload it to google drive.
vvck commentedon Jul 17, 2017
@sovrasov Sorry, Because of the GWF, I can't visit google driver.
sturkmen72 commentedon Oct 15, 2017
maybe this will be helpful to reproduce the bug ( i can provide some more images if needed )
output trackBox.size
[-nan(ind) x 2.4574]