Created
July 19, 2019 11:57
-
-
Save mdfarragher/8d33012be3c5913857608ed7e5497a8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a color palette for plotting | |
var palette = new RgbPixel[] | |
{ | |
new RgbPixel(0xe6, 0x19, 0x4b), | |
new RgbPixel(0xf5, 0x82, 0x31), | |
new RgbPixel(0xff, 0xe1, 0x19), | |
new RgbPixel(0xbc, 0xf6, 0x0c), | |
new RgbPixel(0x3c, 0xb4, 0x4b), | |
new RgbPixel(0x46, 0xf0, 0xf0), | |
new RgbPixel(0x43, 0x63, 0xd8), | |
new RgbPixel(0x91, 0x1e, 0xb4), | |
new RgbPixel(0xf0, 0x32, 0xe6), | |
new RgbPixel(0x80, 0x80, 0x80) | |
}; | |
// draw rectangles on each face using the cluster color | |
for (var i = 0; i < faces.Count; i++) | |
{ | |
Dlib.DrawRectangle(img, faces[i], color: palette[labels[i]], thickness: 4); | |
} | |
// the rest of the code goes here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment