{"id":15292518,"url":"https://github.com/idlesign/opencv-proto","last_synced_at":"2025-04-13T11:12:17.881Z","repository":{"id":57449031,"uuid":"256488427","full_name":"idlesign/opencv-proto","owner":"idlesign","description":"Allows fast prototyping in Python for OpenCV","archived":false,"fork":false,"pushed_at":"2020-04-30T11:25:24.000Z","size":100,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T11:12:12.790Z","etag":null,"topics":["opencv","opencv-python","python","python3"],"latest_commit_sha":null,"homepage":"https://github.com/idlesign/opencv-proto","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idlesign.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-17T11:49:02.000Z","updated_at":"2023-04-19T11:08:44.000Z","dependencies_parsed_at":"2022-09-26T17:30:25.355Z","dependency_job_id":null,"html_url":"https://github.com/idlesign/opencv-proto","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fopencv-proto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fopencv-proto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fopencv-proto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fopencv-proto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idlesign","download_url":"https://codeload.github.com/idlesign/opencv-proto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703198,"owners_count":21148118,"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":["opencv","opencv-python","python","python3"],"created_at":"2024-09-30T16:18:34.126Z","updated_at":"2025-04-13T11:12:17.857Z","avatar_url":"https://github.com/idlesign.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"opencv-proto\n============\nhttps://github.com/idlesign/opencv-proto\n\n|release| |lic|  |ci| |coverage|\n\n.. |release| image:: https://img.shields.io/pypi/v/opencv-proto.svg\n    :target: https://pypi.python.org/pypi/opencv-proto\n\n.. |lic| image:: https://img.shields.io/pypi/l/opencv-proto.svg\n    :target: https://pypi.python.org/pypi/opencv-proto\n\n.. |ci| image:: https://img.shields.io/travis/idlesign/opencv-proto/master.svg\n    :target: https://travis-ci.org/idlesign/opencv-proto\n\n.. |coverage| image:: https://img.shields.io/coveralls/idlesign/opencv-proto/master.svg\n    :target: https://coveralls.io/r/idlesign/opencv-proto\n\n\n**Work in progress. Stay tuned.**\n\nDescription\n-----------\n\n*Allows fast prototyping in Python for OpenCV*\n\nOffers primitives and simplified interfaces to streamline prototypes construction in Python.\n\nFacilitates:\n\n* Windows construction and management\n* Trackbar construction\n* Configuration save/load (including trackbar values)\n* Key binding (e.g. for trackbar control, configuration save/load)\n* Video capturing and modification\n* Work with images\n* Work with text\n* Frames transformation\n\n\nSamples\n-------\n\nColor Palette\n~~~~~~~~~~~~~\n\nLet's replace 37 lines of source code from `Trackbar as the Color Palette \u003chttps://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_trackbar/py_trackbar.html\u003e`_\ntutorial with ``ocvproto``-based implementation:\n\n.. code-block:: python\n\n    from ocvproto.toolbox import WindowManager, Canvas\n\n    with WindowManager() as wm:\n        rgb = wm.window.add_trackbar_group(['R', 'G', 'B'], max=255)\n        for _ in wm.app.loop():\n            wm.set_frame(Canvas(512, 300, color=rgb))\n\n\nCamera capture\n~~~~~~~~~~~~~~\n\nNow let's capture video camera stream into ``ocvproto.avi`` file, being able to adjust blur.\n\nLet's also setup config filepath (``ocvproto.json``) - this allows us to store current trackbar values\n(``s`` key) and load them (``r`` key). It is useful to restore settings between sessions.\n\nWe bind ``z`` key to take camera shots.\n\n.. code-block:: python\n\n    from ocvproto.toolbox import WindowManager, Camera\n\n    with WindowManager() as wm:\n\n        wm.app.set_config('ocvproto.json')\n\n        blur = wm.window.add_trackbar_group(['x', 'y'], 'Blur', default=1)\n\n        with Camera() as cam:\n            wm.app.bind_key('z', cam.dump_image)\n\n            for _ in wm.app.loop():\n                cam.read()\n                cam.blur(blur)\n                cam.dump()\n                wm.set_frame(cam)\n\n\nRead the documentation.\n\nRequirements\n------------\n* Python 3.6+\n* ``opencv-python`` (or variants)\n\nQuick install with third-parties: ``$ pip install opencv-proto[all]``\n\n\nDocumentation\n-------------\n\nhttps://opencv-proto.readthedocs.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidlesign%2Fopencv-proto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidlesign%2Fopencv-proto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidlesign%2Fopencv-proto/lists"}