cv::LineIterator::pos() 's Bug (Bug #408)
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
fixed LineIterator constructor in order to make LineIterator::pos() work properly (#408)
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