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…
Author
Released
9/22/2017- Installing and configuring OpenCV
- Data types and structures
- Image types
- Manipulating pixels
- Scaling and rotating images
- Using video inputs
- Creating custom interfaces
- Thresholding
- Object detection
- Face and feature detection
- Template matching
Skill Level Intermediate
Duration
Views
Related Courses
-
Python: Programming Efficiently
with Michele Vallisneri2h 15m Intermediate -
NumPy Data Science Essential Training
with Charles Kelly3h 54m Intermediate
-
Introduction
-
Welcome56s
-
-
1. Install and Configure OpenCV
-
Install on Mac OS X5m 24s
-
Install on Windows 74m 16s
-
Test the install1m 51s
-
2. Basic Image Operations
-
Data types and structures7m 36s
-
Blur, dilation, and erosion5m 50s
-
Scale and rotate images5m 14s
-
Use video inputs4m 33s
-
Create custom interfaces4m 28s
-
3. Object Detection
-
Simple thresholding6m 15s
-
Adaptive thresholding4m 38s
-
Skin detection6m 8s
-
Introduction to contours1m 38s
-
Contour object detection4m 19s
-
Canny edge detection4m 8s
-
Object detection overview1m 59s
-
4. Face and Feature Detection
-
Haar cascading1m 43s
-
Face detection5m 7s
-
Solution: Eye detection5m 26s
-
Conclusion
-
Additional techniques3m 35s
-
Next steps1m 5s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Area, perimeter, center, and curvature