Giter Club home page Giter Club logo

fuzailpalnak / projkit Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 58 KB

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.

License: Apache License 2.0

Python 100.00%
2d-projections 3d-projection camera-projection point-cloud segmentation image-point-cloud-correspondance

projkit's Introduction

projkit

PyPI Downloads Documentation Status

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)

Documentation

View the documentation for the project here.

projkit's People

Contributors

fuzailpalnak avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

5l1v3r1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.