Ask Your Question

Revision history [back]

The line iterator iterates through a raster line, which means a line as it's drawn. Therefore, you could iterate more pixels than a "mathematical discrete line" (ie count != size of discrete line). But if you want to change/count/... pixels affected by the line drawing, you are using the right iterator. Otherwise, look at the discrete line iteration (not implemented in OpenCV to the best of my knowledge).

The 4-connected and 8-connected lines are respectively a line where the anti-aliasing is computed using 4 neighbors or 8 neighbors. It's usual pixel's neighborhood.