gpt4 book ai didi

python - 使用带有 pylonsrc 的 Python3 gstreamer1.0 使用 basler 相机和 pylon5 在处理循环中给出错误

转载 作者:太空宇宙 更新时间:2023-11-04 04:05:18 26 4
gpt4 key购买 nike

我在 python3 gstreamer1.0 中使用 pylonsrc 元素从 basler 相机中捕捉视频片段。

例如使用这个管道:

[GST_DEBUG=pylonsrc:5 gst-launch-1.0 pylonsrc userid="testCam" imageformat=rgb8 lightsource="off" autoexposure="continuous" autowhitebalance="continuous" autogain="continuous" limitbandwidth="false" flipx="false" flipy="false" ! videoconvert ! xvimagesink]

有时会出现处理循环中的错误并停止录制。

我注意到我运行了许多其他消耗资源的进程,例如,如果我打开 Chrome ,就会出现此错误。另一个例子是当我处理大量来自以太网和其他协议(protocol)的数据时,一些线程开始处理这些数据时出现错误并且相机停止。

我尝试过不同的管道,当我使用大量系统资源时都会遇到这个问题。

有关错误的详细信息:

[Setting pipeline to PLAYING ...
0:00:00.586949696 22636 0x50fb70 DEBUG pylonsrc gstpylonsrc.c:921:gst_pylonsrc_set_caps: Setting caps to video/x-raw, format=(string)RGB, width=(int)1280, height=(int)720, framerate=(fraction)0/1
New clock: GstSystemClock
0:00:13.221158272 22636 0x50fb70 ERROR pylonsrc gstpylonsrc.c:2100:gst_pylonsrc_create: Error in the image processing loop.
ERROR: from element /GstPipeline:pipeline0/GstPylonsrc:pylonsrc0: Internal data flow error.

其他调试信息:

gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstPylonsrc:pylonsrc0: streaming task paused, reason error (-5) Execution ended after 0:00:12.634486400 Setting pipeline to PAUSED ... ]

最佳答案

我认为问题是由 CPU 中断引起的。

整个相机应用程序运行在带有 Ubuntu 16.04LTS 的 Nvidia TX2 上。

Nvidia CAN Controller 在主 CPU 上创建中断,这会干扰在相同 CPU 内核上运行中断的相机应用程序。

我还看到 6 个内核中有 2 个内核(丹佛处理器)不工作。

我已经激活了所有内核并在这些新激活的内核上移动(关联)can0 和 can1 中断。

现在我不再丢失帧,因此处理循环中不再有错误。

但我建议修改 gstpylonsrc.c 中的文件第 2099 行并设置其他条件,如果没有抓取帧,则保留最后一帧。这将避免停止管道。

详细信息:{ https://github.com/zingmars/gst-pylonsrc/issues/5

关于python - 使用带有 pylonsrc 的 Python3 gstreamer1.0 使用 basler 相机和 pylon5 在处理循环中给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57478293/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com