Comment by ColinWright
10 days ago
Yes. We used it for the structures underlying the digital fade algorithm for marine radar images.
It's probably no longer "Commercial In Confidence" ... I should probably write it up sometime.
10 days ago
Yes. We used it for the structures underlying the digital fade algorithm for marine radar images.
It's probably no longer "Commercial In Confidence" ... I should probably write it up sometime.
Could you elaborate please.
Hmm.
This was a long time ago, so we didn't have GPUs or fancy rendering h/ware. We addressed every pixel individually.
So a radar image was painted to the screen, and then the next update was painted on top of that. But that just gives the live radar image ... we wanted moving objects to leave "snail trails".
So what you do for each update is:
* Decrement the existing pixel;
* Update the pixel with the max of the incoming value and the decremented value.
This then leaves stationary targets in place, and anything that's moving leaves a trail behind it so when you look at the screen it's instantly obvious where everything is, and how fast they're moving.
Ideally you'd want to decrement every pixel by one every tenth of a second or so, but that wasn't possible with the h/ware speed we had. So instead we decremented every Nth pixel by D and cycled through the pixels.
But that created stripes, so we needed to access the pixels in a pseudo-random fashion without leaving stripes. The area we were painting was 1024x1024, so what we did was start at the zeroth pixel and step by a prime number size, wrapping around. But what prime number?
We chose a prime close to (2^20)/phi. (Actually we didn't, but that was the starting point for a more complex calculation)
Since phi has no good rational approximation, this didn't leave stripes. It created an evenly spread speckle pattern. The rate of fade was controlled by changing D, and it was very effective.
Worked a treat on our limited hardware (ARM7 on a RiscPC) and easy enough to program directly in ARM assembler.
Thanks for the story.
What's decrementing a pixel ?
I(x,y,t+1) = I(x,y,t) - c ?
2 replies →