This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Fast dark picture subtraction

Hi,
I'm searching for a fast way to substract a dark image from another image.
If the dark image pixel value is greater than the corresponding image pixel, the resulting image pixel should be zero. Otherwise, it should be simply substracted.

Are there special functions for doing this job?

I got an AT91SAM9260 processor and the image data is 10bit depth, laying in a 16-bit array.

Many thank,
Stefan

Parents Reply Children
  • I suppose the answer is hand-crafted assembly code.

    Possibly, but the compiler should be able to take care of much of the necessary optimization. At least that's my experience - I tried beating the compiler with hand-crafted assembly in a similar scenario (by maximizing register usage and memory throughput by using load/store multiple instructions), and the compiler still ended up ahead.

    However, some things (like manually unrolling the loop, at least partially) might still have to be done by hand.