{"id":21371780,"url":"https://github.com/angeligareta/image-segmentation-overview","last_synced_at":"2026-07-09T16:31:04.561Z","repository":{"id":126756042,"uuid":"251749601","full_name":"angeligareta/image-segmentation-overview","owner":"angeligareta","description":"Image Segmentation projects developed for the Image Processing, Analysis, and Classification course at UPM. Implemented using OpenCV and C++.","archived":false,"fork":false,"pushed_at":"2021-02-13T20:12:11.000Z","size":1960,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T16:22:08.190Z","etag":null,"topics":["computer-vision","contour-extraction","image-analysis","image-processing","image-segmentation","watershed-markers"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angeligareta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":"2020-03-31T21:43:27.000Z","updated_at":"2021-02-13T20:12:13.000Z","dependencies_parsed_at":"2023-06-18T12:24:27.783Z","dependency_job_id":null,"html_url":"https://github.com/angeligareta/image-segmentation-overview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angeligareta/image-segmentation-overview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeligareta%2Fimage-segmentation-overview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeligareta%2Fimage-segmentation-overview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeligareta%2Fimage-segmentation-overview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeligareta%2Fimage-segmentation-overview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angeligareta","download_url":"https://codeload.github.com/angeligareta/image-segmentation-overview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeligareta%2Fimage-segmentation-overview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35306715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["computer-vision","contour-extraction","image-analysis","image-processing","image-segmentation","watershed-markers"],"created_at":"2024-11-22T08:15:07.621Z","updated_at":"2026-07-09T16:31:04.536Z","avatar_url":"https://github.com/angeligareta.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eImage Segmentation Overview\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eProjects developed for the Image Processing, Analysis And Classification course of the EIT Digital data science master at \u003ca href=\"https://www.upm.es/\"\u003eUPM\u003c/a\u003e\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"UPM\" src=\"https://img.shields.io/badge/EIT%20Digital-UPM-blue?style=flat-square\"\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/angeligareta/image-processing-overview?style=flat-square\" /\u003e\n\u003c/p\u003e\n\n## Introduction\nThe exercises developed in the area of image segmentation are the following:\n- __Contour extraction:__ Extract contour from an image using the morphological operations of erosion or dilation. (Exercise [1a](src/exercises_01_a_contour_extraction.cpp))\n- __Grassfire propagation algorithm:__ Detect all the flatzones in the image and output them with different random colors. (Exercise [1b](src/exercises_01_b_grassfire.cpp))\n- __Teeth count from gear:__ Given an image of a gear, this program will output an approximate teeth number. (Exercise [2a](src/exercises_02_a_wheel_teeth_count.cpp))\n- __Watershed markers:__ Apply watershed algorithm. (Exercise [2b](src/exercises_02_b_watershed.cpp))\n - __Flatzone detection:__ Given pixel coordinates, neighborhood connectivity and region label, detect the flat zone where the origin pixel is and output an image with that region colored with the input label. (Exercise [11](src/exercises_11_a_flatzone.cpp))\n- __Regional minimum and maximum:__ Given pixel coordinates and neighborhood connectivity, output if the origin pixel is a regional minimum, regional maximum or nothing. (Exercise [13a](src/exercises_13_a_minimum.cpp) and [13b](src/exercises_13_b_maximum.cpp))\n\n## Environment\nThis exercises have been developed in the following environment:\n- Cmake version: 3.15\n- C++ minimum required version: 14\n- OpenCV version: 4.3.0\n- OS: Ubuntu (Linux)\n\n## Project structure\nThe project is structured as:\n- data: Contains all the images that serve as input examples for the developed programs. \n- programs: Compiled version of src programs.\n- src: Contains all the code with an utils folder and the main programs for the exercises.\n- CMakeLists.txt: Used to compile with cmake.\n\n## How to use\n\n- __Flatzone:__\n```\n./programs/exercises_11_a_flatzone ./data/immed_gray_inv_20051218_frgr4.txt ./data/immed_gray_inv_20051218_frgr4.pgm ./output/immed_gray_inv_20051218_frgr4_flatzone_57_36.jpg\n./programs/exercises_11_a_flatzone ./data/gran01_64.txt ./data/gran01_64.pgm ./output/gran01_64_0_0.jpg\n```\n- __Regional minimum:__\n```\n./programs/exercises_13_a_minimum ./data/immed_gray_inv_20051218_frgr4_min_01.txt ./data/immed_gray_inv_20051218_frgr4.pgm ./output/exercise_13a_output_01.txt\n./programs/exercises_13_a_minimum ./data/immed_gray_inv_20051218_frgr4_min_02.txt ./data/immed_gray_inv_20051218_frgr4.pgm ./output/exercise_13a_output_02.txt\n```\n- __Regional maximum:__\n```\n./programs/exercises_13_b_maximum ./data/immed_gray_inv_20051218_frgr4_max_01.txt ./data/immed_gray_inv_20051218_frgr4.pgm ./output/exercise_13b_output_01.txt\n./programs/exercises_13_b_maximum ./data/immed_gray_inv_20051218_frgr4_max_02.txt ./data/immed_gray_inv_20051218_frgr4.pgm ./output/exercise_13b_output_02.txt\n```\n- __Contour extraction:__\n```\n./programs/exercises_01_a_contour_extraction ./data/hitchcock.png ./output/hitchcock_contour.png\n```\n- __Grassfire propagation algorithm:__\n```\n./programs/exercises_01_b_grassfire ./data/particles.png ./output/particles_regions.png\n```\n- __Teeth count from gear:__\n```\n./programs/exercises_02_a_wheel_teeth_count ./data/wheel.png ./output/wheel_teeth.txt\n```\n- __Watershed markers:__\n```\n./programs/exercises_02_b_watershed ./data/coffee_grains.jpg ./output/coffee_markers.jpg\n```\n\n## Author\n- Angel Igareta [angel@igareta.com](mailto:angel@igareta.com) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeligareta%2Fimage-segmentation-overview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangeligareta%2Fimage-segmentation-overview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeligareta%2Fimage-segmentation-overview/lists"}