Back to All
Project

Camera Application for Qualcomm® Robotics RB3 Development Kit

Camera Application for Qualcomm® Robotics RB3 Development Kit

Skill Level Area of Focus Operating System Platform/Hardware
Beginner Bluetooth, Computer Vision, Embedded, Sensors Linux Qualcomm Robotics RB3 Robotics Dev Kit

The Qualcomm Robotics RB3 Development Kit, which is based on the Qualcomm® SDA845 processor, has 4 cameras which are used in combinations with different concurrency modes, such as “2-Camera concurrency mode” and “3-Camera concurrency modes”. These modes are designed to take measurements such as ‘Depth Calculation’, etc. to capture good images and help minimize drawbacks such as ‘Light Scattering’

Objective

This demo application will walk-through setting up the concurrency mode to capture images.

Materials Required / Parts List / Tools

  • Qualcomm Robotics RB3 Development Kit
  • Power Adapter - 12 V with 2500 mA required by the 96Boards specification
  • USB to Micro USB cable - For serial console interface and ADB, Fast boot commands
  • USB to USB Type C cable - For connecting the USB3.0 Type C port and flashing images
  • Host PC OS for Qualcomm Robotics RB3 SDK build process

Source code: Camera Application

camera_test.tar

(found on the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “Sample-apps-codes” section)

Build / Assembly Instructions

Prerequisites:

Complete the build instructions in the "Hello RB3" project, and make sure that the following steps are done before proceeding with running the application on device.

1. Setup the development environment
  • 1.1) Install Android SDK tools (ADB, Fastboot)
  • 1.2) Install and configure the USB driver
  • 1.3) Flash the firmware image on the board
  • 1.4) Setup serial port for debugging purpose
  • 1.5) Install the App Toolchain SDK

 

2. Camera Application:
  • 2.1. From the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “Sample-apps-codes” section, download source code for camera application: “camera_test.tar

Camera-app
  • 2.2. After decompressing the .tar file, the directory is as follows:

  • 
     $ cd “Path to downloaded source code”
     $ tree -L 1
    
    Directory

    Look for Makefile in the downloaded folder


    3. Build and transfer the application.
    • 3.1. Run the Make file to compile and build the application.

    $ cat Makefile
    Command
    Command
  • 3.2. Build the application:

  • 
     $ source /usr/local/oecore-x86_64/environment-setup-armv7a-neon-oemllib32-linux-gnueabi
     $ make
    
  • 3.3. Connect the board to the host PC via Type C cable and ensure that the ADB port can be used (check using ‘adb devices’ and connect using ‘adb shell’)

    Transfer the application on to the RB3 board:

  • $ adb push hal3_test /bin/
    Push

    4. Let’s explore how to use the four cameras concurrency that help in developing the robotics solutions for tracking and evaluation of objects present in the captured images.

    The Qualcomm Robotics RB3 Development Kit supports four camera interfaces namely Stereo, ToF, Tracking and Main camera (OV8856)

    Camera devices can be attached in various combinations and Sensor ID reflects these combinations, as shown in the matrix below:

    Sensor

    In the example of “Sr. No” 1.4, here we are connecting only one of the supported sensors. In this case, “cameraID = 0” will select “Tracking”.

    In the example of “Sr. No” 2.3, here we are connecting stereo camera along with tracking (2 camera sensor scenario). In this case, “cameraID=1” will select “Tracking” while “cameraID=0” will select “Stereo”

    4.1. The combinations of cameras which result in different concurrency modes, such as 2-camera concurrency mode and 3-camera concurrency mode, help in minimizing drawbacks in capturing perfect images such as ‘Light scattering issue’ and also helps in measurements such as ‘Depth Calculation’.

    4.2. A simple demonstrate on how to capture an image using Main camera in jpeg format is given below. The sensor ID specified in the command will determine concurrency of cameras used.

    4.3. The hal3_test application is available on the Thundercomm website to capture image streams provided by the cameras. This application is written using the HAL3 API.

    4.4. To run the hal3_test application, log in to the Qualcomm Robotics RB3 device as a root (using serial or adb shell).

    Start preview with snapshot (size:3264x2448,format:jpeg)

    
     $ adb shell
     # hal3_test
     CAM0>>A:id=2,psize=1920x1080,pformat=yuv420,ssize=3264x2448,sformat=jpeg
     (A: Add a camera device for test)
     CAM0>> P:1 // P : trigger dump preview
     CAM0>> s:1 // s : Trigger snapshot
     CAM0>> D // Delete current camera device
     CAM0>> Q // Quit
     # exit
    

    The following command will pull the image from the Qualcomm Robotics RB3 device board to the host PC, which can be viewed using image viewer:

    $ adb pull /data/misc/camera/”filename”

    Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

    Project Authors
    Rakesh SankarSr, System Architect
    Akshay KulkarniTechnical Lead
    Vihaari SreeramSenior Software Engineer
    Patcha VengamambaSoftware Engineer

    Sign up for the Developer Newsletter.

    Get software and hardware tool resources to help optimize your development delivered to your inbox weekly.

    Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

    Stay connected

    Get the latest Qualcomm and industry information delivered to your inbox.

    Subscribe
    Manage your subscription

    © Qualcomm Technologies, Inc. and/or its affiliated companies.

    Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

    Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

    References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

    Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

    Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

    Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.