openmv能同时输出多少个pwm?
L
lemron 发布的帖子
-
RE: 识别二维码的教程是哪个?
例程讲解-09-qrcodes_with_lens_zoom二维码识别
此例程为09-qrcodes_with_lens_zoom.py 本例程的目标是实现二维码检测。
QRCode Example
这个例子展示了OpenMV Cam的功能,可以在不需要镜头校正的情况下检测QR码。
import sensor, image, time
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()while(True):
clock.tick()
img = sensor.snapshot()
for code in img.find_qrcodes():
print(code)
print(clock.fps())
只找到了这个 -
RE: 串口通信
# 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, 115200) while(True): img = sensor.snapshot() # Take a picture and return the image. blobs = img.find_blobs([yellow_threshold]) if blobs: print('sum :', len(blobs)) output_str = json.dumps(blobs) for b in blobs: # Draw a rect around the blob. img.draw_rectangle(b.rect()) # rect img.draw_cross(b.cx(), b.cy()) # cx, cy print('you send:',output_str) uart.write(output_str+'\n') else: print('not found!')
这个代码不能够显示