IMX477-160 12.3MP Camera在jetson nano上配置调用

这篇具有很好参考价值的文章主要介绍了IMX477-160 12.3MP Camera在jetson nano上配置调用。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

 

sudo /opt/nvidia/jetson-io/jetson-io.py


DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e
SENSOR_ID=0 # 0 for CAM0 and 1 for CAM1 ports
FRAMERATE=30 # Framerate can go from 2 to 30 for 4032x3040 mode
gst-launch-1.0 nvarguscamerasrc sensor-id=$SENSOR_ID ! "video/x-raw(memory:NVMM),width=4032,height=3040,framerate=$FRAMERATE/1" ! nvvidconv ! "video/x-raw(memory:NVMM),width=1920,height=1080,framerate=$FRAMERATE/1" ! nvoverlaysink
SENSOR_ID=0 # 0 for CAM0 and 1 for CAM1 ports
FRAMERATE=60 # Framerate can go from 2 to 60 for 1920x1080 mode
gst-launch-1.0 nvarguscamerasrc sensor-id=$SENSOR_ID ! "video/x-raw(memory:NVMM),width=1920,height=1080,framerate=$FRAMERATE/1" ! nvvidconv ! nvoverlaysink
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
    MENU LABEL primary kernel
    LINUX /boot/Image
    INITRD /boot/initrd
    APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
    FDT /boot/tegra210-p3448-0000-p3449-0000-b00.dtb













sudo apt-get install --reinstall ./nvidia-l4t-kernel_4.9.201-tegra-32.5.0-20210115145440_arm64.deb
sudo apt-get install --reinstall ./nvidia-l4t-kernel-dtbs_4.9.201-tegra-32.5.0-20210115145440_arm64.deb






gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12' ! nvoverlaysink




cd ~wget https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/install_full.sh



chmod +x install_full.sh./install_full.sh -m imx477



ysy@ysy-desktop:~$ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4032 x 3040 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
Execution ended after 0:00:02.183529453
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receive worker failure, notifying 2 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340)
(Argus) Error InvalidState: Argus client is exiting with 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)



TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
    MENU LABEL primary kernel
    LINUX /boot/Image
    INITRD /boot/initrd
    APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
    FDT /boot/tegra210-p3448-0000-p3449-0000-b00.dtb

要在Jetson Nano上使用IMX477-160 12.3MP相机,您需要执行以下步骤:

  1. 将相机连接到Jetson Nano的CSI接口。确保连接正确,电源也已连接。

  2.  确保您的Jetson Nano系统已更新到最新版本。您可以使用以下命令检查并更新系统:

$ sudo apt-get update
$ sudo apt-get upgrade

     3. 安装适当的驱动程序和软件包。要使用IMX477-160相机,您需要安装GStreamer和v4l-utils软件包。您可以使用以下命令安装它们:

$ sudo apt-get install gstreamer1.0-tools gstreamer1.0-plugins-base \
  gstreamer1.0-plugins-good gstreamer1.0-plugins-bad v4l-utils

   4.检查相机是否被识别。您可以使用以下命令检查相机是否已正确识别:

$ v4l2-ctl --list-devices

  如果相机已正确识别,您应该能够看到类似以下内容的输出:

vi-output, imx477  (platform:54080000.vi:0):
    /dev/video0

 5.配置相机参数。您可以使用以下命令查看相机支持的参数:

$ v4l2-ctl --list-ctrls

  您可以使用以下命令设置相机参数:

$ v4l2-ctl -c <control>=<value>

例如,要设置帧速率为30fps:

$ v4l2-ctl -c frame_rate=30

6.使用GStreamer捕获相机图像。您可以使用以下命令捕获相机图像并在屏幕上显示:

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw, width=(int)640, height=(int)480' ! nvvidconv ! nvegltransform ! nveglglessink -e

这将启动GStreamer管道,捕获相机图像并在屏幕上显示。您可以根据需要更改图像的分辨率和帧速率。文章来源地址https://www.toymoban.com/news/detail-613686.html


cd ~wget https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/install_full.sh




chmod +x install_full.sh./install_full.sh -m imx477


输入 y 重新启动电路板。使用以下命令检查相机是否被正确识别。




ls /dev/video0

https://github.com/JetsonHacksNano/CSI-Camera/blob/master/simple_camera.py



git clone https://github.com/amirhosseinh77/JetsonYolo.git


cd weightswget https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt




python3 JetsonYolo.py
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw,width=1280, height=720' ! videoconvert ! 'video/x-raw,format=(string)BGR' ! videoconvert ! 'video/x-raw,format=(string)RGB' ! ximagesink



请确保已安装ximagesink,如果没有,请使用以下命令进行安装:


sudo apt-get install -y x11-apps
import cv2

cap = cv2.VideoCapture(0) # 0表示第一个摄像头,可以尝试其他数字来使用不同的摄像头
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640) # 设置摄像头图像宽度
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) # 设置摄像头图像高度

