Lesson Applications of Robotics II - Artificial Intelligence - ثالث ثانوي

Lesson 3 Applications of Robotics II

Robotics, Computer Vision and AI

Lesson 3 Applications of Robotics II

Adding a Timer

Creating a Folder

Image Processing

Lesson 3 Applications of Robotics II

After the image is checked that it was retrieved successfully,

Lesson 3 Applications of Robotics II

Next, the image has to be changed into grayscale, as needed by the detection,

Human Silhouette Detection

Lesson 3 Applications of Robotics II

Drone Report and Saving of the Detected Images

Lesson 3 Applications of Robotics II

After adding all these functionalities, the run() function of your controller should look like this:

Lesson 3 Applications of Robotics II

reshapes image array to (channels, height, width) format

Lesson 3 Applications of Robotics II

Now, run the simulation to see your drone taking off and patroling around the house. Notice the new console outputs and the images created in the folder.

Lesson 3 Applications of Robotics II

Modify your controller to not check if the folder already exists in the path. Does it create any complications in the execution of the simulation?

Modify your controller to perform a detection every 10 seconds. Do you notice any difference in the frequency of the console prints and the images saved?

Lesson 3 Applications of Robotics II

What would happen to the image output if you merged the color dimensions in the normal sequence instead of the reversed one? Write down your observations below.

Experiment with the fourth and fifth arguments of the rectangle() function. Write down your observations below.

Modify your controllerto also printthe drone’sroll, pitch and yaw values when detecting a person.