{"id":19021454,"url":"https://github.com/wpiroboticsprojects/opencv-installer","last_synced_at":"2025-04-23T07:52:37.054Z","repository":{"id":73953523,"uuid":"67893443","full_name":"WPIRoboticsProjects/opencv-installer","owner":"WPIRoboticsProjects","description":"Simple application to install OpenCV","archived":false,"fork":false,"pushed_at":"2019-05-07T14:31:59.000Z","size":90,"stargazers_count":6,"open_issues_count":3,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-17T22:09:36.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/WPIRoboticsProjects.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":"2016-09-10T20:42:29.000Z","updated_at":"2024-03-31T14:18:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"608b0a73-c1ea-4da4-96de-d7a9646f57f2","html_url":"https://github.com/WPIRoboticsProjects/opencv-installer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WPIRoboticsProjects%2Fopencv-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WPIRoboticsProjects%2Fopencv-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WPIRoboticsProjects%2Fopencv-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WPIRoboticsProjects%2Fopencv-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WPIRoboticsProjects","download_url":"https://codeload.github.com/WPIRoboticsProjects/opencv-installer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395107,"owners_count":21423375,"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":[],"created_at":"2024-11-08T20:22:02.623Z","updated_at":"2025-04-23T07:52:37.047Z","avatar_url":"https://github.com/WPIRoboticsProjects.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencv-installer\nSimple application to install OpenCV.\n\nThis assumes that the OpenCV artifacts are located in the FRC maven repository at `https://first.wpi.edu/FRC/roborio/maven/development` or in the local maven repository.\n\n(Artifacts for this project are also available in the above repository)\n\n[Link to the maven repo](https://first.wpi.edu/FRC/roborio/maven/development)\n\nFor now, this is just a CLI app with no GUI.\n\n## Supported platforms\nThis currently supports  \n\n- Windows (32- and 64-bit x86)  \n- Mac OS X 10.4 or higher  \n- Linux (32- and 64-bit x86, and ARM soft- and hard-float)\n\n### Windows notes\n\nArtifacts are installed by default in `C:\\Users\\\u003cuser\u003e\\OpenCV\\`. You will need to add the install locations to the `PATH` environment variable. \n\n### Linux notes\n\nJNI and native bindings will be installed in `/usr/local/lib` and the headers will be installed in `/usr/local/include`. If you don't have write access to these folders, you can run the installer with \n\n`sudo java -Duser.home=$HOME -jar ...`\n\nMake sure that `/usr/local/lib` is on `LD_LIBRARY_PATH` or the JNI bindings won't be loaded by the JVM.\n\n### OS X notes\n\nSimilar to Linux, but you probably won't need to use `sudo`.\n\n\n## Command line arguments\n\nShort name | Long name | Description | Argument\n---|---|---|---\n| `h` | `help` | Prints the help text |\n| `v` | `version` | Sets the OpenCV version | The version in the format `x.x.x` e.g. `3.1.0`\n| `j` | `java` | Flags the Java API for install. This does _not_ install JNI bindings | Install location (optional)\n| `i` | `jni` | Flags the JNI bindings for install | Install location (optional)\n| `s` | `headers` | Flags the C++ headers for install | Install location (optional)\n| `n` | `natives` | Flags the C++ native libraries for install | Install location (optional)\n| `a` | `all` | Installs all OpenCV artifacts\n| `o` | `overwrite` | Overwrite already installed files\n| `p` | `platform` | Download artifacts for a specific platform. They will be located in `./install` | The platform to download artifacts for\n\n### Options for `platform`\n```\nwindows-x86\nwindows-x86_64\nosx-x86_64\nlinux-x86\nlinux-x86_64\nlinux-arm\nlinux-armhf\n```\n\n### Usage\n```\njava -jar opencv-installer --version \u003cversion\u003e --platform \u003cplatform\u003e --java \u003clocation\u003e --jni \u003clocation\u003e --headers \u003clocation\u003e --natives \u003clocation\u003e --overwrite\n```\n\n## Using the installer in Gradle build scripts\n\n```groovy\nbuildscript {\n  repositories {\n    maven {\n      url 'https://github.com/WPIRoboticsProjects/opencv-maven/raw/mvn-repo'\n    }\n  }\n  dependencies {\n    classpath group: 'edu.wpi.first.wpilib.opencv', name: 'opencv-installer', version: '+'\n  }\n}\n\nimport edu.wpi.first.wpilib.opencv.installer.Installer\nimport edu.wpi.first.wpilib.opencv.installer.PlatformDetector\n\ndef openCvPlatform = PlatformDetector.getPlatform()\ndef openCvVersion = '3.1.0'\n\ndependencies {\n  compile group: 'org.opencv', name: 'opencv-java', version: openCvVersion\n  ...\n}\n\ntask installOpenCvJni(type: Copy) {\n  Installer.setVersion(openCvVersion)\n  Installer.installJni(openCvPlatform.defaultJniLocation())\n  // Or manually set the install location\n  Installer.installJni('/usr/local/lib')\n}\n```\n\n## Using the installer as Java library\n\nFirst, add\n\n```groovy\nrepositories {\n  maven {\n    url 'https://github.com/WPIRoboticsProjects/opencv-maven/raw/mvn-repo'\n  }\n}\ndependencies {\n  compile group: 'edu.wpi.first.wpilib.opencv', name: 'opencv-installer', version: '+'\n}\n```\n\nto your `build.gradle` file.\n\nThen to make sure that OpenCV is installed prior to using any OpenCV code:\n\n```java\nimport edu.wpi.first.wpilib.opencv.installer.Installer;\nimport edu.wpi.first.wpilib.opencv.installer.PlatformDetector;\nimport org.opencv.core.Core;\n\nclass Main {\n\n  static {\n    Installer.setOpenCvVersion(Core.VERSION);\n    Installer.installJni(PlatformDetector.getPlatform().defaultJniLocation());\n    System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\n  }\n\n}\n```\n\nThis will install OpenCV on the current system if the JNI bindings are available for it. If there aren't any JNI bindings, an `IOException` will be thrown by the call to `Installer.installJni()`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpiroboticsprojects%2Fopencv-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpiroboticsprojects%2Fopencv-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpiroboticsprojects%2Fopencv-installer/lists"}