导航

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

    Gloria 发布的帖子

    • RE: 关于模板匹配的参数设置问题

      我也觉得自己表达得很不好,不好意思,
      是那个模板匹配用的NCC算法只能局限于识别到大小与模板相同的图像
      假如我的图像区域有这么大0_1521009952691_0d2fa836-359b-43b9-bc9d-6385c654bfcd-image.png
      但是我的模板是这个
      0_1521009979864_b8ac831e-8309-4232-81fe-5f19acc269eb-image.png
      然后我必须要把摄像头移动到画面只有上面这个模板的时候才能够识别的出来
      这样就比较麻烦
      所以如果我设置一个大小和这个差不多一样的ROI去识别的话
      可否解决这个缺陷

      发布在 OpenMV Cam
      G
      Gloria
    • 关于模板匹配的参数设置问题

      想问一下假如我先设置的图片像素是QVGA,0_1521007743995_f0465d6e-6746-4a9d-b5de-6e4f3b0de390-image.png r然后再设置ROI,那所设的ROI的大小是否能够成为模板匹配的大小,0_1521007873492_4627ea82-5476-4e02-9805-9b6b80094f19-image.png 可能我表达的不是很好,但是我的意思其实是模板匹配那个函数局限比较大,只能匹配和模板大小一样的画面嘛,那设置了ROI之后的那个大小如果跟模板差不多是否能够满足那个要求呢,还有0_1521007964635_e5a84869-3f0a-4a03-a0f2-a2e2cc114dd9-image.png z这个应该的作用是什么呢

      发布在 OpenMV Cam
      G
      Gloria
    • RE: find.keypoint和模板匹配

      还有为什么我在例程keypoints_1的find.keypoint的函数中加了ROI之后会提示错误
      0_1520910310842_7264a2c7-aa47-43eb-90e3-53e201f011b9-image.png
      0_1520910344982_d46fbbcb-a544-467b-9fda-083cf9c45148-image.png
      其他都没有改动

      发布在 OpenMV Cam
      G
      Gloria
    • find.keypoint和模板匹配

      find.keypoint和模板匹配哪个准确度更高,他们的缺点和优点分别是什么,

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 为什么使用找圆程序会出现内存问题

      所以是除了ROI的那个区域其他的部分都不会占用内存的意思吗

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 为什么使用找圆程序会出现内存问题

      可是为什么这样又可以呢,这个也是QVGA,难道是因为我单独定义了ROI吗

      
      import sensor, image, time
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QVGA)
      sensor.skip_frames(time = 2000)
      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()
      
      
      ROI=(240,160,50,50)
      
      threshold_100 = (44, 52, 33, 58, -2, 19)
      
      
      while(True):
          img = sensor.snapshot()        # Take a picture and return the image.
      
          for blob_100 in img.find_blobs([threshold_100], roi = ROI, pixels_threshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_100.rect())
              img.draw_cross(blob_100.cx(), blob_100.cy())
              img.draw_string(blob_100.cx(),blob_100.cy(),"100yuan",color = 0)
      
          for c in img.find_circles(roi = ROI, threshold = 2000, x_margin = 10, y_margin = 10, r_margin = 10):
              img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))
              print(c)
      
      
      
      
          img.draw_rectangle(ROI)```
      发布在 OpenMV Cam
      G
      Gloria
    • RE: 为什么使用找圆程序会出现内存问题

      @kidswong999 你好,我想知道这个找色块的函数太多然后加上找圆的函数就不行了还是什么原因呢?

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 为什么使用找圆程序会出现内存问题

      @kidswong999 请问这代码是哪里出问题了吗

      发布在 OpenMV Cam
      G
      Gloria
    • find.circles的函数参数设置问题

      find.circles的函数应该改变什么参数使得稍微不是很圆,比如有点椭圆的形状也能被识别呢

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 边缘提取之后可以有什么操作

      是不管怎么操作图像都没办法缩放?

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 边缘提取之后可以有什么操作

      那标记出某一部分之后我如何对该部分进行图像缩放呢

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 为什么使用找圆程序会出现内存问题
      import sensor, image, time
      
      
      threshold_100 = (44, 52, 33, 58, -2, 19)
      threshold_1 = (39, 59, -13, -2, 7, 23)
      threshold_5 = (23, 52, 1, 30, -16, 5)
      threshold_10 = (44, 78, -7, 9, 11, 4)
      threshold_20 = (31, 49, 9, 30, 3, 13)
      threshold_50 = (40, 67, -26, -6, -3, 15)
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QVGA)
      sensor.skip_frames(time = 2000)
      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()
      
      # Only blobs that with more pixels than "pixel_threshold" and more area than "area_threshold" are
      # returned by "find_blobs" below. Change "pixels_threshold" and "area_threshold" if you change the
      # camera resolution. "merge=True" merges all overlapping blobs in the image.
      
      
      while(1):
          clock.tick()
          img = sensor.snapshot().lens_corr(1.8)
          for blob_100 in img.find_blobs([threshold_100], pixels_threshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_100.rect())
              img.draw_cross(blob_100.cx(), blob_100.cy())
              img.draw_string(blob_100.cx(),blob_100.cy(),"100yuan",color = 0)
      
          for blob_20 in img.find_blobs([threshold_20], pixels_theshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_20.rect(),color = (255,0,0))
              img.draw_cross(blob_20.cx(), blob_20.cy())
              img.draw_string(blob_20.cx(),blob_20.cy(),"20yuan",color = (255,0,0))
      
          for blob_10 in img.find_blobs([threshold_10], pixels_theshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_10.rect(),color = (0,255,0))
              img.draw_cross(blob_10.cx(), blob_10.cy())
              img.draw_string(blob_10.cx(),blob_10.cy(),"10yuan",color = (0,255,0))
      
          for blob_5 in img.find_blobs([threshold_5], pixels_theshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_5.rect(),color = (0,0,255))
              img.draw_cross(blob_5.cx(), blob_5.cy())
              img.draw_string(blob_5.cx(),blob_5.cy(),"5yuan",color = (0,0,255))
      
          for blob_1 in img.find_blobs([threshold_1], pixels_theshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_1.rect(),color = 0)
              img.draw_cross(blob_1.cx(), blob_1.cy())
              img.draw_string(blob_1.cx(),blob_1.cy(),"1yuan",color = 255)
      
          for blob_50 in img.find_blobs([threshold_50], pixels_theshold = 200, area_threshold = 200, merge = True):
              img.draw_rectangle(blob_50.rect(),color = (0,100,100))
              img.draw_cross(blob_50.cx(), blob_50.cy())
              img.draw_string(blob_50.cx(),blob_50.cy(),"50yuan",color = (0,100,255))
      
          for c in img.find_circles(threshold = 2000, x_margin = 10, y_margin = 10, r_margin = 10):
              img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))
             # print(c)
      
      
        #  print(clock.fps())
          print("FPS %f" % clock.fps())
      
      
      发布在 OpenMV Cam
      G
      Gloria
    • RE: 为什么使用找圆程序会出现内存问题

      0_1520758432581_481807c2-bde9-4627-b21c-70af5cea5397-image.png 0_1520758453822_4dfb2cc8-82b6-4462-aad7-cf3254a0b687-image.png
      0_1520758479254_94bfc19a-dae9-45d5-99b5-79700a7c2270-image.png

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 边缘提取之后可以有什么操作

      就是比如我在检测一页书,只有左上角是我想要的区域,我应该怎么提取出来

      发布在 OpenMV Cam
      G
      Gloria
    • 为什么使用找圆程序会出现内存问题

      0_1520756492765_e992585d-ee9a-422e-8435-1d3b5c9dd243-image.png

      发布在 OpenMV Cam
      G
      Gloria
    • 边缘提取之后可以有什么操作

      假如检测的是一张有字有图案的纸,在边缘检测之后如何截取或者提取出我想要的某一部分内容,或者有什么不通过边缘检测也可以得到的方法

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 关于模板匹配的内存问题

      emmm所以是没有办法扩展的对吧,只能在那个范围之内操作?

      发布在 OpenMV Cam
      G
      Gloria
    • RE: 关于模板匹配的内存问题

      不是说SD卡的文件系统就会自动取代内置的Flash文件系统的吗,那内存不是扩大了吗,那现在提示的不够内存之类的错误是指什么?

      发布在 OpenMV Cam
      G
      Gloria
    • 关于模板匹配的内存问题

      当我导入多个模板的时候会提示out of memory,这里超出的是哪里的内存?应该怎么解决?

      发布在 OpenMV Cam
      G
      Gloria