导航

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

    eagr 发布的帖子

    • openMV-H7 R1 R2 R3有什么区别呢?

      用的是openMV-H7 R1
      还有R1、R2、R3有什么区别呢?

      发布在 OpenMV Cam
      E
      eagr
    • MemoryError: Out of fast Frame Buffer Stack Memory!

      0_1636092513979_d1d92331-51bb-45bd-9797-7b4bfa3b7efa-1636092492(1).png

      # Edge Impulse - OpenMV Image Classification Example
      
      import sensor, image, time, os, tf
      import gc
      gc.threshold(100000)
      sensor.reset()                         # Reset and initialize the sensor.
      sensor.set_pixformat(sensor.RGB565)    # Set pixel format to RGB565 (or GRAYSCALE)
      sensor.set_framesize(sensor.QQVGA)      # Set frame size to QVGA (320x240)
      sensor.set_windowing((240, 240))       # Set 240x240 window.
      sensor.skip_frames(time=2000)          # Let the camera adjust.
      
      net = "trained.tflite"#模型文件
      labels = [line.rstrip('\n') for line in open("labels.txt")]
      #1 -
      clock = time.clock()
      while(True):
          clock.tick()
          gc.collect()
          img = sensor.snapshot()
      
          # default settings just do one detection... change them to search the image...
          for obj in tf.classify(net, img, min_scale=1.0, scale_mul=0.8, x_overlap=0.5, y_overlap=0.5):
              print("**********\nPredictions at [x=%d,y=%d,w=%d,h=%d]" % obj.rect())
              img.draw_rectangle(obj.rect())
              # This combines the labels and confidence values into a list of tuples
              predictions_list = list(zip(labels, obj.output()))
      
              for i in range(len(predictions_list)):
                  print("%s = %f" % (predictions_list[i][0], predictions_list[i][1]))
      
          print(clock.fps(), "fps")
      
      
      发布在 OpenMV Cam
      E
      eagr
    • RE: arduino不能完全接受openmv发送的图像像素坐标数据。

      代码都是官网上的,没改过。

      发布在 OpenMV Cam
      E
      eagr
    • arduino不能完全接受openmv发送的图像像素坐标数据。

      0_1633400253158_af3145da-6e3b-4651-b6ee-96f7e9dcf10d-1633400234(1).png openmv代码

      Blob Detection and uart transport

      import sensor, image, time
      from pyb import UART
      import json

      For color tracking to work really well you should ideally be in a very, very,

      very, controlled enviroment where the lighting is constant...

      yellow_threshold = (65, 100, -10, 6, 24, 51)

      You may need to tweak the above settings for tracking green things...

      Select an area in the Framebuffer to copy the color settings.

      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.RGB565) # use RGB565.
      sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed.
      sensor.skip_frames(10) # Let new settings take affect.
      sensor.set_auto_whitebal(False) # turn this off.
      clock = time.clock() # Tracks FPS.

      uart = UART(3, 19200)
      def find_max(blobs):
      max_size=0
      for blob in blobs:
      if blob.pixels() > max_size:
      max_blob=blob
      max_size = blob.pixels()
      return max_blob

      while(True):
      img = sensor.snapshot() # Take a picture and return the image.

      blobs = img.find_blobs([yellow_threshold])
      if blobs:
          max_blob=find_max(blobs)
          print('sum :', len(blobs))
          img.draw_rectangle(max_blob.rect())
          img.draw_cross(max_blob.cx(), max_blob.cy())
      
          output_str="[%d,%d]" % (max_blob.cx(),max_blob.cy()) #方式1
          #output_str=json.dumps([max_blob.cx(),max_blob.cy()]) #方式2
          print('you send:',output_str)
          uart.write(output_str+'\r\n')
      else:
          print('not found!')
      

      Arduino代码
      void setup() {
      // put your setup code here, to run once:
      Serial.begin(19200);
      }

      void loop() {
      // put your main code here, to run repeatedly:
      if (Serial.available()) {
      // Read the most recent byte
      byte byteRead = Serial.read();
      // ECHO the value that was read
      Serial.write(byteRead);
      }
      }

      发布在 OpenMV Cam
      E
      eagr
    • RE: 一直报UART(3)不存在怎么解决

      @kidswong999
      https://shop67799229.taobao.com/?spm=a230r.7195193.1997079397.15.53f144e3nsTnhp
      淘宝店的链接。
      OpenMV4 H7 Cam
      标配(主板+OV7725模组)

      发布在 OpenMV Cam
      E
      eagr
    • RE: 一直报UART(3)不存在怎么解决

      @ypk4 在 一直报UART(3)不存在怎么解决 中说:

      0_1626267299064_2664a459-1fb2-42f6-ae38-c45a6853a2b7-image.png

      发布在 OpenMV Cam
      E
      eagr
    • RE: 一直报UART(3)不存在怎么解决

      我也是这个问题,openMV是咱家星瞳科技的。怎么回事呢?3也修改不了,一改就错。不该也错。同上述。

      发布在 OpenMV Cam
      E
      eagr