Enum libcamera::controls::TestPatternMode
source · #[repr(i32)]pub enum TestPatternMode {
Off = 0,
SolidColor = 1,
ColorBars = 2,
ColorBarsFadeToGray = 3,
Pn9 = 4,
Custom1 = 256,
}
Expand description
Control to select the test pattern mode. Currently identical to ANDROID_SENSOR_TEST_PATTERN_MODE.
Variants§
Off = 0
No test pattern mode is used. The camera device returns frames from the image sensor.
SolidColor = 1
Each pixel in [R, G_even, G_odd, B] is replaced by its respective color channel provided in test pattern data. \todo Add control for test pattern data.
ColorBars = 2
All pixel data is replaced with an 8-bar color pattern. The vertical bars (left-to-right) are as follows; white, yellow, cyan, green, magenta, red, blue and black. Each bar should take up 1/8 of the sensor pixel array width. When this is not possible, the bar size should be rounded down to the nearest integer and the pattern can repeat on the right side. Each bar’s height must always take up the full sensor pixel array height.
ColorBarsFadeToGray = 3
The test pattern is similar to TestPatternModeColorBars, except that each bar should start at its specified color at the top and fade to gray at the bottom. Furthermore each bar is further subdevided into a left and right half. The left half should have a smooth gradient, and the right half should have a quantized gradient. In particular, the right half’s should consist of blocks of the same color for 1/16th active sensor pixel array width. The least significant bits in the quantized gradient should be copied from the most significant bits of the smooth gradient. The height of each bar should always be a multiple of 128. When this is not the case, the pattern should repeat at the bottom of the image.
Pn9 = 4
All pixel data is replaced by a pseudo-random sequence generated from a PN9 512-bit sequence (typically implemented in hardware with a linear feedback shift register). The generator should be reset at the beginning of each frame, and thus each subsequent raw frame with this test pattern should be exactly the same as the last.
Custom1 = 256
The first custom test pattern. All custom patterns that are available only on this camera device are at least this numeric value. All of the custom test patterns will be static (that is the raw image must not vary from frame to frame).
Trait Implementations§
source§impl Clone for TestPatternMode
impl Clone for TestPatternMode
source§fn clone(&self) -> TestPatternMode
fn clone(&self) -> TestPatternMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ControlEntry for TestPatternMode
impl ControlEntry for TestPatternMode
source§impl Debug for TestPatternMode
impl Debug for TestPatternMode
source§impl From<TestPatternMode> for ControlValue
impl From<TestPatternMode> for ControlValue
source§fn from(val: TestPatternMode) -> Self
fn from(val: TestPatternMode) -> Self
source§impl From<TestPatternMode> for i32
impl From<TestPatternMode> for i32
source§fn from(enum_value: TestPatternMode) -> Self
fn from(enum_value: TestPatternMode) -> Self
source§impl PartialEq for TestPatternMode
impl PartialEq for TestPatternMode
source§impl TryFrom<ControlValue> for TestPatternMode
impl TryFrom<ControlValue> for TestPatternMode
source§type Error = ControlValueError
type Error = ControlValueError
source§impl TryFrom<i32> for TestPatternMode
impl TryFrom<i32> for TestPatternMode
source§impl TryFromPrimitive for TestPatternMode
impl TryFromPrimitive for TestPatternMode
impl Control for TestPatternMode
impl Copy for TestPatternMode
impl Eq for TestPatternMode
impl StructuralPartialEq for TestPatternMode
Auto Trait Implementations§
impl Freeze for TestPatternMode
impl RefUnwindSafe for TestPatternMode
impl Send for TestPatternMode
impl Sync for TestPatternMode
impl Unpin for TestPatternMode
impl UnwindSafe for TestPatternMode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)