c# - True pixel quantity -


i know question littel strange need realy help. have algorithme calculate true pixel quantity in binary image. example how work:

binary image :

0 0 1 0 0 1 1 1 1 1 0 1   1 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 0 1 

her result :

18 15 11 8 6 5 16 13 9  7 5 4 11 9  6  5 4 3 5  4  2  2 2 2 2  2  1  1 1 1 

and how work :

result (i,j) = result (i+1, j) + result (i, j+1) - result(i + 1, j + 1) + image(i,j) 

her example 18 value:

18 = 16 + 15 - 13 + 0  

my question : name of algorithm because need more information it?

thank help.

this called integral image, or summed area table. used speedup box filtering, among others. 2d generalization of prefix sum.


Comments

Popular posts from this blog

bash - How do you programmatically add a bats test? -

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

java - Getting exception in JDBC thin driver -