
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Efficient decomposition of satellite images in a Quad-Tree structure
pip install satcompression
Compression and decompression of satellite images using the Quad-Tree structure.
import satcompression
import rasterio as rio
# Load an image
with rio.open('path/to/image.tif') as src:
image_meta = src.meta
image_data = src.read()
# Compress the image
image_data_compress = satcompression.compress_and_encode_image_data(
image_data=image_data, detail_error_threshold=20
)
# Decompress the image
image_data_decompress = satcompression.reconstruct_image_data(
data=image_data_compress, dtype=image_data.dtype, nchannels = image_data.shape[0]
)
Obtain the pseudo-mtf from the quadtree structure.
import satcompression
import matplotlib.pyplot as plt
with rio.open('path/to/image.tif') as src:
image_data = src.read()
mtf_values1, x_axis1 = satcompression.quadtree_mtf(image_data, 10, detail_error_threshold=20)
mtf_values2, x_axis2 = satcompression.quadtree_mtf(image_data, 10, detail_error_threshold=10)
mtf_values3, x_axis3 = satcompression.quadtree_mtf(image_data, 10, detail_error_threshold=5)
plt.plot(x_axis1, mtf_values1, label="Detail Error Threshold: 0.002")
plt.plot(x_axis2, mtf_values2, label="Detail Error Threshold: 0.001")
plt.plot(x_axis3, mtf_values3, label="Detail Error Threshold: 0.0005")
plt.legend()
plt.ylim(0, 1.2)
plt.title("Pseudo-MTF obtained from the quadtree decomposition")
plt.show()
Obtain the classification of the quadtree nodes.
import satcompression
with rio.open('path/to/image.tif') as src:
image_data = src.read()
satcompression.create_classification_map(image_data, detail_error_threshold=20)
FAQs
A python package to compress sat data
We found that satcompression demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.