Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-186

Camera Intrinsics Apply

Problem

Project a 3D camera-space point to pixel coordinates.

Given point [X, Y, Z] and the 3x3 intrinsic matrix K, return [u, v] = K * [X / Z, Y / Z, 1] rounded to 4 decimal places.

Test cases

case 1
in: [[1,2,4],[[1,0,0],[0,1,0],[0,0,1]]]
expected: [0.25,0.5]
case 2
in: [[1,2,4],[[100,0,50],[0,100,40],[0,0,1]]]
expected: [75,90]
case 3
in: [[0,0,2],[[100,0,50],[0,100,40],[0,0,1]]]
expected: [50,40]
Starter codePython
def project_point(point, K):
    # Your code here
    pass

3 test cases · run your code against them in the editor