imgproc/intersection: fix loop index