Skip to content

Commit 62765bf

Browse files
author
tteil
committed
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.
1 parent 390971b commit 62765bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fswAlgorithms/imageProcessing/centerOfBrightness/centerOfBrightness.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ void CenterOfBrightness::updateState(uint64_t currentSimNanos)
110110
cobBuffer.valid = true;
111111
cobBuffer.timeTag = this->sensorTimeTag;
112112
cobBuffer.cameraID = imageBuffer.cameraID;
113-
cobBuffer.centerOfBrightness[0] = cobData.first[0];
114-
cobBuffer.centerOfBrightness[1] = cobData.first[1];
113+
cobBuffer.centerOfBrightness[0] = cobData.first[0] + 0.5;
114+
cobBuffer.centerOfBrightness[1] = cobData.first[1] + 0.5;
115115
cobBuffer.pixelsFound = static_cast<int32_t> (locations.size());
116116
}
117117
cobBuffer.rollingAverageBrightness = averageBrightnessNew;

0 commit comments

Comments
 (0)