Ask Your Question
2

What does LINE_4, LINE_8 mean?

asked Aug 31 '19

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?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Sep 1 '19

LBerger gravatar image

updated Sep 1 '19

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

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Aug 31 '19

Seen: 4,157 times

Last updated: Sep 01 '19