Skip to main content

3D Zernike Descriptors

pyzernike is a Python library for computing 3D Zernike invariants as descriptors for 3D shape comparison.

Usage

Here's a basic example of how to use the library:

import numpy as np
from pyzernike import ZernikeDescriptor

# Create or load your 3D array here
arr = np.zeros((50,50,50), dtype = np.float32)
arr[15:25, 5:15, 35:45] = 1

# Fit the Zernike descriptor up to order 8
descriptor = ZernikeDescriptor.fit(data = arr, order = 8)

# Get Zernike coefficients
coefficients = descriptor.get_coefficients()

# Reconstruct the array
arr_rec = descriptor.reconstruct(box_size = 50)

# Write the coefficients to a binary file
descriptor.save_invariants("coefficients.inv")

Installation

We recommend installation using one of the following methods

Method Command
PyPi pip install pyzernike
Source pip install git+https://github.com/maurerv/pyzernike

Background

pyzernike provides Python bindings to C code written by Marcin Novotni, which was distributed under a GPL license and provided with the paper:

M. Novotni, R. Klein "Shape Retrieval using 3D Zernike Descriptors" Computer Aided Design 2004; 36(11):1047-1062

A copy of that code serving as the basis for this project was obtained from GitHub. pyzernike includes a range of modifications to the original code base to improve performance but faithfully implements the original derivations.

Metadata

Release files for zernike-descriptors 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zernike-descriptors 0.1.0
File Size Uploaded Provenance
zernike_descriptors-0.1.0.tar.gz 21.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zernike-descriptors 0.1.0
File Interpreter ABI Platform
zernike_descriptors-0.1.0-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details

Total release size: 129.6 kB

Release files / zernike_descriptors-0.1.0.tar.gz

Download URL zernike_descriptors-0.1.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4f2f5d5be0e478018a821e7ef30d850d1d88756d8b4dfbf118e4638131bfe702
BLAKE2b-256 checksum
How to use checksums
817818063ba65ec340e45a4625e44492a05b704b670d4cb475a345b81294973d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Release files / zernike_descriptors-0.1.0-cp311-cp311-macosx_14_0_arm64.whl

Download URL zernike_descriptors-0.1.0-cp311-cp311-macosx_14_0_arm64.whl
Size 108.6 kB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
b64684c41bc7692e9b65026218dff48218e401391440c5669611c47589ef3074
BLAKE2b-256 checksum
How to use checksums
0c121dd58959e503a294ae4c96f86a55f1bb87dfafb9641b1b8fb8cf45f1d124
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Security for zernike-descriptors 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page