Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
get_camera_pose_teabox Namespace Reference

Functions

 save_depth_M_color_file (prefix_data, scene, camera_name_color, camera_name_depth)
 get_object_pose_in_world (object_name)
 get_camera_pose (camera_name, object_name)
 save_pose (filename, pose)
 save_color_camera_pose (prefix, scene, camera_name, object_name)
 get_intrinsics (camera_name)
 save_intrinsics (filename, camera_name, w, h, p_x, p_y, u_0, v_0)

Variables

str camera_name_color = "Camera_L"
str camera_name_depth = "Camera_R"
str object_name = "teabox"
str prefix_data = "/tmp/teabox/"
str prefix_pose = prefix_data + "ground-truth/"
str prefix_color_images = prefix_data + "color/"
str prefix_depth_images = prefix_data + "depth/"
str images_suffix = "JPEG"
 scene = bpy.context.scene
 color_w
 color_h
 color_p_x
 color_p_y
 color_u_0
 color_v_0
str filename_color_intrinsics = prefix_data + camera_name_color + ".xml"
 depth_w
 depth_h
 depth_p_x
 depth_p_y
 depth_u_0
 depth_v_0
str filename_depth_intrinsics = prefix_data + camera_name_depth + ".xml"
 filepath
 file_format
 write_still
tuple filename_color_R = (prefix_color_images + '%04d' + "_R" + scene.render.file_extension) % step
tuple filename_depth_L = (prefix_depth_images + 'Image%04d' + "_L" + ".exr") % step

Function Documentation

◆ get_camera_pose()

get_camera_pose_teabox.get_camera_pose ( camera_name,
object_name )

Return the object pose in the camera frame as an homogenous matrices.

Parameters
[in]camera_nameString corresponding to the name of the camera to consider.
[in]object_nameString corresponding to the name of the object to consider.
Returns
The 4-by-4 homogeneous matrix corresponding to c_M_o.

Definition at line 36 of file get_camera_pose_teabox.py.

References get_object_pose_in_world().

Referenced by save_color_camera_pose().

◆ get_intrinsics()

get_camera_pose_teabox.get_intrinsics ( camera_name)

Save camera intrinsics in xml.

Parameters
[in]camera_nameString corresponding to the name of the camera to consider.

Definition at line 109 of file get_camera_pose_teabox.py.

◆ get_object_pose_in_world()

get_camera_pose_teabox.get_object_pose_in_world ( object_name)

Return the object pose in the world frame w_M_o.

Parameters
[in]object_nameString corresponding to the name of the object to consider.
Returns
The 4-by-4 homogeneous matrix corresponding to w_M_object.

Definition at line 23 of file get_camera_pose_teabox.py.

Referenced by get_camera_pose(), and save_depth_M_color_file().

◆ save_color_camera_pose()

get_camera_pose_teabox.save_color_camera_pose ( prefix,
scene,
camera_name,
object_name )

Save homogeneous transformation from camera to object frames (cMo).

Parameters
[in]prefixString corresponding to the folder name that will contain the saved poses.
[in]sceneScene handler.
[in]camera_nameString corresponding to the name of the camera to consider.
[in]object_nameString corresponding to the name of the object to track.

Definition at line 95 of file get_camera_pose_teabox.py.

References get_camera_pose(), and save_pose().

◆ save_depth_M_color_file()

get_camera_pose_teabox.save_depth_M_color_file ( prefix_data,
scene,
camera_name_color,
camera_name_depth )

Save depth_M_color.txt file.

Parameters
[in]prefix_dataString corresponding to the folder where depth_M_color.txt file has to be saved.
[in]sceneScene handler.
[in]camera_name_colorString corresponding to the name of the color camera to consider.
[in]camera_name_depthString corresponding to the name of the depth camera to consider.

Definition at line 6 of file get_camera_pose_teabox.py.

References get_object_pose_in_world(), and save_pose().

◆ save_intrinsics()

get_camera_pose_teabox.save_intrinsics ( filename,
camera_name,
w,
h,
p_x,
p_y,
u_0,
v_0 )

Save camera intrinsics in xml.

Parameters
[in]filenameName of the file that will contain the intrinsics in xml format.
[in]camera_nameCamera name.
[in]w,hImage size.
[in]p_x,p_yRatio between the focal length and the size of the pixel.
[in]u_0,v_0Coordinates of the principal point.

Definition at line 144 of file get_camera_pose_teabox.py.

◆ save_pose()

get_camera_pose_teabox.save_pose ( filename,
pose )

Save pose in a .txt file.

