sensor.set_framesize(sensor.QVGA)如何在程序中途转换成sensor.set_framesize(sensor.VGA)的形式?
我想在VGA的模式下使用find_bolbs函数,但是find_bolbs只支持在QVGA的模式下。
N
nowh 发布的帖子
-
sensor.QVGA如何在程序中途转换成sensor.VGA的形式?
-
遍历x轴和y轴为什么缓冲界面会卡死?
我想框出一个长为20,宽为20的框,然后遍历x轴和y轴,让这个框每次移动一个格子,得到每个框中的像素,为什么缓冲界面会卡死?
import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(time = 2000) clock = time.clock() while(True): clock.tick() img = sensor.snapshot() for i in range(160): a = i for j in range(120): b = j roi=(a,b,20,20) print(roi) statistics=img.get_statistics(roi=(a,b,100,100)) color_l=statistics.l_max() color_a=statistics.a_max() print(color_l,color_a) #img.draw_rectangle(roi)
-
RE: 特征点检测一定要在sensor.set_framesize(sensor.VGA) 的条件下吗?
import sensor, time, image # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(3) sensor.set_gainceiling(16) sensor.set_framesize(sensor.QQVGA) #sensor.set_windowing((320, 240)) sensor.set_pixformat(sensor.GRAYSCALE)
但是这样子它都不画出特征点了
-
特征点检测一定要在sensor.set_framesize(sensor.VGA) 的条件下吗?
特征点检测一定要在sensor.set_framesize(sensor.VGA) sensor.set_windowing((320, 240))的条件下吗?
改成sensor.set_framesize(sensor.QQVGA)不行吗? -
RE: 颜色和形状同时识别,怎么设置面积小于1的圆不识别?
@oswy 在 颜色和形状同时识别,怎么设置面积小于1的圆不识别? 中说:
r_margin = 10
改变这个半径试试 -
为什么使用人脸识别例程,openmv的缓冲区域会卡死?而程序还在进行
# Snapshot Example # # Note: You will need an SD card to run this example. # # You can use your OpenMV Cam to save image files. import sensor, image, pyb RED_LED_PIN = 1 BLUE_LED_PIN = 3 sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE sensor.set_framesize(sensor.B128X128) # or sensor.QQVGA (or others) sensor.set_windowing((92,112)) sensor.skip_frames(10) # Let new settings take affect. sensor.skip_frames(time = 2000) num = 3 #设置被拍摄者序号,第一个人的图片保存到s1文件夹,第二个人的图片保存到s2文件夹,以此类推。每次更换拍摄者时,修改num值。 n = 20 #设置每个人拍摄图片数量。 #连续拍摄n张照片,每间隔3s拍摄一次。 while(n): #红灯亮 pyb.LED(RED_LED_PIN).on() sensor.skip_frames(time = 3000) # Give the user time to get ready.等待3s,准备一下表情。 #红灯灭,蓝灯亮 pyb.LED(RED_LED_PIN).off() pyb.LED(BLUE_LED_PIN).on() #保存截取到的图片到SD卡 print(n) sensor.snapshot().save("singtown/s%s/%s.pgm" % (num, n) ) # or "example.bmp" (or others) n -= 1 pyb.LED(BLUE_LED_PIN).off() print("Done! Reset the camera to see the saved image.")