Problem with fitLine related to checkVector. (Bug #1373)
Description
When fitLine is provided with a vector<Point2f> containing three elements, it incorrectly interprets it's argument as a vector of 2 3D points.
This is caused by the checkVector(3) returning 2 for such a vector, while the checkVector(2) for the same object returns 3.
History
Updated by Alexander Shishkov almost 13 years ago
- Priority changed from High to Normal
- Target version deleted ()
Updated by Alexander Shishkov almost 13 years ago
- Assignee deleted (
Vadim Pisarevsky)
Updated by Marina Kolpakova almost 13 years ago
- Assignee set to Marina Kolpakova
Updated by Marina Kolpakova almost 13 years ago
Thanks for reporting!
Fixed in revision r7713
- Status changed from Open to Done
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0
Updated by Miguel Visionary over 12 years ago
Still happening with 2.4.3.
I belive the root of the problem comes from checkVector returning 2 which makes is3D true:
bool is3d = points.checkVector(3) >= 0;
Then the following becomes a reshape(3):
CvMat _cpoints = points.reshape(2 + (int)is3d);
which makes cvFitLine call icvFitLine3D instead of icvFitLine2D
Updated by Kirill Kornyakov over 12 years ago
- Target version deleted (
2.4.0) - Status changed from Done to Open
Updated by Vadim Pisarevsky about 12 years ago
- Assignee changed from Marina Kolpakova to Vadim Pisarevsky
- Affected version set to 2.4.3
- Target version deleted ()
Updated by Vadim Pisarevsky about 12 years ago
- Assignee deleted (
Vadim Pisarevsky)
Updated by Vadim Pisarevsky about 12 years ago
- Assignee set to Vadim Pisarevsky
Updated by Kirill Kornyakov about 12 years ago
- Target version set to 2.4.4