From the course: Building Computer Vision Applications with Python
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Solution: Help a robot
From the course: Building Computer Vision Applications with Python
Solution: Help a robot
(upbeat music) - Let me show you my solution. Here's the mask with the white dots. Now for task one, I simply eroded the mask once with a tiny three by three kernel. You can see the code starting at line eight. Let's see it. As you can see all the noise is gone. Now, some of the shelves in the upper part of the picture are almost gone. Now for task two, I followed my own advice and dilated the mask 10 times with a five by five kernel. Here's my result. There you go. As long as there's a black path from the left portion to the right portion of the warehouse this result is useful to the robot. Now let me repeat the experiment this time skipping task number one. That means leaving the tiny white dots before dilating. So first let me restart the Jupyter kernel and clear outputs. Now let's run some cells. And let me skip task number one. Notice what happens when I run task number two. What a mess. Now the robot…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.