📋 المحتوى المنظم
📖 محتوى تعليمي مفصّل
نوع: محتوى تعليمي
الآن شغل المحاكاة لترى الطائرة المسيرة وهي تقلع وتحلق حول المنزل. لاحظ مخرجات وحدة التحكم الجديدة والصور التي تم إنشاؤها في المجلد.
شكل 6.21
نوع: FIGURE_REFERENCE
شكل 6.21
شكل 6.22
نوع: FIGURE_REFERENCE
شكل 6.22: إنشاء المجلد والصور المحفوظة التي تحتوي على الاكتشافات
نوع: METADATA
وزارة التعليم
335
Ministry of Education
2025 - 1447
🔍 عناصر مرئية
شكل 6.21
A screenshot of a drone simulation environment. The main view shows a drone on the ground, a person walking, and a car near a house. A purple bounding box highlights the person. On the left, a hierarchical list of simulation elements is visible. Below the simulation, a console window displays output from a Python script, indicating its start, folder creation, and detection of a person at specific coordinates. A partial view of a code editor with Python code is also visible on the right.
شكل 6.22: إنشاء المجلد والصور المحفوظة التي تحتوي على الاكتشافات
A screenshot of a Windows File Explorer window. The path shown is 'This PC > Documents > AI2_U3_Drone > controllers > drone_controller'. Inside the folder, there are files like 'drone_controller.py', 'haarcascade_fullbody.xml', and a folder named 'detected'. An arrow points from the 'detected' folder to a text bubble saying 'تم إنشاء المجلد.'. Below the file list, two image thumbnails are shown, both with bounding boxes around a person, indicating detected objects. The filenames are 'IMAGE_2023-04-20_10-50-17.png' and 'IMAGE_2023-04-20_10-50-22.png'.
📄 النص الكامل للصفحة
الآن شغل المحاكاة لترى الطائرة المسيرة وهي تقلع وتحلق حول المنزل. لاحظ مخرجات وحدة التحكم الجديدة والصور التي تم إنشاؤها في المجلد.--- SECTION: شكل 6.21 --- شكل 6.21--- SECTION: شكل 6.22 --- شكل 6.22: إنشاء المجلد والصور المحفوظة التي تحتوي على الاكتشافات2025 - 1447--- VISUAL CONTEXT ---
**FIGURE**: شكل 6.21
Description: A screenshot of a drone simulation environment. The main view shows a drone on the ground, a person walking, and a car near a house. A purple bounding box highlights the person. On the left, a hierarchical list of simulation elements is visible. Below the simulation, a console window displays output from a Python script, indicating its start, folder creation, and detection of a person at specific coordinates. A partial view of a code editor with Python code is also visible on the right.
Key Values: File Edit View Simulation Build Overlays Tools Help, IMPORTABLE EXTERNAL PROTO, Floor "floor", Pedestrian "pedestrian", Pedestrian "pedestrian(1)", Road "road", Pedestrian "pedestrian(2)", Windmill "windmill", Windmill "windmill(1)", Windmill "windmill(2)", SmallHouse "small house", SquareManhole "manhole", CardboardBox "cardboard box", CardboardBox(1) "cardboard box(1)", Tree "tree", Mavic 2 PRO "Mavic 2 PRO", translation -1.13 0.227 0.27, rotation -0.00706 0.00314 1.736, name "Mavic 2 PRO", controller "drone_controller", controllerArgs, window "openemics", customData, supervisor FALSE, synchronization TRUE, battery, Console - All, INFO: drone_controller: Starting controller: python.exe -u drone_controller.py, Folder "detected" created!, 2023-04-20 10:50:17.093982, Found a person in coordinates [-0.20, 0.13], 2023-04-20 10:50:22.546951, Found a person in coordinates [-0.81, 0.25], # Copyright (c) 2018-2023 Cyberbotics Ltd., # Licensed under the Apache License, Version 2.0 (the "License");, # you may not use this file except in compliance with the License., # You may obtain a copy of the License at, # http://www.apache.org/licenses/LICENSE-2.0, # Unless required by applicable law or agreed to in writing, software, # distributed under the License is distributed on an "AS IS" BASIS,, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied., # See the License for the specific language governing permissions and, # limitations under the License., from controller import Robot, import numpy as np # used for math operations, import os # used for folder creation, import cv2 # used for image manipulation, from PIL import Image # Used for image processing, from datetime import datetime # used for timestamping, An auxiliary function used for remapping, def clamp(value, value_min, value_max):, return min(max(value, value_min), value_max)
Context: This figure illustrates the execution of a drone control script in a simulated environment, demonstrating real-time object detection and logging of detected objects' coordinates. It also shows the underlying Python code for the controller.**FIGURE**: شكل 6.22: إنشاء المجلد والصور المحفوظة التي تحتوي على الاكتشافات
Description: A screenshot of a Windows File Explorer window. The path shown is 'This PC > Documents > AI2_U3_Drone > controllers > drone_controller'. Inside the folder, there are files like 'drone_controller.py', 'haarcascade_fullbody.xml', and a folder named 'detected'. An arrow points from the 'detected' folder to a text bubble saying 'تم إنشاء المجلد.'. Below the file list, two image thumbnails are shown, both with bounding boxes around a person, indicating detected objects. The filenames are 'IMAGE_2023-04-20_10-50-17.png' and 'IMAGE_2023-04-20_10-50-22.png'.
Key Values: Open File..., Organize, New folder, Quick access, Creative Cloud Files, This PC, Network, This PC > Documents > AI2_U3_Drone > controllers > drone_controller, PC, drone_controller.py, haarcascade_fullbody.xml, detected, تم إنشاء المجلد., File name: drone_controller.py, All Files (*), Open, Cancel, IMAGE_2023-04-20_10-50-17.png, IMAGE_2023-04-20_10-50-22.png Context: This figure demonstrates the file management aspect of the drone simulation, showing how the script automatically creates a dedicated folder ('detected') to store visual evidence (images) of detected objects, complete with timestamps in their filenames.
🎴 بطاقات تعليمية للمراجعة
عدد البطاقات: 5 بطاقة لهذه الصفحة
ما هي وظيفة سكريبت `drone_controller.py` كما هو موضح في شكل 6.21؟
الإجابة: يقوم سكريبت `drone_controller.py` بالتحكم في الطائرة المسيرة، وبدء التحكم، وإنشاء مجلد لتخزين النتائج، واكتشاف الأشخاص في صور المحاكاة مع تسجيل إحداثياتهم.
الشرح: الشكل 6.21 يوضح أن السكريبت يبدأ التحكم (`Starting controller`)، وينشئ مجلداً (`Folder 'detected' created!`)، ثم يكشف عن وجود شخص في إحداثيات معينة (`Found a person in coordinates...`).
تلميح: فكر في الإجراءات التي يبدأها البرنامج والمخرجات التي تظهر في نافذة التحكم.
كيف يتم تسمية الصور المحفوظة في مجلد `detected` لضمان سهولة التعرف عليها؟
الإجابة: يتم تسمية الصور المحفوظة بتضمين التاريخ والوقت اللذين تم فيهما التقاط الصورة، على سبيل المثال: `IMAGE_2023-04-20_10-50-17.png`.
الشرح: أسماء الملفات مثل `IMAGE_2023-04-20_10-50-17.png` تشير إلى أن التاريخ (2023-04-20) والوقت (10:50:17) جزء أساسي من اسم الملف، مما يساعد على تنظيم وتتبع الصور.
تلميح: لاحظ التنسيق الزمني الموجود في أسماء ملفات الصور المعروضة.
اذكر العناصر التي تظهر في نافذة المحاكاة الرئيسية في شكل 6.21.
الإجابة: تظهر في نافذة المحاكاة الرئيسية: طائرة مسيرة، شخص يمشي، سيارة، ومنزل. ويتم تمييز الشخص بصندوق إحاطة أرجواني.
الشرح: وصف الشكل 6.21 يذكر بوضوح هذه العناصر: 'a drone on the ground, a person walking, and a car near a house. A purple bounding box highlights the person.'
تلميح: ركز على العناصر المرئية في المنطقة الأساسية لشاشة المحاكاة.
ما هي بعض المكتبات البرمجية الأساسية المستخدمة في سكريبت `drone_controller.py`؟
الإجابة: تشمل المكتبات البرمجية الأساسية المستخدمة: `numpy` للعمليات الرياضية، `os` لإنشاء المجلدات، `cv2` لمعالجة الصور، `PIL` لمعالجة الصور، و `datetime` لتسجيل الوقت.
الشرح: الكود المعروض يذكر استيراد: `from controller import Robot`, `import numpy as np`, `import os`, `import cv2`, `from PIL import Image`, `from datetime import datetime`.
تلميح: ابحث عن عبارات `import` في الجزء الظاهر من كود البايثون.
ماذا تفعل الطائرة المسيرة في المحاكاة المذكورة في النص؟
الإجابة: تقلع الطائرة المسيرة وتحلق حول المنزل. وتقوم وحدة التحكم بإنشاء صور يتم حفظها في المجلد.
الشرح: تشرح هذه البطاقة الإجراء الذي يتم تنفيذه في المحاكاة وهو إقلاع وتحليق الطائرة المسيرة وأيضا إنشاء صور.
تلميح: راجع وصف عملية المحاكاة.
التصنيف: ملخص | المستوى: سهل