summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/README.md
blob: 26534af0f70840a0f7ce463fd33ad5eeb587839a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.. SPDX-License-Identifier: BSD-2-Clause

# _libcamera_ for the Raspberry Pi

Raspberry Pi provides a fully featured pipeline handler and control algorithms
(IPAs, or "Image Processing Algorithms") to work with _libcamera_. Support is
included for all existing Raspberry Pi camera modules.

_libcamera_ for the Raspberry Pi allows users to:

1. Use their existing Raspberry Pi cameras.
1. Change the tuning of the image processing for their Raspberry Pi cameras.
1. Alter or amend the control algorithms (such as AGC/AEC, AWB or any others)
   that control the sensor and ISP.
1. Implement their own custom control algorithms.
1. Supply new tunings and/or algorithms for completely new sensors.

## How to install and run _libcamera_ on the Raspberry Pi

Please follow the instructions [here](https://github.com/raspberrypi/documentation/tree/master/linux/software/libcamera/README.md).

## Documentation

Full documentation for the _Raspberry Pi Camera Algorithm and Tuning Guide_ can
be found [here](https://github.com/raspberrypi/documentation/tree/master/linux/software/libcamera/rpi_SOFT_libcamera_1p0.pdf).
*/ /* * Copyright (C) 2019, Google Inc. * * control_info.cpp - ControlInfoMap tests */ #include <iostream> #include <libcamera/camera.h> #include <libcamera/camera_manager.h> #include <libcamera/control_ids.h> #include <libcamera/controls.h> #include "libcamera/internal/camera_controls.h" #include "camera_test.h" #include "test.h" using namespace std; using namespace libcamera; class ControlInfoMapTest : public CameraTest, public Test { public: ControlInfoMapTest() : CameraTest("platform/vimc.0 Sensor B") { } protected: int init() override { return status_; } int run() override { const ControlInfoMap &infoMap = camera_->controls(); /* Test looking up a valid control by ControlId. */ if (infoMap.count(&controls::Brightness) != 1) { cerr << "count() on valid control failed" << endl; return TestFail; } if (infoMap.find(&controls::Brightness) == infoMap.end()) { cerr << "find() on valid control failed" << endl; return TestFail; } infoMap.at(&controls::Brightness); /* Test looking up a valid control by numerical ID. */ if (infoMap.count(controls::Brightness.id()) != 1) { cerr << "count() on valid ID failed" << endl; return TestFail; } if (infoMap.find(controls::Brightness.id()) == infoMap.end()) { cerr << "find() on valid ID failed" << endl; return TestFail; } infoMap.at(controls::Brightness.id()); /* Test looking up an invalid control by numerical ID. */ if (infoMap.count(12345) != 0) { cerr << "count() on invalid ID failed" << endl; return TestFail; } if (infoMap.find(12345) != infoMap.end()) { cerr << "find() on invalid ID failed" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(ControlInfoMapTest)