projkit


Nameprojkit JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/fuzailpalnak/projkit
SummaryLibrary 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.
upload_time2023-08-07 13:20:29
maintainer
docs_urlNone
authorFuzail Palnak
requires_python>=3.6
license
keywords camera projections 3d projections 2d projections point cloud
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```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_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.
  
  ```python
  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.
  
  ```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_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:
  
  ```python
  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)
  ```

[comment]: <> (## Installation)

[comment]: <> (To use **projkit**, simply install it using pip:)

[comment]: <> (```sh)

[comment]: <> (pip install projkit)

[comment]: <> (```)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fuzailpalnak/projkit",
    "name": "projkit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Camera Projections,3d Projections,2d projections,point cloud",
    "author": "Fuzail Palnak",
    "author_email": "fuzailpalnak@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/50/f5/dcd067466f773ee0766b883724a04e5ec05f66bac36d5b003f274755ad96/projkit-0.1.3.tar.gz",
    "platform": null,
    "description": "# projkit\n\nWelcome to **projkit**, a Python library designed to simplify camera projection tasks and calculations,\nparticularly when working with image predictions and 3D point cloud data. \nThis library provides functions to effectively incorporate point cloud data with image predictions.\n\n## Installation\n\n```sh\npip install projkit\n```\n\n## Features\n\n- **Camera Projection to Image Coordinates**: Easily project point cloud data onto image coordinates using provided camera parameters.\n  \n  ```python\n  from projkit.camops import project_in_2d_with_K_R_t_dist_coeff\n  from projkit.imutils import to_image, filter_image_and_world_points_with_img_dim\n\n  ic, wc, z = project_in_2d_with_K_R_t_dist_coeff(K, R, t, d, wc)\n  ic, wc, z = filter_image_and_world_points_with_img_dim(Nx, Ny, ic, wc)\n\n  projection_on_image = to_image(Ny, Nx, ic, wc)\n  ```\n  \n- **Intersection with Binary Mask**: Determine intersections between projected data and a binary mask.\n  \n  ```python\n  from projkit.imutils import intersection\n  binary_mask = cv2.imread(file, cv2.IMREAD_GRAYSCALE)\n  binary_mask[binary_mask > 0.50] = 255\n\n  intersection_img, locations = intersection(binary_mask, ic, wc)\n  ```\n  \n- **Identifying Data Holes in Mask**: Identify locations in the mask that require interpolation due to missing point cloud data.\n  \n  ```python\n  import numpy as np\n  from projkit.imutils import difference\n\n  _missing_z_values_image = difference(Ny, Nx, ic, wc, binary_mask)\n  x, y = np.where(_missing_z_values_image == 255)\n  locations = list(zip(y, x))\n  ```\n  \n- **Nearest Search Interpolation**: Perform nearest search interpolation for dense regions in point cloud data.\n  \n  ```python\n  from projkit.imutils import nn_interpolation\n\n  query = nn_interpolation(ic, wc)\n  points = query.generate_points_for_nn_search(Ny, Nx, binary_mask)\n  ic, wc, dist = query.query(points, dist_thresh=15)\n  ```\n  \n  For larger datasets, utilize batch processing:\n  \n  ```python\n  from projkit.imutils import nn_interpolation\n  from projkit.pyutils import batch_gen\n\n  query = nn_interpolation(ic, wc)\n  points = query.generate_points_for_nn_search(Ny, Nx, binary_mask)\n  for i, batch in batch_gen(points, batch_size=500):\n      ic, wc, dist = query.query(batch, dist_thresh=15)\n  ```\n\n[comment]: <> (## Installation)\n\n[comment]: <> (To use **projkit**, simply install it using pip:)\n\n[comment]: <> (```sh)\n\n[comment]: <> (pip install projkit)\n\n[comment]: <> (```)\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "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.",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/fuzailpalnak/projkit"
    },
    "split_keywords": [
        "camera projections",
        "3d projections",
        "2d projections",
        "point cloud"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6fa225cecbd7f66105d406e0f3853bf4a675a7c6efaaf91ba9bdde4853f5acd",
                "md5": "b9e9e38596e1544be7da469288016451",
                "sha256": "718e0992c8a63a8087093473f088e98e9a0911f6e01f8345916be34a8331d7c6"
            },
            "downloads": -1,
            "filename": "projkit-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9e9e38596e1544be7da469288016451",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11993,
            "upload_time": "2023-08-07T13:20:27",
            "upload_time_iso_8601": "2023-08-07T13:20:27.738429Z",
            "url": "https://files.pythonhosted.org/packages/a6/fa/225cecbd7f66105d406e0f3853bf4a675a7c6efaaf91ba9bdde4853f5acd/projkit-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "50f5dcd067466f773ee0766b883724a04e5ec05f66bac36d5b003f274755ad96",
                "md5": "0e6d0c922403587daa7ec8da9133d712",
                "sha256": "3e68f7b1df06460e9aaeb316e80b46a107dfadb0a64f4a79333b5860227dfd0d"
            },
            "downloads": -1,
            "filename": "projkit-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0e6d0c922403587daa7ec8da9133d712",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 12006,
            "upload_time": "2023-08-07T13:20:29",
            "upload_time_iso_8601": "2023-08-07T13:20:29.166366Z",
            "url": "https://files.pythonhosted.org/packages/50/f5/dcd067466f773ee0766b883724a04e5ec05f66bac36d5b003f274755ad96/projkit-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-07 13:20:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fuzailpalnak",
    "github_project": "projkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "projkit"
}
        
Elapsed time: 1.42774s