Nodes/comfyui_cv/CV Camera Matrix
ComfyUI Node

CV Camera Matrix

Builds the 3x3 pinhole intrinsic matrix K = [[fx, 0, cx], [0, fy, cy], [0, 0, 1]] that cv2.solvePnP, projectPoints, undistort, stereoRectify, initUndistortRectifyMap... require - a 3x3 you cannot type with 'CV Scalar'. Use it for a known or approximate camera (a common rough guess is fx = fy = image width and (cx, cy) = the image center); for an accurate matrix calibrate with 'Calibrate Camera (Chessboard)' instead.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Camera Matrix
    • camera_matrix
    fx1000.00
    fy1000.00
    cx320.00
    cy240.00
    Categoryimage/CV/low-level

    Inputs (4)

    NameTypeDefaultDescription
    fxFLOAT1000.000.001–10000000Focal length along X in pixels.
    fyFLOAT1000.000.001–10000000Focal length along Y in pixels (usually = fx).
    cxFLOAT320.00-1000000–1000000Principal point X in pixels (usually image width / 2).
    cyFLOAT240.00-1000000–1000000Principal point Y in pixels (usually image height / 2).

    Outputs (1)

    NameTypeDescription
    camera_matrixNPARRAY3x3 float64 intrinsic matrix K.