make it possible to get positions outside of grid rect
This commit is contained in:
parent
eea1cee1ec
commit
a69d45f97e
|
@ -10,6 +10,7 @@ import pyqtgraph as pg
|
||||||
|
|
||||||
|
|
||||||
from shapely.geometry import LineString
|
from shapely.geometry import LineString
|
||||||
|
from shapely.affinity import scale
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
|
|
||||||
import aruco
|
import aruco
|
||||||
|
@ -448,8 +449,11 @@ class ArucoEstimator:
|
||||||
row_line_top = a + y_frac * vad
|
row_line_top = a + y_frac * vad
|
||||||
row_line_bottom = b + y_frac * vbc
|
row_line_bottom = b + y_frac * vbc
|
||||||
|
|
||||||
column_line = LineString([column_line_top, column_line_bottom])
|
column_line_orig = LineString([column_line_top, column_line_bottom])
|
||||||
row_line = LineString([row_line_top, row_line_bottom])
|
row_line_orig = LineString([row_line_top, row_line_bottom])
|
||||||
|
|
||||||
|
column_line = scale(column_line_orig, 10, 10)
|
||||||
|
row_line = scale(row_line_orig, 10, 10)
|
||||||
|
|
||||||
int_pt = column_line.intersection(row_line)
|
int_pt = column_line.intersection(row_line)
|
||||||
point_of_intersection = np.array([int_pt.x, int_pt.y])
|
point_of_intersection = np.array([int_pt.x, int_pt.y])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user