mirror of
https://github.com/xdsopl/robot36.git
synced 2025-12-06 07:12:07 +01:00
Fixed accumulating of image rows
This commit is contained in:
parent
05763ff3e4
commit
fd3d6fa3a1
|
|
@ -104,8 +104,9 @@ public class HFFax extends BaseMode {
|
|||
int color = ColorConverter.GRAY(scratchBuffer[position]);
|
||||
pixelBuffer.pixels[i] = color;
|
||||
|
||||
cumulated[i] *= 0.99f; //decay old data
|
||||
cumulated[i] += Color.luminance(color);
|
||||
//accumulate recent values, forget old
|
||||
float decay = 0.99f;
|
||||
cumulated[i] = cumulated[i] * decay + Color.luminance(color) * (1 - decay);
|
||||
}
|
||||
|
||||
//try to detect "sync": thick white margin
|
||||
|
|
|
|||
Loading…
Reference in a new issue