Machine vision (three)-OpenCV library

Machine vision (three)-OpenCV library

Overview

The OpenCV library (Open Source Computer Vision Library) is a cross-platform open source computer vision library released under the BSD license, which can run on operating systems such as Linux, Windows, and mac OS. OpenCV is composed of a series of C functions and a small number of C++ classes. It also provides interfaces for languages ​​such as C++, python, Ruby, MATLAB, etc. It implements many common algorithms in image processing and computer vision, and it is free for non-commercial and commercial applications. of. At the same time, OpenCV can directly access the hardware camera, and also provides a simple GUI system-highgui.

One, install OpenCV

Based on the OpenCV library, we can quickly develop machine vision applications, and the OpenCV library and related interface function packages have been integrated in ROS. You can install it with the following command:

sudo apt-get install ros-kinetic-vision-opencv libopencv-dev python-opencv

Two, use OpenCV in ROS

ROS provides developers with an interface function package with OpenCV-cv_bridge. Developers can use this function package to convert image data in ROS into OpenCV format images, and call OpenCV library for various image processing; or convert OpenCV processed data into ROS images, and publish through topics to realize each node Image transfer between.
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45661757/article/details/113256733