导航

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

    apn3 发布的帖子

    • RE: 黑色线段如何识别,识别线段后如何判断黑色?

      @kidswong999 import sensor
      import image
      import time
      import network
      import usocket
      import sys
      import sensor
      import image
      import time
      import network
      import usocket
      import sys
      import math
      from pyb import UART
      from pyb import LED
      enable_lens_corr = True

      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA)
      sensor.skip_frames(time = 2000)
      clock = time.clock()

      min_degree = 60
      max_degree = 120

      left_roi = [0,0,160,20]
      while(True):
      clock.tick()
      img = sensor.snapshot()
      if enable_lens_corr: img.lens_corr(1.8)
      for l in img.find_lines(roi=left_roi, x_stride=4, y_stride=2, threshold=1000, theta_margin=25, rho_margin=25):
      if (min_degree <= l.theta()) and (l.theta() <= max_degree):
      img.draw_line(l.line(), color = (255, 0, 0))
      print(l.theta())
      statistics = img.get_statistics(roi=left_roi)
      print(statistics)
      if 12<statistics.l_mode()<30 and -15<statistics.a_mode()<10 and -6<statistics.b_mode()<14:
      img.draw_rectangle(0,0,160,20, color = (255, 255, 255))
      print("FPS %f" % clock.fps())
      我分别用了线段识别和数据统计,但是这两个是分离的没有统一起来

      发布在 OpenMV Cam
      A
      apn3
    • RE: 黑色线段如何识别,识别线段后如何判断黑色?

      @kidswong999 我就是想在识别线段的基础上如何判断是黑色的

      发布在 OpenMV Cam
      A
      apn3
    • RE: 黑色线段如何识别,识别线段后如何判断黑色?

      0_1636117150309_111.PNG

      发布在 OpenMV Cam
      A
      apn3
    • 黑色线段如何识别,识别线段后如何判断黑色?

      识别线段后如何判断黑色

      发布在 OpenMV Cam
      A
      apn3