Install
$ pip install localaplace
This is an implement of Local Laplace Filter algorithm [1] [Paper]. Just see the effect below.
| Image modal | Original | Enhanced |
|---|---|---|
| RGB (800 × 533) | ||
| RGBA (600 × 460) | ||
| CT (3072 × 3072) |
This is a boring code when I attempt to finish my computer vision homework, but no available python package is found on PyPi
Usage
Demo is as follows, the only function is local_laplace_filter (Please see my detailed comment of the function to see the meaning of arguments):
import os
import cv2
import localaplace as llp
image = cv2.imread('./images/flower.png', cv2.IMREAD_UNCHANGED)
result = llp.local_laplace_filter(
image, 0.2, 0.5, 0.8, 100,
num_workers=-1,
verbose=1,
return_layers=False
)
# save result to disk
if not os.path.exists('results'):
os.makedirs('results')
cv2.imwrite('./results/flower_enchanced.png', result)
If you are interested in the Laplace Pyramid, set return_layers as True to get layers:
result, layers = llp.local_laplace_filter(
image, 0.2, 0.5, 0.8, 100,
num_workers=-1,
verbose=1,
return_layers=True
)
# save inner layers to disk
for i, layer_image in enumerate(layers):
cv2.imwrite(f'./results/layer_{i + 1}.png', layer_image)
Reference
[1] Paris, Sylvain, Samuel W. Hasinoff, and Jan Kautz. "Local Laplacian filters: edge-aware image processing with a Laplacian pyramid." Communications of the ACM 58.3 (2015): 81-91
Metadata
Release files for localaplace 0.0.1
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 | |
|---|---|---|---|---|
| localaplace-0.0.1.tar.gz | 9.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| localaplace-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / localaplace-0.0.1.tar.gz
| Download URL | localaplace-0.0.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecfab21738cb8582484f3ebc5d994db640282ab74d3d3f800571f49b89f4f4f8
|
|
BLAKE2b-256 checksum How to use checksums |
550c0b3708d27bd21cfa2dca3f4bdb910e5baef89a41d9f4233d13db63cf5cef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / localaplace-0.0.1-py3-none-any.whl
| Download URL | localaplace-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37ebf40cbee4ae2bb6870e6084824938af56012c3fb34932e2a76d15ee998ddf
|
|
BLAKE2b-256 checksum How to use checksums |
4b31d549dae69803d74d09591bb97f7b2cf15c19d66fca440f19d85670a8c4b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for localaplace 0.0.1
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.