例程讲解-03-log_polar对数极坐标映射

# 对数极坐标映射示例
# 此示例显示使用对数极坐标变换重新投影图像。 对数极坐标图像是有用的,
# 因为旋转成为X方向上的平移,并且刻度的指数变化(x2,x4等)变为Y方向上的线性平移。
import sensor, image, time

sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.QQVGA) # or sensor.QVGA (or others)
sensor.skip_frames(time = 2000) # Let new settings take affect.
clock = time.clock() # Tracks FPS.

while(True):
    clock.tick() # Track elapsed milliseconds between snapshots().
    img = sensor.snapshot().logpolar(reverse=False)

    print(clock.fps()) # Note: Your OpenMV Cam runs about half as fast while
    # connected to your computer. The FPS should increase once disconnected.

原图:

运行效果图:

星瞳科技OpenMV官方中文文档函数讲解:

results matching ""

    No results matching ""