IMX307pickmode设为1
-
IMX307,pickmode设为1,使用pickone触发读取图片,每隔20s读取一张,会出现读取一段时间后无法读取,而且pickone触发后读取的图片也不实时
-
@lyj
pickone的机制就是在mipi输出的地方做了一个开关。
你可否把你的程序发过来,我们试一下。 -
@veye_xumm
import cv2
import os
import timedef gstreamer_pipeline(self, video_idx, capture_width=1280, capture_height=720):
ret1 = 'v4l2src device=/dev/video{} ! '.format(video_idx)
ret2 = 'video/x-raw, width=(int){}, height=(int){}, '.format(capture_width, capture_height)
ret3 = 'format=(string)UYVY ! '
ret4 = 'nvvidconv ! '
ret5 = 'video/x-raw(memory:NVMM), '
ret6 = 'format=(string)I420 ! '
ret7 = 'nvvidconv ! '
ret8 = 'video/x-raw, '
ret9 = 'format=(string)BGRx ! '
ret10 = 'videoconvert ! '
ret11 = 'video/x-raw, format=(string)BGR ! appsink'
print(ret1 + ret2 + ret3 + ret4 + ret5 + ret6 + ret7 + ret8 + ret9 + ret10 + ret11)
return ret1 + ret2 + ret3 + ret4 + ret5 + ret6 + ret7 + ret8 + ret9 + ret10 + ret11if name == 'main':
cap = cv2.VideoCapture(gstreamer_pipeline(0), cv2.CAP_GSTREAMER)
password = '此处为sudo密码'
ret = os.system(
"echo {} | sudo -S ./shell/cs_mipi_i2c.sh -w -b {} -f pickmode -p1 1".format(password, 9))
print(ret)
while True:
time.sleep(10)
ret = os.system(
"echo {} | sudo -S ./shell/cs_mipi_i2c.sh -w -b {} -f pickone".format(password, 9))
print('%%%', ret)
ret_val, img = cap.read()
print(ret_val)
if ret_val is True:
cv2.imshow('12', img)
cv2.waitKey(0) -
@veye_xumm 以上是我的代码,麻烦帮忙看一下,我这边等你的回复。这个的问题也是,取到的图不是当下的,是几分钟前的
-
@lyj 这个参考一下另一个问题上给你的回复。
-
@veye_xumm 哥,我们认真思考了一下,咱的pickmode写的是:pickmode是一个特殊的功能,一旦开启,sensor正常工作,但是模组将不输出图像,只有收到pickone指令,输出一张。如果是这种情况,就算板卡有缓存,pickone设为1的那一下才输出一张图,存下来的也应该是当下的图像啊
-
@lyj 我说的板卡有缓存,指的是你的主板,不是camera。
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login