summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/focus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/focus.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/focus.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
index 8c5029bd..ea3cc00e 100644
--- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
@@ -31,10 +31,9 @@ char const *Focus::name() const
void Focus::process(StatisticsPtr &stats, Metadata *imageMetadata)
{
FocusStatus status;
- unsigned int i;
- for (i = 0; i < FOCUS_REGIONS; i++)
- status.focusMeasures[i] = stats->focus_stats[i].contrast_val[1][1] / 1000;
- status.num = i;
+ for (unsigned int i = 0; i < stats->focusRegions.numRegions(); i++)
+ status.focusMeasures[i] = stats->focusRegions.get(i).val;
+ status.num = stats->focusRegions.numRegions();
imageMetadata->set("focus.status", status);
LOG(RPiFocus, Debug)