mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 00:25:07 +03:00
ipa: rpi: Add "focus" algorithm
Adds FocusStatus to the image metadata, containing contrast measurements across the image. Optionally also prints a contrast measure to the console, to aid in manual adjustment of the lens. Note that it is not an actual auto-focus algorithm that can drive a lens! Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
0952f2014d
commit
23e15e72f9
5 changed files with 113 additions and 0 deletions
31
src/ipa/raspberrypi/controller/rpi/focus.hpp
Normal file
31
src/ipa/raspberrypi/controller/rpi/focus.hpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
* Copyright (C) 2020, Raspberry Pi (Trading) Limited
|
||||
*
|
||||
* focus.hpp - focus algorithm
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../algorithm.hpp"
|
||||
#include "../metadata.hpp"
|
||||
|
||||
/*
|
||||
* The "focus" algorithm. All it does it print out a version of the
|
||||
* focus contrast measure; there is no actual auto-focus mechanism to
|
||||
* control.
|
||||
*/
|
||||
|
||||
namespace RPi {
|
||||
|
||||
class Focus : public Algorithm
|
||||
{
|
||||
public:
|
||||
Focus(Controller *controller);
|
||||
char const *Name() const override;
|
||||
void Read(boost::property_tree::ptree const ¶ms) override;
|
||||
void Process(StatisticsPtr &stats, Metadata *image_metadata) override;
|
||||
private:
|
||||
bool print_;
|
||||
};
|
||||
|
||||
} /* namespace RPi */
|
Loading…
Add table
Add a link
Reference in a new issue