From 0d085b9d64e8d80d5ab4a8d3f8a629cce35e4570 Mon Sep 17 00:00:00 2001 From: tteil Date: Thu, 31 Oct 2024 12:53:04 -0600 Subject: [PATCH] correct the COB to be in the middle of a pixel We were using the top left corner of the pixel before leading to biases in the filter. --- .../imageProcessing/centerOfBrightness/centerOfBrightness.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fswAlgorithms/imageProcessing/centerOfBrightness/centerOfBrightness.cpp b/src/fswAlgorithms/imageProcessing/centerOfBrightness/centerOfBrightness.cpp index 0cdafbe19..abd4b676a 100755 --- a/src/fswAlgorithms/imageProcessing/centerOfBrightness/centerOfBrightness.cpp +++ b/src/fswAlgorithms/imageProcessing/centerOfBrightness/centerOfBrightness.cpp @@ -110,8 +110,8 @@ void CenterOfBrightness::updateState(uint64_t currentSimNanos) cobBuffer.valid = true; cobBuffer.timeTag = this->sensorTimeTag; cobBuffer.cameraID = imageBuffer.cameraID; - cobBuffer.centerOfBrightness[0] = cobData.first[0]; - cobBuffer.centerOfBrightness[1] = cobData.first[1]; + cobBuffer.centerOfBrightness[0] = cobData.first[0] + 0.5; + cobBuffer.centerOfBrightness[1] = cobData.first[1] + 0.5; cobBuffer.pixelsFound = static_cast (locations.size()); } cobBuffer.rollingAverageBrightness = averageBrightnessNew;