logo

请问openmv的初始化可以在while(ture)里面进行变更吗

2023-07-26 22:27
K
dskg

具体又应该怎么改呢比如更改vga格式?????

具体是说。比如我想在同时使用线性回归和数字识别,但是两者的初始化不同啊(比如像素格式什么的)

我应该怎么改初始化呢(同时的意思是在同一个main文件里)

或者说我要去另外调用文件(里的函数吗)

求大佬解答!!!

2023-07-27 15:01
I
网红小智智 星瞳科技

线性回归和数字识别,都可以使用一样的分辨率(VGA)和颜色(灰度)。

如果非要改的话,先统一设置成VGA和彩色,然后先用彩色识别数字,然后img.to_grayscale()变为灰度,然后使用线性回归。

2023-07-28 20:11
K
dskg

如果我要改vga呢,或者原本开了效果增强,但是想关掉,可以在while里更改么

哥们你答非所问啊

2023-07-28 21:05
I
网红小智智 星瞳科技

主要是我没看懂你的问题究竟是什么。你提供一下具体代码。

2023-07-30 16:10
K
dskg
# Hello World Example
#
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!

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.QQVGA   # Set frame size to QVGA (320x240)
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())              # Note: OpenMV Cam runs about half as fast when connected
                                    # to the IDE. The FPS should increase once disconnected.

我就是想在一个代码程序里面用两种VGA,代码应该怎么写

2023-07-31 17:17
I
网红小智智 星瞳科技

我还是没看懂你要做什么,什么叫做两种VGA?