aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-04-24 17:35:35 +0200
committerThéo de la Hogue2023-04-24 17:35:35 +0200
commit13d597dd3ce8366b11537901223fa9f16963ae87 (patch)
tree5a480d54869c0947cf02d7d108b0705ebf689a84 /src
parent8feb3ebbe35ccea9620bdcc1dbe93386d5339718 (diff)
downloadargaze-13d597dd3ce8366b11537901223fa9f16963ae87.zip
argaze-13d597dd3ce8366b11537901223fa9f16963ae87.tar.gz
argaze-13d597dd3ce8366b11537901223fa9f16963ae87.tar.bz2
argaze-13d597dd3ce8366b11537901223fa9f16963ae87.tar.xz
Ignoring places out of field.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoScene.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py
index f5660dc..70ce236 100644
--- a/src/argaze/ArUcoMarkers/ArUcoScene.py
+++ b/src/argaze/ArUcoMarkers/ArUcoScene.py
@@ -613,7 +613,7 @@ class ArUcoScene():
cv.line(frame, tuple(axisPoints[3].ravel()), tuple(axisPoints[0].ravel()), (n,n,f), 6) # X (red)
cv.line(frame, tuple(axisPoints[3].ravel()), tuple(axisPoints[1].ravel()), (n,f,n), 6) # Y (green)
cv.line(frame, tuple(axisPoints[3].ravel()), tuple(axisPoints[2].ravel()), (f,n,n), 6) # Z (blue)
-
+
# Draw place
placePoints = (T + numpy.float32([R.dot([-l, -l, 0]), R.dot([l, -l, 0]), R.dot([l, l, 0]), R.dot([-l, l, 0])])).reshape(-1, 3)
placePoints, _ = cv.projectPoints(placePoints, self._rotation, self._translation, numpy.array(K), numpy.array(D))
@@ -624,8 +624,6 @@ class ArUcoScene():
cv.line(frame, tuple(placePoints[2].ravel()), tuple(placePoints[3].ravel()), (f,f,f), 3)
cv.line(frame, tuple(placePoints[3].ravel()), tuple(placePoints[0].ravel()), (f,f,f), 3)
- except cv.error as e:
-
- print('ArUcoScene.draw_places: ', e)
- print('T: ', T)
- print('R: ', R)
+ # Ignore errors due to out of field places: their coordinate are larger than int32 limitations.
+ except cv.error:
+ pass