@@ -19,25 +19,6 @@ DrawingHelper::~DrawingHelper()
1919 delete converter;
2020}
2121
22- Mat DrawingHelper::DrawLine (const Mat image, Point point1, Point point2, Colour colour, int borderThickness) {
23-
24- // Create a working RGB image so the border lines are colour even if the image isn't.
25- Mat outImage = converter->ToColourImage (image);
26- Scalar sColour = converter->ToScalarColour (colour);
27-
28- line (outImage, point1, point2, sColour , borderThickness, DEFAULT_BORDER_THICKNESS);
29-
30- return outImage;
31- }
32-
33- Mat DrawingHelper::DrawLine (const Mat image, TrendLine line, Colour colour, int borderThickness) {
34-
35- vector<Point2d> points = line.GetEndPoints (0 , image.cols );
36- Mat outImage = DrawLine (image, points[0 ], points[1 ], colour, borderThickness);
37-
38- return outImage;
39- }
40-
4122Mat DrawingHelper::DrawLimits (const Mat image, const Contour contourLimit, const RotatedRect rotatedRectangleLimit, const Rect straightRectangleLimit)
4223{
4324 // Create a working RGB image so the border lines are colour even if the image isn't.
@@ -61,6 +42,25 @@ Mat DrawingHelper::DrawLimits(const Mat image, const Contour contourLimit, const
6142 return workingImage;
6243}
6344
45+ Mat DrawingHelper::DrawLine (const Mat image, Point point1, Point point2, Colour colour, int borderThickness) {
46+
47+ // Create a working RGB image so the border lines are colour even if the image isn't.
48+ Mat outImage = converter->ToColourImage (image);
49+ Scalar sColour = converter->ToScalarColour (colour);
50+
51+ line (outImage, point1, point2, sColour , borderThickness, DEFAULT_BORDER_THICKNESS);
52+
53+ return outImage;
54+ }
55+
56+ Mat DrawingHelper::DrawLine (const Mat image, TrendLine line, Colour colour, int borderThickness) {
57+
58+ vector<Point2d> points = line.GetEndPoints (0 , image.cols );
59+ Mat outImage = DrawLine (image, points[0 ], points[1 ], colour, borderThickness);
60+
61+ return outImage;
62+ }
63+
6464Mat DrawingHelper::DrawRectangle (const Mat image, const RotatedRect rectangle, Colour colour) {
6565
6666 Mat workingImage = converter->ToColourImage (image);
0 commit comments