Name | cellmean JSON |
Version | 1.2.2 JSON |
download | |
home_page | |
Summary | |
upload_time | 2024-03-09 10:57:25 |
maintainer | |
docs_url | None |
author | TAWSIF AHMED |
requires_python | |
license | |
keywords | |
VCS | |
bugtrack_url | |
requirements | No requirements were recorded. |
Travis-CI | No Travis. |
coveralls test coverage | No coveralls. |
# 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 - `os` - `numpy` - `skimage` - `sklearn` - `matplotlib` ### Functions: 1. **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. 2. **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. 3. **plot_img(segmented_image)**: Plots the segmented image. - `segmented_image`: Segmented image array. 4. **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 - `numpy` - `matplotlib` - `skimage` - `PIL` - `os` ### Functions: 1. **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). 2. **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: ```python 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')
{ "_id": null, "home_page": "", "name": "cellmean", "maintainer": "", "docs_url": null, "requires_python": "", "maintainer_email": "", "keywords": "", "author": "TAWSIF AHMED", "author_email": "sleeping4cat@outlook.com", "download_url": "https://files.pythonhosted.org/packages/db/e7/96115925fdb5efdd0617e1d9a44b83c413cede6e0d611bd0e0b1e6951a15/cellmean-1.2.2.tar.gz", "platform": null, "description": "# Function Usage Guide\r\n\r\nThis 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.\r\n\r\n## Cell Segmentation Functions\r\n\r\n### Required Libraries\r\n- `os`\r\n- `numpy`\r\n- `skimage`\r\n- `sklearn`\r\n- `matplotlib`\r\n\r\n### Functions:\r\n1. **cell_segment(image_path, num_clusters=4)**: Segments cells in an image using K-means clustering.\r\n - `image_path`: Path to the input image file.\r\n - `num_clusters`: Number of clusters for K-means clustering (default is 4).\r\n - Returns: Segmented image array.\r\n\r\n2. **img_save(segmented_image, save_path, image_path)**: Saves the segmented image to a specified location.\r\n - `segmented_image`: Segmented image array.\r\n - `save_path`: Path to the folder where the segmented image will be saved.\r\n - `image_path`: Path to the original image file.\r\n\r\n3. **plot_img(segmented_image)**: Plots the segmented image.\r\n - `segmented_image`: Segmented image array.\r\n\r\n4. **cell_folder(input_folder, output_folder, num_clusters=4)**: Segments cells in all images within a folder and saves the results.\r\n - `input_folder`: Path to the folder containing input images.\r\n - `output_folder`: Path to the folder where segmented images will be saved.\r\n - `num_clusters`: Number of clusters for K-means clustering (default is 4).\r\n\r\n## Image Denoising and Grayscale Conversion Functions\r\n\r\n### Required Libraries\r\n- `numpy`\r\n- `matplotlib`\r\n- `skimage`\r\n- `PIL`\r\n- `os`\r\n\r\n### Functions:\r\n1. **denoise_images(input_folder, result_folder=None)**: Denoises images in a folder using Non-local Means Denoising.\r\n - `input_folder`: Path to the folder containing input images.\r\n - `result_folder`: Path to the folder where denoised images will be saved (optional).\r\n\r\n2. **img_to_gray(input_folder, result_folder=None)**: Converts images to grayscale.\r\n - `input_folder`: Path to the folder containing input images.\r\n - `result_folder`: Path to the folder where grayscale images will be saved (optional).\r\n\r\n## Example Usage:\r\n```python\r\nfrom cellmean import cell_segment, img_save, plot_img, cell_folder, denoise_images, img_to_gray\r\n\r\n# Cell Segmentation\r\nsegmented_image = cell_segment('input_image.jpg')\r\nplot_img(segmented_image)\r\nimg_save(segmented_image, 'output_folder', 'input_image.jpg')\r\ncell_folder('input_images_folder', 'output_images_folder', num_clusters=5)\r\n\r\n# Image Denoising and Grayscale Conversion\r\ndenoise_images('input_images_folder', result_folder='denoised_images')\r\nimg_to_gray('input_images_folder', result_folder='gray_images')\r\n", "bugtrack_url": null, "license": "", "summary": "", "version": "1.2.2", "project_urls": null, "split_keywords": [], "urls": [ { "comment_text": "", "digests": { "blake2b_256": "51ea70928cdbc40b11921eb6057957744254f939ab76aa15f24742cb113d46e0", "md5": "d2a6b280f522edbc1f32cc2f7e90160b", "sha256": "96bf092cb63b46a2d5d7444430f3923985ab1ae2583fd573894bce3aed50971f" }, "downloads": -1, "filename": "cellmean-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d2a6b280f522edbc1f32cc2f7e90160b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7333, "upload_time": "2024-03-09T10:57:23", "upload_time_iso_8601": "2024-03-09T10:57:23.343477Z", "url": "https://files.pythonhosted.org/packages/51/ea/70928cdbc40b11921eb6057957744254f939ab76aa15f24742cb113d46e0/cellmean-1.2.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "dbe796115925fdb5efdd0617e1d9a44b83c413cede6e0d611bd0e0b1e6951a15", "md5": "7e0cf982fe8938478579da5a3c77b171", "sha256": "ff450ed0b8ddf9dba71bdeff12f2dfa70f0a97ad46ad20a5d861a065eb6d29a4" }, "downloads": -1, "filename": "cellmean-1.2.2.tar.gz", "has_sig": false, "md5_digest": "7e0cf982fe8938478579da5a3c77b171", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4453, "upload_time": "2024-03-09T10:57:25", "upload_time_iso_8601": "2024-03-09T10:57:25.180126Z", "url": "https://files.pythonhosted.org/packages/db/e7/96115925fdb5efdd0617e1d9a44b83c413cede6e0d611bd0e0b1e6951a15/cellmean-1.2.2.tar.gz", "yanked": false, "yanked_reason": null } ], "upload_time": "2024-03-09 10:57:25", "github": false, "gitlab": false, "bitbucket": false, "codeberg": false, "lcname": "cellmean" }