Skip to main content

Library designed to simplify camera projection tasks and calculations, particularly when working with image predictions and 3D point cloud data. This library provides functions to effectively incorporate point cloud data with image predictions.

Project description

projkit

Welcome to projkit, a Python library designed to simplify camera projection tasks and calculations, particularly when working with image predictions and 3D point cloud data. This library provides functions to effectively incorporate point cloud data with image predictions.

Installation

pip install projkit

Features

  • Camera Projection to Image Coordinates: Easily project point cloud data onto image coordinates using provided camera parameters.

    from projkit.camops import project_in_2d_with_K_R_t_dist_coeff
    from projkit.imutils import to_image, filter_image_and_world_points_with_img_dim
    
    ic, wc, z = project_in_2d_with_K_R_t_dist_coeff(K, R, t, d, wc)
    ic, wc, z = filter_image_and_world_points_with_img_dim(Nx, Ny, ic, wc)
    
    projection_on_image = to_image(Ny, Nx, ic, wc)
    
  • Intersection with Binary Mask: Determine intersections between projected data and a binary mask.

    from projkit.imutils import intersection
    binary_mask = cv2.imread(file, cv2.IMREAD_GRAYSCALE)
    binary_mask[binary_mask > 0.50] = 255
    
    intersection_img, locations = intersection(binary_mask, ic, wc)
    
  • Identifying Data Holes in Mask: Identify locations in the mask that require interpolation due to missing point cloud data.

    import numpy as np
    from projkit.imutils import difference
    
    _missing_z_values_image = difference(Ny, Nx, ic, wc, binary_mask)
    x, y = np.where(_missing_z_values_image == 255)
    locations = list(zip(y, x))
    
  • Nearest Search Interpolation: Perform nearest search interpolation for dense regions in point cloud data.

    from projkit.imutils import nn_interpolation
    
    query = nn_interpolation(ic, wc)
    points = query.generate_points_for_nn_search(Ny, Nx, binary_mask)
    ic, wc, dist = query.query(points, dist_thresh=15)
    

    For larger datasets, utilize batch processing:

    from projkit.imutils import nn_interpolation
    from projkit.pyutils import batch_gen
    
    query = nn_interpolation(ic, wc)
    points = query.generate_points_for_nn_search(Ny, Nx, binary_mask)
    for i, batch in batch_gen(points, batch_size=500):
        ic, wc, dist = query.query(batch, dist_thresh=15)
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

projkit-0.1.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

projkit-0.1.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file projkit-0.1.2.tar.gz.

File metadata

  • Download URL: projkit-0.1.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for projkit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 47ef524ca49729c411828ed2bca410ef81eb3040a2f1fcfa56cdd97ee3223721
MD5 92009c5c446c3a742b4c43493f748ec8
BLAKE2b-256 60cc64e565758b28f54f0c08bbad8bea5b4e22fa1e32062017ff69031f68e067

See more details on using hashes here.

File details

Details for the file projkit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: projkit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for projkit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 64ac288d678f09b218c31af7bcbcf391807ebe7565b36121e866b53d9bd59324
MD5 a24345afe5291f28d1f7a2cbe7d2251a
BLAKE2b-256 0636343bd0384e9c904e00dc22b7044bc846489c2b16d38af7d8b9b916cb2d1c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page