|
|
@@ -87,7 +87,7 @@ while True:
|
|
|
|
|
|
# Kiểm tra đủ điều kiện
|
|
|
in_center = is_in_center(cx, cy, new_width, new_height)
|
|
|
- within_angle = is_roll_valid(roll) and abs(pitch) < ALLOWED_ANGLE_DEG and abs(yaw) < ALLOWED_ANGLE_DEG
|
|
|
+ within_angle = is_roll_valid(roll)
|
|
|
within_xyz = (
|
|
|
ALLOWED_XYZ_RANGE["x"][0] <= x <= ALLOWED_XYZ_RANGE["x"][1] and
|
|
|
ALLOWED_XYZ_RANGE["y"][0] <= y <= ALLOWED_XYZ_RANGE["y"][1] and
|
|
|
@@ -115,7 +115,7 @@ while True:
|
|
|
# --- Visualization ---
|
|
|
status = marker_states[marker_id]["state"]
|
|
|
color = {"NOT_SPRAYED": (0, 0, 255), "SPRAYING": (0, 255, 255), "SPRAYED": (0, 255, 0)}[status]
|
|
|
-
|
|
|
+
|
|
|
if visualization:
|
|
|
cv2.polylines(frame, [corners], True, color, 2)
|
|
|
cv2.drawFrameAxes(frame, cam_mat, dist_coef, rVec[i], tVec[i], 4, 4)
|