Ask Your Question

What does LINE_4, LINE_8 mean?

asked 2019-08-31 17:19:06 -0600

If I zoom in on small circles drawn with the following C++ code:

const int radius = 4;
const int thickness = 1;
cv::circle(mat, p1, radius, black, thickness, cv::LINE_4);
cv::circle(mat, p2, radius, black, thickness, cv::LINE_8);
cv::circle(mat, p3, radius, black, thickness, cv::LINE_AA);

I see this:

image description

The anti-alias label I understand. But what exactly does LINE_4 and LINE_8 mean?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2019-09-01 03:39:03 -0600

LBerger gravatar image

updated 2019-09-01 03:48:41 -0600

Using png format to save file there is no problem

Line4 : boundary 4-connexity (discrete topology)

Line8 : boundary 8-connexity

image description

except that i think there is a bug in LINE4... write an issue

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-08-31 17:19:06 -0600

Seen: 3,557 times

Last updated: Sep 01 '19