Downloads of v 3.1.0:


Last Update:

18 Feb 2016

Package Maintainer(s):

Software Author(s):

  • Itseez


opencv programming library image processing


This is not the latest version of OpenCV available.

3.1.0 | Updated: 18 Feb 2016



Downloads of v 3.1.0:



Software Author(s):

  • Itseez

OpenCV 3.1.0

This is not the latest version of OpenCV available.

Some Checks Have Failed or Are Not Yet Complete

1 Test Passing and 1 Failing Test

Validation Testing Passed

Verification Testing Failed


To install OpenCV, run the following command from the command line or from PowerShell:


To upgrade OpenCV, run the following command from the command line or from PowerShell:


To uninstall OpenCV, run the following command from the command line or from PowerShell:


NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to

4. Choose your deployment method:

choco upgrade opencv -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade opencv -y --source="'STEP 3 URL'"

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Ensure opencv installed
    name: opencv
    state: present
    version: 3.1.0
    source: STEP 3 URL

See docs at

Coming early 2020! Central Managment Reporting available now! More information...

chocolatey_package 'opencv' do
  action    :install
  version  '3.1.0'
  source   'STEP 3 URL'

See docs at

    Name: opencv,
    Version: 3.1.0,
    Source: STEP 3 URL

Requires Otter Chocolatey Extension. See docs at

cChocoPackageInstaller opencv
   Name     = 'opencv'
   Ensure   = 'Present'
   Version  = '3.1.0'
   Source   = 'STEP 3 URL'

Requires cChoco DSC Resource. See docs at

package { 'opencv':
  provider => 'chocolatey',
  ensure   => '3.1.0',
  source   => 'STEP 3 URL',

Requires Puppet Chocolatey Provider module. See docs at

salt '*' chocolatey.install opencv version="3.1.0" source="STEP 3 URL"

See docs at

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved by moderator ferventcoder on 19 Feb 2016.


Pass the package argument /InstallationPath to set where OpenCV will unzip itself. Left alone, it will unzip in the root C: drive. Remember, it will always unzip itself to a new folder called \opencv in the directory you chose.
Pass the package argument /Environment to add OpenCV to your user environment variables, which may or may not be necessary. Check the installation guide on OpenCV's website to determine the precise directory stucture you want to add to your path. The OPENCV_DIR variable will be created/replaced, and Path will be appended with %OPENCV_DIR%\bin.

OpenCV is released under a BSD license and hence it's free for both academic and commercial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform. Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.

$arguments = @{}
$packageParameters = $env:chocolateyPackageParameters
$ErrorActionPreference = 'Stop';
$packageName= 'OpenCV'
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url        = ''
$installationPath = "C:\"

if ($packageParameters) {
    $match_pattern = "\/(?<option>([a-zA-Z]+)):(?<value>([`"'])?([a-zA-Z0-9- _\\:\.]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
    $option_name = 'option'
    $value_name = 'value'

    if ($packageParameters -match $match_pattern ) {
        $results = $packageParameters | Select-String $match_pattern -AllMatches
        $results.matches | % {
    else {
        Throw "Package Parameters were found but were invalid (REGEX Failure)"

    if ($arguments.ContainsKey("InstallationPath")) {
        Write-Host "You chose to unzip OpenCV in" $arguments["InstallationPath"]
        $installationPath = $arguments["InstallationPath"]
    else {
		Write-Host "No directory specified, installing to" $installationPath

    if ($arguments.ContainsKey("Environment")) {
        Write-Host "Creating OPENCV_DIR environment variable."
        $newpath = [environment]::GetEnvironmentVariable("Path","User") + ";%OPENCV_DIR%\bin"
    else {
        Write-Host "You will need to manually create an OPENCV_DIR environment variable then add %OPENCV_DIR%\bin to your PATH.  Read the OpenCV documentation for more details."

else {
	Write-Host "No directory specified, installing to" $installationPath"."
	Write-Host "To install to a specific directory, pass '/InstallationPath:C:\path\to'. OpenCV will create its own folder within the directory you passed."
	Write-Host "You will need to manually create an OPENCV_DIR environment variable then add %OPENCV_DIR%\bin to your PATH."
    Write-Host "Alternately, you can rerun this and pass '/Environment:C:\path\to' Follow the OpenCV instructions on their website to figure out which directory you would want."

$packageArgs = @{
		packageName   = $packageName
		unzipLocation = $installationPath
		fileType      = 'EXE'
		url           = $url

Install-ChocolateyZipPackage @packageArgs

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
OpenCV 4.1.1 1916 Monday, July 29, 2019 Approved
OpenCV 4.1.0 5429 Tuesday, April 9, 2019 Approved
OpenCV 4.0.1 2895 Wednesday, January 2, 2019 Approved
OpenCV 4.0.0 1444 Monday, November 26, 2018 Approved
OpenCV 4.0.0-rc 149 Monday, November 26, 2018 Approved
OpenCV 4.0.0-beta 174 Thursday, October 25, 2018 Approved
OpenCV 4.0.0-alpha 123 Wednesday, October 24, 2018 Approved

This is the first stabilization update in 3.x series. It shall be reminded that since OpenCV 3.0 we�ve changed the version enumeration scheme, so that 3.1 is the same sort of update to 3.0 as 2.4.1 was to 2.4.0.

This package has no dependencies.

Discussion for the OpenCV Package

Ground Rules:

  • This discussion is only about OpenCV and the OpenCV package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or OpenCV, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus