Skip to content

Commit ff24486

Browse files
committed
run success
1 parent 2bf5114 commit ff24486

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

Library/graphics/Plot2D/geometry2D.vb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Module geometry2D
123123
Dim colors = RColorPalette.getColorSet(args.getBySynonyms("colors", "colorset", "colorSet"), "paper")
124124
Dim size = InteropArgumentHelper.getSize(args.getBySynonyms("size"), env)
125125
Dim scatter As Boolean = CLRVector.asScalarLogical(args.getBySynonyms("scatter"))
126-
Dim theme As New Theme With {.colorSet = colors}
126+
Dim padding As String = InteropArgumentHelper.getPadding(args!padding, "padding: 10% 10% 15% 20%;")
127+
Dim theme As New Theme With {.colorSet = colors, .padding = padding}
127128
Dim driver As Drivers = env.getDriver
128129

129130
If polygons.IsNullOrEmpty Then

studio/Rsharp_kit/signalKit/machineVision.vb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ Public Module machineVision
2727
Return buffer.TryCast(Of Message)
2828
End If
2929

30+
Dim shapes As Polygon2D()
31+
3032
If two_pass Then
31-
Return CCLabeling.TwoPassProcess(buffer).ToArray
33+
shapes = CCLabeling.TwoPassProcess(buffer).ToArray
3234
Else
33-
Return CCLabeling.Process(buffer).ToArray
35+
shapes = CCLabeling.Process(buffer).ToArray
3436
End If
37+
38+
Return shapes.OrderByDescending(Function(a) a.length).Take(30).ToArray
3539
End Function
3640

3741
Private Function bitmapCommon(image As Object, env As Environment) As [Variant](Of BitmapBuffer, Message)
83.4 KB
Loading

test/demo/imageProcessing/CCL/test.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ let shapes = machineVision::ccl(bin);
1010
print(`find ${length(shapes)} shapes.`);
1111

1212
bitmap(bin, file = "ostu_bin.bmp");
13-
bitmap(file = "shapes.png") {
14-
plot(shapes);
13+
bitmap(file = "shapes.png", size = [3600, 2700]) {
14+
plot(shapes, scatter = TRUE, padding = "padding: 5% 5% 10% 10%;");
1515
}

0 commit comments

Comments
 (0)