logo

在LED等下拍照频闪

2023-04-19 10:41
H
yivh
bb76edfa-b6d4-463a-b4ab-8d6d83324fc2.png
2023-04-19 20:03
I
网红小智智 星瞳科技

你这不可能是LED,LED频率很快的,不会影响OpenMV,估计是荧光灯。

暂时的办法:

运行下面的代码:先改exposure_us,直到不频闪,注意画面亮度会改变。然后再增加gain_db把画面亮度变大。

import sensor, image, time

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.set_auto_exposure(False, \
    exposure_us = 100000)
sensor.set_auto_gain(False, gain_db=1)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.
while(True):
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    print(clock.fps())

如果有条件,建议换个灯,或者加一个补光灯。https://singtown.com/product/50776/openmv-light-shield/