{"id":24098426,"url":"https://github.com/matlab-deep-learning/seven-segment-digit-recognition","last_synced_at":"2025-05-07T19:24:27.030Z","repository":{"id":118345541,"uuid":"428548485","full_name":"matlab-deep-learning/Seven-Segment-Digit-Recognition","owner":"matlab-deep-learning","description":"Seven Segment Digit Recognition in MATLAB","archived":false,"fork":false,"pushed_at":"2024-01-24T10:33:51.000Z","size":68,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-14T21:51:22.835Z","etag":null,"topics":["computer-vision","deep-learning","industrial-automation","matlab","matlab-deep-learning","ocr","ocr-recognition","pretrained-models","seven-segment","seven-segments-display","text-detection","text-detection-recognition"],"latest_commit_sha":null,"homepage":"https://www.mathworks.com/products/deep-learning.html","language":null,"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/matlab-deep-learning.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-16T06:51:00.000Z","updated_at":"2024-11-05T12:33:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd9fb237-fc08-4806-a74e-31c29ddc84ef","html_url":"https://github.com/matlab-deep-learning/Seven-Segment-Digit-Recognition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FSeven-Segment-Digit-Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FSeven-Segment-Digit-Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FSeven-Segment-Digit-Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matlab-deep-learning%2FSeven-Segment-Digit-Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matlab-deep-learning","download_url":"https://codeload.github.com/matlab-deep-learning/Seven-Segment-Digit-Recognition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252942229,"owners_count":21829029,"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":["computer-vision","deep-learning","industrial-automation","matlab","matlab-deep-learning","ocr","ocr-recognition","pretrained-models","seven-segment","seven-segments-display","text-detection","text-detection-recognition"],"created_at":"2025-01-10T14:45:38.611Z","updated_at":"2025-05-07T19:24:27.005Z","avatar_url":"https://github.com/matlab-deep-learning.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Seven Segment Digit Recognition\n\nThis repository implements seven segment digit recognition in MATLAB\u0026reg;.\n\n[![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=matlab-deep-learning/Seven-Segment-Digit-Recognition)\n\n**Creator**: MathWorks Development\n\nRequirements\n------------  \n\n- MATLAB R2022b or later\n- Deep Learning Toolbox\u0026trade;\n- Computer Vision Toolbox\u0026trade;\n- Computer Vision Toolbox\u0026trade; Model for Text Detection\n\nNote: Previous MATLAB release users can use [this](https://github.com/matlab-deep-learning/Seven-Segment-Digit-Recognition/tree/previous) branch to download the pretrained models.\n\nOverview\n--------\n\nThis repository implements seven segment digit recognition using two steps. The first step detects the location of image text using [detectTextCRAFT](https://in.mathworks.com/help/vision/ref/detecttextcraft.html) function that requires Deep Learning Toolbox\u0026trade; and Computer Vision Toolbox\u0026trade; Model for Text Detection. The second stage uses the [OCR](https://in.mathworks.com/help/vision/ref/ocr.html) function from the Computer Vision Toolbox\u0026trade; to recognize the digits. \n\nThe two-step approach helps improve OCR by only processing image regions that contains text. This is useful in industrial automation applications where the digital displays are often surrounded by other objects and background content that can hinder the performance of OCR. \n\nRecognize Seven Segment Digits\n---------------------------------------\n\n```\n% Read image.\n  orgImg = imread('sevenSeg.png');\n  \n% Detect seven segment digits.\n  bboxes = detectTextCRAFT(orgImg);\n\n% Binarizing the image before using OCR for better results.\n  I = rgb2gray(orgImg);\n  BW = imbinarize(I, 'adaptive');\n  BW = ~BW;\n  \n% Recognize seven segment digit using ocr.\n  output = ocr(BW,bboxes,Model=\"seven-segment\");\n \n% Display results.\n  recognizedWords = cat(1,output(:).Words);\n  Iocr = insertObjectAnnotation(orgImg, 'rectangle',bboxes,recognizedWords);\n  figure; imshow(Iocr);\n```\n\n\u003cimg src=\"images/workflow.PNG\" alt =\"image\"/\u003e\n\n**Note:** To improve OCR results, see [Troubleshoot ocr Function Results](https://in.mathworks.com/help/vision/ug/troubleshoot-ocr-function-results.html).\n\nReferences\n---------------------------------------\n[1] Baek, Y., Lee, B., Han, D., Yun, S. and Lee, H., 2019. Character region awareness for text detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 9365-9374).\n\nCopyright 2021-2024 The MathWorks, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatlab-deep-learning%2Fseven-segment-digit-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatlab-deep-learning%2Fseven-segment-digit-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatlab-deep-learning%2Fseven-segment-digit-recognition/lists"}