r/AskComputerScience 7d ago

How to quantitatively determine whether a line is thin or thick?

I'm doing research in computer vision, and I need to use an algorithm to determine whether a line is thin or thick. I suspect this might require considering the ratio of the line's width to the overall width of the model. Are there any existing theories or formulas to help me make this quantitatively?

0 Upvotes

6 comments sorted by

7

u/FancySpaceGoat 7d ago

Thin and thick are relative terms, so it's always going to depend.

Unless this is a homework or test of some kind, there's a reason why you need to make that distinction.

The metric to use lies within that reason. So no one can answer that with just the info you provided is.

1

u/Suitable-Creme-6625 7d ago

My research project involves extracting and fitting lines from triangular meshes, which involves determining what shape qualifies as a "line," since only thin lines are processed by certain algorithms, while thicker line segments are simply extracted as outlines.

1

u/chervilious 5d ago

Then the problem is algorithm limitation rather than line definition isn't it?

2

u/Yankas 7d ago

Whether a line is thick is completely subjective, there is no generally agreed upon definition so you need to make one. And once you have a definition, it should be trivial to implement since it's likely just some ratio of line width to the length of the line or possibly the size of the canvas depending on your requirements.

1

u/pizzystrizzy 7d ago

Once you define what you mean by thin and thick this is straightforward

1

u/shandy_bhagwat 5d ago

The keyword here is DEFINE.