wingtorres / morphometrix

A PyQt5 Gui for photogrammetry and morphometry
MIT License
17 stars 7 forks source link

Inaccuracy measuring diagonal w/ Bezier ON #7

Closed KCBierlich closed 1 year ago

KCBierlich commented 2 years ago

I'm using the updated version of the code that Clara Bird helped with where the Bezier curve is not applied to a measurement line with only two points, even if it is selected ON. In other words, the Bezier curve is applied only to a measurement with 3 or more points, whether it is check ON or OFF.

There seems to be inaccuracy when an straight object is measured on a diagonal line as opposed to horizontal or vertical.

I did a test where I measured a A) horizontal, B) vertical, and C) diagonal line four times:

1) Bezier ON w/ 2 pts in line 2) Bezier OFF w/ 2 pts in line 3) Bezier ON w/ 3 pts in line 4) Bezier OFF w/ 3 pts in line

In this test, the actual measurement doesn't matter, just that the result are the same for each of the four measurements for horizontal, vertical, and diagonal.

For the horizontal and vertical lines, each of the four measurements (2 and 3 pts in line) were essentially identical (within 0.01). However, for the diagonal line, all were identical except measurement 3) "Bezier ON w/ 3 pts", which was larger (5.41 instead of 5.11) . So, it appears that the Bezier line may be affected by the angle of the measurement line relative to the pixels, with 45 degrees in theory having the potential for the greatest difference.

Is there a way to fix this so that the Bezier curve does not add error to the measurement when at a diagonal?

I attached is an image and MorphoMetriX output for horizontal, vertical, and diagonal measurements.

Thanks! KC

Diagonal_Measurement_Inaccuracy-measurements Diagonal_Measurement_Inaccuracy.csv Diagonal_Measurement_Inaccuracy