AMIs follow a build-and-save procedure similar to Docker. This is ideal for large batch processing jobs where you want to start something and forget about it until it’s done. Using Docker, we only need to build OpenCV once, save it as an image, and it will be ready to be used on any system.īut while Docker is a great solution for running OpenCV with FFMPEG support on your local machine without the hassle, what if you want to run a large job in the cloud? That requires a slightly different solution: Amazon AMI’s.Īn AMI (Amazon Machine Image) is a snapshot of a system that you can boot up on a cloud server using Amazon’s EC2 service. As a result, we settled on Docker containers as our method for doing so.ĭocker images are, in a way, lighter versions of virtual machines that allow applications to be configured and deployed on various systems. Since we are building tools in-house using OpenCV and FFMPEG that we want other labs to use, it is critical that we have an easy and robust solution for distributing this toolchain. There is no easy way to prebuild OpenCV and have it work with any FFMPEG install. Unfortunately, this does not work, as OpenCV has to find FFMPEG on the given system at compile time and generate links. The first idea was to simply precompile the library with links to FFMPEG enabled and distribute it as a package for Anaconda. After that, all it takes is two lines at a command prompt to get a working version up and running on any system.īefore deciding on Docker, we considered a few different options for distribution. However, with the help of modern containerization services like Docker, we can bundle a working version of OpenCV into a container and deploy it across platforms. The build process can be tricky, with various unique issues arising on different systems. Unfortunately, OpenCV’s ability to write movies in common output formats relies on OpenCV being linked to FFMPEG (a video codec library) and compiled manually, so you can’t just install the necessary software with a package manager. For this, we use OpenCV, a tool for advanced frame-by-frame image analysis. Back to main blog Distributing OpenCV and FFMPEGįor some of our previous work on eye tracking, we needed to be able to generate videos in way that could be linked into an automated analysis pipeline.
0 Comments
Leave a Reply. |