Matlab vs. OpenCV: A Comparative Study of Different Machine Learning Algorithms

Ahmed A. Elsayed,Waleed A. Yousef
DOI: https://doi.org/10.48550/arXiv.1905.01213
2019-08-14
Abstract:Scientific Computing relies on executing computer algorithms coded in some programming languages. Given a particular available hardware, algorithms speed is a crucial factor. There are many scientific computing environments used to code such algorithms. Matlab is one of the most tremendously successful and widespread scientific computing environments that is rich of toolboxes, libraries, and data visualization tools. OpenCV is a (C++)-based library written primarily for Computer Vision and its related areas. This paper presents a comparative study using 20 different real datasets to compare the speed of Matlab and OpenCV for some Machine Learning algorithms. Although Matlab is more convenient in developing and data presentation, OpenCV is much faster in execution, where the speed ratio reaches more than 80 in some cases. The best of two worlds can be achieved by exploring using Matlab or similar environments to select the most successful algorithm; then, implementing the selected algorithm using OpenCV or similar environments to gain a speed factor.
Machine Learning,Mathematical Software,Software Engineering
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the performance differences between different programming environments in scientific computing, especially in terms of the execution speed of machine - learning algorithms. Specifically, the author explores the advantages and disadvantages of Matlab and OpenCV by comparing the speeds of machine - learning algorithms on 20 different real - world datasets in these two environments. Although Matlab has advantages in development convenience and data presentation, OpenCV performs better in execution speed, and in some cases, the speed can be increased by more than 80 times. The paper also discusses how to combine the advantages of the two, that is, first use Matlab or a similar environment to select the optimal algorithm, and then use OpenCV or a similar environment for efficient implementation to obtain the best execution efficiency.