Fixed sampling loop ranges in channelsAvg
. It was effectively doubling spotSize
, sampling an area of 64x64 instead of 32x32.
This commit is contained in:
parent
e1b170526a
commit
c0aa982fdd
@ -77,8 +77,8 @@ bool channelsAvg(
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::array<int, 3> pxCount = {}; // Per-channel sample counts
|
std::array<int, 3> pxCount = {}; // Per-channel sample counts
|
||||||
for (int c = spotPos.x - spotSize; c < spotPos.x + spotSize; ++c) {
|
for (int c = x1; c < x2; ++c) {
|
||||||
for (int r = spotPos.y - spotSize; r < spotPos.y + spotSize; ++r) {
|
for (int r = y1; r < y2; ++r) {
|
||||||
const int ch = ri->getSensorType() == rtengine::ST_BAYER ? ri->FC(r,c) : ri->XTRANSFC(r,c);
|
const int ch = ri->getSensorType() == rtengine::ST_BAYER ? ri->FC(r,c) : ri->XTRANSFC(r,c);
|
||||||
|
|
||||||
++pxCount[ch];
|
++pxCount[ch];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user