Object detection practice: pedestrian detection using Opencv built-in method
Did you know that OpenCV has a built-in method to perform pedestrian detection?
OpenCV comes with a pre trained HOG + linear SVM model that can be used to perform pedestrian detection in images and video streams.
Today, we use Opencv's own model to detect pedestrians in the video stream. Just open a new file and name it detect Py, and then ad ...
Posted by Canabalooza on Tue, 21 Dec 2021 10:17:15 +0100
OpenCV_ Background modeling and optical flow estimation
1, Background modeling
First, what belongs to the background? It's easy for us to judge which part of a picture is the background subjectively, but the computer can't identify which part is the background, so we have to find a way to tell the computer which part is the background.
1. Frame difference method
Because the target in the sc ...
Posted by krotkruton on Tue, 21 Dec 2021 08:25:34 +0100
Operate image pixels and realize some functions -- image brightness, contrast adjustment, image inversion and fusion (openCV learning record -- 2)
0. Preface
opencv has two operations on pixels, one is to operate on a single pixel (point operation), and the other is to operate on the pixels of a region.
They can be used separately to achieve different effects
Recently, I mainly learned some point operations and some effects that can be achieved through point operations
The first i ...
Posted by echox on Mon, 20 Dec 2021 17:08:40 +0100
OpenCV basic operation and detection quantity C++
<h2><a id="1OpenCV__0"></a>1.OpenCV Image loading,display, Modify and save</h2>
-(CV:: imread) load image
-(CV:: namedwindow) create a window named OpenCV
namedWindow("OpenCV window", 2)// A value of 2 allows you to resize the window with the mouse
-(CV:: imshow) disp ...
Posted by dmyst3 on Sun, 19 Dec 2021 16:35:30 +0100
OpenCV introduction series teaching drawing geometry and adding text
1, Draw simple geometry and add text
Drawing graphics in opencv is very simple. We only need to use the following common functions.
#Draw a line
cv2.line()
#Draw a circle
cv2.circle()
#Draw rectangle
cv. rectangle()
#Draw an ellipse
cv.ellipse()
#Add text to image
cv.putText()
In all the above functions, we can see some common parameters, as ...
Posted by drunknbass on Sun, 19 Dec 2021 04:37:55 +0100
OpenCV Python actual combat (part outside) - dynamic drawing of graphics using mouse events in OpenCV
Dynamic drawing using mouse events
We are already OpenCV Python practice (3) -- drawing graphics and text in OpenCV Learned how to draw graphics and text using OpenCV. In this part, we will further use the drawing functions learned to learn how to use mouse events to perform dynamic drawing.
Drawing graphics dynamically
In order to use m ...
Posted by Najjar on Sat, 18 Dec 2021 00:45:28 +0100
Compare the similarity of two pictures
1. Cosine similarity
from PIL import Image
from numpy import average, linalg, dot
def get_thumbnail(image, size=(30, 30), greyscale=False):
image = image.resize(size, Image.ANTIALIAS)
if greyscale:
image = image.convert('L')
return image
def image_similarity_vectors_via_numpy(image1, image2):
image1 = get_thumbnail( ...
Posted by cosmoparty on Sat, 18 Dec 2021 00:07:10 +0100
Opencv Python tutorial: template matching
Original link: http://www.juzicode.com/opencv-python-matchtemplate
Return to opencv Python tutorial
Template matching can find the feature image in the source image. The feature image is generally a rectangular image. In the previous article, orange fungus also introduced some methods about "matching" function, such as morphological ...
Posted by GetReady on Fri, 17 Dec 2021 22:00:29 +0100
centos 8 installs opencv+ffmpeg (can decode video using decoder)
Installation steps:
1. Update the software warehouse and use domestic sources: configure and use Ali's open source image in CentOS
1) Back up the original file / etc / yum.com repos. d
2) Download the repo file of the corresponding version of the system from the Alibaba open source image site:
#CentOS8
[root@VM-0-8-centos yum.repos.d]# wget ...
Posted by lkalik on Fri, 17 Dec 2021 13:40:25 +0100
OpenCV learning notes - k-nearest neighbor algorithm
K-nearest neighbor algorithm is one of the simplest machine learning algorithms. It is mainly used to divide objects into known classes and is widely used in life. For example, if a coach wants to select a group of long-distance runners, how to select them? He may use the k-nearest neighbor algorithm. He will choose those who are tall, long leg ...
Posted by idire on Thu, 16 Dec 2021 15:59:02 +0100