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>
26 lines
565 B
C
26 lines
565 B
C
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
/*
|
|
* Copyright (C) 2020, Raspberry Pi (Trading) Limited
|
|
*
|
|
* focus_status.h - focus measurement status
|
|
*/
|
|
#pragma once
|
|
|
|
#include <linux/bcm2835-isp.h>
|
|
|
|
// The focus algorithm should post the following structure into the image's
|
|
// "focus.status" metadata. Recall that it's only reporting focus (contrast)
|
|
// measurements, it's not driving any kind of auto-focus algorithm!
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct FocusStatus {
|
|
int num;
|
|
uint32_t focus_measures[FOCUS_REGIONS];
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|