|
@@ -20,7 +20,8 @@ namespace bbiwarg.Images
|
|
palmContour = 1,
|
|
palmContour = 1,
|
|
wristLine = 2,
|
|
wristLine = 2,
|
|
thumbLine = 3,
|
|
thumbLine = 3,
|
|
- palmRect = 4
|
|
|
|
|
|
+ palmRect = 4,
|
|
|
|
+ palmGrid = 5
|
|
}
|
|
}
|
|
|
|
|
|
class PalmImage
|
|
class PalmImage
|
|
@@ -46,5 +47,30 @@ namespace bbiwarg.Images
|
|
{
|
|
{
|
|
image.Draw(line, new Gray((byte)state), 1);
|
|
image.Draw(line, new Gray((byte)state), 1);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public void drawGrid(Vector2D a, Vector2D b, Vector2D c, Vector2D d)
|
|
|
|
+ {
|
|
|
|
+ int columnCount = 4;
|
|
|
|
+ int rowCount = 3;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Vector2D bc = c - b;
|
|
|
|
+ for (int i = 1; i < columnCount; i++)
|
|
|
|
+ {
|
|
|
|
+ Vector2D bci = b + (bc * ((float)i/columnCount));
|
|
|
|
+ Vector2D adi = a + (bc * ((float)i/columnCount));
|
|
|
|
+ drawLine(new LineSegment2DF(bci, adi), PalmImageState.palmGrid);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Vector2D ab = b - a;
|
|
|
|
+ for (int i = 1; i < rowCount; i++)
|
|
|
|
+ {
|
|
|
|
+ Vector2D abi = a + (ab * ((float)i / rowCount));
|
|
|
|
+ Vector2D dci = d + (ab * ((float)i / rowCount));
|
|
|
|
+ drawLine(new LineSegment2DF(abi, dci), PalmImageState.palmGrid);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|