@kidswong999 谢谢
vfap 发布的帖子
-
RE: 关于OpenMV H7的模块识别仪表盘表针角度的问题
Single Color RGB565 Blob Tracking Example
This example shows off single color RGB565 tracking using the OpenMV Cam.
import sensor, image, time, math
threshold_index = 0 # 0 for red, 1 for green, 2 for blue
Color Tracking Thresholds (L Min, L Max, A Min, A Max, B Min, B Max)
The below thresholds track in general red/green/blue things. You may wish to tune them...
#thresholds = [(30, 100, 15, 127, 15, 127), # generic_red_thresholds
# (30, 100, -64, -8, -32, 32), # generic_green_thresholds
# (0, 30, 0, 64, -128, 0)] # generic_blue_thresholdsthresholds = [(9, 65, 14, 75, -21, 75), # generic_red_thresholds
(30, 100, -64, -8, -32, 32), # generic_green_thresholds
(0, 30, 0, 64, -128, 0)] # generic_blue_thresholdssensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must be turned off for color tracking
sensor.set_auto_whitebal(False) # must be turned off for color tracking
clock = time.clock()Only blobs that with more pixels than "pixel_threshold" and more area than "area_threshold" are
returned by "find_blobs" below. Change "pixels_threshold" and "area_threshold" if you change the
camera resolution. "merge=True" merges all overlapping blobs in the image.
while(True):
clock.tick()
img = sensor.snapshot()
for blob in img.find_blobs([thresholds[threshold_index]], pixels_threshold=200, area_threshold=200, merge=True):
# These values depend on the blob not being circular - otherwise they will be shaky.
# if blob.elongation() > 0.5:
# img.draw_edges(blob.min_corners(), color=(255,0,0))
# img.draw_line(blob.major_axis_line(), color=(0,255,0))
# img.draw_line(blob.minor_axis_line(), color=(0,0,255))
# These values are stable all the time.
img.draw_rectangle(blob.rect())
img.draw_cross(blob.cx(), blob.cy())
# Note - the blob rotation is unique to 0-180 only.
# img.draw_keypoints([(blob.cx(), blob.cy(), int(math.degrees(blob.rotation())))], size=20)
print(blob)
print(clock.fps()) -
关于OpenMV H7的模块进行线识别的问题
大家好,我目前要用OpenMV H7的模块去识别仪表盘表针(类似于汽车上的仪表)的角度,有如下问题:
1)最近也看了些资料,建议用线识别的思路,再提取角度,不知道哪能找到相关资料?
2)要是用线识别,角度应该只能是0~179的范围。现在表针的角度超过180,低于360,大家有没有更好的方法。
望诸位高手帮忙指点一二,谢谢!!! -
关于OpenMV H7的模块识别仪表盘表针角度的问题
大家好,我目前要用OpenMV H7的模块去识别仪表盘表针(类似于汽车上的仪表)的角度,按照官方教程“视频教程4 - 颜色识别:https://singtown.com/learn/49993/”,更改待识别对象的LAB值,可以识别到表针,但blob中的blob.rotation() 返回色块的旋转角度和实际的对不上。请大家帮忙分析一下,另外有没有其他更好的方法或教程可以借鉴的,谢谢!!!
-
关于OpenMV H7的模块串口方面的问题
请问,OpenMV H7的模块串口方面有如下问题:
1、该模块具有几个串口;
2、每个串口的波特率最高能到多少;
3、串口电平标准是TTL电平吗?兼容5V吗?
谢谢!!!