Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2021-02-09 03:26:14 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2021-02-09 03:26:14 +0300
commite68ac8e910295f3b4d20f5f09ca56a52f06c23fc (patch)
treecfea393b99a6b545c470fb362c831e91d6f5aab3
parent020d3659b2d94fe6679295da85dc84ef9ce5bc6d (diff)
v2.4.4v2.4.4
* (Improvement) Exposure time finder: Invert circles loop into quadrants
-rw-r--r--CHANGELOG.md4
-rw-r--r--UVtools.Core/Operations/OperationCalibrateExposureFinder.cs34
-rw-r--r--UVtools.Core/UVtools.Core.csproj2
-rw-r--r--UVtools.WPF/UVtools.WPF.csproj2
4 files changed, 37 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f453633..ec843a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## 09/02/2021 - v2.4.4
+
+* (Improvement) Exposure time finder: Invert circles loop into quadrants
+
## 08/02/2021 - v2.4.3
* **(Add) Exposure time finder:**
diff --git a/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs b/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs
index 2bfc978..cc5d26b 100644
--- a/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs
+++ b/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs
@@ -947,17 +947,45 @@ namespace UVtools.Core.Operations
// Print a hardcoded spiral if have space
if (positiveSideWidth >= 250)
{
+ var mat = layers[0].CloneBlank();
+ var matMask = layers[0].CloneBlank();
xPos = (int) ((layers[0].Width - holePanelWidth) / 1.8);
yPos = layers[0].Height - featuresMarginY - TextMarkingSpacing / 2;
byte circleThickness = 5;
byte radiusStep = 13;
int count = -1;
- for (int radius = radiusStep; radius <= 100; radius += (radiusStep + count))
+ int maxRadius = 0;
+ //bool white = true;
+
+ for (int radius = radiusStep;radius <= 100; radius += (radiusStep + count))
{
count++;
- CvInvoke.Circle(layers[1], new Point(xPos, yPos), radius, EmguExtensions.WhiteByte, circleThickness, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
+ CvInvoke.Circle(mat, new Point(xPos, yPos), radius, EmguExtensions.WhiteByte, circleThickness, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
+ maxRadius = radius;
+ /*for (int i = 0; i < 360; i+=90)
+ {
+ CvInvoke.Ellipse(layers[1], new Point(xPos, yPos), new Size(radius, radius), 0, i, i+90, white ? EmguExtensions.WhiteByte : EmguExtensions.BlackByte, 5, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
+ white = !white;
+ }
+ white = !white;*/
}
- CvInvoke.Circle(layers[1], new Point(xPos, yPos), 5, EmguExtensions.WhiteByte, -1, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
+
+ CvInvoke.Circle(mat, new Point(xPos, yPos), 5, EmguExtensions.WhiteByte, -1, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
+ CvInvoke.Circle(matMask, new Point(xPos, yPos), maxRadius+2, EmguExtensions.WhiteByte, -1);
+
+ var matRoi1 = new Mat(mat, new Rectangle(xPos, yPos - maxRadius-1, maxRadius+2, maxRadius+1));
+ var matRoi2 = new Mat(mat, new Rectangle(xPos-maxRadius-1, yPos, maxRadius+1, Math.Min(mat.Height- yPos, maxRadius)));
+
+ CvInvoke.BitwiseNot(matRoi1, matRoi1);
+ CvInvoke.BitwiseNot(matRoi2, matRoi2);
+
+ CvInvoke.BitwiseAnd(layers[0], mat, layers[1], matMask);
+
+ Point anchor = new Point(-1, -1);
+ //CvInvoke.MorphologyEx(layers[1], layers[1], MorphOp.Open, CvInvoke.GetStructuringElement(ElementShape.Rectangle, new Size(3,3), anchor), anchor, 1, BorderType.Reflect101, default);
+
+ mat.Dispose();
+ matMask.Dispose();
}
return layers;
diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj
index c5c5511..87f4548 100644
--- a/UVtools.Core/UVtools.Core.csproj
+++ b/UVtools.Core/UVtools.Core.csproj
@@ -10,7 +10,7 @@
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl>
<Description>MSLA/DLP, file analysis, calibration, repair, conversion and manipulation</Description>
- <Version>2.4.3</Version>
+ <Version>2.4.4</Version>
<Copyright>Copyright © 2020 PTRTECH</Copyright>
<PackageIcon>UVtools.png</PackageIcon>
<Platforms>AnyCPU;x64</Platforms>
diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj
index 9f8bed6..c60bf3e 100644
--- a/UVtools.WPF/UVtools.WPF.csproj
+++ b/UVtools.WPF/UVtools.WPF.csproj
@@ -12,7 +12,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
- <Version>2.4.3</Version>
+ <Version>2.4.4</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">