{"id":19617537,"url":"https://github.com/kakshay21/opencv","last_synced_at":"2026-04-16T02:30:58.170Z","repository":{"id":97810360,"uuid":"105425764","full_name":"kakshay21/OpenCV","owner":"kakshay21","description":"Security Automation Tool","archived":false,"fork":false,"pushed_at":"2017-10-25T12:09:57.000Z","size":9937,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T18:17:15.922Z","etag":null,"topics":["algorithm","opencv","security-automation"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kakshay21.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":"2017-10-01T07:17:47.000Z","updated_at":"2023-09-04T21:05:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"55648b85-c997-48b4-bf9f-dd6e958f0326","html_url":"https://github.com/kakshay21/OpenCV","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kakshay21/OpenCV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakshay21%2FOpenCV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakshay21%2FOpenCV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakshay21%2FOpenCV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakshay21%2FOpenCV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kakshay21","download_url":"https://codeload.github.com/kakshay21/OpenCV/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakshay21%2FOpenCV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31868487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["algorithm","opencv","security-automation"],"created_at":"2024-11-11T11:04:33.906Z","updated_at":"2026-04-16T02:30:58.138Z","avatar_url":"https://github.com/kakshay21.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OpenCV\r\n### What does it do?\r\n\r\nIt can detect the presence of any person and record the time in a text file. \r\n#### Possible use case  \r\nSecurity automation where it can warn the security authority when something interesting happens in the video. Can save endless hours in watching these security tapes.\r\n\r\n### How to spin it up\r\n\r\n### *Requirements*\r\n#### 1. openCV 3.0 or greater\r\n#### 2. imutils\r\n#### 3. [this video](https://drive.google.com/file/d/0B2vPCVjlmUOsa2otcnJMbmtKRFE/view?usp=sharing)\r\n\r\n### *Approach*\r\n#### Approach 1:\r\nYou can use Darknet model to recognize the image but it's computationally heavy task and can't run it on every frame.\r\nBesides, Darknet model is not compiled in openCV, so you can trigger it but the question is How to get the result back? \r\nI was amazed at its accuracy and wanted to use it so badly in this project but every one frame costs me the 6-second \r\nloss of the time in computing. \r\n![alt ](https://github.com/kakshay21/OpenCV/blob/master/predictions.png)\r\nAs you can see very good prediction.\r\n\r\n#### Approach 2:\r\nUse some predefined algorithm to subtract the background from the video and detect the change in the scene. \r\n[Here](http://docs.opencv.org/3.3.0/db/d5c/tutorial_py_bg_subtraction.html) is a good tutorial for this.\r\nThese actually work well even with the shadow. But the problem with this approach is the video we have to refresh\r\nthe scene every 5 sec. So any predefined algorithm like above mentioned takes first 120 frames to set threshold and \r\nsubtract it frame by frame. Only problem, the video we are working with is, it refreshes the scene every 5 sec. \r\nSo even with the no activity in the video, we'll find something like this\r\n![alt ](https://github.com/kakshay21/OpenCV/blob/master/anamoly.png)\r\n#### Approach 3:\r\nStraightforward, just use the approach of the above algorithm and fit it with the current scenario. pretty easy, right?\r\nLet's see in detail.\r\n\r\nJust convert the frame into gray one and make a threshold image after blurring it to a bit.\r\nNow subtract it frame by frame with the current frame.\r\n\r\nVoila! It's working.\r\n\r\n![alt ](https://github.com/kakshay21/OpenCV/blob/master/detect.png)\r\n\r\nWanna try it?\r\nCode is [here](https://github.com/kakshay21/OpenCV/blob/master/run.py)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakshay21%2Fopencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkakshay21%2Fopencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakshay21%2Fopencv/lists"}