
As mentioned in Methods, the output of the Matlab version of the encoder is not identical to the orignal shell script, because filtering and resampling differ in their implementation. Therefore, it is important to confirm that the differences are minor and that therefore the Matlab script can be used in place of the original shell script.
For this comparison, the Memorial Church scene was encoded with both the shell script disp14enc and the Matlab version hdrEnc. The two framebuffer images were then compared. First below is the comparison of the LED backlight drive values. The x-axis is the LED index, and the y-axis is the framebuffer value. Since the framebuffer is 8-bit, the LED values range from 0-255.
The two LED value vectors track each other very closely. Differences are concentrated mostly in the bright LEDs, where they are likely to be less perceptually signficant. To make the error magnitudes clearer, the next plot shows the absolute difference between the two LED drive vectors
The maximum absolute error here is 8, with the mean absolute error being 0.108 (mean LED value is 8.9). The errors appear to be small and acceptable.
Finally, the next plot shows the absolute error image of the two encoders' LCD images.
For 85% of the pixels, the error is zero, and the overall mean error is 0.3668. The error is concentrated at image edges, where differences in filtering and scaling would be most noticeable, and in the very bright regions. The very largest errors are at the edges inside the stained-glass window, where the brightness changes drastically over just one or two pixels. Again, the error seems quite reasonable, and the images track each other well overall.
Finally, the runtime of the Matlab version is roughly 11 seconds, compared to about 35 seconds for the shell script. This is most likely due to the increased disk activity needed for the shell script, as each utility in the script has to load and parse the intermediate files from previous stages. Since the Matlab port is comparable to the shell script, only it is used in the encoder comparisons on the next page.