Skip to content

Commit

Permalink
cleaned DLC output files and added TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianPlum committed Nov 2, 2022
1 parent dcf3b75 commit d49c967
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ def execute(self, context):
200),
1)

# TODO add robust joint angle calculation (for various species)
"""
joint_angles = np.empty(42)
joint_angles_conf = np.empty(42) # report confidence on each joint angle
Expand Down Expand Up @@ -752,7 +753,9 @@ def execute(self, context):
pose_output_file = open(bpy.path.abspath(bpy.context.edit_movieclip.filepath)[
:-4] + "_POSE_" + track.name + ".csv", "w")
# write header line
pose_output_file.write("frame," + pose_joint_header + ",r1_deg,r2_deg,r3_deg,l1_deg,l2_deg,l3_deg\n")
#pose_output_file.write("frame," + pose_joint_header + ",r1_deg,r2_deg,r3_deg,l1_deg,l2_deg,l3_deg\n")
# TODO add robust joint angle calculation
pose_output_file.write("frame," + pose_joint_header + "\n")
for key, value in track_pose.items():
line = key + "," + ",".join(str(e) for e in value.flatten())
pose_output_file.write(line + "\n")
Expand Down

0 comments on commit d49c967

Please sign in to comment.