{"id":15718953,"url":"https://github.com/hritik5102/blob-detection-using-matlab","last_synced_at":"2025-07-19T06:05:04.763Z","repository":{"id":134373155,"uuid":"211547026","full_name":"hritik5102/Blob-detection-using-Matlab","owner":"hritik5102","description":"Blob detection and analysis using Matlab","archived":false,"fork":false,"pushed_at":"2020-10-22T20:46:30.000Z","size":74860,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T21:14:56.979Z","etag":null,"topics":["blob-analysis","blob-detection","color-detection","color-tracker","image-processing","matlab","matlab-codes","matlab-image-processing-toolbox","matlab-interface","matlab-script"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hritik5102.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-09-28T18:47:56.000Z","updated_at":"2022-03-02T00:10:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"c44e4f74-0017-4132-9c0f-7a579f295043","html_url":"https://github.com/hritik5102/Blob-detection-using-Matlab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hritik5102/Blob-detection-using-Matlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hritik5102%2FBlob-detection-using-Matlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hritik5102%2FBlob-detection-using-Matlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hritik5102%2FBlob-detection-using-Matlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hritik5102%2FBlob-detection-using-Matlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hritik5102","download_url":"https://codeload.github.com/hritik5102/Blob-detection-using-Matlab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hritik5102%2FBlob-detection-using-Matlab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265895983,"owners_count":23845415,"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":["blob-analysis","blob-detection","color-detection","color-tracker","image-processing","matlab","matlab-codes","matlab-image-processing-toolbox","matlab-interface","matlab-script"],"created_at":"2024-10-03T21:54:24.028Z","updated_at":"2025-07-19T06:05:04.742Z","avatar_url":"https://github.com/hritik5102.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Blob detection and analysis using Matlab\nA Blob is a group of connected pixels in an image that share some common property ( E.g grayscale value ).\n\n### Steps includes for blob analysis on image \n\n   \u003e ### Load sample frames\n   \n   ```matlab\n      \n      load sampleFrames.mat\n      subplot(1,3,1)\n      imshow(vidFrame1)\n   ```\n   \u003e ### Threshold image\n   ```matlab\n   I = rgb2hsv(vidFrame1);\n\n   % Define thresholds for channel 1 based on histogram settings\n   channel1Min = 0.333;\n   channel1Max = 0.561;\n\n   % Define thresholds for channel 2 based on histogram settings\n   channel2Min = 0.327;\n   channel2Max = 1.000;\n\n   % Define thresholds for channel 3 based on histogram settings\n   channel3Min = 0.186;\n   channel3Max = 1.000;\n\n   % Create mask based on chosen histogram thresholds\n   sliderBW = (I(:,:,1) \u003e= channel1Min ) \u0026 (I(:,:,1) \u003c= channel1Max) \u0026 ...\n       (I(:,:,2) \u003e= channel2Min ) \u0026 (I(:,:,2) \u003c= channel2Max) \u0026 ...\n       (I(:,:,3) \u003e= channel3Min ) \u0026 (I(:,:,3) \u003c= channel3Max);\n   BW = sliderBW;\n\n   subplot(1,3,2)\n   imshow(BW)\n\n   \n   ```\n   \u003e ### Remove disturbances\n   ```matlab\n      \n      noise = strel('disk' , 3);\n\n      open = imopen(BW, noise);\n      subplot(1,3,3);\n      imshow(open);\n\n   ```\n   \u003e ### Blob Analysis\n   \n   ```matlab\n   blob = vision.BlobAnalysis('MinimumBlobArea',200,...    \n    'MaximumBlobArea',5000);\n    % to perform a blob analysis on the video frame we need to use step\n    % function :- parameter =\u003e (blob analysis system object , input image i.e open)\n    % function output 3 :- area , centroid , bounding box\n\n    [objectArea , objCentroid , bboxout] = step(blob , open);\n\n\n   ```\n   \u003e ### Annotate image\n   ```matlab\n     \n     % now we get a bounding box cordinates of detected ball let apply contour\n     % over the detected ball using rectangle \n\n     rectangle = insertShape(vidFrame1 , 'rectangle',bboxout , 'Linewidth' , 4 , 'Color',...\n         [155 164 155]);\n\n     figure \n     subplot(1,2,1)\n     imshow(rectangle)\n\n\n   ```\n   \u003e ### Clean up\n   \n   ```matlab\n      release(blob)\n\n   ```\n   \n### Result \n\n![](Media2.gif \"Blob Detection using Matlab\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhritik5102%2Fblob-detection-using-matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhritik5102%2Fblob-detection-using-matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhritik5102%2Fblob-detection-using-matlab/lists"}