This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux/AM5728:具有摄像头模块的摄像头应用

Guru**** 2611705 points
Other Parts Discussed in Thread: TMDSEVM572X, TMDSCM572X, AM5728

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/581003/linux-am5728-camera-application-with-camera-module

器件型号:AM5728
主题中讨论的其他器件:TMDSEVM572XTMDSCM572X

工具/软件:Linux

您好!

我有 TMDSEVM572X 和 TMDSCM572X (摄像头模块)、并使用 PSDK v3.2.0.5。

当我按如下方式运行摄像头应用程序时、Qt 窗口在 LCD 上启动、但不显示摄像头模块的捕获图像。 然后控制台上显示以下错误。 如果您对我有一些建议、请告诉我。

根目录@am57xx-EVM:~#/usr/share/qt5/examples/multimediawidgets/camera/camera
使用 Wayland-EGL
wlpvr:已初始化 PVR 服务
无法查询参数信息:"无效参数"
无法查询参数信息:"无效参数"
无法查询参数信息:"无效参数"
无法查询参数信息:"无效参数"
无法查询参数信息:"无效参数"
无法查询参数信息:"无效参数"
[365.449195] VIP 48990000.VIP:大小为12582912的 dma_alloc_相干 失败
CameraBin 错误:"分配所需内存失败。"
CameraBin 错误:"内部数据流错误。"

当我按下矩阵 GUI 的图标时、摄像头模块的捕获图像会正确显示在 LCD 上、因此摄像头模块正常。
摄像头->双摄像头演示->运行

此外、如果我移除摄像头模块并连接 USB 摄像头、摄像头应用程序将正常运行、并且 LCD 上显示 USB 摄像头的捕获图像。

根目录@am57xx-EVM:~#/usr/share/qt5/examples/multimediawidgets/camera/camera
[57.986264]  USB 1-1.1:使用 xhci-hcd 重置高速 USB 器件编号3
使用 Wayland-EGL
wlpvr:已初始化 PVR 服务

