doc error at cascade_classification.html [closed]
I believe there may be an error in the docs here . In the fifth paragraph, second sentence
"For example, in the case of the third line feature (2c) the response is calculated as the difference between the sum of image pixels under the rectangle covering the whole feature (including the two white stripes and the black stripe in the middle) and the sum of the image pixels under the black stripe multiplied by 3 in order to compensate for the differences in the size of areas."
I think the "multiplied by 3" should be "multiplied by 2" since the black area was counted as white once, so it must be subtracted one time to arrive at the sum of the two white areas, and then must be subtracted again to get white areas minus black areas, in total then requiring subtraction twice and not thrice.
I think if the code calculates the difference between "the sum of image pixels under the rectangle covering the whole feature (including the two white stripes and the black stripe in the middle)" and something else, then it is not implementing Haar-like features correctly (basd on my understanding of Haar-like features). So it may be more serious than a documentation issue. The correct Haar-like feature value would be the white area's sum minus 2x the black area's sum (2x because the white area is 2x the size). Or more generally, for any feature: (white sum / white area) - (black sum / black area). The sum of whole feature area (black + white) is not relevant.