# CameraTracker

> Track Features, then Solve Camera.

Track Features, then Solve Camera. Rejected tracks (error above max track error) are left out; Delete Rejected removes them. Export makes a Camera, point cloud, Scene or Scene+ (with ScanlineRender), or a LensDistortion.

| Node | CameraTracker |
|---|---|
| Menu | Transform › CameraTracker |
| **Names in each format** | |
| .oink comp (JSON) | `"type": "OC_N_cameratracker"` |
| .nk script | `CameraTracker` ([how .nk import works](/docs/nuke-users/nk-import)) |
| Python | `nuke.createNode("CameraTracker")` |
| Assistant (MCP) | `create_node(type="CameraTracker")` |
| Tab search | `cameratracker`, or its initials `ct` |

![CameraTracker properties](/shots/nodes/cameratracker@2x.webp)

## Inputs and outputs

| Port | Name | Type |
|---|---|---|
| input 0 | Source | image |
| input 1 | Mask | image |
| output 0 | Image | image |

## Knobs

Panel tab **Cameratracker**, in panel order.

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `number_features` | number of features | float | `150` | 8 to 2000 (integer) | `number_features` |  |
| `detection_threshold` | detection threshold | float | `0.001` | 0 to 0.05 | `detection_threshold` |  |
| `feature_separation` | feature separation | float | `20` | 2 to 200 (integer) | `feature_separation` |  |
| `track_range` | range | menu | `input` | input, custom |  |  |
| `range_first` | first | float | `1` | -100000 to 100000 (integer) |  |  |
| `range_last` | last | float | `100` | -100000 to 100000 (integer) |  |  |
| `mask_mode` | mask (white = ignore) | menu | `none` | none (None), source_alpha (Source Alpha), source_inverted_alpha (Source Inverted Alpha), mask_luminance (Mask Luminance), mask_inverted_luminance (Mask Inverted Luminance), mask_alpha (Mask Alpha), mask_inverted_alpha (Mask Inverted Alpha) |  |  |
| `proxy` | track proxy | menu | `auto` | auto (Auto (<= 2K)), full (Full), half (Half), quarter (Quarter) |  |  |
| `ai_assist` | AI assist (camera prior) | bool | `false` |  |  |  |
| `camera_motion` | camera motion | menu | `free` | free (Free Camera), rotation (Rotation Only) |  |  |
| `focal_length_type` | focal length | menu | `unknown` | known (Known), approximate (Approximate), unknown (Unknown) |  |  |
| `focal_length` | length (mm) | float | `35` | 1 to 500 | `focal_length` |  |
| `film_back_size` | film back size | vector ×2 | `24.576, 18.672` | 1 to 80 |  |  |
| `lens_distortion` | lens distortion | menu | `no_lens_distortion` | no_lens_distortion (No Lens Distortion), unknown (Unknown Lens), known (Known (k1, k2)) |  |  |
| `k1` | k1 | float | `0` | -0.5 to 0.5 | `k1` |  |
| `k2` | k2 | float | `0` | -0.5 to 0.5 | `k2` |  |
| `min_length` | min length | float | `5` | 2 to 100 (integer) | `min_length` |  |
| `max_track_error` | max track error | float | `3` | 0 to 20 | `max_track_error` |  |
| `auto_reject` | auto reject outliers | bool | `true` |  |  |  |
| `solve_error` | solve error (px) | float | `0` | 0 to 5 |  |  |
| `focal_solved` | solved focal (mm) | float | `0` | 0 to 500 |  |  |

### Other knobs (Python, .nk and the assistant; not on the panel)

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `gl_color` | Viewer Controls Color | float ×3 | `0, 0, 0` | 0 to 1 |  |  |
| `postage_stamp_frame` | Static Frame | int | `1` | -2147483648 to 2147483647 |  |  |
| `lifetimeStart` | Lifetime Start | int | `0` | -2147483648 to 2147483647 |  |  |
| `lifetimeEnd` | Lifetime End | int | `100` | -2147483648 to 2147483647 |  |  |
| `useLifetime` | Use Lifetime | boolean | `false` |  |  |  |
| `cached` | Cached | boolean | `false` |  |  |  |
| `bookmark` | Bookmark | boolean | `false` |  |  |  |
| `dope_sheet` | Dope Sheet | boolean | `false` |  |  |  |
| `clone_group` | Clone Group | string |  |  |  |  |
| `link_source` | Link Source | string |  |  |  |  |
| `link_overrides` | Link Overrides | string |  |  |  |  |
| `split_views` | Split Views | string |  |  |  |  |
| `num_tracks` | Tracks | int | `0` | -2147483648 to 2147483647 |  |  |
| `num_rejected` | Rejected | int | `0` | -2147483648 to 2147483647 |  |  |

## Knob names in .nk scripts

| .nk knob | Knob here |
|---|---|
| `numberFeatures` | `number_features` |
| `detectionThreshold` | `detection_threshold` |
| `featureSeparation` | `feature_separation` |
| `minLength` | `min_length` |
| `maxTrackError` | `max_track_error` |
| `focalLength` | `focal_length` |

Other .nk knobs use the same name here. See [.nk import](/docs/nuke-users/nk-import).


---
Sources: opencomp_core/nodes/tracking/camera_tracker.py, opencomp_electron/src/components/properties/knobSchema.ts, opencomp_core/nodes/help/cameratracker.md, opencomp_core/nk/mapping.py
