Mini2440 Linux移植开发实战教程

需积分: 15 3 下载量 175 浏览量 更新于2024-09-19 收藏 7.38MB PDF 举报
"Mini2440_Linux移植开发实战指南.pdf" 这本《Mini2440 Linux移植开发实战指南》是专为嵌入式系统开发者设计的一份详细教程,聚焦于在Mini2440开发板上进行Linux操作系统的移植与开发。Mini2440是一款基于ARM9处理器的开发板,因其高质量、全面的软件支持和精心设计而受到广泛欢迎。该书的内容涵盖了Linux内核2.6.32.2的移植过程,包括了各种驱动程序的移植、编写和测试方法。 书中不仅讲解了Mini2440开发板所使用的文件系统的构建步骤,还涉及到如何使用Git工具进行版本控制,这对于协同开发和管理代码库至关重要。Git的安装和使用章节中,详细阐述了如何在Fedora9系统上下载源代码、安装Git以及验证版本号的操作流程。 此外,书中还讨论了supervivi这个引导加载程序,它是Mini2440开发板上的一个关键组件。作者强调了保持supervivi最新版本的重要性,因为它提供了许多功能,如分区表管理、固件更新等。书中还提到了如何识别开发板上的supervivi版本,以及如何恢复或更新它。同时,对于希望使用其他开源bootloader的读者,书中也给出了指导。 开发环境的配置是另一个重要环节,书中介绍了开发平台的选择以及交叉编译器的使用。交叉编译器允许在不同架构之间编译代码,例如在x86主机上构建针对ARM架构的Linux系统。这部分内容对于确保软件在目标硬件上的正确运行至关重要。 整个手册还借鉴了社区中其他开发者的经验和文档,旨在为读者提供一个全面的学习资源,帮助他们更好地理解和实践Linux在Mini2440开发板上的移植工作。无论你是初学者还是经验丰富的开发者,这本书都提供了宝贵的实战经验和技巧,是学习嵌入式Linux开发的理想参考资料。

这段 import cv2 import face_recognition import numpy as np from PIL import Image, ImageDraw,ImageFont video_capture = cv2.VideoCapture(r'C:/Users/ALIENWARE/123.mp4')#如果输入是(0)为摄像头输入 #现输入为MP4进行识别检测人脸 first_image = face_recognition.load_image_file("1.jpg") first_face_encoding = face_recognition.face_encodings(first_image)[0] Second_image = face_recognition.load_image_file("2.jpg") Second_face_encoding = face_recognition.face_encodings(Second_image)[0] third_image = face_recognition.load_image_file("3.jpg") third_face_encoding = face_recognition.face_encodings(third_image)[0] inside_face_encodings = [first_face_encoding,Second_face_encoding,third_face_encoding] inside_face_names = ['A','B','C'] face_locations = [] face_encodings = [] face_names = [] process_this_frame = True while True: ret, frame = video_capture.read() small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25) rgb_small_frame = small_frame[:, :, ::-1] if process_this_frame: face_locations = face_recognition.face_locations(rgb_small_frame) face_encodings = face_recognition.face_encodings(rgb_small_frame, face_locations) face_names = [] for face_encoding in face_encodings: matches = face_recognition.compare_faces(inside_face_encodings, face_encoding) name = '未录入人脸' if True in matches: first_match_index = matches.index(True) name = inside_face_names[first_match_index] face_names.append(name) process_this_frame = not process_this_frame for (top, right, bottom, left), name in zip(face_locations, face_names): top *= 4 right *= 4 bottom *= 4 left *= 4 cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2) img_pil = Image.fromarray(frame) draw = ImageDraw.Draw(img_pil) fontStyle = ImageFont.truetype("C:/Windows/Fonts/simsun.ttc", 32, encoding="utf-8") draw.text((left + 6, bottom - 6), name, (0, 200, 0), font=fontStyle) frame = np.asarray(np.array(img_pil)) cv2.imshow('face_out', frame) if cv2.waitKey(1) & 0xFF == ord('q'): #退出需要按下Q键否则内核会崩溃 break video_capture.release() cv2.destroyAllWindows()

2023-06-07 上传