How to use the kornia.PinholeCamera.from_parameters function in kornia

To help you get started, we’ve selected a few kornia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kornia / kornia / test / geometry / warp / test_depth_warper.py View on Github external
def _create_pinhole_pair(self, batch_size):
        # prepare data
        fx, fy = 1., 1.
        height, width = 3, 5
        cx, cy = width / 2, height / 2
        tx, ty, tz = 0, 0, 0

        # create pinhole cameras
        pinhole_src = kornia.PinholeCamera.from_parameters(
            fx, fy, cx, cy, height, width, tx, ty, tz, batch_size)
        pinhole_dst = kornia.PinholeCamera.from_parameters(
            fx, fy, cx, cy, height, width, tx, ty, tz, batch_size)
        return pinhole_src, pinhole_dst
github kornia / kornia / test / geometry / warp / test_depth_warper.py View on Github external
def _create_pinhole_pair(self, batch_size):
        # prepare data
        fx, fy = 1., 1.
        height, width = 3, 5
        cx, cy = width / 2, height / 2
        tx, ty, tz = 0, 0, 0

        # create pinhole cameras
        pinhole_src = kornia.PinholeCamera.from_parameters(
            fx, fy, cx, cy, height, width, tx, ty, tz, batch_size)
        pinhole_dst = kornia.PinholeCamera.from_parameters(
            fx, fy, cx, cy, height, width, tx, ty, tz, batch_size)
        return pinhole_src, pinhole_dst