导航

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

    lxuy 发布的帖子

    • RE: 点亮闪光灯

      可以给写一个历程吗,开白色和关闭白色

      发布在 OpenMV Cam
      L
      lxuy
    • RE: 点亮闪光灯

      我想让闪光灯是白色,稳定调试

      发布在 OpenMV Cam
      L
      lxuy
    • 点亮闪光灯

      想让在颜色识别的的时候点亮闪光灯
      有没有教程

      发布在 OpenMV Cam
      L
      lxuy
    • 多个颜色

      如何吧三个不同颜色定义成不同的数字比如红色是1绿色是2黄色是4

      发布在 OpenMV Cam
      L
      lxuy
    • RE: 颜色过去以后会出现好几遍这个颜色,能不能只出现一次

      现在是会出现好几个1好几个2好几个4但是我只想要一个124,就是这个红色会识别很多次绿色会识别很多次,蓝色会识别很多次

      发布在 OpenMV Cam
      L
      lxuy
    • 颜色过去以后会出现好几遍这个颜色,能不能只出现一次

      颜色过去以后会出现好几遍这个颜色,能不能只出现一次

      import sensor, image,time,pyb,utime
      import sensor, image, time,utime
      from pyb import UART
      uart = UART(3, 57600)
      output_str=0
      yanse=0
      flag=1
      while 1:
        if uart.any():
      	 flag=uart.readline().decode()
      	 flag=int(flag)
      	 print(flag)
        if flag==1:
      		 thresholds = [(60, 18, 37, 75, -35, 76),(58, 24, -11, 17, -61, -16),(60, 30, -17, -58, -43, 31)]
      		 sensor.reset()
      		 sensor.set_pixformat(sensor.RGB565)
      		 sensor.set_framesize(sensor.QVGA)
      		 sensor.skip_frames(time = 2000)
      		 sensor.set_auto_gain(False)
      		 sensor.set_auto_whitebal(False)
      		 while flag :
      			img = sensor.snapshot()
      			blobs=img.find_blobs(thresholds, pixels_threshold=5000, area_threshold=400)
      			for blob in blobs:
      			  img.draw_rectangle(blob.rect())
      			  img.draw_cross(blob.cx(), blob.cy())
      			  yanse="%s" % (blob.code())
      			  print( yanse)
      			  if  yanse:
      				 uart.write(yanse)
      				 yanse=0
      
      发布在 OpenMV Cam
      L
      lxuy
    • RE: 两个程序运行

      原来可以用,加了一个f=3的判断语句,结果就不行了

      发布在 OpenMV Cam
      L
      lxuy
    • RE: 两个程序运行

      我识别一个颜色就让他加1一共识别三个颜色然后退出这个循环

      发布在 OpenMV Cam
      L
      lxuy
    • 两个程序运行

      我要识别三个颜色,当三个颜色识别结束以后退出颜色识别程序打开二维码扫码程序,但是不能累加颜色识别计数
      这是程序

      import sensor, image,time,pyb,utime
      import sensor, image, time,utime
      from pyb import UART
      p0 = pyb.Pin('P0', pyb.Pin.OUT_PP)
      p0.value(1)
      uart = UART(3, 57600)
      output_str=0
      yanse=0
      flag0=1
      f=0
      while 1:
        if uart.any():
      	 flag0=uart.readline().decode()
      	 flag0=int(flag0)
      	 print(flag0)
        if flag0==1:
      		 thresholds= [(60, 18, 37, 75, -35, 76),(58, 24, -11, 17, -61, -16),(60, 30, -17, -58, -43, 31)]
      		 sensor.reset()
      		 sensor.set_pixformat(sensor.RGB565)
      		 sensor.set_framesize(sensor.QVGA)
      		 sensor.skip_frames(time = 2000)
      		 sensor.set_auto_gain(False)
      		 sensor.set_auto_whitebal(False)
      		 while flag0 :
      			img = sensor.snapshot()
      			blobs=img.find_blobs(thresholds, pixels_threshold=5000, area_threshold=400)
      			for blob in blobs:
      			  img.draw_rectangle(blob.rect())
      			  img.draw_cross(blob.cx(), blob.cy())
      			  yanse="%s" % (blob.code())
      			  print( yanse)
      			  pyb.delay(500)
      			  if  yanse :
                       f=f+1
      				 uart.write(yanse)
      				 yanse=0
                    if f==3 :
                       flag0=2
                       
      				
        if flag0==2:
      	sensor.reset()
      	sensor.set_pixformat(sensor.GRAYSCALE)
      	sensor.set_framesize(sensor.VGA)
      	sensor.set_windowing((240, 240))
      	sensor.skip_frames(30)
      	sensor.set_auto_gain(False)
      	while flag :
      	  img = sensor.snapshot()
      	  img.lens_corr(0.1)
      	  for code in img.find_qrcodes():
      		img.draw_rectangle(code.rect(), color = (255, 0, 0))
      		output_str="%s" % (code.payload())
      		print(output_str)
      		pyb.delay(500)
      		if output_str:
      		   uart.write(output_str)
      		   pyb.delay(10)
      		   p0.value(0)
      		   pyb.delay(10)
      		   p0.value(1)
      		   output_str=0
      		   flag=0
      
      发布在 OpenMV Cam
      L
      lxuy
    • RE: 两个标志位为什么标志为2不能执行,

      怎么修改呢,给一个提示可以吗

      发布在 OpenMV Cam
      L
      lxuy
    • 两个标志位为什么标志为2不能执行,

      import sensor, image,time,pyb,utime
      import sensor, image, time,utime
      from pyb import UART
      p0 = pyb.Pin('P0', pyb.Pin.OUT_PP)
      p0.value(1)
      uart = UART(3, 19200)
      output_str=0
      yanse=0
      flag=2
      while 1:
      if uart.any():
      flag=uart.readline().decode()
      flag=int(flag)
      print(flag)
      if flag==1:
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.VGA)
      sensor.set_windowing((240, 240)) # look at center 240x240 pixels of the VGA resolution.
      sensor.skip_frames(30)
      sensor.set_auto_gain(False) # must turn this off to prevent image washout...
      clock = time.clock()
      clock.tick()
      img = sensor.snapshot()
      img.lens_corr(0.1) # strength of 1.8 is good for the 2.8mm lens.
      for code in img.find_qrcodes():
      img.draw_rectangle(code.rect(), color = (255, 0, 0))
      output_str="%s" % (code.payload())
      uart.write(output_str)
      print(output_str)
      pyb.delay(500)
      if output_str:
      p0.value(0)
      pyb.delay(10)
      p0.value(1)
      output_str=0
      flag=0
      if flag==2:
      thresholds = [(54, 74, 44, 91, -16, 52),(76, 48, -22, 75, -76, -25),(68, 83, -47, -22, -7, 40)] # generic_blue_thresholds
      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()
      utime.sleep_ms(2000)
      img = sensor.snapshot()
      blobs=img.find_blobs(thresholds, pixels_threshold=5000, area_threshold=400)
      for blob in blobs:
      img.draw_rectangle(blob.rect())
      img.draw_cross(blob.cx(), blob.cy())
      yanse="%s" % (blob.code())
      uart.write(yanse)
      print( yanse)
      pyb.delay(500)
      if yanse:
      p0.value(0)
      pyb.delay(10)
      p0.value(1)
      yanse=0

      发布在 OpenMV Cam
      L
      lxuy
    • 色块识别

      怎么能同时识别3个不同颜色的色块,并以123的形式串口通信到2560上面

      发布在 OpenMV Cam
      L
      lxuy