There are additional ways to characterize objects in images, including by measuring how curvy an object's outline is, as well as the area contained by a contour loop. Some of these parameters are obtained by leveraging the contour, closed loop data. Patrick shows how to determine these attributes to characterize multiple objects within a single image for comparison.
- [Instructor] Now that we have segmented out…and individually bounded contours of objects…in the previous video,…let's keep going and extract more information…from each of these individual objects.…Specifically, we're going to be looking at…the area, perimeter, and centroids of these objects.…To begin, I'm going to start off by deleting lines 16 and 17,…and then creating an empty…NPRA called Objects equals NP.zeros…and then we want to use the original image dimensions…so we'll type img in brackets…dot shape and then the first value…then img.shape bracket the next value…and then we're going to indicate the number…of channels we want to draw.…
Which in this case we can do three.…Then we need to indicate the type…using the unsigned integer of depth eight.…We'll type U INT eight end quote end parenthesis.…For our blank object now created…let's go ahead and do a four loop over each of the contours.…Typing four, C in contours.…We can type CV2.draw contours.…Then we'll pass in the objects matrix we just created.…Then we're going to do a funny thing…
AuthorPatrick W. Crawford
- Installing and configuring OpenCV
- Data types and structures
- Image types
- Manipulating pixels
- Scaling and rotating images
- Using video inputs
- Creating custom interfaces
- Object detection
- Face and feature detection
- Template matching
Skill Level Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
Python: Programming Efficientlywith Michele Vallisneri2h 15m Intermediate
1. Install and Configure OpenCV
2. Basic Image Operations
3. Object Detection
4. Face and Feature Detection
- 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.