导航

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

    dx1g 发布的帖子

    • RE: openmv的神经网络例程是只能识别那十种物体吗?识别的东西能自己改吗?

      你好,请问神经网络训练出来可以识别其它东西了吗

      发布在 OpenMV Cam
      D
      dx1g
    • RE: 请问如何在openmv的lenet.network网络模型自己训练lenet模型使用。

      现有的神经网络识别数字、字母的方法,其运行时间大概多长

      发布在 OpenMV Cam
      D
      dx1g
    • 请问如何在openmv的lenet.network网络模型自己训练lenet模型使用。

      请问如何在openmv M4的lenet.network网络模型自己训练lenet模型使用。

      发布在 OpenMV Cam
      D
      dx1g
    • 请问使用神经网络能够识别H吗?

      请问openmv中使用神经网络能够识别H吗?

      发布在 OpenMV Cam
      D
      dx1g
    • openmv网络连接,wifi图传的wifi模块是什么,可以不用它的wifi拓展版吗?

      openmv网络连接,wifi图传的wifi模块是什么,可以不用它的wifi拓展版吗?

      发布在 OpenMV Cam
      D
      dx1g
    • openmv插上内存卡后脱机无法运行时为什么?

      为什么openmv插上储存卡后脱机就不能运行了?拔了储存卡就可以运行这是为什么?

      发布在 OpenMV Cam
      D
      dx1g
    • openmv连接不了

      0_1564968259374_0a0780b7-8b73-4ee8-b7ad-18c650a612e1-image.png

      发布在 OpenMV Cam
      D
      dx1g
    • RE: openmv连接不了

      事情里面的办法都试了,都不行。无法升级固件

      发布在 OpenMV Cam
      D
      dx1g
    • openmv一上电就会自启动吗?

      openmv可以在上电后,过段时间由认为控制它启动吗?

      发布在 OpenMV Cam
      D
      dx1g
    • RE: 霍夫检测找圆代码中,为什么会将不是圆形物体乱识别成圆?

      如果我将threshold的增大了,检测到的圆是少了,但同时找圆的时间也长了,如果我摄像头稍微晃动,就找不到圆了,但我需要一直有圆的坐标值返回

      发布在 OpenMV Cam
      D
      dx1g
    • 霍夫检测找圆代码中,为什么会将不是圆形物体乱识别成圆?

      0_1564803241799_668bbf38-bf4a-4f36-8b3c-f5faa1718931-image.png
      对着电脑照为什会将我的屏幕识别成圆?

      发布在 OpenMV Cam
      D
      dx1g
    • openmv连接不了

      openmv不能连接电脑,亮绿灯,但不能与IDE连接

      发布在 OpenMV Cam
      D
      dx1g
    • openmv中识别圆的代码参数不理解

      0_1564386254662_212f1e59-3c4d-48f3-9c8e-3485f516d2d1-image.png openmv
      图片中的x_margin、y_margin、r_margin这三个参数是什么意思,控制所检测的圆的合并是什么意思?麻烦指导下,谢谢!

      发布在 OpenMV Cam
      D
      dx1g
    • openmv找圆问题???

      openmv在使用找圆例程执行找圆操作时,摄像头放到圆的上方但却找不到圆,圆的坐标值没有数据返回,这是什么原因?

      发布在 OpenMV Cam
      D
      dx1g
    • OPENMV具有手势识别的功能吗?

      OPENMV具有手势识别的功能吗?

      发布在 OpenMV Cam
      D
      dx1g
    • 代码中的角度值deflection_angle表示什么
      # Black Grayscale Line Following Example
      #
      # Making a line following robot requires a lot of effort. This example script
      # shows how to do the machine vision part of the line following robot. You
      # can use the output from this script to drive a differential drive robot to
      # follow a line. This script just generates a single turn value that tells
      # your robot to go left or right.
      #
      # For this script to work properly you should point the camera at a line at a
      # 45 or so degree angle. Please make sure that only the line is within the
      # camera's field of view.
      
      import sensor, image, time, math
      
      # Tracks a black line. Use [(128, 255)] for a tracking a white line.
      GRAYSCALE_THRESHOLD = [(0, 64)]
      #设置阈值,如果是黑线,GRAYSCALE_THRESHOLD = [(0, 64)];
      #如果是白线,GRAYSCALE_THRESHOLD = [(128,255)]
      
      
      # Each roi is (x, y, w, h). The line detection algorithm will try to find the
      # centroid of the largest blob in each roi. The x position of the centroids
      # will then be averaged with different weights where the most weight is assigned
      # to the roi near the bottom of the image and less to the next roi and so on.
      ROIS = [ # [ROI, weight]
              (0, 100, 160, 20, 0.7), # You'll need to tweak the weights for you app
              (0, 050, 160, 20, 0.3), # depending on how your robot is setup.
              (0, 000, 160, 20, 0.1)
             ]
      #roi代表三个取样区域,(x,y,w,h,weight),代表左上顶点(x,y)宽高分别为w和h的矩形,
      #weight为当前矩形的权值。注意本例程采用的QQVGA图像大小为160x120,roi即把图像横分成三个矩形。
      #三个矩形的阈值要根据实际情况进行调整,离机器人视野最近的矩形权值要最大,
      #如上图的最下方的矩形,即(0, 100, 160, 20, 0.7)
      
      # Compute the weight divisor (we're computing this so you don't have to make weights add to 1).
      weight_sum = 0 #权值和初始化
      for r in ROIS: weight_sum += r[4] # r[4] is the roi weight.
      #计算权值和。遍历上面的三个矩形,r[4]即每个矩形的权值。
      
      # Camera setup...
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.GRAYSCALE) # use grayscale.
      sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.
      sensor.skip_frames(30) # Let new settings take affect.
      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() # Tracks FPS.
      
      while(True):
          clock.tick() # Track elapsed milliseconds between snapshots().
          img = sensor.snapshot() # Take a picture and return the image.
      
          centroid_sum = 0
          #利用颜色识别分别寻找三个矩形区域内的线段
          for r in ROIS:
              blobs = img.find_blobs(GRAYSCALE_THRESHOLD, roi=r[0:4], merge=True)
              # r[0:4] is roi tuple.
              #找到视野中的线,merge=true,将找到的图像区域合并成一个
      
              #目标区域找到直线
              if blobs:
                  # Find the index of the blob with the most pixels.
                  most_pixels = 0
                  largest_blob = 0
                  for i in range(len(blobs)):
                  #目标区域找到的颜色块(线段块)可能不止一个,找到最大的一个,作为本区域内的目标直线
                      if blobs[i].pixels() > most_pixels:
                          most_pixels = blobs[i].pixels()
                          #merged_blobs[i][4]是这个颜色块的像素总数,如果此颜色块像素总数大于                     #most_pixels,则把本区域作为像素总数最大的颜色块。更新most_pixels和largest_blob
                          largest_blob = i
      
                  # Draw a rect around the blob.
                  img.draw_rectangle(blobs[largest_blob].rect())
                  img.draw_rectangle((0,0,30, 30))
                  #将此区域的像素数最大的颜色块画矩形和十字形标记出来
                  img.draw_cross(blobs[largest_blob].cx(),
                                 blobs[largest_blob].cy())
      
                  centroid_sum += blobs[largest_blob].cx() * r[4] # r[4] is the roi weight.
                  #计算centroid_sum,centroid_sum等于每个区域的最大颜色块的中心点的x坐标值乘本区域的权值
      
          center_pos = (centroid_sum / weight_sum) # Determine center of line.
          #中间公式
      
          # Convert the center_pos to a deflection angle. We're using a non-linear
          # operation so that the response gets stronger the farther off the line we
          # are. Non-linear operations are good to use on the output of algorithms
          # like this to cause a response "trigger".
          deflection_angle = 0
          #机器人应该转的角度
      
          # The 80 is from half the X res, the 60 is from half the Y res. The
          # equation below is just computing the angle of a triangle where the
          # opposite side of the triangle is the deviation of the center position
          # from the center and the adjacent side is half the Y res. This limits
          # the angle output to around -45 to 45. (It's not quite -45 and 45).
          deflection_angle = -math.atan((center_pos-80)/60)
          #角度计算.80 60 分别为图像宽和高的一半,图像大小为QQVGA 160x120.
          #注意计算得到的是弧度值
      
          # Convert angle in radians to degrees.
          deflection_angle = math.degrees(deflection_angle)
          #将计算结果的弧度值转化为角度值
      
          # Now you have an angle telling you how much to turn the robot by which
          # incorporates the part of the line nearest to the robot and parts of
          # the line farther away from the robot for a better prediction.
          print("Turn Angle: %f" % deflection_angle)
          #将结果打印在terminal中
      
          print(clock.fps()) # Note: Your OpenMV Cam runs about half as fast while
          # connected to your computer. The FPS should increase once disconnected.
      
      

      代码中的角度值deflection_angle表示什么,(center_pos-80)/60,分母为60,如果视野中是直线,但center_pos偏差值很大,那么也会返回一个很大的角度,这样不就不对了吗

      发布在 OpenMV Cam
      D
      dx1g
    • RE: 请问使用img.get_lines()方法返回的line对象中的rho()参数具体指什么?

      @xsco 0_1564192839745_60c13e32-c3cf-4081-a107-1d4ed465725f-image.png

      发布在 OpenMV Cam
      D
      dx1g
    • RE: 知道四个点如何切割一个区域(非矩形)?

      @bm6h 可以改变你的roi区间,即“感兴趣区域”

      发布在 OpenMV Cam
      D
      dx1g