tags: Python learning from getting started to masterpiece series opencv python Computer vision
When you use OpenCV, PY will prompt us that we have not installed the CV2 library. If we follow the traditional installation method, the error will be applied.
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)

Solution to the search when we installedopencv-python

Can I use the CV2 library after installation? Is it very simple?
#We we define a tuple to represent green
import cv2
green = (0, 255, 0) #4
# c c (0) to (300, 300), show the result, and wait for any button
cv2.line(canvas, (0, 0), (300, 300), green) #5
cv2.imshow("Canvas", canvas) #6
cv2.waitKey(0) #7
# We define a tuple to represent red, and then emphasize that OpenCV is BGR mode instead of RGB mode.
red = (0, 0, 255) #8
# c c (300, 0) to (0,300),
# And the line type of the line is three pixels, which is also the meaning of the last parameter, then display the result, and wait for any button
cv2.line(canvas, (300, 0), (0, 300), red, 3) #9
cv2.imshow("Canvas", canvas) #10
cv2.waitKey(0) #11
OpenCV is a cross-platform computer visual library issued based on BSD licenses (open source), which can run on Linux, Windows, Android, and Mac OS operating systems. It is lightweight and efficient - consists of a series of C functions and a small amount of C ++ classes, while providing a language of Python, Ruby, Matlab, a number of general algorithms for image processing and computer visual. OpenCV is written in C ++ language, and its main interface is also a C ++ language, but a large number of C language interfaces are still retained.
In the development of computer vision projects, OpenCV serve as a larger open source library, has a wealth of common image processing libraries, using C / C ++ language, can run on Linux / Windows / Mac and other operating systems, fast implementation Some image processing and identification tasks. In addition, OpenCV also provides Java, Python, CUDA, etc. use interfaces, machine learning basic algorithm calls, so that image processing and image analysis make it easier to get started, so that developers are more energy to spend algorithm.
1. Computer visual field direction
1, human machine interaction
2, object identification
3, image segmentation
4, face recognition
5, action identification
6, sports tracking
7, robot
8, exercise analysis
9, machine vision
10, structural analysis
11, car safe driving
2, computer operation underlayer technology
Image data operation: assignment, release, copy, setup, and conversion. The image is the input output I / O of the video, the file is output, the image, and video file output of the camera).
Operation of matrix and vector and algorithm for linear algebra: matrix, solving equation, feature value, and singular values.
Various dynamic data structures: list, queue, collection, tree, diagram, etc.
Basic digital image processing: filter, edge detection, angular detection, sampling and difference, color conversion, morphological operation, histogram, image pyramid, etc.
Structural analysis: connecting components, contour processing, distance transformation, respective distance calculation, template matching, hough transformation, polygon approximation, linear fitting, elliptical fitting, delaunay triangle division, etc.
Camptography: Discovery and Track Scale Mode, Scale, Basic Matrix Estimation, Quality Matrix Estimation, and Stereo.
Motion analysis: optical flow, motion segmentation, tracking.
Target Identification: Characterization, Hidden Markov Model: HMM.
Basic GUI: Image with video display, keyboard and mouse event, scroll bar.
Image label: line, quadratic curve, polygon, draw text.
Python OpenCV IMPORT CV2 error Try to run Maybe you can solve your problem...
The installation method is to use pip install python-opencv Then test import cv2 in the python program...
Introduction OpenCV is an open source cross-platform computer visual library that can run on Linux, Windows, Android, and Mac OS. OpenCV consists of a series of C functions and a small amount of C ++ ...
RET: Determine whether the dual value is successful dst: image output after dual -value SRC: Enter the image, can only be a single channel image, general gray image Thresh: Set the threshold MaxVal: I...
1. Image noise reduction (Gaussian filtering), because the Canny operator is easily disturbed by noise, so it is necessary to find a suitable noise reduction processing to smooth the image and filter ...
Compared with the Sobel operator, SCharr operator is more weight in the convolution nucleus, which means that it can detect more subtle edges. Laplacian operator, the second order is discretely. Sobel...
Sobel operator principle Through convolutional thoughts, GX is the difference in the X direction (left and right direction) of the X direction. By adding weight to each pixel, the difference is obtain...
When you use cv2.imread(file) to read the picture, you can’t read it, you need to see if the file path exists in Chinese. The code I wrote today, I use cv2.imread() to read the picture path and ...