Parameters
[in]filenameString corresponding to the file name that will contain the saved pose.
[in]poseObject pose to save as a 4-by-4 homogeneous matrix.

Definition at line 61 of file get_camera_pose_teabox.py.

Referenced by save_color_camera_pose(), and save_depth_M_color_file().

Variable Documentation

◆ camera_name_color

str get_camera_pose_teabox.camera_name_color = "Camera_L"

Definition at line 174 of file get_camera_pose_teabox.py.

◆ camera_name_depth

str get_camera_pose_teabox.camera_name_depth = "Camera_R"

Definition at line 175 of file get_camera_pose_teabox.py.

◆ color_h

get_camera_pose_teabox.color_h

Definition at line 195 of file get_camera_pose_teabox.py.

◆ color_p_x

get_camera_pose_teabox.color_p_x

Definition at line 195 of file get_camera_pose_teabox.py.

◆ color_p_y

get_camera_pose_teabox.color_p_y

Definition at line 195 of file get_camera_pose_teabox.py.

◆ color_u_0

get_camera_pose_teabox.color_u_0

Definition at line 195 of file get_camera_pose_teabox.py.

◆ color_v_0

get_camera_pose_teabox.color_v_0

Definition at line 195 of file get_camera_pose_teabox.py.

◆ color_w

get_camera_pose_teabox.color_w

Definition at line 195 of file get_camera_pose_teabox.py.

◆ depth_h

get_camera_pose_teabox.depth_h

Definition at line 199 of file get_camera_pose_teabox.py.

◆ depth_p_x

get_camera_pose_teabox.depth_p_x

Definition at line 199 of file get_camera_pose_teabox.py.

◆ depth_p_y

get_camera_pose_teabox.depth_p_y

Definition at line 199 of file get_camera_pose_teabox.py.

◆ depth_u_0

get_camera_pose_teabox.depth_u_0

Definition at line 199 of file get_camera_pose_teabox.py.

◆ depth_v_0

get_camera_pose_teabox.depth_v_0

Definition at line 199 of file get_camera_pose_teabox.py.

◆ depth_w

get_camera_pose_teabox.depth_w

Definition at line 199 of file get_camera_pose_teabox.py.

◆ file_format

get_camera_pose_teabox.file_format

Definition at line 211 of file get_camera_pose_teabox.py.

◆ filename_color_intrinsics

str get_camera_pose_teabox.filename_color_intrinsics = prefix_data + camera_name_color + ".xml"

Definition at line 196 of file get_camera_pose_teabox.py.

◆ filename_color_R

tuple get_camera_pose_teabox.filename_color_R = (prefix_color_images + '%04d' + "_R" + scene.render.file_extension) % step

Definition at line 219 of file get_camera_pose_teabox.py.

◆ filename_depth_intrinsics

str get_camera_pose_teabox.filename_depth_intrinsics = prefix_data + camera_name_depth + ".xml"

Definition at line 200 of file get_camera_pose_teabox.py.

◆ filename_depth_L

tuple get_camera_pose_teabox.filename_depth_L = (prefix_depth_images + 'Image%04d' + "_L" + ".exr") % step

Definition at line 226 of file get_camera_pose_teabox.py.

◆ filepath

get_camera_pose_teabox.filepath

Definition at line 210 of file get_camera_pose_teabox.py.

◆ images_suffix

str get_camera_pose_teabox.images_suffix = "JPEG"

Definition at line 181 of file get_camera_pose_teabox.py.

◆ object_name

str get_camera_pose_teabox.object_name = "teabox"

Definition at line 176 of file get_camera_pose_teabox.py.

◆ prefix_color_images

str get_camera_pose_teabox.prefix_color_images = prefix_data + "color/"

Definition at line 179 of file get_camera_pose_teabox.py.

◆ prefix_data

str get_camera_pose_teabox.prefix_data = "/tmp/teabox/"

Definition at line 177 of file get_camera_pose_teabox.py.

◆ prefix_depth_images

str get_camera_pose_teabox.prefix_depth_images = prefix_data + "depth/"

Definition at line 180 of file get_camera_pose_teabox.py.

◆ prefix_pose

str get_camera_pose_teabox.prefix_pose = prefix_data + "ground-truth/"

Definition at line 178 of file get_camera_pose_teabox.py.

◆ scene

get_camera_pose_teabox.scene = bpy.context.scene

Definition at line 191 of file get_camera_pose_teabox.py.

◆ write_still

get_camera_pose_teabox.write_still

Definition at line 212 of file get_camera_pose_teabox.py.