此致、
Kazu

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Kazu、

    我在电路板上测试了这个、它看起来工作正常。 以下是控制台输出:

    root@am57xx-evm:/usr/share/qt5/examples/multimediawidgets/camera 编号./camera

    [95.732131] OMAP_hwmod:mu0_dsp2:_wait_target_disable 失败

    [95.738053] OMAP-iommu 41501000.MMU:41501000.MMU:版本3.0

    [95.744146] OMAP-IMU 41500.MMU:41500.MMU:版本3.0

    [95.758325] OMAP_hwmod:mu0_dsp1:_wait_target_disable 失败

    [95.764227] OMAP-iommu 40d01000.MMU:40d01000.MMU:版本3.0

    [95.770184] OMAP-iommu 40d020.MMU:40d020.MMU:版本3.0

    使用 Wayland-EGL

    wlpvr:已初始化 PVR 服务

    无法查询参数信息:"无效参数"

    无法查询参数信息:"无效参数"

    无法查询参数信息:"无效参数"

    无法查询参数信息:"无效参数"

    无法查询参数信息:"无效参数"

    无法查询参数信息:"无效参数"

    [99.246072] VIP 48990000.VIP:大小为6291456的 dma_alloc_相干 故障

    [108.015327] omap_hwmod:mu1_dsp1:_wait_target_disable 失败

    [108.027998] omap_hwmod:mu1_dsp2:_wait_target_disable 失败

    [108.040624] omap_hwmod:mu0_dsp1:_wait_target_disable 失败

    [108.053439] omap_hwmod:mu0_dsp2:_wait_target_disable 失败

    我可以在 AM572x EVM 显示屏上看到摄像头窗口:

    您能否检查摄像头模块在 camera 板上的连接是否良好、有时两者之间的连接不好(将电缆按在连接器上)。  

    此致、  
    Yordan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Yordan、您好!

    感谢您的快速回复。 我不知道为什么 Qt 摄像头应用程序无法与我的摄像头模块配合使用。 无论如何、我还使用 gstreamer 检查操作。

    我将摄像头模块和 USB 摄像头连接到 AM5728 GP-EVM。

    root@am57xx-EVM:~#
    root@am57xx-EVM:~ v4l2-ctl --list-devices
    wbcap (平台:omapwb-cap):
    /dev/video11

    omapwb-M2M (平台:omapwb-M2M):
    /dev/video10

    VIP (平台:VIP):
    /dev/video1

    VPE (平台:VPE):
    /dev/video0

    USB 2.0 PC 摄像头(usb-xhci-hcd.1.auto-1.2):
    /dev/video2

    root@am57xx-EVM:~#

    使用以下命令、摄像头模块捕获的图像将显示在 LCD 上。

    root@am57xx-EVM:~#
    root@am57xx-EVM:~# gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4! 'VIDEO/x-RAW、FORMAT=YUY2、width=640、height=480、framerate=30/1'! VPE! 排队! 陆上接收机
    正在将管道设置为暂停...
    管道处于活动状态,不需要 PREROLL...
    正在将管道设置为正在播放...
    新时钟:GstSystemClock
    /GstPipeline0/GstV4l2Src:v4l2src0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) YUy2\、\ width\=(int\) 640\、\ height\=(int\) 480\、\、\(bacy\) bace-dile-dy= 1) bapertix (bapperity\)、bacy= 1) d/帧比1 (trade-1)
    /GstPipeline0/GstCapsFilter:capsfilter0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) YUy2、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素纵横比= 1)、色带1 (trackety= 1)、1)/framex (fretry) metry (framex (fretry) 1) metry)
    /GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(string\) 30\(frame\) 1/frate\
    /GstPipeline0/GstQueue:queue0.GstPad:sink:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    /GstPipeline0/GstVpe:vpe0.GstPad:SINK:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ FORMAT\=(STRING\) Y2\、\ width\=(int\) 640\、\ height\=(int\) 480\、PIXEL -纵横比\=(STRING\) 601\(渐变模式)、色带1) 30\
    /GstPipeline0/GstCapsFilter:capsfilter0.GstPad:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ format\=(string\) YUy2、\ width\=(int\) 640\、\ height\=(int\) 480\、\、\像素纵横比= 1)、色带1 (trackety= 1)/framex (track= 1) metry)、1) mort/帧(track= 1)
    /GstPipeline0/GstCapsFilter:capsfilter0.GstPad:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ format\=(string\) YUy2、\ width\=(int\) 640\、\ height\=(int\) 480\、\、\像素纵横比= 1)、色带1 (trackety= 1)/framex (track= 1) metry)、1) mort/帧(track= 1)
    /GstPipeline0/GstWaylandSink:waylandsink.GstPad:SINK:SINK:SINK:CAPS ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素纵横比= 1) 30\(fraperate) 1/frate
    /GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(string\) 30\(frame\) 1/frate\
    /GstPipeline0/GstQueue:queue0.GstPad:sink:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    /GstPipeline0/GstQueue:queue0.GstPad:sink:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    /GstPipeline0/GstWaylandSink:waylandsink.GstPad:SINK:SINK:SINK:CAPS ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素纵横比= 1) 30\(fraperate) 1/frate

    但是、USB 摄像头捕获失败、如下所示。

    root@am57xx-EVM:~#
    root@am57xx-EVM:~# gst-launch-1.0 -v v4l2src device=/dev/video2 io-mode=4! 'VIDEO/x-RAW、FORMAT=YUY2、width=640、height=480、framerate=30/1'! VPE! 排队! 陆上接收机
    正在将管道设置为暂停...
    管道处于活动状态,不需要 PREROLL...
    正在将管道设置为正在播放...
    新时钟:GstSystemClock
    /GstPipeline0/GstV4l2Src:v4l2src0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) YUy2\、\ width\=(int\) 640\、\ height\=(int\) 480\、\、\(bite-bers-pixel \) bader= 1:1:1:/framex (pixel 1) d/(fretry)比1:1:1:1:1:1)
    /GstPipeline0/GstCapsFilter:capsfilter0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) YUy2、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素纵横比= 1)、色带1:1:/framex (fretry) 1:1:1:1:1:1:1:1:1:/fretry
    /GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(string\) 30\(frame\) 1/frate\
    /GstPipeline0/GstQueue:queue0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    /GstPipeline0/GstWaylandSink:waylandsink.GstPad:SINK:SINK:SINK:CAPS ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素纵横比= 1) 30\(fraperate) 1/frate
    /GstPipeline0/GstQueue:queue0.GstPad:sink:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    /GstPipeline0/GstVpe:vpe0.GstPad:SINK:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ FORMAT\=(STRING\) Y2\、\ width\=(int\) 640\、\ height\=(int\) 480\、PIXEL -纵横比\=(1) 1:1:1:帧/帧比1:1帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧/帧
    /GstPipeline0/GstCapsFilter:capsfilter0.GstPad:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ FORMAT\=(STRING\) YUY2、\ width\=(int\) 640\、\ height\=(int\) 480\、\、\像素纵横比= 1)、1:/frameetry (fretry) 1:1:1:1:1:/fretry (framex) x (fretry) x (fretry) x (fretry) x (fretry) x 1:1:1:1:1:1:1:1:1:1:1:1:1:1)
    /GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(string\) NV12\、\(tam1\) 406/400太小、帧速率为1 (1) 996/400)

    /GstPipeline0/GstQueue:queue0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    /GstPipeline0/GstWaylandSink:waylandsink.GstPad:SINK:SINK:SINK:CAPS ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素纵横比= 1) 30\(fraperate) 1/frate
    /GstPipeline0/GstQueue:queue0.GstPad:sink:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 640\、\ height\=(int\) 480\、\像素-宽高比\=(frame\) 1) 30、帧速率
    错误:来自元素/GstPipeline:流水 线0/GstV4l2Src:v4l2src0:内部数据流错误。
    其他调试信息:
    ./../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c (2943):gst_base_src_loop ():/GstPipeline:流水线0/GstV4l2Src:v4l2src0:
    流任务暂停、原因错误(-5)
    执行在0:00:01.019431021之后结束
    正在将管道设置为暂停...
    正在将管道设置为就绪...
    正在将管道设置为 NULL ...
    正在释放管道...
    root@am57xx-EVM:~#

    我猜需要改变加斯特雷默的命令、但我该怎么做?

    此致、
    Kazu

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!


    关于 gstreamer、我建议您在流水线中添加--gst-debug=3以获得更多调试打印。

    我建议您也检查此主题:
    e2e.ti.com/.../2034142

    gstreamer 示例的 wiki 页面:
    processors.wiki.ti.com/.../Processor_Training:_Multimedia

    BR
    玛格丽塔
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Margarita、

    很抱歉耽误你的回答。 我参考了您的 E2E 主题、我应用了补丁并重新制作了 uvcvideo.ko、然后我的问题得到了解决。 谢谢你。

    此致、
    Kazu

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    我很高兴这个问题得到解决。

    BR
    玛格丽塔