Fragment
Any extent is a set of smaller fragment extent , which can be as small as 1 x 1 to the size of the extent given. This library will section the given extent in to specified smaller fragment extent
Installation
pip install image-fragment
Image Fragments
An image extent can be sectioned into many fragments, these fragments holds positional information to where it is located to the original extent
Now this information can be used to extract selected fragments from the Image, perform operation, and transfer the new data to selected position.
import numpy as np
from image_fragment.fragment import ImageFragment
image = np.zeros((1, 1024, 1024, 3))
new_image = np.zeros((1, 1024, 1024, 3))
image_fragment = ImageFragment.image_fragment_4d(fragment_size=(1, 512, 512, 3), org_size=(1, 1024, 1024, 3))
for fragment in image_fragment:
# GET DATA THAT BELONGS TO THE FRAGMENT
fragmented_image = fragment.get_fragment_data(image)
# DO SOME OPERATION ON THE FRAGMENTED DATA
operation_done_on_fragmented_data = np.rot(fragmented_image)
# TRANSFER OPERATED IMAGE ON NEW IMAGE ON THE FRAGMENT POSITION
new_image = fragment.transfer_fragment(transfer_from=operation_done_on_fragmented_data, transfer_to=new_image)
If image is 3 Dimensional then switch to image_fragment = ImageFragment.image_fragment_3d(fragment_size=(512, 512, 3), org_size=(1024, 1024, 3)),
this will provide fragments for 3 dimensional image
Metadata
Release files for image-fragment 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| image_fragment-0.2.3.tar.gz | 4.8 kB | Without provenance | Details for image_fragment-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| image_fragment-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for image_fragment-0.2.3-py3-none-any.whl |
Total release size: 9.8 kB
Release files / image_fragment-0.2.3.tar.gz
| Download URL | image_fragment-0.2.3.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adbd5b7036a4bd744ec8620b0e0b8704642a228139f67093e34160df945d9c1c
|
|
BLAKE2b-256 checksum How to use checksums |
53dfb8b2dbdf94473594d73a780a0b7a5344a7152cc08c5f9db7f6889cf3d5fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / image_fragment-0.2.3-py3-none-any.whl
| Download URL | image_fragment-0.2.3-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c2f48d2a2bae25eb51b3dd94604f5ac81626200f74d631ee75fcfd093cc6410
|
|
BLAKE2b-256 checksum How to use checksums |
e978fba84bd3778babe50ba73300e313300877e5da1e0ac4d86c7324253cf96a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for image-fragment 0.2.3
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.