Mini2440 Linux移植开发实战教程

需积分: 16 0 下载量 36 浏览量 更新于2024-07-28 收藏 7.27MB PDF 举报
"Mini2440_Linux移植开发实战指南.pdf" 这是一份针对Mini2440开发板的Linux系统移植与开发的实战指南,适合嵌入式系统初学者。该手册由广州友善之臂计算机科技有限公司制作,旨在帮助用户理解Linux-2.6.32.2内核在Mini2440上的移植步骤,包括驱动程序的移植、编写和测试。此外,手册还涵盖了Mini2440文件系统的构建方法。Mini2440开发板因其高质量、全面的软件支持和高效的技术服务,在国内ARM9开发板市场中拥有广泛的用户基础,并自Linux-2.6.31起被官方内核所支持。 手册中部分内容源自社区用户的分享和经验总结,对于micro2440开发板同样适用,因为两者硬件接口相同。读者可以自由复制和传播该手册,但需尊重友善之臂的解释和修改权。手册分为多个章节,如Git的安装和使用、关于supervivi(一种Bootloader)和开发环境的介绍,以及交叉编译器的相关知识。 第一章介绍了如何在Fedora9系统上安装和使用Git,包括下载源代码、安装步骤以及验证版本号的方法。 第二章深入讲解了supervivi。首先,提供了最新的supervivi版本信息和分区表,以及如何确定开发板上supervivi的版本。接着,阐述了如何恢复或更新supervivi,以及其功能概述。此外,讨论了为何需要使用最新版本的supervivi,并简要提及了使用其他开源Bootloader的可能性。接下来,手册讨论了开发平台的选择和交叉编译器的重要性,这是进行嵌入式开发的基础工具。 第三章可能会进一步涵盖Linux内核配置、编译和烧录到开发板的过程,以及如何调试和优化系统性能。这些内容对于学习Linux在嵌入式硬件上的实际应用至关重要。 这份指南为想要在Mini2440上进行Linux移植和开发的初学者提供了一个详尽的起点,通过阅读和实践,读者可以掌握从搭建开发环境到成功运行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 上传