{"id":23059855,"url":"https://github.com/jetsonhacks/buildopencvtx2","last_synced_at":"2025-10-09T08:39:11.953Z","repository":{"id":83667214,"uuid":"87323575","full_name":"jetsonhacks/buildOpenCVTX2","owner":"jetsonhacks","description":"Build and install OpenCV for the NVIDIA Jetson TX2","archived":false,"fork":false,"pushed_at":"2022-12-29T05:06:38.000Z","size":48,"stargazers_count":276,"open_issues_count":20,"forks_count":151,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-30T05:07:09.684Z","etag":null,"topics":["gstreamer","image-processing","jetson","jetson-tx2","opencv"],"latest_commit_sha":null,"homepage":null,"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/jetsonhacks.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}},"created_at":"2017-04-05T15:07:11.000Z","updated_at":"2025-02-20T05:13:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"691d9017-bf15-4681-aa15-15cb2f0817a0","html_url":"https://github.com/jetsonhacks/buildOpenCVTX2","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/jetsonhacks%2FbuildOpenCVTX2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetsonhacks%2FbuildOpenCVTX2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetsonhacks%2FbuildOpenCVTX2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetsonhacks%2FbuildOpenCVTX2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jetsonhacks","download_url":"https://codeload.github.com/jetsonhacks/buildOpenCVTX2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441059,"owners_count":20939239,"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":["gstreamer","image-processing","jetson","jetson-tx2","opencv"],"created_at":"2024-12-16T03:08:08.420Z","updated_at":"2025-10-09T08:39:06.931Z","avatar_url":"https://github.com/jetsonhacks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# buildOpenCVTX2\nBuild and install OpenCV for the NVIDIA Jetson TX2\n\nThese scripts build OpenCV version 3.4 for the NVIDIA Jetson TX2 Development Kit. Please see Releases/Tags for earlier versions.\n\nOpenCV is a rich environment which can be configured in many different ways. You should configure OpenCV for your needs, by modifying the build file \"buildOpenCV.sh\". Note that selecting different options in OpenCV may also have additional library requirements which are not included in these scripts. Please read the notes below for other important points before installing.\n\nThe buildOpenCV script has two optional command line parameters:\n\n\u003cul\u003e\n\u003cli\u003e-s | --sourcedir   Directory in which to place the opencv sources (default $HOME)\u003c/li\u003e\n\u003cli\u003e-i | --installdir  Directory in which to install opencv libraries (default /usr/local)\u003c/li\u003e\n\u003c/ul\u003e\n\nTo run the the build file:\n\n$ ./buildOpenCV.sh -s \u0026lt;file directory\u0026gt;\n\nThis example will build OpenCV in the given file directory and install OpenCV in the /usr/local directory.\n\nThe folder ~/opencv and (optional) ~/opencv_extras contain the source, build and extra data files. If you wish to remove them after installation, a convenience script is provided:\n\n$ ./removeOpenCVSources.sh -d \u0026lt;file directory\u0026gt;\n\nwhere the \u0026lt;file directory\u0026gt; contains the OpenCV source.\n\nThe folder ~/opencv and ~/opencv_extras contain the source, build and extra data files. If you wish to remove them after installation, a convenience script is provided:\n\n$ ./removeOpenCVSources.sh\n\n\u003ch3\u003ePackaging\u003c/h3\u003e\nAn alternative build script, buildAndPackageOpenCV.sh , will build the OpenCV package as described above and the build .deb files using the standard OpenCV mechanism defined using the CPACK_BINARY_DEB=ON in the OpenCV Make file. See the script.\n\nThe buildAndPackageOpenCV script has two optional command line parameters:\n\n\u003cul\u003e\n\u003cli\u003e-s | --sourcedir   Directory in which to place the opencv sources (default $HOME)\u003c/li\u003e\n\u003cli\u003e-i | --installdir  Directory in which to install opencv libraries (default /usr/local)\u003c/li\u003e\n\u003c/ul\u003e\n\nTo run the the build file:\n\n$ ./buildAndPackageOpenCV.sh -s \u0026lt;file directory\u0026gt;\n\nThis example will build OpenCV in the given file directory and install OpenCV in the /usr/local directory.\n\nThe corresponding .deb files will be in the \u0026lt;file directory\u0026gt;/opencv/build directory in .deb file and compressed forms. \n\n\u003ch4\u003eInstalling .deb files\u003c/h4\u003e\n\nTo install .deb files:\n\nSwitch to the directory where the .deb files are located. Then:\n\n\u003cblockquote\u003e\n$ sudo dpkg -i OpenCV-\u0026lt;OpenCV Version info\u0026gt;-aarch64-libs.deb\n\n\u003cem\u003eFor example: $ sudo dpkg -i OpenCV-3.4.1-1-g75a2577-aarch64-libs.deb\u003c/em\u003e \n\n$ sudo apt-get install -f\n\n$ sudo dpkg -i OpenCV-\u0026lt;OpenCV Version info\u0026gt;-aarch64-dev.deb \n\n$ sudo dpkg -i OpenCV-\u0026lt;OpenCV Version info\u0026gt;-aarch64-python.deb \u003c/blockquote\u003e\n\nThe libraries will be installed in /usr/lib\n\nBinaries are in /usr/bin\n\nopencv.pc is in /usr/lib/pkgconfig\n\n\u003cstrong\u003ePackage Notes: \u003c/strong\u003e\n\u003cul\u003e\u003cli\u003eThe build process default installation is in /usr/local\nNote that the .deb file install into /usr\u003c/li\u003e\n\u003cli\u003eAfter installation, the dpkg/apt name does not include version information, e.g. the name is opencv-libs\u003c/li\u003e\n\u003c/ul\u003e\n\n## Notes\nThere may be issues if different version of OpenCV are installed. JetPack normally installs OpenCV in the /usr folder. You will need to consider if this is appropriate for your application. It is important to realize that many packages may rely on OpenCV. The standard installation by JetPack places the OpenCV libraries in the /usr directory. \n\nYou may consider removing OpenCV installed by JetPack before performing this script installation:\n\n$ sudo apt-get purge libopencv*\n\nWith this script release, the script now installs OpenCV in /usr/local. Earlier versions of this script installed in /usr. You may have to set your include and libraries and/or PYTHONPATH to point to the new version. See the Examples folder. Alternatively, you may want to change the script to install into the /usr directory.\n\nThe Jetson is an aarch64 machine, which means that the OpenCV configuration variable ENABLE_NEON is ignored. The compiler includes NEON support for all machines with aarch64 architecture.\n\nThese scripts rely on OpenCV finding the correct CUDA version, instead of setting it manually.\n\nSpecial thanks to Daniel (Github user @dkoguciuk) for script cleanup.\n\n\n## References\n\nMost of this information is derived from:\n\nhttp://docs.opencv.org/3.2.0/d6/d15/tutorial_building_tegra_cuda.html\n\nhttps://devtalk.nvidia.com/default/topic/965134/opencv-3-1-compilation-on-tx1-lets-collect-the-quot-definitive-quot-cmake-settings-/?offset=3\n\n## Release Notes\nJune 2018\n* L4T 28.2\n* CUDA 9\n* OpenCV 3.4\n* Added command line arguments to set source and installation directories\n* Add a script to build OpenCV .deb packages.\n* Add upstream patch for C library compilation issues\n\nMay 2018\n* L4T 28.2\n* CUDA 9\n* OpenCV 3.4\n* OpenGL support added to build script\n* Fast Math support (cuBLAS) added\n* Supports both Python 2 and Python 3\n* Canny Detection example supports built-in camera and USB camera. See the Examples folder\n\nSeptember 2017\n* L4T 28.1\n* CUDA 8\n* OpenCV 3.3\n* GStreamer support added to build script\n* GStreamer OpenCV examples using the Jetson onboard camera \n\nApril 2017\n* Initial Release\n* L4T 27.1\n* OpenCV 3.2\n\n## License\nMIT License\n\nCopyright (c) 2017-2018 Jetsonhacks\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetsonhacks%2Fbuildopencvtx2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetsonhacks%2Fbuildopencvtx2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetsonhacks%2Fbuildopencvtx2/lists"}