while(True):
    # 逐帧读取摄像头图像
    ret, frame = cap.read()

    # 显示摄像头图像
    cv2.imshow('USB Camera',frame)

    # 按'q'键退出循环
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

# 释放摄像头并关闭窗口
cap.release()
cv2.destroyAllWindows()
ysy@ysy-desktop:~$ nvgstcapture-1.0 --orientation=2
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
  (2) : 640x480
  (3) : 1280x720
  (4) : 1920x1080
  (5) : 2104x1560
  (6) : 2592x1944
  (7) : 2616x1472
  (8) : 3840x2160
  (9) : 3896x2192
  (10): 4208x3120
  (11): 5632x3168
  (12): 5632x4224

Runtime ARGUS Camera Commands:

  Help : 'h'
  Quit : 'q'
  Set Capture Mode:
      mo:<val>
          (1): image
          (2): video
  Get Capture Mode:
      gmo
  Set sensor orientation:
      so:<val>
          (0): none
          (1): Rotate counter-clockwise 90 degrees
          (2): Rotate 180 degrees
          (3): Rotate clockwise 90 degrees
  Get sensor orientation:
      gso
  Set sensor mode:
      smo:<val> e.g., smo:1
  Get sensor mode:
      gsmo
  Set Whitebalance Mode:
      wb:<val>
          (0): off
          (1): auto
          (2): incandescent
          (3): fluorescent
          (4): warm-fluorescent
          (5): daylight
          (6): cloudy-daylight
          (7): twilight
          (8): shade
          (9): manual
  Get Whitebalance Mode:
      gwb
  Set Saturation (0 to 2):
      st:<val> e.g., st:1.25
  Get Saturation:
      gst
  Set Exposure Compensation (-2 to 2):
      ec:<val> e.g., ec:-2
  Get Exposure Compensation:
      gec
  Set Auto Whitebalance Lock:
      awbl:<val> e.g., awbl:0
  Get Auto Whitebalance Lock:
      awbl
  Set Auto Exposure Lock:
      ael:<val> e.g., ael:0
  Get Auto Exposure Lock:
      gael
  Set TNR Mode:
      tnrm:<val> e.g., tnrm:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get TNR Mode:
      gtnrm
  Set TNR Strength (-1 to 1):
      tnrs:<val> e.g., tnrs:0.5
  Get TNR Strength:
      gtnrs
  Set EE Mode:
      eem:<val> e.g., eem:1
          (0): OFF
          (1): FAST
          (2): HIGH QUALITY
  Get EE Mode:
      geem
  Set EE Strength (-1 to 1):
      ees:<val> e.g., ees:0.5
  Get EE Strength:
      gees
  Set Auto Exposure Anti-Banding (0 to 3):
      aeab:<val> e.g., aeab:2
          (0): OFF
          (1): MODE AUTO
          (2): MODE 50HZ
          (3): MODE 60HZ
  Get Auto Exposure Anti-Banding:
      gaeab
  Set Gain Range:
      gr:<val><space><val> e.g., gr:1 16
  Get Gain Range:
      ggr
  Set Exposure Time Range:
      etr:<val><space><val> e.g., etr:34000 35000
  Get Exposure Time Range:
      getr
  Set ISP Digital Gain Range:
      dgr:<val><space><val> e.g., dgr:2 152
  Get ISP Digital Gain Range:
      gdgr
  Capture: enter 'j' OR
           followed by a timer (e.g., jx5000, capture after 5 seconds) OR
           followed by multishot count (e.g., j:6, capture 6 images)
           timer/multihot values are optional, capture defaults to single shot with timer=0s
  Start Recording : enter '1'
  Stop Recording  : enter '0'
  Video snapshot  : enter '2' (While recording video)
  Get Preview Resolution:
      gpcr
  Get Image Capture Resolution:
      gicr
  Get Video Capture Resolution:
      gvcr


Runtime encoder configuration options:

  Set Encoding Bit-rate(in bytes):
      br:<val> e.g., br:4000000
  Get Encoding Bit-rate(in bytes):
      gbr
  Set Encoding Profile(only for H.264):
      ep:<val> e.g., ep:1
          (0): Baseline
          (1): Main
          (2): High
  Get Encoding Profile(only for H.264):
      gep
  Force IDR Frame on video Encoder(only for H.264):
      Enter 'f' 


bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE 
** Message: 00:22:07.568: <main:4670> iterating capture loop ....
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4032 x 3040 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 2560 x 1440 FR = 40.000000 fps Duration = 25000000 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 1 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

