导航

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

    1lte

    @1lte

    0
    声望
    12
    楼层
    725
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    1lte 关注

    1lte 发布的帖子

    • RE: mlx90640调色问题 调色不一致

      我怎么感觉图像颜色反了,温度越低反而越深,怎么调整一下比较合适

      发布在 OpenMV Cam
      1
      1lte
    • mlx90640调色问题 调色不一致
      import image, time, fir
      
      drawing_hint = image.BICUBIC # or image.BILINEAR or 0 (nearest neighbor)
      
      # Initialize the thermal sensor
      fir.init()
      w = fir.width()
      h = fir.height()
      
      if (fir.type() == fir.FIR_MLX90621):
          w = w * 10
          h = h * 10
      elif (fir.type() == fir.FIR_MLX90640):
          w = w * 10
          h = h * 10
      elif (fir.type() == fir.FIR_MLX90641):
          w = w * 10
          h = h * 10
      elif (fir.type() == fir.FIR_AMG8833):
          w = w * 20
          h = h * 20
      
      # FPS clock
      clock = time.clock()
      
      while (True):
          clock.tick()
      
          try:
              img = fir.snapshot(x_size=w, y_size=h,
                                 color_palette=fir.PALETTE_IRONBOW, hint=drawing_hint,
                                 copy_to_fb=True)
          except OSError:
              continue
      
          # Print FPS.
          print(clock.fps())
      
      

      为什么例程里这张图mlx90640调色是这样的0_1646455622400_c1a39c1e-848a-41dd-90df-afd570bdad7c-image.png
      而我仿照编写的程序 为了放在摄像头图像上

      import image, time, fir, sensor
      
      drawing_hint = image.BILINEAR # or image.BILINEAR or 0 (nearest neighbor) or image.BICUBIC
      
      # Initialize the thermal sensor
      sensor.reset()
      #初始化摄像头,reset()是sensor模块里面的函数
      
      sensor.set_pixformat(sensor.RGB565)
      #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种
      
      sensor.set_framesize(sensor.QVGA)
      #设置图像像素大小
      
      
      
      sensor.skip_frames(time = 2000)
      fir.init(type=fir.FIR_MLX90640, refresh=32)
      w = fir.width()*10
      h = fir.height()*10
      ir_buffer =  fir.snapshot(x_size=w, y_size=h, pixformat=sensor.GRAYSCALE)
      
      clock = time.clock()
      
      while (True):
          clock.tick()
          img = sensor.snapshot()
          ta, ir, to_min, to_max = fir.read_ir()
          to_max=to_max/0.92
          fir.draw_ir(ir_buffer, ir, alpha=256, hint=drawing_hint)
          img.draw_image(ir_buffer, 0, 0, alpha=256,color_palette=fir.PALETTE_IRONBOW)
      

      出来的图像调色是这样的
      0_1646455807176_c1df48d0-135c-4788-b898-67114d0f3dca-image.png
      怎么才能变成上面那幅图的调色

      发布在 OpenMV Cam
      1
      1lte
    • RE: 各位大佬,如何使用Mlx90640模块测温测5s/或10s后,输出这期间测的平均值,之前写的这个感觉并不能解决问题
      # MLX90640叠加演示与红外平滑
      # 将热图覆盖到主摄像头的OpenMV摄像头的实时视频输出上。
      
      import sensor, image, time, fir
      import utime
      
      
      IR_SCALE = 4
      
      sensor.reset()
      #初始化摄像头,reset()是sensor模块里面的函数
      
      sensor.set_pixformat(sensor.RGB565)
      #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种
      
      sensor.set_framesize(sensor.QVGA)
      #设置图像像素大小
      
      sensor.set_vflip(True)
      sensor.set_hmirror(True)
      #垂直方向翻转180°,水平方向翻转180°
      
      sensor.skip_frames(time = 2000)
      
      # 初始化热传感器
      fir.init(type=fir.FIR_MLX90640, refresh=16) # 16Hz, 32Hz or 64Hz.
      
      # 为更流畅的视频分配另一个帧缓冲。
      ir_buffer = image.Image(fir.width() * IR_SCALE, fir.height() * IR_SCALE, sensor.GRAYSCALE)
      
      # FPS clock
      clock = time.clock()
      #y = 1
      TEMP = []
      while (True):
      
          clock.tick()
          # 捕捉图像
          img = sensor.snapshot()
      
          # Capture FIR data
          # 捕捉FIR数据
          #   ta: Ambient temperaturev 环境温度
          #   ir: Object temperatures (IR array) 物体温度(IR 阵列)
          #   to_min: Minimum object temperature 最小物体温度
          #   to_max: Maximum object temperature 最大物体温度
          ta, ir, to_min, to_max = fir.read_ir()
          to_max=to_max/0.92
          # 创建一个副图像,然后混合到帧缓冲区中。
      
          # 转换FIR数据为灰度图像并缩放
          fir.draw_ir(ir_buffer, ir, alpha=256)
      
          # 平滑缩放后的图像
          ir_buffer.mean(IR_SCALE-1)
      
          # 使用调色板将灰度FIR图像转换为彩色,并与相机图像相结合
          img.draw_image(ir_buffer, 200, 0, alpha=256,color_palette=sensor.PALETTE_IRONBOW)
      
          # 绘制环境温度、最小温度和最大温度。
          #img.draw_string(8, 0, "Ta: %0.2f C" % ta, color = (255, 0, 0),scale = 2,  mono_space = False)
          #img.draw_string(8, 16, "To min: %0.2f C" % to_min, color = (255, 0, 0),scale = 2,  mono_space = False)
          img.draw_string(200, 96, "Temp: %0.2f C"% to_max, color = (255, 0, 0),scale = 2,  mono_space = False)
          TEMP.append(to_max)
          if(len(TEMP) > 1000):
              TEMP.pop(0)
          avg = sum(TEMP)/len(TEMP)
          AVG = []
          AVG.append(avg)
          if(len(AVG) > 50):
              AVG.pop(0)
          tyt = sum(AVG)/len(AVG)
          print(tyt)
      

      照您的方法写了以后 还是在一直输出数据,如何做到测5s 3s的只输出一个平均值,然后跳出循环。

      发布在 OpenMV Cam
      1
      1lte
    • RE: 各位大佬,如何使用Mlx90640模块测温测5s/或10s后,输出这期间测的平均值,之前写的这个感觉并不能解决问题
       while (True):
                  clock.tick()
      
                  # 捕捉图像
                  img = sensor.snapshot()
      
                  # Capture FIR data
                  # 捕捉FIR数据
                  #   ta: Ambient temperaturev 环境温度
                  #   ir: Object temperatures (IR array) 物体温度(IR 阵列)
                  #   to_min: Minimum object temperature 最小物体温度
                  #   to_max: Maximum object temperature 最大物体温度
                  ta, ir, to_min, to_max = fir.read_ir()
                  to_max=to_max/0.92
                  # 创建一个副图像,然后混合到帧缓冲区中。
      
                  # 转换FIR数据为灰度图像并缩放
                  fir.draw_ir(ir_buffer, ir, alpha=256)
      
                  # 平滑缩放后的图像
                  ir_buffer.mean(IR_SCALE-1)
      
                  # 使用调色板将灰度FIR图像转换为彩色,并与相机图像相结合
                  img.draw_image(ir_buffer, 200, 0, alpha=256,color_palette=sensor.PALETTE_IRONBOW)
      
                  # 绘制环境温度、最小温度和最大温度。
                  #img.draw_string(8, 0, "Ta: %0.2f C" % ta, color = (255, 0, 0),scale = 2,  mono_space = False)
                  #img.draw_string(8, 16, "To min: %0.2f C" % to_min, color = (255, 0, 0),scale = 2,  mono_space = False)
                  img.draw_string(200, 96, "Temp: %0.2f C"% to_max, color = (255, 0, 0),scale = 2,  mono_space = False)
                  i=1600
                  t=1
                  dist = 0
                  for t in range(1, i+1):
                      #d1为温度值
                      dist = to_max + dist #计算d0 d1即样本图像与被检测人脸的特征差异度。
                      t=t+1
                   
                      print("%0.2f °C"% float(dist/2))
      

      我想做到将mlx90640这5s内或10s内测的温,然后输出这5s内测出的平均值。大佬,怎么实现,我这个没实现成功。

      发布在 OpenMV Cam
      1
      1lte
    • 各位大佬,如何使用Mlx90640模块测温测5s/或10s后,输出这期间测的平均值,之前写的这个感觉并不能解决问题
       i=10
          t=1
          dist = 0
          for t in range(1, i+1):
              #d1为温度值 
              dist = to_max + dist #计算d0 d1即样本图像与被检测人脸的特征差异度。
              t=t+1
              #print("Average Temp : %0.2f"% to_max/i)
      
      发布在 OpenMV Cam
      1
      1lte
    • RE: 各位大佬,我现在想用两个openmv 4之间通过iic通讯可以吗

      有没有openmv作为主机接收数据的程序,我看例程里有openmv作为从机给Arduino传输的例程。

      发布在 OpenMV Cam
      1
      1lte
    • RE: 各位大佬,我现在想用两个openmv 4之间通过iic通讯可以吗

      外部上拉已经在洞洞板上做好

      发布在 OpenMV Cam
      1
      1lte
    • 各位大佬,我现在想用两个openmv 4之间通过iic通讯可以吗

      我现在想用两个openmv 4之间通讯因为其中一个openmv两个串口都被占用,所以用一个openmv的i2c(4)和另一个openmv的i2c(2)通讯可以吗

      发布在 OpenMV Cam
      1
      1lte
    • 如何让mlx90640使用p7、p8的iic通讯,怎么初始化mlx90640

      我购买了M7,因为使用lcd屏幕已经占用了uart1,另一个串口在p4,p5处,而所以想用p7、p8来与mlx90640进行通讯,我应该怎么操作呢,我知道设置iic改为4,但是要在mlx90640_overlay里面怎么改程序,怎么给mlx90640初始化呢(mlx90640的板子已经画好了)0_1639558055723_f0f28db9-d035-4229-a8d6-b2b04ee4d928-image.png

      发布在 OpenMV Cam
      1
      1lte