Camera ====== The phyCORE-AM62Ax development kit overs a MIPI CSI-2 camera connection located on the back of the board (X28). The Camera Serial Interface (CSI) is a specification of the Mobile Industry Processor Interface (MIPI) Alliance. It defines an interface between a camera and a host processor. This guide will show you how to connect and take pictures with a MIPI CSI-2 camera module (VM-016 phyCAM-M). To learn more information about the phyCORE-AM62Ax CSI/Camera interface, please see sections 8 and 8.3 in the `Hardware Manual `_. .. image:: ../../images/phycore-am62x/pb-07124_camera.png :width: 800px :alt: phyCORE-AM62Ax Camera Requirements ------------ * `VM-016 phyCAM-M `_ Setting Up the Camera ----------------------- * With the board powered off, connect the phyCAM-M module to the camera connector (X28) on the carrier board. #. Open the X28 connector by pulling the black tab backwards toward the center of the carrier board. #. Insert the ribbon cable into the connector, with the blue tape facing outward. #. Once the ribbon cable has been seated into the connector, pull the black tab back towards it's closed position. You should hear a small click when the connector has completely closed. * Power on the development kit and stop in U-boot. Load the device tree overlay required for the parallel camera interface and then boot the board. .. code-block:: none :caption: Target (U-boot) setenv overlays k3-am62-phyboard-lyra-vm016-mipi.dtbo boot .. note:: For more information about overlays see chapter :ref:`ConfiguringTheBootloader-62A`. * Once in Linux, setup the camera pipelines. .. code-block:: none :caption: Target (Linux) media-ctl -d /dev/media0 -V "'ar0144 1-0010':0 [fmt:SGRBG8_1X8/1280x800 (0,4)/1280x800 field:none colorspace:default xfer:default ycbcr:default quantization:default]" media-ctl -d /dev/media0 -V "'ar0144 1-0010':0 [fmt:SGRBG8_1X8/1280x800 field:none colorspace:default xfer:default ycbcr:default quantization:default]" media-ctl -d /dev/media0 -V "'30102000.ticsi2rx':0 [fmt:SGRBG8_1X8/1280x800 field:none colorspace:default xfer:default ycbcr:default quantization:default]" .. note:: "media-ctl" configures the camera pipeline by defining the format, resolution, and other settings for the image capture. "ar0144" refers to the CMOS digital image sensor with the pixel array of 1280H x 800V being used to capture images. "1-0010" refers to the I2C device being used. In this case I2C1 device is being utilized. "30102000.ticsi2rx" refers to the TI CSI interface. Taking a Picture ------------------ * To capture a JPG picture named "smile.jpg", use the following gstreamer pipeline command. .. code-block:: none :caption: Target (Linux) gst-launch-1.0 v4l2src num-buffers=5 device=/dev/video3 ! video/x-bayer,format=grbg,depth=8,width=1280,height=800 ! bayer2rgb ! videoconvert ! jpegenc ! multifilesink location=smile.jpg .. code-block:: none :caption: Target (Expected Output) Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock Redistribute latency... Got EOS from element "pipeline0". Execution ended after 0:00:02.443544000 Setting pipeline to NULL ... Freeing pipeline ... Viewing Picture ----------------- This example will use the Secure Copy Protocol (SCP), which requires a network connection. Discover more mediums that can assist in copying files by following the guide :ref:`CopyFilesToTarget-62A`. .. This has not been proven yet. Will add section back once tested. .. 1. Using the Capacitive Touch Display (LCD-018-070-KAP) you can display the image on the LCD using the built in weston software. .. .. note:: Either tap the "X" on the LCD display picture window or press "ctrl+c" to return to normal console usage. Once the following command is run you should see your picture on the display. .. .. code-block:: none :caption: Target (Linux) weston-image out.jpg Viewing via SCP ~~~~~~~~~~~~~~~~~ * Use a local network and copy the file from the development kit to your host machine (Ubuntu or Windows). #. Connect the development kit to your local network using either ethernet port. #. Confirm the development kit's ethernet IP address (DHCP). For more information on how to change the from a static IP address to a DHCP address, see the :ref:`Ethernet-62A` interface guide. .. code-block:: none :caption: Target (Linux) ip addr #. Transfer the image via Windows Command Prompt or Linux terminal. .. code-block:: none :caption: Host (Ubuntu or Windows) scp root@:/root/smile.jpg ./Downloads/ * Open your host machine's Downloads folder. You should see an image named "smile.jpg".