导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. 搜索

    高级搜索

    搜索子版块
    保存设置 清除设置
    共 499 条结果匹配 "sensor",(耗时 0.12 秒)

    openmv运行出现 sensor control failed怎么解决

    回复: RuntimeError: Sensor control failed0_1645664177849_QQ图片20220224085355.png

    O
    发布在 OpenMV Cam

    大佬请问为什么二值化之后找线段在正对矩形的时候找的到 歪了就不行

    import pyb
    from pyb import LED #导入LED
    from machine import UART
    import sensor, image, time, math, os, tf
    uart = UART(1, baudrate=115200)
    sensor.reset()
    sensor.set_pixformat(sensor.GRAYSCALE)
    sensor.set_framesize(sensor.QVGA)
    sensor.set_auto_exposure(False, 1000)
    sensor.__write_reg(0x03,0x04)
    sensor.__write_reg(0x04,0x05)
    sensor.__write_reg(0xB2,0x40)
    sensor.__write_reg(0xB3,0x00)
    sensor.__write_reg(0xB4,0x40)
    sensor.__write_reg(0xB5,0x00)
    sensor.__write_reg(0x03,0x03)
    sensor.__write_reg(0x5B,0x60)
    sensor.__write_reg(0x03,0x08)
    sensor.set_auto_whitebal(False, (0x80,135,0x80))
    sensor.set_brightness(500)
    sensor.set_auto_gain(False)
    sensor.skip_frames(time = 2000)
    clock = time.clock()
    Large_area=[0,0,320,180]
    min_degree = 45
    max_degree = 135
    i=0
    yzb=[0,0]
    he=[]
    ypj=[]
    yjd=[]
    lbypj=[]
    lbyjd=[]
    suibian=[]
    red_threshold = (0,150)
    def get_pj(point):
        point_1 = point[0]
        point_2 = point[1]
        he = int((point_1+ point_2)/2)
        return he
    while(True):
        img = sensor.snapshot()
        img.binary([red_threshold])
        #img.draw_rectangle(Large_area, color = (255, 0, 0))
        for l in img.find_line_segments(roi=Large_area,merge_distance = 10, max_theta_diff = 10):
                #if (min_degree <= l.theta()) and (l.theta() <= max_degree):
                    img.draw_line(l.line(), color = (255, 0, 0))
                    #print(l.line())
                    yzb = [l.y1(),l.y2()]
                    #yjd= [l.theta()]
                    ypj = get_pj(yzb)
                    if(i<5):
                        lbypj.append(ypj)
                        #lbyjd.append(yjd)
                        i=i+1
                    if (i==5):
                        #suibian=lbypj
                        ypjmax=max(lbypj)
                        juliy=240-ypjmax
                        img.draw_line([0,ypjmax,320,ypjmax], color = (255, 0, 0))
                        #zuidixian=suibian.index(max(suibian))
                        #outjd =lbyjd[zuidixian]
                        print(juliy)
                        lbypj=[]
                        #lbyjd=[]
                        i=0
    
    

    1_1650804075413_QQ图片20220424204052.png

    0_1650804075411_QQ图片20220424204044.png

    R
    发布在 OpenMV Cam

    无法把图片读入framebuffer,求教

    0_1543651463853_微信截图_20181201160409.png

    import sensor, image, time
    
    # 仍然需要初始化 sensor
    sensor.reset()
    # 设置 sensor
    sensor.set_contrast(1)
    sensor.set_gainceiling(16)
    
    # 设置sensor的 pixel format
    sensor.set_framesize(sensor.QQVGA)
    sensor.set_pixformat(sensor.GRAYSCALE)
    
    # 导入 image
    img = image.Image("/example.bmp", copy_to_fb=True)
    
    # 添加画线的代码
    # img.draw_line(...)
    
    # Flush FB
    sensor.flush()
    
    # Add a small delay to allow the IDE to read the flushed image.
    time.sleep(100)
    

    X
    发布在 OpenMV Cam

    想做MT9V034的Binning操作,但是配置寄存器没有效果

    sensor.__write_reg(0x0D,0x003A)
    

    B
    发布在 OpenMV Cam

    新买的openmv4plus在rpg565下拍摄的图片发绿发暗

    OpenMV4 Plus用的是ov5640的sensor,OpenMV3用的是ov7725的sensor。
    在暗光情况下ov5640会比ov7725更暗一些。

    发布在 OpenMV Cam

    7 Puls关闭白平衡,IDE显示黑屏

    gain_db的值不对。

    运行这个程序,可以获得当前的gain_db
    https://book.openmv.cc/example/21-Sensor-Control/sensor-manual-whitebal-control.html

    发布在 OpenMV Cam

    追踪色块程序关掉白平衡后,开盖启动程序时随机出现三种不同的色调

    sensor.set_auto_whitebal(False),要添加第二个参数的。

    代码:https://book.openmv.cc/example/21-Sensor-Control/sensor-manual-whitebal-control.html

    同理,sensor.set_auto_gain你也得改。

    发布在 OpenMV Cam

    想问一下如何调节图片色温呢?感谢!!

    https://book.openmv.cc/example/21-Sensor-Control/sensor-manual-whitebal-control.html

    色温就是调节白平衡。

    sensor.set_auto_whitebal(False, rgb_gain_db = (0.0, 0.0, 0.0))

    里面设置值。

    发布在 OpenMV Cam

    openmv有没有一个函数可以将RGB图像转换成灰度图?如果没有那么PIL的模块有没有?能不能直接导入

    import sensor, image, tv
    from PIL import Image

    sensor.reset() # Initialize the camera sensor.
    sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
    sensor.set_framesize(sensor.QQVGA)
    tv.init() # Initialize the tv.

    while(True):
    img = sensor.snapshot()
    img.convert('L')
    tv.display(img)

    I
    发布在 OpenMV Cam

    关于摄像头在高低亮度环境下上电,获取图像亮度不同的问题

    你可以把sensor.get_gain_db(), sensor.get_exposure_us()打印出来。

    用的是什么感光元件?

    参考:https://book.openmv.cc/example/21-Sensor-Control/sensor-auto-gain-control.html

    发布在 OpenMV Cam
    • 1
    • 2
    • 3
    • 4
    • 5
    • 49
    • 50
    • 3 / 50