Pixel rounding and propagating error
Posted: Sun Aug 12, 2007 7:47 pm
I was, as it so happens, reading over vivftp's new photon torpedo calcs thread and noticing a few things.
Namely, in the OP, vivftp asked if the audience thought the new calcs were more accurate than his old calcs, and that reminded me that I didn't see any stated MOEs for pixel measurements.
In many cases, pixel rounding, fully propagated, is one of the most significant sources of scaling error in this sort of field. The problem comes in how carefully you count pixels - do you report a +/- 2 px error, or a +/- 1 px error?
I'm of the opinion that if you are exceptionally careful with counting pixels, you can split the difference on the partial pixels (i.e., pixels that are between the feature and background colors) and thus get the measurement to +/-1 px in many cases. For example, if there are two 50% pixels at the end of a line, you could count one of them, and be assured that you are almost certain to be within one pixel.
However, if you're not being exceptionally careful, you could easily be consistently overcounting or undercounting your pixels by one on each end, meaning that you should usually report +/-2 px if you're not examining very closely.
Now how do those errors propagate? Assuming that errors are independent, fractional error is propagated by the square root of the sum of the squares. When errors are dependent, they are simply added.
Let's take vivftp's OP in the thread linked to for an example. I'll assume the "exceptionally careful counting" model, although that's probably not justified. Involved in setting the scale for the picture he's counting the asteroid on ultimately are:
Electrical socket, 22 +/- 1 px.
Window, (348 +/-1 px)*2 +/-13 +/-1 px = 709 +/- sqrt(5) px*
Window, 14.3 +/-1 px
Timeship, 29.7 +/-1 px
Timeship, 20 +/-1 px
Torpedo, 4 +/-1 px
Torpedo, 3 +/-1 px
So the fractional MOE for the scale of the "Rise" image is, through these steps:
sqrt(1/22^2+5/709^2+1/14.3^2+1/29.7^2+1/20^2+1/4^2+1/3^2)=0.43
We'll ignore the pixel rounding on the asteroid - it's not significant compared with the pixel errors from everything else.
Meaning the figure for the asteroid dimensions could be generously reported here as 52 +/-22 meters for length and 34 +/- 14 meters for width. Just using the linear coefficient of the derivative actually falls apart for a MOE this wide; normally we would multiply the fractional MOE by three for a cubed value (+129%), but in this case, we actually would want to look at the cube (+200/-80% or so).
*Why sqrt(5)? Because the +/-1 px from the middle frame is independent of the +/-2 px from the two windows proper.
Namely, in the OP, vivftp asked if the audience thought the new calcs were more accurate than his old calcs, and that reminded me that I didn't see any stated MOEs for pixel measurements.
In many cases, pixel rounding, fully propagated, is one of the most significant sources of scaling error in this sort of field. The problem comes in how carefully you count pixels - do you report a +/- 2 px error, or a +/- 1 px error?
I'm of the opinion that if you are exceptionally careful with counting pixels, you can split the difference on the partial pixels (i.e., pixels that are between the feature and background colors) and thus get the measurement to +/-1 px in many cases. For example, if there are two 50% pixels at the end of a line, you could count one of them, and be assured that you are almost certain to be within one pixel.
However, if you're not being exceptionally careful, you could easily be consistently overcounting or undercounting your pixels by one on each end, meaning that you should usually report +/-2 px if you're not examining very closely.
Now how do those errors propagate? Assuming that errors are independent, fractional error is propagated by the square root of the sum of the squares. When errors are dependent, they are simply added.
Let's take vivftp's OP in the thread linked to for an example. I'll assume the "exceptionally careful counting" model, although that's probably not justified. Involved in setting the scale for the picture he's counting the asteroid on ultimately are:
Electrical socket, 22 +/- 1 px.
Window, (348 +/-1 px)*2 +/-13 +/-1 px = 709 +/- sqrt(5) px*
Window, 14.3 +/-1 px
Timeship, 29.7 +/-1 px
Timeship, 20 +/-1 px
Torpedo, 4 +/-1 px
Torpedo, 3 +/-1 px
So the fractional MOE for the scale of the "Rise" image is, through these steps:
sqrt(1/22^2+5/709^2+1/14.3^2+1/29.7^2+1/20^2+1/4^2+1/3^2)=0.43
We'll ignore the pixel rounding on the asteroid - it's not significant compared with the pixel errors from everything else.
Meaning the figure for the asteroid dimensions could be generously reported here as 52 +/-22 meters for length and 34 +/- 14 meters for width. Just using the linear coefficient of the derivative actually falls apart for a MOE this wide; normally we would multiply the fractional MOE by three for a cubed value (+129%), but in this case, we actually would want to look at the cube (+200/-80% or so).
*Why sqrt(5)? Because the +/-1 px from the middle frame is independent of the +/-2 px from the two windows proper.