资源简介
openmv后视镜.zip

代码片段和文件信息
# Iris Detection 2 Example
#
# This example shows how to find the eye gaze (pupil detection) after finding
# the eyes in an image. This script uses the find_eyes function which determines
# the center point of roi that should contain a pupil. It does this by basically
# finding the center of the darkest area in the eye roi which is the pupil center.
#
# Note: This script does not detect a face first use it with the telephoto lens.
import sensor time image
from pyb import UART
from pyb import LED
red_led = LED(1)
green_led = LED(2)
blue_led = LED(3)
ir_led = LED(4)
uart = UART(3 115200)
# Reset sensor
sensor.reset()
# Sensor settings
sensor.set_contrast(3)
sensor.set_gainceiling(64)
# Set resolution to VGA.
sensor.set_framesize(sensor.VGA)
# Bin/Crop image to 200x100 which gives more details with less data to process
sensor.set_windowing((220 190 200 100))
sensor.set_pixformat(sensor.GRAYSCALE)
# Load Haar Cascade
# By default this will use all stages lower stages is faster but less accurate.
eyes_cascade = image.HaarCascade(“eye“ stages=24)
print(eyes_cascade)
# FPS clock
clock = time.clock()
while (True):
clock.tick()
green_led.on()
# Capture snapshot
img = sensor.snapshot()
# Find eyes !
# Note: Lower scale factor scales-down the image more and detects smaller objects.
# Higher threshold results in a higher detection rate with more false positives.
eyes = img.find_features(eyes_cascade threshold=0.5 scale_factor=1.5)
# Find iris
for e in eyes:
iris = img.find_eye(e)
print(iris)
#uart.write(iris)
#uart.write(iris[1])
output_str=“%.3d%.3d“ % (iris[0] iris[1]) #方式1
if output_str!=0: red_led.on()
time.sleep(20)
red_led.off()
#output_str=json.dumps([max_blob.cx()max_blob.cy()]) #方式2
#print(‘you send:‘output_str)
uart.write(output_str+‘\r\n‘)
img.draw_rectangle(e)
img.draw_cross(iris[0] iris[1])
# Print FPS.
# Note: Actual FPS is higher streaming the FB makes it slower.
#print(1)
#print(2)
#print(clock.fps())
#uart.write(“Hello World!\r“)
time.sleep(10)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 349249 2018-12-16 12:53 后视镜驱动\OBJ\timer.crf
目录 0 2019-05-12 23:37 后视镜驱动\
目录 0 2019-05-12 23:37 后视镜驱动\CORE\
文件 17273 2010-06-07 10:25 后视镜驱动\CORE\core_cm3.c
文件 85714 2011-02-09 14:59 后视镜驱动\CORE\core_cm3.h
文件 17273 2010-06-07 10:25 后视镜驱动\CORE\core_cm3_1.c
文件 85714 2011-02-09 14:59 后视镜驱动\CORE\core_cm3_1.h
文件 15503 2011-03-10 10:52 后视镜驱动\CORE\startup_stm32f10x_hd.s
文件 12955 2017-08-03 17:35 后视镜驱动\CORE\startup_stm32f10x_md.s
目录 0 2019-05-12 23:37 后视镜驱动\HARDWARE\
目录 0 2019-05-12 23:37 后视镜驱动\HARDWARE\CAN\
文件 5056 2018-11-06 09:49 后视镜驱动\HARDWARE\CAN\can.c
文件 389 2018-11-06 08:42 后视镜驱动\HARDWARE\CAN\can.h
目录 0 2019-05-12 23:37 后视镜驱动\HARDWARE\KEY\
文件 1060 2018-11-06 08:56 后视镜驱动\HARDWARE\KEY\key.c
文件 575 2018-11-06 08:20 后视镜驱动\HARDWARE\KEY\key.h
目录 0 2019-05-12 23:37 后视镜驱动\HARDWARE\LCD\
文件 35016 2015-03-13 14:54 后视镜驱动\HARDWARE\LCD\font.h
文件 85363 2018-11-09 09:16 后视镜驱动\HARDWARE\LCD\lcd.c
文件 7529 2015-04-24 11:48 后视镜驱动\HARDWARE\LCD\lcd.h
目录 0 2019-05-12 23:37 后视镜驱动\HARDWARE\LED\
文件 836 2018-11-09 21:14 后视镜驱动\HARDWARE\LED\led.c
文件 171 2018-11-08 10:05 后视镜驱动\HARDWARE\LED\led.h
文件 2346 2018-11-13 22:12 后视镜驱动\HARDWARE\motor.c
文件 463 2018-11-13 21:25 后视镜驱动\HARDWARE\motor.h
文件 1624 2018-11-13 21:26 后视镜驱动\HARDWARE\timer.c
文件 109 2018-11-08 10:17 后视镜驱动\HARDWARE\timer.h
目录 0 2019-05-12 23:37 后视镜驱动\OBJ\
文件 359764 2018-12-16 12:53 后视镜驱动\OBJ\CAN.axf
文件 1851 2018-12-16 12:53 后视镜驱动\OBJ\CAN.build_log.htm
文件 31056 2018-12-16 12:53 后视镜驱动\OBJ\CAN.hex
............此处省略159个文件信息
相关资源
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
- 联想启天M4350 BIOS升级文件
- 操作系统教程课后答案华中科技大学
评论
共有 条评论