1 | initial version |
your point vec has 6 items, so the largest valid index is 5, and your loop should be:
for (int i = 0; i < 5; i++) // 6-1 because of vec[i+1]
2 | No.2 Revision |
your point vec has 6 items, so the largest valid index is 5, and your loop should be:
for (int i = 0; i < 5; i++) // 6-1 because of vec[i+1]
also:
im += img; // this should be removed !
3 | No.3 Revision |
your point vec has 6 items, so the largest valid index is 5, and your loop should be:
for (int i = 0; i < 5; i++) // 6-1 because of vec[i+1]
also:
im += img; // this should be removed !
! (and use imshow("image", img);)