导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. iear
    3. 帖子
    I
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    iear 创建的帖子

    • I

      openmv 与stm32联调直接用io口,当stm32输出高时,摄像头接收高后才控制开启运行程序是可以的吗?
      OpenMV Cam • • iear

      2
      0
      赞同
      2
      楼层
      1152
      浏览

      可以,你直接在OpenMV里死循环判断就行了。
    • I

      如何同时识别形状是矩形,颜色是红绿蓝的物体呢
      OpenMV Cam • • iear

      2
      0
      赞同
      2
      楼层
      1493
      浏览

      https://book.openmv.cc/image/blob_circle.html
    • I

      怎样识别随机颜色红绿蓝其中一种颜色的色卡呢?还有threshold_index ,color_code又是怎么得到值的
      OpenMV Cam • • iear

      8
      0
      赞同
      8
      楼层
      4098
      浏览

      @iear 我不知道你具体要做什么,很有可能你想的步骤不合适。
    • I

      识别色卡颜色并找到相对应颜色的气球扎破,我写的这个代码可以实现吗?
      OpenMV Cam • • iear

      9
      0
      赞同
      9
      楼层
      4428
      浏览

      I

      @kidswong999 代码改了一点 结果是这样的
    • I

      请问 用openmv如何判断色卡的颜色,并找出相对应颜色的小球?(小白不懂,求大佬帮忙解答一下啊) 谢谢啦!
      OpenMV Cam • • iear

      4
      0
      赞同
      4
      楼层
      2483
      浏览

      I

      @kidswong99 import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 10) sensor.set_auto_whitebal(False) sensor.set_auto_gain(False) clock = time.clock() 、 ROI=(0,0,80,80) while(True): clock.tick() img = sensor.snapshot() statistics=img.get_statistics(roi=ROI) color_l=statistics.l_mode() color_a=statistics.a_mode() color_b=statistics.b_mode() print(color_l,color_a,color_b) img.draw_rectangle(ROI) pyb.delay(2000) img = sensor.snapshot().lens_corr(1.8) for c in img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10, r_min = 2, r_max = 100, r_step = 2): area = (c.x()-c.r(), c.y()-c.r(), 2*c.r(), 2*c.r()) statistics = img.get_statistics(roi=area)#像素颜色统计 print(statistics) if 20<statistics.l_mode()<100 and 15<statistics.a_mode()<127 and 15<statistics.b_mode()<12:#if the circle is red img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))#识别到的红色圆形用红色的圆框出来 if 30<statistics.l_mode()<100 and -64<statistics.a_mode()<-8 and -32<statistics.b_mode()<32:#if the corcle is green img.draw_circle(c.x(),c.y(),c.r(),color=(0,255,0)) if 0<statistics.l_mode()<15 and 0<statistics.a_mode()<40 and -80<statistics.b_mode()<-20:#if the circle is blue img.draw_circle(c.x(),c.y(),c.r(),color=(0,0,255)) else: img.draw_rectangle(area, color = (255, 255, 255)) #将非红色的圆用白色的矩形框出来 print("FPS %f" % clock.fps())