Hey
at first, I will try to explain what i want to do. The idea is to use imageprocessing related functions which are hardware accelerated to calculate the probability of objects in 2d space. So the bitmap will represent the map and low pixel values stand for low probability high values for high probability that there is an object.
...and therefore my question:
How to add, multiply and divide 2 bitmaps of the same size by pixel value? Is there a fast way to do to avoid alot of getpixel & setpixel?
my formular to calculate the new bitmap is (per pixel):
Pixel of two source bitmaps: a, b
Maximum pixel value: max
Source pixel: s
S=A*B/ (A*B+(max-a)*(max-b))
I would appreciate any suggestions
sorry for my english as it is not my first language
Magnus
at first, I will try to explain what i want to do. The idea is to use imageprocessing related functions which are hardware accelerated to calculate the probability of objects in 2d space. So the bitmap will represent the map and low pixel values stand for low probability high values for high probability that there is an object.
...and therefore my question:
How to add, multiply and divide 2 bitmaps of the same size by pixel value? Is there a fast way to do to avoid alot of getpixel & setpixel?
my formular to calculate the new bitmap is (per pixel):
Pixel of two source bitmaps: a, b
Maximum pixel value: max
Source pixel: s
S=A*B/ (A*B+(max-a)*(max-b))
I would appreciate any suggestions
sorry for my english as it is not my first language
Magnus