到了这里,关于IMX477-160 12.3MP Camera在jetson nano上配置调用的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Jetson Nano配置YOLOv5并实现FPS=25

    JetPack 4.6——2021.8 yolov5-v6.0版本 使用的为yolov5的yolov5n.pt,并利用tensorrtx进行加速推理,在调用摄像头实时检测可以达到FPS=25。 在打开的文档的末尾添加如下: 保持并退出,终端执行 1.打开终端输入: 2.修改nvzramconfig.sh文件 3.重启Jetson Nano 4.终端中输入: 可查看到swap已经变为

    2024年02月13日
    浏览(37)
  • Jetson nano B01学习笔记 -- 系统环境配置以及ROS安装

    Jetson Nano是一款体积小巧、功能强大的人工智能嵌入式开发板,于2019年3月由英伟达推出。它预装Ubuntu 18.04LTS系统,搭载英伟达研发的128核Maxwell GPU,可以快速将AI技术落地并应用于各种智能设备。相比于Jetson之前的几款产品(Jetson TK1、Jetson TX1、Jetson TX2、Jetson Xavier),Jetson

    2023年04月24日
    浏览(48)
  • 亲测可用-jetson nano b01上配置cuda加速的opencv

    前面的文章已经写过如何安装镜像及基础配置 亲测可用-jetson nano B01镜像安装及配置 jetson nano的官方镜像中自带opencv,但是不支持显卡加速 输入命令 按下数字7查看INFO界面,可以看到 所以默认自带的是不支持cuda加速(GPU)的,没有办法充分发挥jetson上GPU的性能 卸载自带的op

    2024年02月03日
    浏览(48)
  • Nvidia Jetson Nano Developer KIT配置全过程(二):Ubuntu系统安装

    将烧录好的存储卡插入开发板中,连接好各类数据线和电源线,开机启动。 第1步,选择接受协议。 第2步,选择语言,这里选择中文简体。 第3步,选择键盘布局。 第4步,配置无线网络。后续的配置过程中很多地方会涉及到从互联网上下载组件包,所以建议配置网络。当然

    2024年02月15日
    浏览(48)
  • 3:Ubuntu上配置QT交叉编译环境并编译QT程序到Jetson Orin Nano(ARM)

       GCC配置同上   最后配置Kits 上面设置完成之后 ,设置Kits 中的Device(这是为了能够直接把项目部署到arm设备上)      点击NEXT之后会出现连接被拒绝,不用担心 ,下面会对其设置密码。 验证arm设置的密码。                 代码: 此代码是抄的别人的,具体是哪位博主的

    2024年02月11日
    浏览(48)
  • Linux Server 20.04 Qt5.14.2配置Jetson Orin Nano Developer Kit 交叉编译环境

    最近公司给了我一块Jetson Orin Nano的板子,先刷了系统(1.Jetson Orin Nano Developer Kit系统刷机)又让我搭建交叉编译环境,所以有了下面的文章 1.1设备环境 1.1.1 Server: 1.1.2 Jetson Orin Nano : 1.2 Qt相关下载地址 1.2.1 Qt源码下载 Qt源码下载(最好下载tar.xz,tar格式可能在windows下编辑过,后期

    2024年02月12日
    浏览(48)
  • 12.3 实现模拟鼠标录制回放

    本节将向读者介绍如何使用键盘鼠标操控模拟技术,键盘鼠标操控模拟技术是一种非常实用的技术,可以自动化执行一些重复性的任务,提高工作效率,在Windows系统下,通过使用各种键盘鼠标控制函数实现动态捕捉和模拟特定功能的操作。 有时我们经常需要进行重复性的鼠

    2024年02月08日
    浏览(50)
  • 12.3 ARM寄存器组织

    目录 ARM寄存器组织(一) 寄存器 概念 作用 分类 ARM寄存器 ARM寄存器组织(二) 专用寄存器 R15(PC,Program Counter) R14(LR,Link Register) R13(SP,Stack Pointer) ARM寄存器组织(三) CPSR寄存器 ARM寄存器组织(一) 寄存器 概念 寄存器是处理器内部的存储器,没有地址 C语言中register存储在寄

    2024年02月13日
    浏览(41)
  • jetson nano GPIO控制说明

    GPIO(General Purpose Input Output)通用输入输出。有时候我们会简称为“IO口”。GPIO口在智能硬件开发中是一个比较重要的概念,用户可以通过GPIO口和硬件进行数据交互(如UART),控制硬件工作(如LED、蜂鸣器等),读取硬件的工作状态信号(如中断信号)等。Jetson TX1、TX2、AGX Xavier和

    2024年02月16日
    浏览(47)
  • 【nano系列】jetson nano 迁移系统、制作SD卡启动扩展内存(二)

    我的SD卡在nano中显示的名称为 /dev/sda1 ,不同于其他文章 的 /dev/mmcblk1p1。 Micro SD卡是一种极细小的快闪存储器卡,其格式源自SanDisk创造,原本这种记忆卡称为T-Flash,及后改称为Trans Flash。TF卡是Micro SD卡的旧称呼,两者没有区别。 nano编辑器无需图形界面,操作比vim更方便 下

    2023年04月19日
    浏览(37)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包