{"id":23692405,"url":"https://github.com/pn-projects/skintone_detection_using_matlab","last_synced_at":"2026-03-18T01:35:37.665Z","repository":{"id":268852651,"uuid":"905646950","full_name":"PN-Projects/Skintone_detection_using_MATLAB","owner":"PN-Projects","description":"Simple MATLAB app to Extract Skintone of the human subject from the given images ( Without using ML )","archived":false,"fork":false,"pushed_at":"2025-01-12T17:22:50.000Z","size":155,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-20T00:43:22.332Z","etag":null,"topics":["digital-image-processing","image-processing","image-segmentation","matlab"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PN-Projects.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}},"created_at":"2024-12-19T08:48:43.000Z","updated_at":"2025-01-12T17:22:53.000Z","dependencies_parsed_at":"2024-12-19T10:23:46.095Z","dependency_job_id":"fbb87423-427f-478a-a3f6-85ea91404d58","html_url":"https://github.com/PN-Projects/Skintone_detection_using_MATLAB","commit_stats":null,"previous_names":["pn-projects/skintone_detection_using_matlab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PN-Projects%2FSkintone_detection_using_MATLAB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PN-Projects%2FSkintone_detection_using_MATLAB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PN-Projects%2FSkintone_detection_using_MATLAB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PN-Projects%2FSkintone_detection_using_MATLAB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PN-Projects","download_url":"https://codeload.github.com/PN-Projects/Skintone_detection_using_MATLAB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758830,"owners_count":19692033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["digital-image-processing","image-processing","image-segmentation","matlab"],"created_at":"2024-12-30T03:27:28.521Z","updated_at":"2026-03-18T01:35:37.621Z","avatar_url":"https://github.com/PN-Projects.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Skintone Detection Using HSV \u0026 YCbCr mask in MATLAB \n## Introduction\nThis project presents an innovative MATLAB-based system for detecting skin tone and extracting its representative color in the form of a hex code. The system leverages multi-dimensional color spaces (YCbCr and HSV) combined with k-means clustering for accurate skin tone identification. Designed to be user-friendly yet robust, the extracted hex code enables practical applications such as personalized clothing color recommendations and digital styling.\n\nThe methodology integrates manual region selection with algorithmic processes, providing precise results while minimizing errors caused by lighting or background variations. This project is an accessible tool for use in digital fashion, cosmetics, and academic research.\n## Flow chart\n\u003ca href=\"https://ibb.co/br7XYfK\"\u003e\u003cimg src=\"https://i.ibb.co/4jJpCQV/Untitled-diagram-2025-01-11-104316.png\" alt=\"Untitled-diagram-2025-01-11-104316\" border=\"0\"\u003e\u003c/a\u003e\n- Caution, copying it without permission may lead to legal consequences, kindly go through [this](https://github.com/PN-Projects/Skintone_detection_using_MATLAB/tree/main?tab=License-1-ov-file#readme)\n## Steps to Set Up and Run\n### System Requirements\n- MATLAB version: R2023a or later (recommended for optimal compatibility).\n- Operating System:\n- Minimum: Windows 10 64-bit or macOS Catalina.\n- Recommended: Windows 11 64-bit or macOS Ventura.\n- Processor: Dual-core 2.0 GHz or higher.\n- RAM: Minimum 4 GB; Recommended 8 GB or more.\n### Dependencies\nBefore running the project, ensure the following MATLAB toolboxes are installed:\n\n- [Image Processing Toolbox](https://in.mathworks.com/products/image-processing.html): Used for image manipulation and processing.\n- [Statistics and Machine Learning Toolbox](https://in.mathworks.com/products/statistics.html): Required for k-means clustering.\n  \n### Running the Application\n\n\u003ch4\u003eSetting Up Environment \u003c/h4\u003e\nDeal with this step by yourself \nclone the contents of this repo as per your convenience and deal with setting up path etc...\n\n\u003ch4\u003eLaunch MATLAB\u003c/h4\u003e\n\u003cp\u003eOpen MATLAB and navigate to the folder containing the application files.\u003c/p\u003e\n\n\u003ch4\u003eRun the Application\u003c/h4\u003e\n\u003cp\u003eExecute the main file (\u003ccode\u003eipprojekt_exported.mlapp\u003c/code\u003e) by typing the following command in MATLAB’s Command Window:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\nipprojekt_exported\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch4\u003eUpload an Image\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003eClick the \"Upload\" button and select an image (supported formats: JPG, PNG, BMP).\u003c/li\u003e\n  \u003cli\u003eThe selected image will be displayed for reference.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch4\u003eSelect Skin Region\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003eA manual selection tool will appear. Use it to draw a rectangle around the skin region of the image.\u003c/li\u003e\n  \u003cli\u003eEnsure the selected area contains only skin for accurate detection.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch4\u003eProcess the Image\u003c/h4\u003e\n\u003cul\u003e\n  \u003cli\u003eClick the \"Process\" button to start the analysis.\u003c/li\u003e\n  \u003cli\u003eThe system will:\n    \u003cul\u003e\n      \u003cli\u003eGenerate a skin mask.\u003c/li\u003e\n      \u003cli\u003eExtract skin pixels.\u003c/li\u003e\n      \u003cli\u003ePerform k-means clustering to identify the dominant tone.\u003c/li\u003e\n      \u003cli\u003eDisplay the hex code and dominant skin tone.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n\n### Features\n\n\u003cul\u003e\n  \u003cli\u003e\u003cstrong\u003eDual-Color Space Segmentation:\u003c/strong\u003e\n    \u003cp\u003eUses YCbCr and HSV color spaces to ensure reliable skin tone detection under diverse lighting conditions.\u003c/p\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eManual Skin Region Selection:\u003c/strong\u003e\n    \u003cp\u003eProvides flexibility for precise region identification.\u003c/p\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eClustering for Dominance:\u003c/strong\u003e\n    \u003cp\u003ek-means clustering isolates the dominant skin tone, reducing noise and errors.\u003c/p\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eHex Code Representation:\u003c/strong\u003e\n    \u003cp\u003eConverts RGB values of the dominant tone into a hex code, offering a standardized reference.\u003c/p\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n### Additional Notes \n\n\u003cul\u003e\n  \u003cli\u003eEnsure high-quality images are used for better results. Poor lighting or low resolution may affect accuracy.\u003c/li\u003e\n  \u003cli\u003eIf encountering any issues, verify that all toolboxes are installed and the MATLAB version meets the system requirements.\u003c/li\u003e\n\u003c/ul\u003e\n\n### Future Improvements\n\u003cul\u003e\n  \u003cli\u003eAutomating skin region detection using deep learning techniques.\u003c/li\u003e\n  \u003cli\u003eSupporting additional color spaces (e.g., Lab, Luv) for higher precision.\u003c/li\u003e\n  \u003cli\u003eExpanding recommendations with a machine learning-based algorithm.\u003c/li\u003e\n\u003c/ul\u003e\n\n\n# LICENSE\n\u003cp xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dct=\"http://purl.org/dc/terms/\"\u003e\u003ca property=\"dct:title\" rel=\"cc:attributionURL\" href=\"https://github.com/PN-Projects/Skintone_detection_using_MATLAB\"\u003eSkintone Detection using HSV \u0026 YCbCr mask\u003c/a\u003e by \u003ca rel=\"cc:attributionURL dct:creator\" property=\"cc:attributionName\" href=\"https://github.com/satyanandatripathi\"\u003eParthiv Katapara\u003c/a\u003e is licensed under \u003ca href=\"https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1\" target=\"_blank\" rel=\"license noopener noreferrer\" style=\"display:inline-block;\"\u003eCreative Commons Attribution-NonCommercial-NoDerivatives 4.0 International\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\" alt=\"\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\" alt=\"\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1\" alt=\"\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nd.svg?ref=chooser-v1\" alt=\"\"\u003e\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpn-projects%2Fskintone_detection_using_matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpn-projects%2Fskintone_detection_using_matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpn-projects%2Fskintone_detection_using_matlab/lists"}