Compilation problem with cv::polylines (Bug #2130)


Added by Adi Shavit over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-07-02
Priority:Normal Due date:
Assignee:Marina Kolpakova % Done:

0%

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

Description

Hi,

I'm getting a compilation problem with MSVC2008, OpenCV 2.4, when replacing line 1: with 2:.
It give some kind of ambiguity error with the other polylines() overload. For some reason, only a const pointer is accepted.

Mat gray = Mat::zeros(100,100,CV_8UC1);

Point p1(10,10);
Point p2(50,10); 
Point p3(50,50);
Point p4(10,50);

Point quad[] = { p1, p2, p3, p4 }; // square polygon
const Point* p = &quad[0];  // 1: This is OK
//  Point* p = &quad[0]; // 2: This does not compile
int count = 4;

polylines(gray, &p, &count, 1, true, Scalar(255,255,255),1,8, 0);

Warm regards,
Adi


Associated revisions

Revision 66aff45e
Added by Marina Kolpakova over 12 years ago

fixed #2130

History

Updated by Marina Kolpakova over 12 years ago

Thanks for reporting!

  • Status changed from Open to Done
  • Target version set to 3.0
  • Assignee changed from Vadim Pisarevsky to Marina Kolpakova

Updated by Andrey Kamaev over 12 years ago

  • Target version changed from 3.0 to 2.4.3

Also available in: Atom PDF