• 免费好用的星瞳AI云服务上线!简单标注,云端训练,支持OpenMV H7和OpenMV H7 Plus。可以替代edge impulse。 https://forum.singtown.com/topic/9519
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • OSError :Image is not mutable



    • 回复: 求教一下OSError :Image is not mutable是什么问题
      sensor.set_framesize(sensor.VGA)使用QVGA不报错

      import sensor, image, time, lcd
      from pyb import UART
      import json
      
      green_threshold   = (22, 54, -22, 8, -38, -10)#15:03正版
      #green_threshold   = (28, 56, -25, -3, -27, -3)#15:10 left盗版
      
      sensor.reset() # 初始化摄像头
      sensor.set_pixformat(sensor.RGB565) # 格式为 RGB565.
      sensor.set_framesize(sensor.VGA) # 使用 QQVGA 速度快一些
      sensor.skip_frames(time = 10) # 跳过2000s,使新设置生效,并自动调节白平衡
      sensor.set_auto_gain(False) # 关闭自动自动增益。默认开启的,在颜色识别中,一定要关闭白平衡。
      sensor.set_auto_whitebal(False)#关闭白平衡。白平衡是默认开启的,在颜色识别中,一定要关闭白平衡
      lcd.init() # Initialize the lcd screen.
      
      clock = time.clock() # 追踪帧率
      
      uart = UART(3, 115200)
      
      while(True):
          clock.tick() # Track elapsed milliseconds between snapshots().
          img = sensor.snapshot() # 从感光芯片获得一张图像
          blobs = img.find_blobs([green_threshold], pixels_threshold=200, area_threshold=200)
          if blobs:
              for b in blobs:
                  img.draw_rectangle(b[0:4], color = (255, 0, 0))
                  x = b.x()
                  y = b.y()
                  #print(x, y, end = ',')
                  data = bytearray([x,y])
                  uart.write(data)
          else:
              print(0)
          img.to_rgb565(roi=(96,40,128,160))
          lcd.display(img)
      
      

      0_1636254815684_屏幕截图 2021-11-07 111318.png



    • VGA分辨率太大了,OpenMV4放不下,是jpeg压缩格式,不能运行图像算法。