Learn how to write the code to call a mutate action on the provided Image to draw a Polygon (the rectangle indicating a face) for each rectangle specified in the response JSON.
- [Instructor] Now that we're set up with an image in memory…we can ask the library to draw on that image.…And so this is done with an extension method.…So we say image.Mutate.…This is available thanks to the name spaces…we have at the top of the file,…and we'll say the action we would like to take…as a lambda here will be a. and we will apply…a certain drawing mechanism, a method to the existing image.…So we'll mutate, we'll modify the image,…and in our case we'll say draw,…you have many options.…
I'm going to say polygon.…And what do we want to draw?…Well the polygon, of course, is going to be a line…and it's going to use several points.…These are the points that we have in our rectangle.…So there's an Rgba52 helper here…that'll help us pick a color,…something that will stand out.…We have to say how wide the pen or the line will be.…So as we draw the line what does…that brush stroke look like?…I'll just specify with 20.…
And then we need to specify all the corners,…all the vertexes of the polygon.…Now we got back a rectangle which was already…
Skill Level Intermediate
1. Problem 1: Pond Oreille
2. Problem 2: Where Am I?
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Facial Recognition
6. Problem 6: Real-Time Information Dashboard
Next steps2m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.