426 lines
22 KiB
C#
426 lines
22 KiB
C#
// using OpenCvSharp;
|
||
//
|
||
// namespace Make3.Renderer
|
||
// {
|
||
// internal class TestClass
|
||
// {
|
||
// private readonly Mat _inputMat;
|
||
// private readonly string _outputDirectory;
|
||
//
|
||
// public TestClass(Stream stream, string outputDirectory)
|
||
// {
|
||
// _inputMat = Mat.FromStream(stream, ImreadModes.Grayscale); ;
|
||
// _outputDirectory = outputDirectory;
|
||
// }
|
||
//
|
||
// public TestClass(Mat inputMat, string outputDirectory)
|
||
// {
|
||
// _inputMat = inputMat;
|
||
// _outputDirectory = outputDirectory;
|
||
// }
|
||
//
|
||
// internal void Execute()
|
||
// {
|
||
// var colors = GetColors();
|
||
//
|
||
// var c = _inputMat.Threshold(0, 255, ThresholdTypes.Binary & ThresholdTypes.Otsu);
|
||
// var closing = c.EmptyClone();
|
||
// Cv2.MorphologyEx(c, closing, MorphTypes.Close, null);
|
||
//
|
||
// //var contours0 = closing.FindContoursAsArray(RetrievalModes.List, ContourApproximationModes.ApproxNone);
|
||
// Point[][] contours;
|
||
// HierarchyIndex[] hierarchy;
|
||
// //closing.FindContours(out contours1, , RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
// closing.FindContours(out contours, out hierarchy, RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
//
|
||
// var contNum = 0;
|
||
//
|
||
// var allContursColored = GetContoursColored(contours, hierarchy, contNum);
|
||
// allContursColored.SaveImage(Path.Combine(_outputDirectory, $"GS_TEST_{contNum}_conturs_colored.png"));
|
||
//
|
||
// var allConturs = GetContoursBW(contours, hierarchy, contNum);
|
||
// allConturs.SaveImage(Path.Combine(_outputDirectory, $"GS_TEST{contNum}_conturs_BW.png"));
|
||
//
|
||
// //colorSeparatedMats.Add(c);
|
||
//
|
||
// DistanceTransform(allConturs, contNum);
|
||
// }
|
||
//
|
||
// private List<ushort> GetColors()
|
||
// {
|
||
// var nonZero = _inputMat.FindNonZero();
|
||
// var colors = new List<ushort>();
|
||
// var total = nonZero.Total();
|
||
// for (int i = 0; i < total; i++)
|
||
// {
|
||
// var p = nonZero.At<Point>(i);
|
||
// var color = _inputMat.At<byte>(p.X, p.Y);
|
||
// if (!colors.Contains(color) && color != 0) colors.Add(color);
|
||
// }
|
||
// return colors;
|
||
// }
|
||
//
|
||
// private Mat GetContoursColored(Point[][] contours, HierarchyIndex[] hierarchy, int contur)
|
||
// {
|
||
// var result = Mat.Zeros(_inputMat.Size(), MatType.CV_8UC3).ToMat();
|
||
// Cv2.DrawContours(result, contours, contur, new Scalar(hierarchy[contur].Parent < 0 ? 255 : 0, 128, 20 * contur), -1,
|
||
// hierarchy: hierarchy,
|
||
// maxLevel: int.MaxValue);
|
||
// return result;
|
||
// }
|
||
//
|
||
// /// <summary>
|
||
// /// sdfsd
|
||
// /// </summary>
|
||
// /// <param name="contours"></param>
|
||
// /// <param name="hierarchy"></param>
|
||
// /// <param name="contur"></param>
|
||
// /// <returns></returns>
|
||
// private Mat GetContoursBW(Point[][] contours, HierarchyIndex[] hierarchy, int contur)
|
||
// {
|
||
// var result = Mat.Zeros(_inputMat.Size(), MatType.CV_8UC1).ToMat();
|
||
// Cv2.DrawContours(result, contours, contur, new Scalar(hierarchy[contur].Parent < 255 ? 255 : 20 * contur), -1,
|
||
// hierarchy: hierarchy,
|
||
// maxLevel: int.MaxValue);
|
||
// return result;
|
||
// }
|
||
//
|
||
// /// <summary>
|
||
// /// <para>
|
||
// /// Ссылка на обсуждение нахождения расстояний
|
||
// /// <see href="https://stackoverflow.com/questions/26421566/pixel-indexing-in-opencvs-distance-transform">вот</see> и на форум из комментариев
|
||
// /// <see href="https://answers.opencv.org/question/6109/per-pixel-labeling-in-distancetransform/">ещё вот</see>. Там на C++
|
||
// /// </para>
|
||
// /// <para>
|
||
// /// Вот ещё <see href="https://docs.opencv.org/3.4/d2/dbd/tutorial_distance_transform.html">что-то</see> с DataTransform.
|
||
// /// </para>
|
||
// /// <para>
|
||
// /// И ещё, но <see href="https://www.reddit.com/r/computervision/comments/cj7kqq/any_algorithms_for_finding_closest_two_black/">что-то</see> не читал.
|
||
// /// </para>
|
||
// /// <para>
|
||
// /// <see href="https://www.appsloveworld.com/opencv/100/6/pixel-indexing-in-opencvs-distance-transform">Это</see>, к сожалению, на Питоне,
|
||
// /// и там используется местная библиотека numpy, так что не подходит.
|
||
// /// </para>
|
||
// /// <para>
|
||
// /// Вот <see href="https://python.hotexamples.com/ru/examples/cv2/-/distanceTransformWithLabels/python-distancetransformwithlabels-function-examples.html">тут</see>
|
||
// /// примеры функций типа bwdist и прочих. До конца не смотрел, возможно, что-то и подходит.К сожалению, тоже на Питоне, и также используется numpy.
|
||
// /// </para>
|
||
// /// <para>
|
||
// /// <see href="https://shimat.github.io/opencvsharp_docs/html/f61ce7b7-e1a6-119d-9a73-3d60751e88de.htm">Это</see>
|
||
// /// просто документация, описание DistanceTransformWithLabels. К сожалению, написано очень скудно, и примеров нет.
|
||
// /// </para>
|
||
// /// <para>
|
||
// /// Вот <see href="https://csharpdoc.hotexamples.com/class/OpenCvSharp/Cv2">тут</see>
|
||
// /// примеры функций, но похоже, просто скопировано с докементации, примеров, к сожалению, нет (ну они есть, но <see href="https://csharp.hotexamples.com/examples/OpenCvSharp/Cv2/-/php-cv2-class-examples.html">не те</see>).
|
||
// /// </para>
|
||
// /// </summary>
|
||
// /// <param name="input"></param>
|
||
// /// <param name="contur"></param>
|
||
// private void DistanceTransform(Mat input, int contur)
|
||
// {
|
||
// var distanceTransform = input.EmptyClone();
|
||
// //Cv2.DistanceTransform(dst1, dst2, DistanceTypes.L2, DistanceTransformMasks.Precise);
|
||
// var labels = input.EmptyClone();
|
||
// Cv2.DistanceTransformWithLabels(input, distanceTransform, labels, DistanceTypes.L2, DistanceTransformMasks.Precise,
|
||
// //Cv2.DistanceTransformWithLabels(dst1, dst2, labelIndexes, DistanceTypes.L2, DistanceTransformMasks.Mask3,
|
||
// DistanceTransformLabelTypes.Pixel);
|
||
// distanceTransform.SaveImage(Path.Combine(_outputDirectory, $"GS_TEST{contur}_distance_transform.png"));
|
||
//
|
||
// //labels.PushBack(-1);
|
||
// var k = 1;
|
||
// for (int i = 0; i < distanceTransform.Height; i++)
|
||
// {
|
||
// for (int j = 0; j < distanceTransform.Width; j++)
|
||
// {
|
||
// var px = distanceTransform.At<int>(i, j);
|
||
// if (px == 0)
|
||
// {
|
||
// //labels.PushBack(new Vec2i(i, j));
|
||
// }
|
||
// else { }
|
||
// var p = labels.At<int>(i, j);
|
||
//
|
||
// var p_x = p % labels.Width;
|
||
// var p_y = p / labels.Width;
|
||
//
|
||
// var p1 = labels.At<Vec2i>(i, j);
|
||
// var p2 = labels.At<Vec3i>(i, j);
|
||
// var p3 = labels.At<Point2d>(i, j);
|
||
// var p4 = labels.At<Point>(i, j);
|
||
//
|
||
// }
|
||
// }
|
||
//
|
||
// labels.SaveImage(Path.Combine(_outputDirectory, $"GS_TEST{contur}_distance_transform_labels.png"));
|
||
// }
|
||
//
|
||
// //private void B()
|
||
// //{
|
||
// // using (var s = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||
// // {
|
||
//
|
||
// // //var m = new Mat();
|
||
// // //var m = Mat.FromStream(s, ImreadModes.Color);
|
||
// // var m = Mat.FromStream(s, ImreadModes.Grayscale);
|
||
// // var result = new List<ushort>();
|
||
//
|
||
// // var nonZero = m.FindNonZero();
|
||
// // var colors = new List<ushort>();
|
||
// // var total = nonZero.Total();
|
||
// // for (int i = 0; i < total; i++)
|
||
// // {
|
||
// // var p = nonZero.At<Point>(i);
|
||
// // var color = m.At<byte>(p.X, p.Y);
|
||
// // if (!colors.Contains(color) && color != 0) colors.Add(color);
|
||
// // }
|
||
//
|
||
//
|
||
// // //___
|
||
//
|
||
// // //var c = m.InRange(new Scalar(color), new Scalar(color));
|
||
//
|
||
// // var c = m.Threshold(0, 255, ThresholdTypes.Binary & ThresholdTypes.Otsu);
|
||
//
|
||
// // var closing = c.EmptyClone();
|
||
//
|
||
// // //var contours0 = closing.FindContoursAsMat(RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
// // //Cv2.MorphologyEx(c, closing, MorphTypes.Close, contours0[0]);
|
||
// // Cv2.MorphologyEx(c, closing, MorphTypes.Close, null);
|
||
//
|
||
// // //var contours0 = closing.FindContoursAsArray(RetrievalModes.List, ContourApproximationModes.ApproxNone);
|
||
// // Point[][] contours1;
|
||
// // HierarchyIndex[] hierarchy;
|
||
// // //closing.FindContours(out contours1, , RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
// // closing.FindContours(out contours1, out hierarchy, RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
//
|
||
// // var contNum = 0;
|
||
//
|
||
// // var aaaaa = contours1.Count();
|
||
//
|
||
// // var aaa = hierarchy.Where(q => q.Parent < 0).ToList();
|
||
//
|
||
// // //var boundingRect = Cv2.BoundingRect(contours1[0]);
|
||
//
|
||
// // var dst0 = Mat.Zeros(m.Size(), MatType.CV_8UC3).ToMat();
|
||
// // //var dst0 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // //Cv2.DrawContours(dst0, contours1, contNum, new Scalar(0, 128, 20 * contNum), -1,
|
||
// // // LineTypes.Link8, maxLevel: -1);
|
||
// // //Cv2.DrawContours(dst0, contours1, 0, new Scalar(hierarchy[contNum].Parent < 0 ? 255 : 0, 128, 20 * contNum), -1, maxLevel: -1);
|
||
// // //Cv2.DrawContours(dst0, contours1, 0, new Scalar(hierarchy[contNum].Parent < 0 ? 255 : 0, 128, 20 * contNum), -1, maxLevel: int.MaxValue);
|
||
// // Cv2.DrawContours(dst0, contours1, contNum, new Scalar(hierarchy[contNum].Parent < 0 ? 255 : 0, 128, 20 * contNum), -1,
|
||
// // hierarchy: hierarchy,
|
||
// // //maxLevel: -1);
|
||
// // maxLevel: int.MaxValue);
|
||
// // //colorSeparatedMats.Add(c);
|
||
// // dst0.SaveImage(@$"F:\GS_TEST_c{contNum}.png");
|
||
//
|
||
// // var boundingRect = Cv2.BoundingRect(contours1[0]);
|
||
//
|
||
// // //var dst1 = Mat.Zeros(boundingRect.Size, MatType.CV_8UC1).ToMat();
|
||
// // var dst1 = Mat.Zeros(m.Size(), MatType.CV_8UC1).ToMat();
|
||
// // //var dst0 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // //Cv2.DrawContours(dst1, contours1, contNum, new Scalar(hierarchy[contNum].Parent < 0 ? 255 : 0, 128, 20 * contNum), -1,
|
||
// // Cv2.DrawContours(dst1, contours1, contNum, new Scalar(hierarchy[contNum].Parent < 255 ? 255 : 20 * contNum), -1,
|
||
// // hierarchy: hierarchy,
|
||
// // //maxLevel: -1);
|
||
// // maxLevel: int.MaxValue);
|
||
// // //colorSeparatedMats.Add(c);
|
||
// // dst1.SaveImage(@$"F:\GS_TEST_cc{contNum}.png");
|
||
//
|
||
// // var dst2 = dst1.EmptyClone();
|
||
// // //Cv2.DistanceTransform(dst1, dst2, DistanceTypes.L2, DistanceTransformMasks.Precise);
|
||
// // var labels = dst1.EmptyClone();
|
||
// // Cv2.DistanceTransformWithLabels(dst1, dst2, labels, DistanceTypes.L2, DistanceTransformMasks.Precise,
|
||
// // //Cv2.DistanceTransformWithLabels(dst1, dst2, labelIndexes, DistanceTypes.L2, DistanceTransformMasks.Mask3,
|
||
// // DistanceTransformLabelTypes.Pixel);
|
||
// // dst2.SaveImage(@$"F:\GS_TEST_ccc{contNum}.png");
|
||
//
|
||
// // //labels.PushBack(-1);
|
||
// // var k = 1;
|
||
// // for (int i = 0; i < dst2.Height; i++)
|
||
// // //for (int i = boundingRect.Top; i < boundingRect.Height; i++)
|
||
// // {
|
||
// // for (int j = 0; j < dst2.Width; j++)
|
||
// // //for (int j = boundingRect.Left; j < boundingRect.Width; j++)
|
||
// // {
|
||
// // var px = dst2.At<int>(i, j);
|
||
// // if (px == 0)
|
||
// // {
|
||
// // //labels.PushBack(new Vec2i(i, j));
|
||
// // }
|
||
// // else { }
|
||
// // var p = labels.At<int>(i, j);
|
||
//
|
||
// // var p_x = p % labels.Width;
|
||
// // var p_y = p / labels.Width;
|
||
//
|
||
// // var p1 = labels.At<Vec2i>(i, j);
|
||
// // var p2 = labels.At<Vec3i>(i, j);
|
||
// // var p3 = labels.At<Point2d>(i, j);
|
||
// // var p4 = labels.At<Point>(i, j);
|
||
//
|
||
// // }
|
||
// // }
|
||
//
|
||
// // labels.SaveImage(@$"F:\GS_TEST_cccc{contNum}.png");
|
||
//
|
||
//
|
||
//
|
||
//
|
||
// // //var un = labels.dis
|
||
//
|
||
// // Console.ReadLine();
|
||
// // //foreach (var contour in contours1)
|
||
// // //{
|
||
// // // //if (hierarchy[contNum].Parent < 0)
|
||
// // // //{
|
||
// // // // var boundingRect = Cv2.BoundingRect(contour);
|
||
//
|
||
// // // // var dst0 = Mat.Zeros(m.Size(), MatType.CV_8UC3).ToMat();
|
||
// // // // //var dst0 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // // // Cv2.DrawContours(dst0, contours1, contNum, new Scalar(0, color, 20 * cNum), -1,
|
||
// // // // LineTypes.Link8, maxLevel: -1);
|
||
// // // // //colorSeparatedMats.Add(c);
|
||
// // // // dst0.SaveImage(@$"F:\GS_TEST_c{cNum}.png");
|
||
// // // //}
|
||
//
|
||
// // // var boundingRect = Cv2.BoundingRect(contour);
|
||
//
|
||
// // // var dst0 = Mat.Zeros(m.Size(), MatType.CV_8UC3).ToMat();
|
||
// // // //var dst0 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // // //Cv2.DrawContours(dst0, contours1, contNum, new Scalar(0, 128, 20 * contNum), -1,
|
||
// // // // LineTypes.Link8, maxLevel: -1);
|
||
// // // Cv2.DrawContours(dst0, contours1, contNum, new Scalar(hierarchy[contNum].Parent < 0 ? 255 : 0, 128, 20 * contNum), -1,
|
||
// // // LineTypes.Link8, maxLevel: -1);
|
||
// // // //colorSeparatedMats.Add(c);
|
||
// // // dst0.SaveImage(@$"F:\GS_TEST_c{contNum}.png");
|
||
//
|
||
//
|
||
//
|
||
//
|
||
// // // //var mean = Cv2.Mean(c, mask);
|
||
// // // //var notBlackContour = Cv2.Mean(c, mask)[0] > 0;
|
||
//
|
||
// // // //var averageInsideColor =
|
||
//
|
||
//
|
||
// // // //var c1 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // // //var dst0 = c1.EmptyClone();
|
||
// // // //Cv2.BitwiseAnd(c1, c1, dst0, c.GetRectSubPix(boundingRect.Size, new Point2f(boundingRect.Left + (boundingRect.Width / 2), boundingRect.Top + (boundingRect.Height / 2))));
|
||
//
|
||
// // // //var c1 = c.CvtColor(ColorConversionCodes.GRAY2BGR);
|
||
// // // //var m1 = c1.InRange(new Scalar(0), new Scalar(255));
|
||
// // // //Cv2.FloodFill(c1, m1, new Point(0, 0), new Scalar(0, color, 20 * cNum));
|
||
//
|
||
// // // //dst0.SaveImage(@$"F:\GS_TEST_cc{cNum}_{contNum}.png");
|
||
// // // contNum++;
|
||
// // //}
|
||
//
|
||
// // //___
|
||
//
|
||
// // //var colorSeparatedMats = new List<Mat>();
|
||
// // //var cNum = 0;
|
||
// // //foreach (var color in colors)
|
||
// // //{
|
||
//
|
||
//
|
||
// // // //var c = m.InRange(new Scalar(color), new Scalar(color));
|
||
//
|
||
// // // var c = m.Threshold(0, 255, ThresholdTypes.Binary & ThresholdTypes.Otsu);
|
||
//
|
||
// // // var closing = c.EmptyClone();
|
||
//
|
||
// // // //var contours0 = closing.FindContoursAsMat(RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
// // // //Cv2.MorphologyEx(c, closing, MorphTypes.Close, contours0[0]);
|
||
// // // Cv2.MorphologyEx(c, closing, MorphTypes.Close, null);
|
||
//
|
||
// // // //var contours0 = closing.FindContoursAsArray(RetrievalModes.List, ContourApproximationModes.ApproxNone);
|
||
// // // Point[][] contours1;
|
||
// // // HierarchyIndex[] hierarchy;
|
||
// // // //closing.FindContours(out contours1, , RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
// // // closing.FindContours(out contours1, out hierarchy, RetrievalModes.Tree, ContourApproximationModes.ApproxNone);
|
||
//
|
||
// // // var contNum = 0;
|
||
//
|
||
// // // var aaaaa = contours1.Count();
|
||
//
|
||
// // // var a01 = hierarchy[0].Previous;
|
||
// // // var a02 = hierarchy[0].Next;
|
||
// // // var a03 = hierarchy[1].Previous;
|
||
// // // var a04 = hierarchy[1].Next;
|
||
//
|
||
// // // var aaa = hierarchy.Where(q => q.Parent < 0).ToList();
|
||
//
|
||
// // // foreach (var contour in contours1)
|
||
// // // {
|
||
// // // //if (hierarchy[contNum].Parent < 0)
|
||
// // // //{
|
||
// // // // var boundingRect = Cv2.BoundingRect(contour);
|
||
//
|
||
// // // // var dst0 = Mat.Zeros(m.Size(), MatType.CV_8UC3).ToMat();
|
||
// // // // //var dst0 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // // // Cv2.DrawContours(dst0, contours1, contNum, new Scalar(0, color, 20 * cNum), -1,
|
||
// // // // LineTypes.Link8, maxLevel: -1);
|
||
// // // // //colorSeparatedMats.Add(c);
|
||
// // // // dst0.SaveImage(@$"F:\GS_TEST_c{cNum}.png");
|
||
// // // //}
|
||
//
|
||
// // // var boundingRect = Cv2.BoundingRect(contour);
|
||
//
|
||
// // // var dst0 = Mat.Zeros(m.Size(), MatType.CV_8UC3).ToMat();
|
||
// // // //var dst0 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // // Cv2.DrawContours(dst0, contours1, contNum, new Scalar(0, color, 20 * cNum), -1,
|
||
// // // LineTypes.Link8, maxLevel: -1);
|
||
// // // //colorSeparatedMats.Add(c);
|
||
// // // dst0.SaveImage(@$"F:\GS_TEST_c{cNum}.png");
|
||
//
|
||
//
|
||
//
|
||
//
|
||
// // // //var mean = Cv2.Mean(c, mask);
|
||
// // // //var notBlackContour = Cv2.Mean(c, mask)[0] > 0;
|
||
//
|
||
// // // //var averageInsideColor =
|
||
//
|
||
//
|
||
// // // //var c1 = new Mat(boundingRect.Size, MatType.CV_8UC3, new Scalar(0, color, 20 * cNum));
|
||
// // // //var dst0 = c1.EmptyClone();
|
||
// // // //Cv2.BitwiseAnd(c1, c1, dst0, c.GetRectSubPix(boundingRect.Size, new Point2f(boundingRect.Left + (boundingRect.Width / 2), boundingRect.Top + (boundingRect.Height / 2))));
|
||
//
|
||
// // // //var c1 = c.CvtColor(ColorConversionCodes.GRAY2BGR);
|
||
// // // //var m1 = c1.InRange(new Scalar(0), new Scalar(255));
|
||
// // // //Cv2.FloodFill(c1, m1, new Point(0, 0), new Scalar(0, color, 20 * cNum));
|
||
//
|
||
// // // //dst0.SaveImage(@$"F:\GS_TEST_cc{cNum}_{contNum}.png");
|
||
// // // contNum++;
|
||
// // // }
|
||
//
|
||
// // // //colorSeparatedMats.Add(c);
|
||
// // // //c.SaveImage(@$"F:\GS_TEST_c{cNum}.png");
|
||
//
|
||
// // // cNum++;
|
||
// // //}
|
||
//
|
||
// // //foreach (var cMat in colorSeparatedMats)
|
||
// // //{
|
||
// // // cNum++;
|
||
// // //}
|
||
// // //c.SaveImage(@$"F:\GS_TEST_c{cNum}.png");
|
||
//
|
||
// // var contours = m.FindContoursAsArray(RetrievalModes.List, ContourApproximationModes.ApproxNone);
|
||
// // var a = contours.Count();
|
||
// // //var c = contours.Where(q => q.).Count();
|
||
// // //var nbl = m.FindNonZero();
|
||
// // //var contours1 = nbl.FindContoursAsArray(RetrievalModes.List, ContourApproximationModes.ApproxNone);
|
||
// // //var b = contours1.Count();
|
||
// // var biggestContourRect = Cv2.BoundingRect(contours[0]);
|
||
// // Mat dst = new Mat();
|
||
// // Cv2.Rectangle(dst,
|
||
// // new Point(biggestContourRect.X, biggestContourRect.Y),
|
||
// // new Point(biggestContourRect.X + biggestContourRect.Width, biggestContourRect.Y + biggestContourRect.Height),
|
||
// // new Scalar(255, 255, 255), 2);
|
||
// // }
|
||
// //}
|
||
// }
|
||
// }
|