我试过int(),round(),还是无法解决
l46w
@l46w
Posts made by l46w
-
RE: openmv灰度图转彩色图问题
@kidswong999 kidswong999 因为我在一个程序中要实现多个功能,开始识别有颜色的东西然后转换成grayscale灰度图去模板匹配,然后又要变成RGB565去识别颜色,就这样切换
-
RE: 神经网络训练模型问题
Edge Impulse - OpenMV Image Classification Example
import sensor, image, time, os, tf, uos, gc
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_windowing((240, 240)) # Set 240x240 window.
sensor.skip_frames(time=2000) # Let the camera adjust.net = None
labels = Nonetry:
# Load built in model
labels, net = tf.load_builtin_model('trained')
except Exception as e:
raise Exception(e)clock = time.clock()
while(True):
clock.tick()img = sensor.snapshot() # default settings just do one detection... change them to search the image... for obj in net.classify(img, min_scale=1.0, scale_mul=0.8, x_overlap=0.5, y_overlap=0.5): print("**********\nPredictions at [x=%d,y=%d,w=%d,h=%d]" % obj.rect()) img.draw_rectangle(obj.rect()) # This combines the labels and confidence values into a list of tuples predictions_list = list(zip(labels, obj.output())) for i in range(len(predictions_list)): print("%s = %f" % (predictions_list[i][0], predictions_list[i][1])) print(clock.fps(), "fps")
这是模型里跑出来的代码
-
想问一下更换摄像头模组的问题
现目前原装镜头根据项目所需有点大了,现想将镜头换小一点,用另一种z正点原子的的的ov5640模组,想请问一下,这个摄像头怎么和原装的搭一块,硬件方面要怎么设计
或者有帧率较高一点的,适配于openmv4 H7 Plus的摄像头推荐吗,非常感谢!