I defined the camera prim as below and generated the rgb and depth images using the render product.
I want to get a camera intrinsic matrix, is there a way?
I can use the get_intrinsics_matrix() function with the Camera class, but I don’t know how to get it if I define it as prim.
import omni.replicator.core as rep
from omni.isaac.core.utils import prims
self.camera = prims.create_prim(
prim_path="/World/Camera",
prim_type="Camera",
position= np.array([0, 0, 0.85]),
orientation= np.array([1, 0, 0, 0]),
attributes={
"focusDistance": 1,
"focalLength": 24,
"horizontalAperture": 20.955,
"verticalAperture": 15.2908,
"clippingRange": (0.01, 1000000),
"clippingPlanes": np.array([1.0, 0.0, 1.0, 1.0]),
},
)
self.render_product = rep.create.render_product(prims.get_prim_path(self.camera), resolution=RESOLUTION)
self.rgb = rep.AnnotatorRegistry.get_annotator("rgb")
self.depth = rep.AnnotatorRegistry.get_annotator("distance_to_camera")
self.rgb.attach(self.render_product)
self.depth.attach(self.render_product)