Linux is based on OpenCv and built-in code to add text to the picture
1, Principle
1. Internal code
The internal code of Chinese characters refers to the code that represents a Chinese character in the computer. The internal code is slightly different from the location code. As mentioned above, the area code and bit code of Chinese location code are between 1 ~ 94. If the location code is directly used as t ...
Added by khendar on Tue, 09 Nov 2021 20:56:08 +0200
OpenCV Basic Tutorial (11) - HighGUI GUI
11. HighGUI GUI
Creation and use of 11.1 slider bar
11.1,1 Create slider: createTrackbar() function
The createTrackbar function creates a slider bar that can adjust values:
int cv::createTrackbar(const cv::String &trackbarname, const cv::String &winname, int *value, int count, cv::TrackbarCallback onChange = (cv::TrackbarCallback)0, ...
Added by feckless on Tue, 09 Nov 2021 19:07:13 +0200
OpenCV C + + case practice III "QR code detection"
preface
This article will use OpenCV C + + for QR code detection.
1, QR code detection
Firstly, we must preprocess the image and extract the image contour through gray, filtering, binarization and other operations. Here I also added morphological operations to eliminate noise and effectively connect rectangular areas.
Mat gray;
cvt ...
Added by kylevisionace02 on Thu, 04 Nov 2021 12:18:18 +0200
How to configure OpenCV on CLion?
Reference link: how to configure OpenCV on CLion- Don't know, don't hit the answer. - know https://www.zhihu.com/question/47331502/answer/166576437
Environment: windows 10 professional version 64bit + MinGW 3.22 + cmake 3.8.1 (cmake version should be a newer version, such as this version) + clion 2017.1 (my clion2021.2.3) + opencv3.20 (it can ...
Added by Franko126 on Sat, 23 Oct 2021 15:48:25 +0300
Python OpenCV extract object contour
Usually, when extracting the contour of an object, there is noise in the image, and the extraction effect is not ideal. As shown in the following figure,
Extract code:
import cv2
img = cv2.imread("mouse.png")
cv2.imshow("origin",img)
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
ret,binary = cv2.threshold(gray,128,255,cv2.THRESH_BINARY)
cv2. ...
Added by Fizzgig on Thu, 21 Oct 2021 08:30:05 +0300
Usage example of OpenCV3.4.1 under Ubuntu
preface
By learning opencv image library programming, learn how to complete a comprehensive program design with the help of third-party library functions.
1, Know OpenCV
Open source computer vision (OpenCV) is a programming function library mainly for real-time computer vision. The application fields of OpenCV include:
2D and 3D feature ...
Added by schoenung on Fri, 15 Oct 2021 07:13:56 +0300
OpenCV-Python Tutorial: Image Gradients (Sobel,Scharr,Laplacian)
Original Link:http://www.juzicode.com/opencv-python-image-gradient
Return to the Opencv-Python tutorial
Gaussian smoothing, bilateral smoothing And Mean Smoothing, Median Smoothing The smoothing described can be seen as a "low-pass filter" of the image, which filters out the "high frequency" part of the image to make it ...
Added by Square1 on Thu, 14 Oct 2021 19:27:49 +0300
Opencv implementation of image encryption and decryption
1. Basic: image encryption and decryption based on XOR operation
Generally, the process of image encryption and decryption is realized by bitwise XOR operation. The encryption can be realized by bitwise XOR between the original image and the key image, and the decryption process can be realized by bitwise XOR between the encrypted image and th ...
Added by adige72 on Thu, 07 Oct 2021 09:14:27 +0300
OpenCV interactive foreground extraction uses the GrabCut algorithm
Working principle of the algorithm: Initially, the user draws a rectangle around the foreground area (the foreground area should be completely located in the rectangular part). Then, the algorithm will segment it iteratively to obtain the best result. Done, but in some cases, the segmentation may not be good. For example, some foreground areas ...
Added by speedy33417 on Mon, 27 Sep 2021 11:25:03 +0300
Geometric transformation of Opencv image
OpenCV provides two kinds of transformation functions, cv2.warpAffine and cv2.warpsperspective. The first is affine transformation function and the second is perspective transformation function. The first received parameter is 2x3 transformation matrix, and the second received parameter is 3x3 transformation matrix.
Extended zoom
Extended sca ...
Added by doofystyle on Fri, 24 Sep 2021 16:13:11 +0300