• 07/14/2017
  • Public Content
Contents

Example Test Cases

Since it is not possible to run both a viewfinder and capture JPEG images from the same stream, use these test cases to discover how this can be done by accessing the camera HAL directly.
Google Test Framework
These test cases are based on the Google Test framework and can be found here:
These also demonstrate how to capture full 13 Mpixel resolution images from the 13 MPixel camera. From Gstreamer, the largest resolution stream that can be set up is 4k (3840 x 2160).
Camera HAL via Android camera V3 API
The Camera HAL exposes it's functionality through the Android camera V3 API:
The test cases can be executed by running the following commands:
mkdir temp && cd temp && ldconfig camera_subsys_test_linux.sh
List the available unit tests
The following commands will provide details of available unit tests:
camera_subsys_test --gtest_list_tests --gtest_filter=-imx135*:imx230*:ov8858*
To demonstrate the capture of a full 13 Mipxel resolution JPEG image while simultaneously having a VGA resolution preview stream configured (this will not be visible though) while waiting until the 3A has stabilized (auto-focus, auto-white-balance, auto-exposure), you can execute the following test case:
camera_subsys_test --gtest_filter=jpeg_resolutions/RawHal_Test_Jpeg_Resolutions.TestJpegCapture/0
The resulting image can be viewed with:
gst-launch-1.0 filesrc location=CameraId_0_jpeg_resolutions_RawHal_Test_Jpeg_Resolutions_TestJpegCapture_0_1_4096x3104.jpeg ! jpegdec ! imagefreeze ! autovideosink
Some of the test cases support dumping all of the captured frames to the file system when the “--dump” parameter is specified.
Maker and Model information in the JPEG EXIF data
JPEG images captured from the CSI cameras will contain EXIF data. To adjust the Maker and Model information that gets inserted to this EXIF data, create the file “/etc/camerahal.cfg” (or edit it if it already exists). The file should have the following content:
ro.product.model=exampleModel ro.product.manufacturer=exampleManufacturer
Replace the exampleModel and exampleManufacturer text strings with the relevant strings for your device design.
The same can be achieved when building Ref-OS-IoT from source by applying these same edits to the patch named "0001-Add-camerahal.cfg-file.patch" in the build folder "meta-ref-os-iot/recipes-camera-adaptation/camera3hal/files".

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804