Enable TLS for MySQL Clients

AmitDiwan
Updated on 10-Mar-2021 09:03:36

415 Views

TLS is also known as SSL (Secure Sockets Layer). It refers to Transport Layer Security.When there is an unencrypted connection between the MySQL client and the server, a person who has access to the network can watch all the traffic and inspect the data that is being sent or received between client and server. When the user wishes to move information over a network in a secure method, an unencrypted connection is not acceptable.To make any sort of data unreadable, encryption has to be used. Encryption algorithms usually include security elements that help resist many kinds of known attacks, some ... Read More

Crop Detected Faces in OpenCV Using C++

Ginni
Updated on 10-Mar-2021 08:59:54

771 Views

We will know how to crop the detected faces in OpenCV. To crop detected faces, we need multiple matrices. The most appropriate way is to use an image array. In this program using the following two lines, we have declared two image matrices −Mat cropped_faces[4];Mat faceROI[4];The first matrix is to store the cropped images, and the second matrix is to define the region of interest. In the detection process, first, the program locates the faces and store them in vectors. In our program, the name of the vector is 'faces' Vectors can contain multiple elements.Using the following two lines, we ... Read More

Count the Number of Faces in OpenCV Using C++

Ginni
Updated on 10-Mar-2021 08:58:49

349 Views

Counting the number of faces located in an image is easy. The program we wrote in the previous section already have the information of number of faces in 'faces.size()'. This code-'faces.size()' gives an integer value.For example, if we write 'int x = faces.size()', the 'x' will contain the number of faces.The following program calculates the number of faces from a given image and shows it in console window.Example#include #include #include //This header includes the definition of Cascade Classifier// #include using namespace std; using namespace cv; int main(int argc, char** argv){    Mat image_with_humanface;//Declaring a matrix to load image with human ... Read More

Detect Face in Still Picture using OpenCV and C++

Ginni
Updated on 10-Mar-2021 08:55:37

708 Views

We detect the faces from the image. To detect the face, we used 'detectMultiScale()' function.The actual format of this function is −SyntaxdetectMultiScale(source matrix, vector, searchScaleFactor, minNeighbours, flags, minfeatureSize)By changing the function arguments, we can control the 'detect.MultiSpace()' function. This function takes the following arguments.Source MatrixIt is the matrix where the face will be detected. In this case, it will the matrix which is keeping the video frames.VectorThe 'detect.MultiScale()' function will be a vector of rectangular type. A rectangle is a vector in OpenCV, and we have to define it as a vector.searchScaleFactorSearch scale factor determines how many different sizes of ... Read More

Track Color in OpenCV Using C++

Ginni
Updated on 10-Mar-2021 08:52:23

751 Views

Color tracking is similar to color detection. For tracking purpose, we added extra few lines to calculate the area of the detected object and then track the current position of that area and finally used line() function of OpenCV to show the object's path of motion.The following program demonstrates how to track the color in OpenCV using C++.Example#include #include #include using namespace std; using namespace cv; int main(int argc, char** argv) {    VideoCapture video_load(0);//capturing video from default camera//    namedWindow("Adjust");//declaring window to show the image//    int Hue_Low= 0;//lower range of hue//    int Hue_high = 22;//upper range of ... Read More

Detect Color Using OpenCV in C++

Ginni
Updated on 10-Mar-2021 08:50:24

2K+ Views

We will understand how to detect specific color and track object based on color. Performance of color detection and color detection based tracking system is environment dependent.If you change light of the room or if you change background color, there will be significant effect on color detection.The following program demonstrates how to detect the color using OpenCV in C++.Example#include #include #include using namespace std; using namespace cv; int main(int argc, char** argv) {    VideoCapture video_load(0);//capturing video from default camera//    namedWindow("Adjust");//declaring window to show the image//    int Hue_Lower_Value = 0;//initial hue value(lower)//    int Hue_Lower_Upper_Value = 22;//initial hue ... Read More

Work with Mouse Events Using OpenCV in C++

Ginni
Updated on 10-Mar-2021 08:48:25

2K+ Views

Mouse Events is one of the most useful features of OpenCV. In OpenCV, we can track the mouse pointer's position and track the clicks (right, left and middle-click). OpenCV has a wide application in robotics and computer vision. In robotics and computer vision tracking mouse pointer and clicks are frequently used.Here we will understand how to track the mouse pointer's location on an image and track the clicks.The following program demonstrates how to track the location of the mouse pointer and clicks.Example#include #include #include using namespace std; using namespace cv; void locator(int event, int x, int y, int flags, void* ... Read More

Rotate Video in OpenCV Using C++

Ginni
Updated on 10-Mar-2021 08:47:25

595 Views

Rotating a video is similar to rotate an image. The only difference is instead of load a still picture into an image matrix, we have loaded a video or take video stream from the camera.Here, we are not loading the video but taking a video using the camera. If you want to use a video file, just put the address of the video file properly.The following program demonstrates how to rotate a video in OpenCV using C++.Example#include #include #include using namespace std; using namespace cv; int main(int argc, char* argv[]) {    VideoCapture loadvideo(0);//capture video from default camera//    namedWindow("OriginalVideo");//declaring ... Read More

Change Image Size and Add Border in OpenCV Using C++

Ginni
Updated on 10-Mar-2021 08:46:49

279 Views

In this topic, we will see another application of trackbar. Here, we will use track-bar to change the size of an image and add a border to the image and change the border's size using the track-bar.Using the following program, we can change the size of an image, add a border, change the border's size and rotate the image. It is similar to the previous example.The following program demonstrates how to add multiple sliders in the same track-bar.Example#include #include #include using namespace std; using namespace cv;    int Rotate = 180;//initializing angle//    int Scale = 50;//initializing scale//    int ... Read More

Rotate Image in OpenCV Using C++

Ginni
Updated on 10-Mar-2021 08:42:40

2K+ Views

Rotating image using built-in functions of OpenCV is an effortless task. To rotate image, we have to use 'highgui.hpp' and 'imgproc.hpp' header files and we will introduce more functions in this program which deal with image rotation.The following program how to rotate an image in OpenCV using C++.Example#include #include #include using namespace std; using namespace cv; int main(int argc, char** argv) {    Mat before_rotation = imread("bright.jpg");//loading image to a matrix    namedWindow("BeforeRotation");//Declaring window to show the original image//    imshow("BeforeRotation", before_rotation);//showing the image before rotation//    namedWindow("AfterRotation");//declaring window to show rotated image//    int Rotation = 180;//initialization rotation angle// ... Read More

Advertisements