• Recent
    • Docs
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    • Register
    • Login

    Cool Pi 4B 如何使用GPIO啊,树莓派的HQ Camera如何使用呢?

    Scheduled Pinned Locked Moved Ubuntu
    9 Posts 5 Posters 706 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xingzhan2012
      last edited by

      在ubuntu系统下cool pi 4b的gpio怎么样才可以操作呢,有现成的驱动接口吗,还有就是摄像头接口应该如何使用呢?之前用树莓派4B的时候有官方的picanera2包,现在cool pi上没有整个包安装了。那么应该如何使用树莓派的HQ Camera呢?

      J 1 Reply Last reply Reply Quote 0
      • J
        jack_admin @xingzhan2012
        last edited by jack_admin

        @xingzhan2012

        参考这个贴子
        https://www.cool-pi.com/topic/136/coolpi-4b-python3-gpio-operation-compatable-with-raspberry-pi/1

        X 1 Reply Last reply Reply Quote 0
        • X
          xingzhan2012 @jack_admin
          last edited by

          @jack_admin 这里好像只有gpio的使用方法,请问摄像头接口如何使用呢?

          G 1 Reply Last reply Reply Quote 0
          • G
            george @xingzhan2012
            last edited by

            @xingzhan2012 摄像头可以使用gstreamer。默认的镜像里边已经支持。
            USB摄像头预览,参数根据自己设备的情况修改:

            gst-launch-1.0 v4l2src device=/dev/video20 ! image/jpeg, width=1920, height=1080, framerate=25/1 ! jpegparse ! mppjpegdec ! kmssink plane-id=88
            

            摄像头编码:

            gst-launch-1.0 v4l2src device=/dev/video11 ! video/x-raw,format=NV12 ! mpph264enc ! h264parse ! filesink location=1.h264 -e
            

            注意:默认的mipi摄像头对应的video11节点,USB摄像头对应的video20.

            X J 3 Replies Last reply Reply Quote 0
            • X
              xingzhan2012 @george
              last edited by xingzhan2012

              @george 谢谢解答,请问如果要使用python opencv,应该怎么做比较好呢?树莓派官方的picamera2很好用,不知cool pi 上的python接口支持怎么样,还有就是要设置摄像头的一些曝光之类的参数接口怎么样

              1 Reply Last reply Reply Quote 0
              • J
                jugg @george
                last edited by

                @george
                摄像头mjpeg格式 编码和播放同时 命令是什么样的

                zhengbichengZ 1 Reply Last reply Reply Quote 0
                • zhengbichengZ
                  zhengbicheng @jugg
                  last edited by

                  @jugg 解码和播放运行第一条命令应该就有了?

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jugg @zhengbicheng
                    last edited by

                    @zhengbicheng
                    编码H264和播放mjpeg 两个同时 一条命令

                    1 Reply Last reply Reply Quote 0
                    • X
                      xingzhan2012 @george
                      last edited by

                      @george 试了不能用

                      gst-launch-1.0 v4l2src device=/dev/video11 ! image/jpeg, width=1920, height=1080, framerate=25/1 ! jpegparse ! mppjpegdec ! kmssink plane-id=88
                      Setting pipeline to PAUSED ...
                      ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
                      Additional debug info:
                      ../sys/kms/gstkmssink.c(1183): gst_kms_sink_start (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
                      driver does not provide mode settings configuration
                      ERROR: pipeline doesn't want to preroll.
                      ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
                      Additional debug info:
                      ../libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
                      Failed to start
                      ERROR: pipeline doesn't want to preroll.
                      Failed to set pipeline to PAUSED.
                      Setting pipeline to NULL ...
                      Freeing pipeline ...

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post