Python-OpenCV development environment construction tutorial (mac version)

1. OpenCV development tool installation

1.1 pip install --upgrade setuptools

(python configuration tool)
insert image description here

1.2 pip install numpy

(math library in python)
insert image description here

1.3 pip install matplotlib

(similar to matlab's drawing tool)
insert image description here

1.4 pip install opencv-python

insert image description here

2. OpenCV test case

insert image description here
imread can only read absolute paths. If you want to read relative paths, use the method shown in the above figure, "./numpy.jpg";
imread cannot read Chinese paths, otherwise an error will be reported.

Guess you like

Origin blog.csdn.net/m0_51027322/article/details/128756344