tiny adaptations of the package
This commit is contained in:
parent
c3b37dfe7d
commit
16873702d4
@ -1,2 +1,2 @@
|
|||||||
from .image_marker import ImageMarker, MarkerTask
|
from .image_marker import ImageMarker, MarkerTask
|
||||||
from .tracking_result import TrackingResult
|
from .tracking_result import TrackingResult, coordinate_transformation
|
@ -30,6 +30,7 @@ class ImageMarker:
|
|||||||
print("Reading frame: %i" % frame_counter, end="\r")
|
print("Reading frame: %i" % frame_counter, end="\r")
|
||||||
success, frame = video.read()
|
success, frame = video.read()
|
||||||
frame_counter += 1
|
frame_counter += 1
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
self._fig.gca().imshow(frame)
|
self._fig.gca().imshow(frame)
|
||||||
else:
|
else:
|
||||||
|
@ -14,6 +14,10 @@ y_factor = 0.81/height # Einheit m/px
|
|||||||
center = (np.round(x_0 + width/2), np.round(y_0 + height/2))
|
center = (np.round(x_0 + width/2), np.round(y_0 + height/2))
|
||||||
center_meter = ((center[0] - x_0) * x_factor, (center[1] - y_0) * y_factor)
|
center_meter = ((center[0] - x_0) * x_factor, (center[1] - y_0) * y_factor)
|
||||||
"""
|
"""
|
||||||
|
def coordinate_transformation(position,x_0, y_0, x_factor, y_factor):
|
||||||
|
x = (position[0] - x_0) * x_factor
|
||||||
|
y = (position[1] - y_0) * y_factor
|
||||||
|
return (x, y) #in m
|
||||||
|
|
||||||
class TrackingResult(object):
|
class TrackingResult(object):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user