{"id":15565027,"url":"https://github.com/conorheffron/bio-cell-red-edge","last_synced_at":"2026-02-28T20:21:00.004Z","repository":{"id":219924293,"uuid":"737159069","full_name":"conorheffron/bio-cell-red-edge","owner":"conorheffron","description":"Edge Detection of Biological Cells (Python Image Processing Script)","archived":false,"fork":false,"pushed_at":"2026-02-02T21:55:45.000Z","size":14136,"stargazers_count":23,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T11:09:13.559Z","etag":null,"topics":["biology","computer-vision","image-processing","mathplotlib","ndimage","pytest","python3","scikitlearn-machine-learning","scipy","skimage","systems-biology"],"latest_commit_sha":null,"homepage":"https://conorheffron.github.io/bio-cell-red-edge/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conorheffron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-30T02:40:43.000Z","updated_at":"2026-01-31T10:24:02.000Z","dependencies_parsed_at":"2024-01-30T12:01:16.916Z","dependency_job_id":"7622f46a-f098-43a1-bc84-ea1252d411e5","html_url":"https://github.com/conorheffron/bio-cell-red-edge","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"ef57d04a08c8c47a6e10ce43cebf27cbdd2b33d2"},"previous_names":["conorheffron/bio-cell-red-edge"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/conorheffron/bio-cell-red-edge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbio-cell-red-edge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbio-cell-red-edge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbio-cell-red-edge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbio-cell-red-edge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conorheffron","download_url":"https://codeload.github.com/conorheffron/bio-cell-red-edge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorheffron%2Fbio-cell-red-edge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29951645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biology","computer-vision","image-processing","mathplotlib","ndimage","pytest","python3","scikitlearn-machine-learning","scipy","skimage","systems-biology"],"created_at":"2024-10-02T16:48:52.148Z","updated_at":"2026-02-28T20:20:59.974Z","avatar_url":"https://github.com/conorheffron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bio-cell-red-edge\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n[![Python application](https://github.com/conorheffron/bio-cell-red-edge/actions/workflows/python-app.yml/badge.svg)](https://github.com/conorheffron/bio-cell-red-edge/actions/workflows/python-app.yml)\n\n![Proof HTML](https://github.com/conorheffron/bio-cell-red-edge/actions/workflows/proof-html.yml/badge.svg)\n\n### Original Image (before crop)\n\n![Original Image for Testing](./doc/CellSegmentationExample_01.png)\n\n### Sample Edge Detection Script which produces the following result `.png` file.\n\n\u003cimg align=\"middle\" width=\"452\" alt=\"image\" src=\"https://github.com/conorheffron/bio-cell-red-edge/assets/8218626/cb1761f3-070c-48aa-bf48-ad975105c757\"\u003e\n\n### Sample CLI Usage\n\n```python\npython main.py `\u003cfile_to_be_processed\u003e`\n```\n\n```python\n\u003e python main.py \"/path/original image cropped.png\"\nThe name of the program is: main.py\nThe file for processing is located at: /path/original image cropped.png\nSet original image to output\nSet gray scale image to output\nSet Sobel Edge detection image to output\nSet noise reduction image to output\nSet binary image to output\nSet gap fill image to output\nSet dilated image to output\nSet overlay / final image to output\nImage processing complete, please see results at: /path/result.png\n```\n\n### See more info at [bio-cell-outline](https://conorheffron.github.io/bio-cell-red-edge/bio-cell-outline.pdf)\n\n---\n\n# Biological Cell - Image Processing Script \u0026 Analysis\n\nI have a keen interest in the processing of biological images such as cells. I think the area of computer vision will continue to grow and its application in health care could be a key component of improving health care. The image processing of cells can help measure and track cell attributes like mass, size, composition, movement, further analysis on goal post markers pre-applied to cell images etc. There are many variations and usage opportunities for these tools.\n\nDepending on the logic and Machine Learning (ML) pipeline, these endeavours can help support biological research which in turn can lead to the early diagnosis of disease where symptoms and standard tests (urine, blood, and faecal matter etc.) do not lead health care practitioners to a diagnosis or treatment plan while traversing the issues patients face. Patients may not be aware of their predisposition to certain risks which can only be spotted a cellular level.\n\nI have previous experience in image processing with languages / tools such as Java \u0026 MATLAB. I wanted to see what Python has to offer in this domain. So far, after taking a related course on DataCamp - I found the ‘skimage’ package in Python to be very useful with many useful functions and libraries that reduce the amount of code required to do some powerful image processing operations.\n\nI would like to provide an example of something I processed and plotted today in Python. A few hours analysis and very little code later, I found the result I wanted in Python with the equivalent body of work in MATLAB to compare against.\n\nPlease see the image produced from my script below which is a quick and dirty example of cell segmentation, the result is an overlay image to help convey how accurate this labelling process is with very little code and minimal time assigned to it.\n\nThe most time consuming steps were to select an appropriate thresholding algorithm followed by a suitable level of noise reduction from the image.\n\n## See final code snippet below:\n```python\nthresh = ski.filters.threshold_triangle(sobel_edge)\n\nred_noise = ski.restoration.denoise_tv_chambolle(sobel_edge, \n\tweight=0.01, channel_axis=-1)\n```\n\n \n\n## The `flow of logic` was to:\n1.\tRead the original image\n2.\tConvert the image to grayscale\n3.\tApply Sobel Edge Detection (roberts, scharr and prewitt made little to no difference)\n4.\tReduce Noise (white spots outside cells)\n5.\tAmplify image 4 by converting to Binary Image (Note: threshold_otsu() was not great option here)\n6.\tFill Gaps in Cells\n7.\tDilate Image to further Amplify\n8.\tCreate resulting image where figure 7 is the red overlay on original cells image\n\nMy aim was to visualise the segmentation of the cells image.\n\n### Reference:\n - __1994-2023 The MathWorks, Inc. “Detect Cell Using Edge Detection and Morphology”__\n - **Accessed:** November 29, 2023.\n - **Available:**\n   - [https://www.mathworks.com/help/images/detecting-a-cell-using-image-segmentation.html](https://www.mathworks.com/help/images/detecting-a-cell-using-image-segmentation.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorheffron%2Fbio-cell-red-edge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconorheffron%2Fbio-cell-red-edge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorheffron%2Fbio-cell-red-edge/lists"}