├── README.md ├── fetch.py ├── v3.4.6 └── opencv.js ├── v3.4.7 └── opencv.js ├── v3.4.8 └── opencv.js ├── v3.4.9 └── opencv.js ├── v4.1.0 └── opencv.js ├── v4.1.1 └── opencv.js ├── v4.1.2 └── opencv.js └── v4.2.0 └── opencv.js /README.md: -------------------------------------------------------------------------------- 1 | # compiled-opencvjs 2 | 3 | This repository collects the compiled version of Opencvjs. And it's ready to use in your js environment without installation! -------------------------------------------------------------------------------- /fetch.py: -------------------------------------------------------------------------------- 1 | import os 2 | import urllib.request 3 | 4 | VERSIONS = [ 5 | '4.2.0', 6 | '4.1.2', 7 | '4.1.1', 8 | '4.1.0', 9 | '3.4.9', 10 | '3.4.8', 11 | '3.4.7', 12 | '3.4.6', 13 | ] 14 | 15 | def downlown_opencvjs_file (version, filename): 16 | url = "https://docs.opencv.org/%s/opencv.js" % version 17 | 18 | with urllib.request.urlopen(url) as response, open(filename, 'wb') as out_file: 19 | data = response.read() # a `bytes` object 20 | out_file.write(data) 21 | 22 | def main(): 23 | for v in VERSIONS: 24 | print("Checking version %s" % v) 25 | 26 | dst_dir_path = os.path.join(os.path.dirname(__file__), "v%s" % (v)) 27 | dst_file_path = os.path.join(dst_dir_path, "opencv.js") 28 | if os.path.isfile(dst_file_path): 29 | print("The file already exist. Skip this version.") 30 | else: 31 | print('Dowloadinag v%s' % v) 32 | os.makedirs(dst_dir_path) 33 | downlown_opencvjs_file(v, dst_file_path) 34 | 35 | if __name__ == '__main__': 36 | main() 37 | --------------------------------------------------------------------------------