Problem with fitLine related to checkVector. (Bug #1373)


Added by nemerle - over 13 years ago. Updated about 12 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:core
Target version:2.4.4
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:

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.


Associated revisions

Revision f5152500
Added by Marina Kolpakova almost 13 years ago

fixed #1373

Revision 146ca61a
Added by Vadim Pisarevsky about 12 years ago

added tests for #1373, #2629, #2719; fixed another bug in determinant(Matx<T,n,n>)

Revision fd3b2326
Added by Roman Donchenko over 11 years ago

Merge pull request #1373 from abidrahmank:pykeypoints

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 Andrey Kamaev about 12 years ago

Fix is pushed to 2.4

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF