![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OpenMV
李某人_1
这个作者很懒,什么都没留下…
展开
-
17年电赛的板球控制系统,PID算法的C程序实现+OpenMV的图像处理(颜色识别)
练习了17年电赛的板球控制系统,主要用到两个,一个是PID,另一个是OpenMV的图像处理(颜色识别)PID:#include "main.h"#include "stdio.h"void PIDx_init(void);float PIDx_realize(float speed);void PIDy_init(void);float PIDy_realize(float speed);#include "PID.h" /******************* X轴PID **原创 2021-08-03 14:08:17 · 2492 阅读 · 1 评论 -
python 创建FrameBuffer缓存区
cs.low() rs.high() fbuf=bytearray(320*240*2) fbuf_temp = bytearray(320) for m in range(0,240): for i in range(0,320): fbuf[(m*320+i)*2]=0x00 fbuf[(m*320+i)*2+1]=0xff fbuf_end=framebuf.FrameBuffer(...原创 2021-06-11 20:15:47 · 813 阅读 · 2 评论 -
OpenMV物体分类和颜色识别两种模式通过串口发送,与STM32通信。
import sensor, image, time, math,os, tffrom pyb import UARTfrom pyb import Pin, Timer# 50kHz pin6 timer2 channel1uart = UART(3, 9600)buff=0while(True): while( uart.any() ): temp = uart.readline().decode() buff=temp if tem原创 2021-04-22 19:11:34 · 2084 阅读 · 2 评论 -
OpenMV 驱动自己的LCD屏(修改后)
OpenMV 驱动自己的LCD屏所以在写这个代码之前参考一位老哥的代码,但是他使用的是OpenMV V3,我的是OpenMV V4 H7 Plus,运行他的源代码后发现并不能显示。所以我在他的代码基础上进行了更改,来适配新版本的OpenMV。其中最重要的更改就是write_image()这个函数,OpenMV返回的image对象并不能直接拿来给SPI发送,因为他会丢掉GRB565 16位数据的低(或高)八位,所以,我又开辟了一个新的数据缓存区:fbuf = bytearray(320)#建立帧缓冲原创 2021-04-22 18:33:15 · 11537 阅读 · 72 评论 -
OpenMV查找除了自定义的颜色外的所有颜色,并把他框选起来
import sensor, image, time, mathimport timefrom pyb import Pin, Timer# 50kHz pin6 timer2 channel1light = Timer(2, freq=50000).channel(1, Timer.PWM, pin=Pin("P6"))light.pulse_width_percent(100) # 控制扩展LED的亮度 0~100thresholds = [(41, 82, -18, 11, -20,原创 2021-04-22 19:07:05 · 590 阅读 · 0 评论