@veye_xumm 哥,我们认真思考了一下,咱的pickmode写的是:pickmode是一个特殊的功能,一旦开启,sensor正常工作,但是模组将不输出图像,只有收到pickone指令,输出一张。如果是这种情况,就算板卡有缓存,pickone设为1的那一下才输出一张图,存下来的也应该是当下的图像啊
Posts made by lyj
-
RE: IMX307pickmode设为1
-
RE: IMX307使用抓拍模式pipeline启动失败
@veye_xumm 还得是大佬出手,我还有个问题,这个图片只能保存成jpg吗?能不能是bmp格式
-
RE: IMX307使用抓拍模式pipeline启动失败
cap = cv2.VideoCapture('v4l2src -d /dev/video0 num-buffers=1 ! \"video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080\" ! nvvidconv ! \"video/x-raw(memory:NVMM),format=(string)I420\" ! nvjpegenc ! filesink location=jpgname.jpg')
我使用这段代码,提示错误如下
-
RE: IMX307采用视频预览模式读取图片有延时
@veye_xumm 我用pickone这种,也会有buffer吗?那用不用这个不是没啥差异?就是pickmode设成0还是1都有buffer,没什么本质区别
-
RE: IMX307pickmode设为1
@veye_xumm 以上是我的代码,麻烦帮忙看一下,我这边等你的回复。这个的问题也是,取到的图不是当下的,是几分钟前的
-
RE: IMX307pickmode设为1
@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) -
IMX307pickmode设为1
IMX307,pickmode设为1,使用pickone触发读取图片,每隔20s读取一张,会出现读取一段时间后无法读取,而且pickone触发后读取的图片也不实时
-
IMX307使用抓拍模式pipeline启动失败
IMX307,使用以下参数 v4l2src num-buffers=1 /dev/video0! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=1.jpg 启动pipeline,提示cannot find appsink in maanual pipeline,开启失败
-
IMX307采用视频预览模式读取图片有延时
IMX307使用视频预览模式,间隔10s取一张图(cap.read()一次),图片有极大的延时,该如何解决?是什么原因导致的延时?