Overview
The Camera Control Interface enables precise specification of camera trajectories for video generation in WorldStereo. This interface allows you to define camera poses, movements, and parameters that guide the video generation process while maintaining 3D consistency.Camera Trajectory Specification
CameraTrajectory
Define a camera trajectory for video generation.A sequence of camera poses defining the trajectory. Each pose specifies the camera position and orientation at a specific frame.
Total number of frames to generate along the trajectory.
Interpolation method between poses. Options:
linear: Linear interpolationspline: Smooth spline interpolationbezier: Bezier curve interpolation
Frames per second for the generated video.
CameraPose
Represents a single camera pose in 3D space.Camera position in 3D space as
[x, y, z] coordinates.Camera orientation. Can be specified as:
- Quaternion:
[w, x, y, z] - Euler angles:
{"roll": float, "pitch": float, "yaw": float}(in degrees) - Rotation matrix: 3x3 nested list
Frame index where this pose should be applied.
Field of view in degrees.
Camera Intrinsics
CameraIntrinsics
Define camera intrinsic parameters.Focal length in pixels.
Principal point coordinates as
[cx, cy].Image width in pixels.
Image height in pixels.
Lens distortion coefficients
[k1, k2, p1, p2, k3].Usage Examples
Basic Camera Trajectory
Circular Camera Motion
Custom Intrinsics
Trajectory Utilities
load_trajectory()
Load camera trajectory from file.Path to trajectory file. Supported formats:
.json: JSON trajectory specification.txt: COLMAP-style camera poses.xml: OpenCV camera calibration format
Format specification. Auto-detected from file extension if not provided.
Loaded camera trajectory object.
save_trajectory()
Save camera trajectory to file.Camera trajectory to save.
Output file path.
Output format (
json, colmap, or opencv).interpolate_poses()
Interpolate between camera poses.Starting camera pose.
Ending camera pose.
Number of interpolation steps.
Interpolation method for rotations:
slerp: Spherical linear interpolation (recommended)linear: Linear interpolation
List of interpolated camera poses.
Example Usage
Coordinate System
WorldStereo uses a right-handed coordinate system:
- X-axis: Right
- Y-axis: Up
- Z-axis: Backward (into the scene)
Best Practices
Smooth trajectories: Use spline interpolation with sufficient keyframes for smooth camera motion.Consistent scale: Maintain consistent position scales across poses to ensure proper geometric memory integration.Reasonable motion: Avoid extreme camera velocities between frames to maintain video quality and 3D consistency.Frame spacing: Space keyframes 10-30 frames apart for optimal interpolation quality.
Related
- 3D Reconstruction - Reconstruct 3D scenes from generated videos
- Camera-Guided Generation - Guide for camera-controlled video generation
- Global Geometric Memory - Understanding camera trajectory integration