共 791 条结果匹配 "阈值",(耗时 0.08 秒)
绿光在灰度模式下阈值是多少?
用全局快门设置灰度模式识别绿光,绿光的阈值应该设为多少?
颜色阈值提取用的是什么方法?
颜色阈值提取用的是什么方法?
阈值选择会受到灯光的影响吗
在缓冲帧区选择阈值时,在灯光下影响大吗?
RI明亮的白光阈值是怎么看的
没有白光的阈值怎么调
自动识别阈值怎么判断是我想要的值得范围呢
自动识别阈值怎么判断是我想要的值得范围呢
不是阈值的问题,我用的是黑色的阈值,如果是阈值的问题根本得不到这条白线,况且小车没有得到直线后一个轮子转一个轮子不转?
THRESHOLD = (0, 50, -24,-1, -18, 6) # Grayscale threshold for dark things...
import sensor, image, time
from pyb import LED
import car
from pid import PID
rho_pid = PID(p=0.4, i=0)
theta_pid = PID(p=0.001, i=0)
#LED(1).on()
#LED(3).on()
sensor.reset()
sensor.set_vflip(True)
sensor.set_hmirror(True)
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQQVGA) # 80x60 (4,800 pixels) - O(N^2) max = 2,3040,000.
#sensor.set_windowing([0,20,80,40])
sensor.skip_frames(time = 2000)
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot().binary([THRESHOLD])
line = img.get_regression([(100,100,0,0,0,0)], robust = True)
if (line):
rho_err = abs(line.rho())-img.width()/2
if line.theta()>90:
theta_err = line.theta()-180
else:
theta_err = line.theta()
img.draw_line(line.line(), color = 127)
print(rho_err,line.magnitude(),rho_err)
if line.magnitude()>8:
#if -40<b_err<40 and -30<t_err<30:
rho_output = rho_pid.get_pid(rho_err,1)
theta_output = theta_pid.get_pid(theta_err,1)
output = rho_output+theta_output
car.run(50+output, 50-output)
else:
car.run(0,0)
else:
car.run(50,-50)
pass
#print(clock.fps())
得不到线性回归后的直线
IDE中阈值编辑器的LAB阈值输出变成了符号,之前是可以正常使用的,输出也是数字
# Hello World Example
#
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!
import sensor, image, time
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000) # Wait for settings take effect.
clock = time.clock() # Create a clock object to track the FPS.
while(True):
clock.tick() # Update the FPS clock.
img = sensor.snapshot() # Take a picture and return the image.
print(clock.fps()) # Note: OpenMV Cam runs about half as fast when connected
# to the IDE. The FPS should increase once disconnected.
可以通过stm32上的按键修改阈值吗
想通过stm32f1的key键,修改openmv的阈值以减小环境光线的干扰,提高瞄准的准确度
颜色阈值的选取,除了手动选择,还有openmv自带的 otsu's算法求阈值,openmv里还有其他方法嘛?
因为我想做个通过颜色去识别物体,但是那个阈值 历程是手动去根据人眼调整阈值,Openmv库里有内置的算法求阈值嘛?类似于openmv里的 histogram.get_threshold() 这个函数通过Otsu's算法得到一个阈值用于分割。