Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuzailpalnak/projkit
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.
https://github.com/fuzailpalnak/projkit
2d-projections 3d-projection camera-projection image-point-cloud-correspondance point-cloud segmentation
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/fuzailpalnak/projkit
- Owner: fuzailpalnak
- License: apache-2.0
- Created: 2023-08-03T10:05:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-20T19:02:29.000Z (over 1 year ago)
- Last Synced: 2024-11-08T18:54:09.853Z (3 months ago)
- Topics: 2d-projections, 3d-projection, camera-projection, image-point-cloud-correspondance, point-cloud, segmentation
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# projkit
![PyPI](https://img.shields.io/pypi/v/projkit)
[![Downloads](https://static.pepy.tech/badge/projkit)](https://pepy.tech/project/projkit)
[![Documentation Status](https://readthedocs.org/projects/projkit-docs/badge/?version=latest)](https://projkit-docs.readthedocs.io/en/latest/?badge=latest)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
```sh
pip install projkit
```## Features
- **Camera Projection to Image Coordinates**: Easily project point cloud data onto image coordinates using provided camera parameters.
```python
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_dimic, 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.
```python
from projkit.imutils import intersection
binary_mask = cv2.imread(file, cv2.IMREAD_GRAYSCALE)
binary_mask[binary_mask > 0.50] = 255intersection_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.
```python
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.
```python
from projkit.imutils import nn_interpolationquery = 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:
```python
from projkit.imutils import nn_interpolation
from projkit.pyutils import batch_genquery = 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](https://projkit-docs.readthedocs.io/en/latest/).[comment]: <> (## Installation)
[comment]: <> (To use **projkit**, simply install it using pip:)
[comment]: <> (```sh)
[comment]: <> (pip install projkit)
[comment]: <> (```)