cv::LineIterator::pos() 's Bug (Bug #408)


Added by Fei DUAN over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

if the orientation of the line segments specified equals 45 degree,
calling pos() function will return correct positions, but in other cases, the coordinates returned by pos() are all wrong.

sample code:
---------------------------------------------
cv::Mat img = cv::Mat::zeros(100, 100, CV_8UC3);
cv::LineIterator lineIter(img, Point(10, 10), Point(60, 80));
for(int i = 0; i < lineIter.count; i++ ) {
cout << lineIter.pos().x << "," << lineIter.pos().y <<endl;
lineIter++;
}


Associated revisions

Revision 808190c0
Added by Vadim Pisarevsky over 14 years ago

fixed LineIterator constructor in order to make LineIterator::pos() work properly (#408)

Revision 727b6a72
Added by Andrey Kamaev about 12 years ago

Merge pull request #408 from asmorkalov:giganetix_cams_patch

History

Updated by Fei DUAN over 14 years ago

I tried above codes on Windows Vista, Windows 7 and Windows XP, the results are all the same.

Updated by Vadim Pisarevsky over 14 years ago

thanks! the bug was fixed in r3453

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF