Zernike moments: Digital images
The Zernike moment's package program is developed for square digital images mimicking some part of Matlab code provided by Christian Wolf. Zernike moments are unique due to orthogonality and a complete set of Zernike polynomials. Zernike moments are used in image analysis to characterize the shape and structure of objects. The following articles and their references give a detailed description of the Zernike polynomials and Zernike moments.
Description
The code includes the following functions:
zernike_order_list: Generates a list of Zernike polynomial orders.
robust_fact_quot: Calculates the robust factor quotient between two lists of values.
zernike_bf: Generates Zernike basis functions for a given size and order.
zernike_mom: Calculates the Zernike moments of an input image using precomputed Zernike basis functions.
zernike_rec: Reconstructs an image from Zernike moments(Inverse trasformation).
Installation
Install the ZEMO library using pip:
pip install ZEMO
Usage
- The standard way to import ZEMO library:
import ZEMO
from ZEMO import zemo
- Generates Zernike basis functions for a given
size,order, and optionalwithnegparameter for a square images of size SZ. If withneg is 1, then the basis functions with negative repetition are included.
ZBFSTR = zemo.zernike_bf(SZ,order,withneg)
- Calculates Zernike moments of an input image (images) using precomputed Zernike basis functions. I is the input image.
Z = zemo.zernike_mom(I,ZBFSTR)
- Reconstructs an image from Zernike moments using precomputed Zernike basis functions.
I = zemo.zernike_rec(Z,SZ,ZBFSTR)
Here is an example of face (Hossein Safari) image:
from ZEMO import dataset
dataset.Face_Data()
Due to the slightly large size of the "dataset", the command "dataset.Face_Data()" will take a few moments.
You can see some examples of the ZEMO code in https://github.com/hmddev1/ZEMO
How to Cite
Raboonik, A., Safari, H., Alipour, N., & Wheatland, M. S. 2017, ApJ, 834, 11
Alipour, N., Mohammadi, F., Safari, H. 2019, ApJS, 243, 20
Authors
Hossein Safari (https://orcid.org/0000-0003-2326-3201), Nasibe Alipour (https://orcid.org/0000-0003-3643-5121), Hamed Ghaderi (https://orcid.org/0009-0005-7934-2752), Pardis Garavand
License
Release files for ZEMO 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ZEMO-1.0.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ZEMO-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / ZEMO-1.0.0.tar.gz
| Download URL | ZEMO-1.0.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04cf4a8fac81d74ec6e630dfb249d1c3860fbb99e056a1b9ae32990ec6b33c19
|
|
BLAKE2b-256 checksum How to use checksums |
2b9238165988751c935d4582743051f12817b4f1cadafb7159649a1d1882e7aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / ZEMO-1.0.0-py3-none-any.whl
| Download URL | ZEMO-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7ac5b8387b52769f03bb89b9ddf70ac724e63fa52db6b7e40286c641a46879f
|
|
BLAKE2b-256 checksum How to use checksums |
a9a5ef220f2b489297dcfcf898c4501452a7e4f134bd94e9113349e3788c5df6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|