{"id":18764396,"url":"https://github.com/momsfriendlyrobotcompany/dpkg_opencv","last_synced_at":"2026-05-02T10:41:06.416Z","repository":{"id":111157518,"uuid":"115448170","full_name":"MomsFriendlyRobotCompany/dpkg_opencv","owner":"MomsFriendlyRobotCompany","description":"OpenCV 4.x debian package for Raspbian ","archived":false,"fork":false,"pushed_at":"2020-03-28T12:14:08.000Z","size":77663,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T20:37:49.708Z","etag":null,"topics":["debian-packages","opencv","opencv3","raspbian"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MomsFriendlyRobotCompany.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}},"created_at":"2017-12-26T19:09:54.000Z","updated_at":"2020-08-17T04:36:53.000Z","dependencies_parsed_at":"2023-03-24T19:30:50.578Z","dependency_job_id":null,"html_url":"https://github.com/MomsFriendlyRobotCompany/dpkg_opencv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MomsFriendlyRobotCompany/dpkg_opencv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyRobotCompany%2Fdpkg_opencv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyRobotCompany%2Fdpkg_opencv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyRobotCompany%2Fdpkg_opencv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyRobotCompany%2Fdpkg_opencv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MomsFriendlyRobotCompany","download_url":"https://codeload.github.com/MomsFriendlyRobotCompany/dpkg_opencv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MomsFriendlyRobotCompany%2Fdpkg_opencv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32531742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["debian-packages","opencv","opencv3","raspbian"],"created_at":"2024-11-07T18:29:42.186Z","updated_at":"2026-05-02T10:41:06.381Z","avatar_url":"https://github.com/MomsFriendlyRobotCompany.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dpkg [OpenCV](https://github.com/opencv/opencv)\n\nUnfortunately raspbian has old packages and the linux distro model is to move\nslow and not update things. Unfortunately linux homebrew doesn't always work\n(I use homebrew on macOS and it is awesome!) on liux.\n\n# What this does\n\nThis package installs to `/home/pi/.local` and doesn't interact with normal debian\npackages from Raspbian. You can install by:\n\n1. You will need to install my [`dpkg_python3`](https://github.com/MomsFriendlyRobotCompany/dpkg_python3) first\n1. Install package with: `sudo dpkg -i kevin-opencv-3.x.x.deb` where 3.x.x is the\ncurrent version\n\n## Package Setup\n\n- DEBIAN\n    - control (required)\n    - templates (optional)\n    - preinst (optional, chmod 0755)\n    - postinst (optional, chmod 0755)\n    - prerm (optional, chmod 0755)\n    - postrm (optional, chmod 0755)\n\n where:\n\n**preinst** – this script executes before that package will be unpacked from its Debian archive (“.deb”) file. Many ‘preinst’ scripts stop services for packages which are being upgraded until their installation or upgrade is completed (following the successful execution of the ‘postinst’ script).\n\n**postinst** – this script typically completes any required configuration of the package foo once it has been unpacked from its Debian archive (“.deb”) file. Often ‘postinst’ scripts ask the user for input, and/or warn the user that if they accept the default values, they should remember to go back and re-configure that package as the situation warrants. Many ‘postinst’ scripts then execute any commands necessary to start or restart a service once a new package has been installed or upgraded.\n\n**prerm** – this script typically stops any daemons which are associated with a package. It is executed before the removal of files associated with the package.\n\n**postrm** – this script typically modifies links or other files associated with foo, and/or removes files created by the package.\n\n## Test Raspberry Pi Camara with Video4Linux\n\nOne way to use the Raspberry Pi camera connected to the ribbon cable with OpenCV is the picamera module. You have to set it up to grab images to numpy.array then map the array to OpenCV Mat. But that has a completely different interface. Instead let's setup the Pi Camera to use the standard `cv2.VideoCapture(0)`.\n\nTo use the standard grabbing loop `cv2.VideoCapture(0)`  with raspicam the Video4Linux driver is needed.\n\n1. Check prerequisites (with sudo raspi-config):\n    1. Enable the camera\n    1. Set large memory for gpu_mem (In Advance Options \u003e Memmory Split set 128 MB)\n1. Install v4l library from repository: `sudo apt-get -y install libv4l-dev v4l-utils`\n1. Enable the kernel module: `sudo modprobe bcm2835-v4l2`\n1. Test the module with: `v4l2-ctl --list-devices`\n1. You should receive something like this:\n\t```bash\n\tmmal service 16.1 (platform:bcm2835-v4l2):\n\t\t /dev/video0\n\t```\n1. Test: try to grab a single frame and check for the file  `test.jpg`:\n\t```bash\n\tv4l2-ctl --set-fmt-video=width=800,height=600,pixelformat=3\n\tv4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=./test.jpg\n\t```\n1. Info: check all available controls like brightness, contrast, etc with: `v4l2-ctl --list-ctrls`\n\n**If all it works** well, add the module name `bcm2835-v4l2` to the list of modules \nloaded at boot time in `/etc/modules-load.d/modules.conf`.\n\n\n# Build the Package\n\nGet the current OpenCV number from: https://github.com/opencv/opencv/releases\n\nYou should be able to use the package already built in this\nrepo, but if you want/need to build it, do:\n\n\t./update-opencv.sh\n\t./build-opencv.sh 3.4.0\n\t./build-pkg.sh 3.4.0\n\nNote, you pass the version number to `build-opencv.sh` so it downloads the version you want\nand you pass it `build-pkg.sh` so it gets appended onto the packages name. After, running \nthe above commands, you should now have a shiny new debian package.\n\n## Check\n\nYou can double check your package with: `dpkg-deb --info \u003cdeb file\u003e`\n\n```bash\npi@mario opencv3 $ dpkg-deb --info libopencv3.4.0.deb\n new debian package, version 2.0.\n size 7369108 bytes: control archive=651 bytes.\n     159 bytes,     7 lines   *  control              \n     292 bytes,    10 lines      copyright            \n       6 bytes,     1 lines   *  install              \n     512 bytes,    25 lines   *  postinst             #!/bin/bash\n Package: opencv\n Architecture: all\n Maintainer: Kevin\n Depends: debconf (\u003e= 0.5.00)\n Priority: optional\n Version: 3.4.0\n Description: Kevins computer vision library\n ```\n\n# Install the Package\n\nMake sure to run update opencv script so you have the right libraries installed and setup.\n\n\t./update-opencv.sh\n\tsudo dpkg -i libopencv3.4.0.deb\n\n## References\n\n- [Package setup details](https://www.leaseweb.com/labs/2013/06/creating-custom-debian-packages/)\n- [Install OpenCV 3.2 Python/C++ on Raspberry PI using video4linux interface](http://pklab.net/index.php?lang=EN\u0026id=392)\n\n# Licenses\n\n## BSD License for OpenCV\n\nSee its license file\n\n## MIT License for build scripts\n\nCopyright (c) 2016 Kevin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Documentation\n\n \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-sa/4.0/88x31.png\" align=\"middle\"/\u003e\u003c/a\u003e\u003cbr /\u003eThis documentation is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\"\u003eCreative Commons Attribution-ShareAlike 4.0 International License\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomsfriendlyrobotcompany%2Fdpkg_opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmomsfriendlyrobotcompany%2Fdpkg_opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmomsfriendlyrobotcompany%2Fdpkg_opencv/lists"}