{"id":15657916,"url":"https://github.com/tobybreckon/python-examples-ip","last_synced_at":"2025-09-11T13:11:27.247Z","repository":{"id":54970393,"uuid":"73108951","full_name":"tobybreckon/python-examples-ip","owner":"tobybreckon","description":"OpenCV Python Image Processing Examples used for Teaching","archived":false,"fork":false,"pushed_at":"2025-01-13T22:50:21.000Z","size":178,"stargazers_count":25,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T11:13:43.932Z","etag":null,"topics":["image-processing","opencv","python","webcam"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobybreckon.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}},"created_at":"2016-11-07T18:36:15.000Z","updated_at":"2025-01-13T22:50:24.000Z","dependencies_parsed_at":"2025-04-15T10:49:39.289Z","dependency_job_id":"dfc95c47-d247-41b2-9f28-5842a380eacb","html_url":"https://github.com/tobybreckon/python-examples-ip","commit_stats":{"total_commits":132,"total_committers":6,"mean_commits":22.0,"dds":0.4696969696969697,"last_synced_commit":"b9073a0f4431ef3448a476d271af54f276d866a6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tobybreckon/python-examples-ip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobybreckon%2Fpython-examples-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobybreckon%2Fpython-examples-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobybreckon%2Fpython-examples-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobybreckon%2Fpython-examples-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobybreckon","download_url":"https://codeload.github.com/tobybreckon/python-examples-ip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobybreckon%2Fpython-examples-ip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274640914,"owners_count":25322843,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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":["image-processing","opencv","python","webcam"],"created_at":"2024-10-03T13:10:21.892Z","updated_at":"2025-09-11T13:11:27.151Z","avatar_url":"https://github.com/tobybreckon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Image Processing OpenCV Teaching Examples\n\nOpenCV Python image processing examples used for teaching within the undergraduate Computer Science programme\nat [Durham University](http://www.durham.ac.uk) (UK) by [Prof. Toby Breckon](https://breckon.org/toby/).\n\n![Python - PEP8](https://github.com/tobybreckon/python-examples-ip/workflows/Python%20-%20PEP8/badge.svg)\n\nAll tested with [OpenCV](http://www.opencv.org) 3.x / 4.x and Python 3.x.\n\n```\n# Example : \u003c................................\u003e processing from a video file\n# specified on the command line (e.g. python FILE.py video_file) or from an\n# attached web camera\n```\n\nMore generally most of the examples accessing camera or video can be used as follows:\n\n```\npython3 ./skeleton.py -h\nusage: skeleton.py [-h] [-c CAMERA_TO_USE] [-r RESCALE] [video_file]\n\nPerform ./skeleton.py example operation on incoming camera/video image\n\npositional arguments:\n  video_file            specify optional video file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CAMERA_TO_USE, --camera_to_use CAMERA_TO_USE\n                        specify camera to use\n  -r RESCALE, --rescale RESCALE\n                        rescale image by this factor\n```\n\nMost run with a webcam connected or from a command line supplied video file of a format OpenCV supports on your system (supplied as a command line argument as per above).\n\nDemo source code is provided _\"as is\"_ to aid learning and understanding of topics on the course and beyond.\n\n---\n\n### Background:\n\nDirectly adapted from the [C++](https://github.com/tobybreckon/cpp-examples-ipcv.git) and earlier [C](https://github.com/tobybreckon/cpp-examples-ipcv.git) language teaching examples used to generate the video examples within the ebook version of:\n\n[Dictionary of Computer Vision and Image Processing](http://dx.doi.org/10.1002/9781119286462) (R.B. Fisher, T.P. Breckon, K. Dawson-Howe, A. Fitzgibbon, C. Robertson, E. Trucco, C.K.I. Williams), Wiley, 2014.\n[[Google Books](http://books.google.co.uk/books?id=TaEQAgAAQBAJ\u0026lpg=PP1\u0026dq=isbn%3A1118706811\u0026pg=PP1v=onepage\u0026q\u0026f=false)] [[doi](http://dx.doi.org/10.1002/9781119286462)]\n\nNotably, the [C++](https://github.com/tobybreckon/cpp-examples-ipcv.git) examples may contain further speed optimizations.\n\n---\n### How to download and run:\n\nDownload each file as needed or to download the entire repository and run each try:\n\n```\ngit clone https://github.com/tobybreckon/python-examples-ip.git\ncd python-examples-ip\npython3 ./\u003cinsert file name of one of the examples\u003e.py [optional video file]\n```\n\nAn extremely simple example to check if OpenCV and the other python libraries commonly needed by these examples are present/working on your system and which version of them is in use, is the ``version.py`` example:\n\n```\npython3 ./version.py\n```\n\nwhich should then output something like this (but with the _\"x\"_ elements completed\nspecific to your system install):\n\n```\nWe are using OpenCV: x.x.x\n.. do we have the Open CV Contrib Modules: xxxx\nWe are using numpy: x.x.x\nWe are using matplotlib: x.x.x\n.. and this is in Python: x.x.x (default, xxxxx) [xxx]\n```\n\nMore generally an extended set of [OpenCV functionality tests](TESTING.md) is available (used to check OpenCV itself is working) and also a simple bash shell script (``test_all.sh``) to run through all the examples for semi-automated testing.\n\n---\n\n### Re-usable Exemplar Components (Python Classes):\n\nThis codebase contains the following re-usable exemplar elements:\n\n- ```camera_stream.py``` - a re-usable threaded camera class, that is call compatible with the existing OpenCV VideoCapture class, designed to always deliver the latest frame from a single camera without buffering delays (used by all examples if available).\n\nThe master copy of the above is available from the the [OpenCV Python Computer Vision Examples used for Teaching](https://github.com/tobybreckon/python-examples-cv) repository.\n\n---\n\n### Reference:\n\nAll techniques are fully explained in corresponding section of:\n\n_Fundamentals of Digital Image Processing: A Practical Approach with Examples in Matlab_,\nChris J. Solomon and Toby P. Breckon, Wiley-Blackwell, 2010\nISBN: 0470844736, DOI:10.1002/9780470689776, http://www.fundipbook.com\n\n(which also has Matlab code examples of many of the same techniques here - [https://github.com/tobybreckon/solomon-breckon-book.git]( https://github.com/tobybreckon/solomon-breckon-book.git))\n\n```\n@Book{solomonbreckon10fundamentals,\n  author \t    = \t {Solomon, C.J. and Breckon, T.P.},\n  title \t     = \t {Fundamentals of Digital Image Processing: A Practical Approach with Examples in Matlab},\n  publisher \t = \t {Wiley-Blackwell},\n  year \t\t  =   {2010},\n  isbn      =   {0470844736},\n  doi       = {10.1002/9780470689776},\n  url       = {http://www.fundipbook.com}\n}\n```\n\n---\n\nIf you find any bugs raise an issue (or much better still submit a git pull request with a fix) - toby.breckon@durham.ac.uk\n\n_\"may the source be with you\"_ - anon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobybreckon%2Fpython-examples-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobybreckon%2Fpython-examples-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobybreckon%2Fpython-examples-ip/lists"}