Function Usage Guide
This guide provides instructions on how to use two sets of image processing functions in Python. The first set focuses on cell segmentation, while the second set includes functions for denoising images and converting them to grayscale.
Cell Segmentation Functions
Required Libraries
osnumpyskimagesklearnmatplotlib
Functions:
-
cell_segment(image_path, num_clusters=4): Segments cells in an image using K-means clustering.
image_path: Path to the input image file.num_clusters: Number of clusters for K-means clustering (default is 4).- Returns: Segmented image array.
-
img_save(segmented_image, save_path, image_path): Saves the segmented image to a specified location.
segmented_image: Segmented image array.save_path: Path to the folder where the segmented image will be saved.image_path: Path to the original image file.
-
plot_img(segmented_image): Plots the segmented image.
segmented_image: Segmented image array.
-
cell_folder(input_folder, output_folder, num_clusters=4): Segments cells in all images within a folder and saves the results.
input_folder: Path to the folder containing input images.output_folder: Path to the folder where segmented images will be saved.num_clusters: Number of clusters for K-means clustering (default is 4).
Image Denoising and Grayscale Conversion Functions
Required Libraries
numpymatplotlibskimagePILos
Functions:
-
denoise_images(input_folder, result_folder=None): Denoises images in a folder using Non-local Means Denoising.
input_folder: Path to the folder containing input images.result_folder: Path to the folder where denoised images will be saved (optional).
-
img_to_gray(input_folder, result_folder=None): Converts images to grayscale.
input_folder: Path to the folder containing input images.result_folder: Path to the folder where grayscale images will be saved (optional).
Example Usage:
from cellmean import cell_segment, img_save, plot_img, cell_folder, denoise_images, img_to_gray
# Cell Segmentation
segmented_image = cell_segment('input_image.jpg')
plot_img(segmented_image)
img_save(segmented_image, 'output_folder', 'input_image.jpg')
cell_folder('input_images_folder', 'output_images_folder', num_clusters=5)
# Image Denoising and Grayscale Conversion
denoise_images('input_images_folder', result_folder='denoised_images')
img_to_gray('input_images_folder', result_folder='gray_images')
Metadata
Release files for cellmean 1.2.2
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 |
|---|---|---|---|---|
| cellmean-1.2.2.tar.gz | 4.5 kB | Without provenance | Details for cellmean-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cellmean-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for cellmean-1.2.2-py3-none-any.whl |
Total release size: 11.8 kB
Release files / cellmean-1.2.2.tar.gz
| Download URL | cellmean-1.2.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff450ed0b8ddf9dba71bdeff12f2dfa70f0a97ad46ad20a5d861a065eb6d29a4
|
|
BLAKE2b-256 checksum How to use checksums |
dbe796115925fdb5efdd0617e1d9a44b83c413cede6e0d611bd0e0b1e6951a15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / cellmean-1.2.2-py3-none-any.whl
| Download URL | cellmean-1.2.2-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96bf092cb63b46a2d5d7444430f3923985ab1ae2583fd573894bce3aed50971f
|
|
BLAKE2b-256 checksum How to use checksums |
51ea70928cdbc40b11921eb6057957744254f939ab76aa15f24742cb113d46e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for cellmean 1.2.2
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.