ReprojectImage
The node that converts between pinhole, fisheye, and equirectangular — and moves your camera
- image
- mask
- transform_matrix
- reprojected image
- reprojected mask
This is the node that started the pack, honestly. ReprojectImage takes any image and remaps it between the three camera projection models the pack supports - PINHOLE, FISHEYE, and EQUIRECTANGULAR - while optionally applying a 4×4 camera transform to rotate or move the view. If you've ever stared at a 360° equirectangular panorama and wondered what it would look like through a normal camera lens, or wished a fisheye view covered a wider field, this is the tool. It's the geometric heart that every other node in camera-comfyUI leans on - OutpaintAnyProjection, the point cloud pipeline, and the stereo workflow all call it internally.
The mental model: you're re-sampling the image as if seen through a different lens, from a possibly different angle. A pinhole image is a flat rectangle with a single field of view; a fisheye is a circular projection with extreme distortion at the edges; an equirectangular maps longitude/latitude onto a 2:1 rectangle (your classic 360° panorama). ReprojectImage moves pixels between those coordinate systems and tells you, via a mask, which output pixels had real source data and which are holes.
The inputs that matter
- image - the source,
[B,H,W,C]. - input_projection / output_projection - pick from PINHOLE / FISHEYE / EQUIRECTANGULAR. The single most important choice you'll make.
- input_horiszontal_fov / output_horiszontal_fov - note the pack's spelling; it's how wide each view is, in degrees. Going pinhole → equirectangular with a 360° output fov is the classic "unfold to panorama" move.
- output_width / output_height - 0 means "keep the input size"; otherwise set the target resolution.
- feathering - how many pixels to feather the mask edges (default 40), so seams blend instead of hard-cutting when you composite.
- transform_matrix - an optional
MAT_4X4camera transform. Feed it a rotation and you've panned the view before reprojecting. - inverse - invert that matrix (camera-to-world instead of world-to-camera), useful when a pipeline hands you poses in the other convention.
- mask - optional; pass your own mask and it gets reprojected with the image.
What comes out
Two outputs: reprojected image (BHWC) and reprojected mask (HW), where 1.0 means "this pixel has valid source data." That mask is your honesty signal - when you're outpainting or stitching, it tells you exactly where the geometry has holes that need filling. For FISHEYE output the node also applies a circular mask so the rounded lens shape is respected.
How it works
Internally it builds a sampling grid: for every output pixel, it computes where that ray came from in the input image (through the projection math, with your transform applied) and samples with grid_sample. A border of transparent pixels around the input means anything sampling outside the source comes back as a hole rather than a smear.
Installing it
It's in camera-comfyUI. Manager → Custom Nodes Manager → search camera-comfyUI → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Alexankharin/camera-comfyUI.git
cd camera-comfyUI && python install.py
No optional dependencies needed for this node.
Common issues
- Everything comes out stretched - you almost certainly have the input fov wrong. A pinhole image has a specific horizontal fov; guess wrong and the reprojection warps.
- Black holes everywhere - the input projection doesn't cover the output field of view. Going pinhole 90° → equirectangular 360° will leave 75% empty unless you outpaint first. That's not a bug; that's the gap
OutpaintAnyProjectionexists to fill. - Typo in the field name -
input_horiszontal_fov(with the stray "z") is intentional; that's what the schema calls it.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| input_horiszontal_fov | FLOAT | 900–360 | — |
| output_horiszontal_fov | FLOAT | 900–360 | — |
| input_projection | COMBO | input projection type | |
| output_projection | COMBO | output projection type | |
| output_width | INT | 00–16384 | — |
| output_height | INT | 00–16384 | — |
| inverse | BOOLEAN | false | — |
| feathering | INT | 400–16384 | — |
| maskopt | MASK | — | |
| transform_matrixopt | MAT_4X4 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| reprojected image | IMAGE | — |
| reprojected mask | MASK | — |