A target object identification and processing method in industrial inspection process
Through SIFT feature information and extreme point descriptor matching technology, the problem of low identification accuracy of unmanned container transport vehicles in industrial video recognition is solved, and the scheduling efficiency and identification accuracy of terminal transport vehicles are improved.
Patent Information
- Application Number
- CN202410851672.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-28
AI Technical Summary
When existing industrial video recognition technology identifies moving unmanned container transport vehicles with significant appearance features, there are problems such as insufficient sample numbers and occlusion obstacles that affect the recognition accuracy, resulting in low efficiency in dispatching unmanned transport vehicles at terminals.
SIFT feature information is used for video frame image analysis and recognition. Through grayscale, Gaussian filtering, extreme point detection and descriptor matching, combined with covariance matrix and matching value judgment, target object images are screened and matched to improve recognition accuracy and robustness. Great sex.
It achieves accurate identification and marking of moving target objects, improves video information processing efficiency, and enhances the accuracy and efficiency of dispatching unmanned transport vehicles.
Smart Images

Figure CN118397520B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial video inspection processing, and in particular to a target object recognition processing method in an industrial inspection process. Background Art
[0002] With the development of science and technology, industrial video image recognition and its application have also developed rapidly in recent years; industrial video image recognition has also been put into practical use in many fields, such as warehouse management, logistics management, and terminal transportation management; for example, some smart terminals now use industrial video image recognition technology;
[0003] Industrial video recognition refers to the use of computer vision and image processing technology to analyze and identify videos in terminal scenes to achieve automated and intelligent management and operation.
[0004] This technology can be applied to cargo loading and unloading, container management, vehicle dispatching, security monitoring, etc. to improve the efficiency and safety of the terminal.
[0005] In industrial video recognition in smart terminals, commonly used technologies include: Target detection and tracking: Identify target objects in the video, such as cargo, containers, vehicles, etc., through algorithms and models, and track their positions and movement trajectories.
[0006] This can help automate cargo identification and tracking, improving loading and unloading efficiency and accuracy.
[0007] By analyzing and understanding the video, useful information can be extracted, such as container stacking density, yard utilization, vehicle congestion, etc.
[0008] This information can be used to optimize terminal layout and scheduling, improving throughput and efficiency.
[0009] However, further research found that the existing technology has at least the following technical problems:
[0010] The conventional image processing neural network model currently used requires a large number of samples for training. When the number of samples does not meet the requirements, it is impossible to accurately identify and mark the target person or target object; especially in industrial videos, specific target objects that are always moving and have significant appearance characteristics, namely unmanned container transport vehicles (or unmanned container transport platforms); at the same time, during the movement process, there will be occlusion obstacles between the container transport vehicles in the image, which affects the accurate identification of the target object and ultimately affects the scheduling of unmanned transport vehicles at the terminal. Summary of the invention
[0011] The purpose of the present invention is to provide a method for identifying and processing target objects in an industrial inspection process, which solves the above-mentioned technical problems pointed out in the prior art.
[0012] The present invention provides a method for identifying and processing target objects in an industrial inspection process, comprising the following steps:
[0013] Obtain video information containing the target object;
[0014] Acquire a plurality of continuous video frame image information according to the video information;
[0015] Analyze and identify the SIFT feature information in each of the video frame image information to obtain the target object image;
[0016] Marking is performed according to the target object image to obtain the target object of each video frame image corresponding to the video information.
[0017] Preferably, analyzing and identifying the SIFT feature information in each of the video frame image information to obtain the target object image includes the following steps:
[0018] Grayscale the video frame image information to obtain a grayscale frame image;
[0019] Performing Gaussian filtering on the grayscale frame image to obtain a Gaussian pyramid image; the Gaussian pyramid image includes a plurality of Gaussian frame images of different scales;
[0020] Calculate Gaussian difference scale space for Gaussian frame images at adjacent scales;
[0021] Detecting according to the Gaussian difference scale space to obtain multiple extreme points;
[0022] Calculate and obtain the gradient direction and gradient value of each extreme point;
[0023] Generate a frame image extreme point descriptor according to the gradient direction and the gradient value;
[0024] The extreme point descriptors of each of the frame images are screened to obtain the extreme point descriptors of the target frame image; and the extreme point descriptors of the target frame image are matched with the extreme point descriptors of the sample target object image of the preset sample target object image to obtain the target object image in the video frame image information.
[0025] Preferably, screening each of the frame image extreme point descriptors to obtain the target frame image extreme point descriptor includes the following steps:
[0026] Labeling each of the extreme point descriptors of the frame image to obtain a descriptor number n;
[0027] Establish a first reference window of size a×b, divide the video frame image information by the first reference window and the descriptor number to obtain a plurality of first sub-windows; calculate the covariance matrix R' based on the pixel values of each pixel point in the first sub-window; obtain the inverse matrix R based on the covariance matrix calculation; the center point of the first sub-window is the frame image extreme point descriptor corresponding to the descriptor number;
[0028] Calculate and obtain the matching value p and the matching weight w of the inverse matrix based on the inverse matrix R;
[0029] Determine whether the matching value p is greater than or equal to a preset matching value threshold, and at the same time, determine whether the matching weight w is greater than or equal to a preset matching weight threshold;
[0030] If the matching value p is greater than or equal to a preset matching value threshold and the matching weight w is greater than or equal to a preset matching weight threshold, then determining the frame image extreme point descriptor corresponding to the descriptor number as the descriptor to be determined;
[0031] Repeat the above operation until all the descriptor numbers are traversed to obtain multiple descriptors to be determined;
[0032] Performing secondary identification processing on each of the to-be-determined descriptors, during the secondary identification processing, setting a second descriptor number for the current plurality of to-be-determined descriptors; setting a plurality of second reference windows a'×b'; screening according to the second reference windows and each of the second descriptor numbers to obtain the extreme point descriptor of the target frame image;
[0033] Preferably, the covariance matrix R' is calculated as follows: ;
[0034] Wherein, hh is: the sum of the squares of the differences between the pixel values of the upper right and lower left pixels in all first reference windows;
[0035] gg is the sum of squares of the differences between the pixel values of the upper left and lower right pixels in all first reference windows;
[0036] hg and gh are both the sum of the products of the difference between the pixel values of the upper right and lower left pixels and the difference between the pixel values of the upper left and lower right pixels in all first reference windows;
[0037] Preferably, the size relationship between the first reference window and the second reference window is: a'>a; b'>b.
[0038] Preferably, the matching value p is calculated as follows: ;
[0039] The matching weight w is calculated as follows: ;
[0040] Where trR is the trace of the inverse matrix R (the sum of the elements on the main diagonal of the matrix);
[0041] Preferably, the matching value of the inverse matrix represents the membership value of the extreme point descriptor of the current frame image as the extreme point descriptor of the target frame image;
[0042] The matching weight w of the inverse matrix represents the credibility of the extreme point descriptor of the current frame image as the extreme point descriptor of the target frame image;
[0043] Preferably, screening according to the second reference window and each of the second descriptor numbers to obtain the target frame image extreme point descriptor includes the following steps:
[0044] The current video frame image information is divided according to the second reference window to obtain a plurality of second sub-windows; the second sub-windows include a plurality of second descriptor numbers;
[0045] Traversing each of the second descriptor numbers in each of the second sub-windows, determining whether the matching value corresponding to the second descriptor number is the largest, and if so, determining that the to-be-determined descriptor corresponding to the second descriptor number is the to-be-determined target frame image extreme point descriptor;
[0046] Repeat the above operation to obtain multiple extreme point descriptors of the target frame image to be determined;
[0047] Counting the number z of the target frame image extreme point descriptors to be determined; judging whether the number z of the target frame image extreme point descriptors to be determined is greater than or equal to a preset target frame image extreme point descriptor number threshold v; if so, outputting each of the target frame image extreme point descriptors to be determined as the target frame image extreme point descriptors;
[0048] If not, the second reference window is reduced by a ratio of s to obtain a new second reference window, and the above operation is returned based on the new second reference window to obtain multiple new target frame image extreme point descriptors to be determined, until the number z of the target frame image extreme point descriptors to be determined is greater than or equal to the preset target frame image extreme point descriptor number threshold v.
[0049] Preferably, reducing the second reference window by a ratio s to obtain a new second reference window comprises the following steps:
[0050] According to the matching value p of the to-be-determined target frame image extreme point descriptor corresponding to each current second sub-window, the matching value standard deviation p' is calculated;
[0051] Calculate and obtain the reduction ratio s according to the target frame image extreme point descriptor number threshold v and the matching value standard deviation p';
[0052] The reduction ratio s is calculated as follows: ;
[0053] Preferably, the second reference window is reduced by a ratio of s to obtain a new second reference window, and the following operation steps are also included: obtaining the brightness value of each pixel point of the current video frame image information; generating a brightness histogram according to the brightness value; and analyzing and judging whether there is brightness distortion in the current video frame image information according to the brightness histogram;
[0054] The brightness distortion mentioned above refers to the uneven brightness caused by the current video frame image information being affected by lighting or blocked by shadows;
[0055] If yes, then set the initial reduction ratio s', and preset the iteration counter and the maximum iteration number threshold; the iteration number of the iteration counter is initially 0;
[0056] Initially increase the iteration counter by one, and obtain the reduction ratio gradient based on the initial reduction ratio s' according to the preset loss function calculation ;
[0057] Calculate and obtain a new reduction ratio s'' based on the reduction ratio gradient and the initial reduction ratio s';
[0058] The new reduction ratio s'' is calculated as follows: ;
[0059] In the formula, is the gradient of reduction ratio; a is the learning rate;
[0060] According to the new reduction ratio s'', obtain new extreme point descriptors of the target frame image to be determined and the new number of extreme point descriptors of the target frame image to be determined; determine whether the new number of extreme point descriptors of the target frame image to be determined is greater than or equal to the new threshold value of the number of extreme point descriptors of the target frame image; if so, return to the above operation and output the extreme point descriptors of the target frame image; if not, determine whether the number of iterations of the iteration counter is greater than or equal to the maximum threshold value of the number of iterations; if so, output the current new reduction ratio s''; if not, use the new reduction ratio as the initial reduction ratio, and return to the above steps until the new number of extreme point descriptors of the target frame image to be determined is greater than or equal to the new threshold value of the number of extreme point descriptors of the target frame image or the number of iterations of the iteration counter is greater than or equal to the maximum threshold value of the number of iterations.
[0061] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages:
[0062] From the analysis of the target object identification and processing method of the above-mentioned industrial inspection process provided by the present invention, it can be known that in a specific application, video information containing the target object is obtained to provide input data for subsequent image recognition processing; multiple continuous video frame image information is obtained according to the video information, and each frame is independently identified and processed; according to the SIFT feature information in each video frame image information, the target object image is obtained by analysis and identification, and the detection and matching effect of the target object is improved through the SIFT feature information; the target object is identified in each frame image; according to the target object image, the target object of each video frame image corresponding to the video information is obtained by marking, and the recognition result is reflected in the entire video information, so that the user can understand the position and appearance of the target object in each frame; thereby realizing accurate identification and marking of the video information containing the target object, and reflecting the recognition result in the entire video information, so that the user can understand the position and appearance of the target object in each frame, or in the subsequent video information processing process, only the marked target object image can be processed, without identifying and analyzing each video frame image one by one, thereby improving the video information processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A schematic diagram of the main process of a target object identification and processing method in an industrial inspection process;
[0064] Figure 2 A schematic diagram of the operation steps for obtaining a target object image in a target object recognition processing method in an industrial inspection process;
[0065] Figure 3 A schematic diagram of the operation steps for obtaining an extreme point descriptor of a target frame image in a target object recognition processing method in an industrial inspection process;
[0066] Figure 4 A schematic diagram of a simulation of the operation flow of obtaining an extreme point descriptor of a target frame image in a target object recognition processing method in an industrial inspection process;
[0067] Figure 5 A schematic diagram of the operation steps for obtaining an extreme point descriptor of a target frame image in a target object recognition processing method in an industrial inspection process;
[0068] Figure 6 A schematic diagram of a reduced-scale simulation of the operation flow of a calculation process in a target object identification processing method in an industrial inspection process. DETAILED DESCRIPTION
[0069] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.
[0070] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of the present invention.
[0071] The present invention is further described in detail below through specific embodiments in conjunction with the accompanying drawings.
[0072] like Figure 1 As shown, the present invention provides a method for identifying and processing target objects in an industrial inspection process, comprising the following steps:
[0073] Step S10: obtaining video information containing the target object, wherein the video information is obtained by recording and collecting a camera device set within a preset range from the target object, or by crawling the video information containing the target object using crawler technology;
[0074] Step S20: acquiring a plurality of continuous video frame image information according to the video information;
[0075] Explanation: The above-mentioned embodiment of the present application splits the video information to obtain the video frame image information of each frame of the video information.
[0076] Step S30: Analyze and identify the SIFT feature information in each of the video frame image information to obtain a target object image;
[0077] It should be noted that the above embodiment of the present application obtains the target object image in each video frame image information by performing SIFT feature information analysis and recognition on the image information of each video frame, which provides a marking basis for subsequent target object marking;
[0078] Step S40: Marking the target object image to obtain the target object of each video frame image corresponding to the video information;
[0079] It should be noted that the above-mentioned embodiment of the present application continuously identifies the target object image in each video frame image, and automatically processes the target object image through accurate recognition and marking, thereby improving the marking speed and accuracy of the target object image and improving work efficiency.
[0080] The above-mentioned embodiment of the present application obtains the video data to be processed to provide input for subsequent image recognition processing; further obtains multiple video frame image information by splitting the video information, and performs independent recognition processing on each frame; improves the detection and matching effect of the target object through SIFT feature information, and identifies the target object in each frame image; finally, marks the identified target object image, and reflects the recognition result in the entire video information, so that the user can understand the position and appearance of the target object in each frame, or in the subsequent video information processing process, only the marked target object image can be processed, without identifying and analyzing each video frame image one by one, thereby improving the efficiency of video information processing.
[0081] The above-mentioned embodiment of the present application obtains the video data to be processed to provide input for subsequent image recognition processing; further splits the video information to obtain multiple video frame image information, and performs independent recognition processing on each frame of video frame image information (i.e., SIFT feature information analysis and recognition); establishes a multi-dimensional SIFT feature vector or SIFT feature descriptor, i.e., SIFT feature information, about a specific target object. Then, through the SIFT feature information, the detection and matching effect of the specific target object is improved, and the specific target object (dynamically moving target object and target object shape) is recognized in each frame of the image; the recognition result is reflected in the entire video information, so that the user can understand the position and appearance of the target object in each frame.
[0082] However, research has found that in video images, container transport trucks (container loading vehicles) as target objects in specific scenarios of the embodiments of the present application have both of the above-mentioned two characteristics of dynamic mobility and specific and significant target morphology, so it is very appropriate to use local feature descriptors (or SIFT feature information) to identify target objects in the application scenarios of this embodiment.
[0083] SIFT (Scale Invariant Feature Transform) feature is a local feature descriptor commonly used in computer vision. It is very useful for identifying target objects with unique textures, shapes or structures.
[0084] In terms of face recognition, SIFT features are usually used to detect and describe local features of container transport trucks, such as the front shape, body shape, and front orientation of container transport trucks.
[0085] The shape of a container transporter has some unique texture and structural features. SIFT features can help match and recognize the shape of container transporters under different scales and rotation conditions.
[0086] For moving objects, SIFT features can also be used for recognition.
[0087] When a moving object has a unique texture, shape, or structure, SIFT features can help detect and describe these local features, thereby achieving recognition and tracking of the moving object.
[0088] For example, in video surveillance, SIFT features can be used to detect and track moving objects such as container transport trucks.
[0089] In the application scenario of the above embodiment, the role of SIFT features is to extract the SIFT feature descriptor of the target object from the acquired video frame image and establish a SIFT feature library of the specific target object; in subsequent video frame images, the SIFT feature descriptor is used to detect and identify the target object and find the position of the target object in each frame.
[0090] So here SIFT features are used to identify and track specific target objects. Its advantage is that it can stably detect and locate target objects in the video, providing a basis for subsequent tracking and processing.
[0091] It should also be noted that SIFT features can extract local features with unique textures, shapes or structures.
[0092] These feature descriptors are relatively stable and distinguishable throughout the image, allowing them to accurately represent the characteristics of the target object.
[0093] This uniqueness and distinguishability make SIFT features effective in recognition even in complex backgrounds and occlusion situations.
[0094] Specifically, Figure 2 As shown, in step S30, the target object image is acquired by analyzing and identifying the SIFT feature information in each of the video frame image information, including the following operation steps:
[0095] Step S31: grayscale the video frame image information to obtain a grayscale frame image;
[0096] Step S32: performing Gaussian filtering on the grayscale frame image to obtain a Gaussian pyramid image; the Gaussian pyramid image includes a plurality of Gaussian frame images of different scales;
[0097] Step S33: Calculating Gaussian difference scale space for Gaussian frame images at adjacent scales;
[0098] Step S34: Detecting according to the Gaussian difference scale space to obtain multiple extreme value points;
[0099] It should be noted that the above-mentioned detection of extreme points is achieved by comparing various Gaussian difference scale spaces to obtain extreme points and the positions of extreme points and the Gaussian frame images where the extreme points are located; the above-mentioned extreme points refer to key points, that is, positions with significant changes in video frame image information, such as corner points, edges, etc. (specifically including the shape features of container transport vehicles and the shape features of identification marks). By finding extreme points in the Gaussian difference scale space, the positions of key points and their scales can be determined, which facilitates subsequent screening, matching and analysis to identify the target object image.
[0100] The above-mentioned appearance characteristics refer to that a container transport vehicle generally has unique appearance characteristics, such as a rectangular body and a flat cargo area.
[0101] The identification mark appearance feature is a pre-installed and easy-to-identify mark on the container transport vehicle: container transport vehicles usually have signs and logos, such as vehicle identification codes (consisting of multiple English letters), etc. These signs and logos can be used as features to identify container transport vehicles.
[0102] It is necessary to set a vehicle identification code sign on the container transport vehicle in advance;
[0103] Step S35: Calculate and obtain the gradient direction and gradient value of each extreme point;
[0104] Step S36: generating a frame image extreme point descriptor according to the gradient direction and the gradient value;
[0105] Step S37: Filter the extreme point descriptors of each of the frame images to obtain the extreme point descriptors of the target frame image; match the extreme point descriptors of the target frame image with the extreme point descriptors of the sample target object image of the preset sample target object image (if the match is successful, it proves that the target object image exists and the target object image is obtained; for example, the extreme point descriptors of the sample target object image of the preset sample target object image can be a certain SIFT feature descriptor generated by pre-extraction processing of different vehicle identification code signs; it can also be a certain SIFT feature descriptor generated for the front contours of container transport vehicles of different shapes, and the rest will not be repeated), to obtain the target object image in the video frame image information.
[0106] It should be noted that, in the above-mentioned embodiment of the present application, the target object image is obtained by matching the extreme point descriptor of the target frame image with the extreme point descriptor of the sample target object image, which means that when the extreme point descriptor of the target frame image and the extreme point descriptor of the sample target object image are successfully matched, and the number of successful matches is greater than a preset number threshold, it is proved that the target object image exists, and growth segmentation is performed based on the pixel points corresponding to the extreme point descriptors of each target frame image to obtain the contour of the target object image, thereby identifying the target object image;
[0107] The above-mentioned embodiment of the present application first converts the color video frame image into a grayscale image, simplifies the image information, and removes the influence of color on subsequent feature extraction; further, by performing Gaussian filtering on the grayscale image, a Gaussian pyramid image is obtained, the image is smoothed, noise is reduced, and multiple images of different scales are provided at the same time; by performing differential calculation on the Gaussian frame images at adjacent scales, different changes in the scale space are provided, which is helpful to detect the key points in the image (i.e., the above-mentioned extreme points);
[0108] By determining the position and spatial scale of the extreme points, a basis is provided for subsequent feature extraction and matching. In further operations, gradient calculations are performed on the extreme points to extract local features of the key points, which helps to describe the structural information in the image. Descriptors are generated based on the gradient direction and gradient value, and the key points are converted into specific feature vectors to facilitate subsequent matching. Finally, matching is performed based on the descriptors of the preset sample target object images to obtain the target object image, thereby improving the recognition speed and accuracy of the target object image.
[0109] body, such as Figure 3 or Figure 4 As shown, in step S37, each of the frame image extreme point descriptors is screened to obtain the target frame image extreme point descriptor, including the following operation steps:
[0110] Step S371: labeling each of the extreme point descriptors of the frame image to obtain a descriptor number n;
[0111] Step S372: Establish a first reference window of size a×b, divide the video frame image information by the first reference window and the descriptor number to obtain a plurality of first sub-windows; calculate the covariance matrix R' based on the pixel values of each pixel point in the first sub-window; obtain the inverse matrix R based on the covariance matrix calculation; the center point of the first sub-window is the frame image extreme point descriptor corresponding to the descriptor number;
[0112] The covariance matrix R' is calculated as follows: ;
[0113] Wherein, hh is: the sum of the squares of the differences between the pixel values of the upper right and lower left pixels in all first reference windows;
[0114] gg is the sum of squares of the differences between the pixel values of the upper left and lower right pixels in all first reference windows;
[0115] hg and gh are both the sum of the products of the difference between the pixel values of the upper right and lower left pixels and the difference between the pixel values of the upper left and lower right pixels in all first reference windows;
[0116] Step S373: Calculate and obtain the matching value p and the matching weight w of the inverse matrix based on the inverse matrix R;
[0117] The matching value p is calculated as follows: ;
[0118] The matching weight w is calculated as follows: ;
[0119] Where trR is the trace of the inverse matrix R (the sum of the elements on the main diagonal of the matrix);
[0120] The matching value of the above inverse matrix represents the membership value of the extreme point descriptor of the current frame image as the extreme point descriptor of the target frame image;
[0121] The matching weight w of the above inverse matrix represents the credibility of the extreme point descriptor of the current frame image as the extreme point descriptor of the target frame image;
[0122] Step S374: determining whether the matching value p is greater than or equal to a preset matching value threshold, and at the same time, determining whether the matching weight w is greater than or equal to a preset matching weight threshold;
[0123] If the matching value p is greater than or equal to the preset matching value threshold and the matching weight w is greater than or equal to the preset matching weight threshold, the frame image extreme point descriptor corresponding to the descriptor number is determined as the descriptor to be determined (if not, the frame image extreme point descriptor is screened out);
[0124] Repeat the above operation until all the descriptor numbers are traversed to obtain multiple descriptors to be determined;
[0125] Step S375: performing secondary screening processing on each of the descriptors to be determined. During the secondary screening processing, setting a second descriptor number for the current multiple descriptors to be determined; setting multiple second reference windows a'×b'; filtering according to the second reference windows and each of the second descriptor numbers to obtain the extreme point descriptors of the target frame image; the size relationship between the first reference window and the second reference window is: a'>a; b'>b.
[0126] Briefly describe the two screening processes of the extreme point descriptors of the above frame images:
[0127] The above-mentioned application embodiment obtains the target frame image extreme point descriptor of the video frame image information by twice screening the frame image extreme point descriptor. This is because in the video frame image information, due to the shadow occlusion or the influence of light in some areas, the pixel points other than the target object image in the video frame image information are obvious, and thus are extracted as extreme points (or frame image extreme point descriptors) by SIFT feature points; the embodiment of the present application performs the first screening: by calculating the matching value and the matching weight, when the matching value and the matching weight meet the preset conditions, multiple extreme points (i.e., the above-mentioned descriptors to be determined) that may be vehicle identification code signs of container transport vehicles are screened out, multiple extreme points that do not meet the conditions are screened out, the amount of data is reduced, and the subsequent second screening is faster;
[0128] Furthermore, through the second screening, the descriptors to be determined are analyzed and screened using the second reference window to obtain the extreme points of the vehicle identification code sign, so that the subsequent detection of the target object image is more accurate.
[0129] It should be noted here that the width and height of the second reference window are set to be greater than the width and height of the first reference window. This is because in the first screening process, the multiple descriptors to be determined may be identified as extreme points because some pixels in the current video frame image information that do not belong to the target object image but are close to the target object image are identified as extreme points. Therefore, in the embodiment of the present application, it is also necessary to screen the pixel points to obtain extreme point descriptors that only belong to the target object image.
[0130] The above-mentioned embodiments of the present application can improve the accurate matching of the extreme point descriptors of the target frame image by calculating the covariance matrix and judging the matching values and weights; the embodiments of the present application set the matching threshold to filter out those extreme point descriptors that are not credible enough, thereby reducing the misrecognition rate; further, by performing secondary screening processing on the descriptors to be determined, the performance and accuracy of the system can be further improved; by establishing a reference window and calculating the covariance matrix, the stability of the algorithm to image changes can be enhanced.
[0131] In the specific implementation process of the above-mentioned embodiment of the present application, firstly, a part of the to-be-determined descriptors that may serve as the extreme point descriptors of the target frame image are screened out by calculating the matching value and the matching weight, and some extreme points that are less than the matching value threshold and the matching weight threshold are screened out, so as to provide a data basis for subsequent fine screening and reduce the calculation pressure of subsequent fine screening; further, among the to-be-determined descriptors, there may be some areas in which the matching values or matching weights of some pixel points outside the vehicle identification code sign of the container transport vehicle may increase due to shadows or other reasons, but since the setting of the vehicle identification code sign is greatly different from the background, the to-be-determined descriptors can be further screened to obtain the to-be-determined descriptors of the vehicle identification code sign (that is, the extreme point descriptors of the target frame image);
[0132] Specifically, Figure 5 As shown, in step S375, the target frame image extreme point descriptors are obtained by screening according to the second reference window and each of the second descriptor numbers, including the following operation steps:
[0133] Step S3751: dividing the current video frame image information according to the second reference window to obtain a plurality of second sub-windows; the second sub-windows include a plurality of second descriptor numbers;
[0134] Step S3752: traverse each of the second descriptor numbers in each of the second sub-windows to determine whether the matching value corresponding to the second descriptor number is the largest; if so, determine that the to-be-determined descriptor corresponding to the second descriptor number is the to-be-determined target frame image extreme point descriptor (if not, filter out the second descriptor number and filter out the second descriptor number with the largest matching value);
[0135] Repeat the above operation to obtain multiple extreme point descriptors of the target frame image to be determined;
[0136] Step S3753: Count the number z of the target frame image extreme point descriptors to be determined; determine whether the number z of the target frame image extreme point descriptors to be determined is greater than or equal to a preset target frame image extreme point descriptor number threshold v; if so, output each of the target frame image extreme point descriptors to be determined as the target frame image extreme point descriptors;
[0137] If not, the second reference window is reduced by a ratio of s to obtain a new second reference window, and the above operation is returned based on the new second reference window to obtain multiple new target frame image extreme point descriptors to be determined, until the number z of the target frame image extreme point descriptors to be determined is greater than or equal to the preset target frame image extreme point descriptor number threshold v.
[0138] It should be noted that the above-mentioned embodiment of the present application can improve the accuracy of screening by traversing the descriptor numbers in the second sub-window and selecting the second descriptor number corresponding to the largest matching value in the second reference window as the target frame image extreme point descriptor; further, when the number of target frame image extreme point descriptors to be determined is insufficient, the embodiment of the present application can dynamically reduce the proportion of the second reference window and re-screen, thereby ensuring that the number of output target frame image extreme point descriptors meets expectations.
[0139] Specifically, Figure 6 As shown, in step S3753, the calculation process of reducing the reduction ratio of the second reference window by the ratio s includes the following operation steps:
[0140] Step S37531: Calculate and obtain the matching value standard deviation p' according to the matching value p of the to-be-determined target frame image extreme point descriptor corresponding to each current second sub-window;
[0141] Step S37532: Calculate and obtain the reduction ratio s according to the target frame image extreme point descriptor number threshold v and the matching value standard deviation p';
[0142] The reduction ratio s is calculated as follows: ;
[0143] It should be noted that the above-mentioned embodiment of the present application measures the discreteness or stability of each matching value by calculating their standard deviation p' based on the matching values of the extreme points of the target frame image to be determined in each second sub-window; further calculates a reduction ratio s based on the target frame image extreme point descriptor number threshold v and the matching value standard deviation p'; when the standard deviation p' is small, it means that the stability of the matching value is high, and a smaller reduction ratio can be used to update the second reference window to obtain a sufficient number of target frame image extreme point descriptors; and when the standard deviation p' is large, it means that the stability of the matching value is low, and a larger reduction ratio may be needed to update the second reference window to obtain an updated number of target frame image extreme point descriptors.
[0144] During the specific implementation of the above-mentioned scheme of the present application, further technicians discovered that when the video frame image information is blocked by light or shadow, the contrast and brightness of the image will change, which will cause the stability of the matching value corresponding to the extreme point descriptor of the target frame image to decrease, thereby causing the standard deviation to increase; for example, due to excessive light exposure or shadow blocking, the vehicle identification code sign marked on the container transport vehicle is blurred. At this time, only using the current reduction ratio s to calculate the size of the second reference window cannot stably obtain sufficient target frame image extreme point descriptors. Therefore, in the recognition of the target frame image extreme point descriptors of the vehicle identification code sign marked on the container transport vehicle blocked by light or shadow, it is necessary to use an additional calculation method to obtain the reduction ratio s, thereby improving the robustness of target detection.
[0145] Specifically, in step S37532, the following operation steps are also included:
[0146] Step S101: obtaining the brightness value of each pixel of the current video frame image information; generating a brightness histogram according to the brightness value; and analyzing and determining whether the current video frame image information has brightness distortion according to the brightness histogram;
[0147] The brightness distortion mentioned above refers to the uneven brightness caused by the current video frame image information being affected by lighting or blocked by shadows;
[0148] It should be noted that, in the above-mentioned embodiment of the present application, whether the current video frame image information has brightness distortion is determined by determining whether the distribution of the brightness values of the current brightness histogram is uniform; if the distribution of the brightness values of the current brightness histogram is uniform, it is proved that the current video frame image information does not have brightness distortion; if the distribution of the brightness values of the current brightness histogram is uneven, it is proved that the current video frame image information has brightness distortion;
[0149] Step S102: If yes (if no, return to the above step S37532 to obtain the reduction ratio s), set the initial reduction ratio s', and preset the iteration counter and the maximum iteration number threshold; the iteration number of the iteration counter is initially 0;
[0150] Step S103: Initially increase the iteration counter by one, and obtain the reduction ratio gradient based on the initial reduction ratio s' according to the preset loss function calculation. ;
[0151] Step S104: Calculate and obtain a new reduction ratio s'' based on the reduction ratio gradient and the initial reduction ratio s';
[0152] The new reduction ratio s'' is calculated as follows: ;
[0153] In the formula, To reduce the proportional gradient; a is the learning rate;
[0154] Step S105: Obtain new target frame image extreme point descriptors to be determined and the number of new target frame image extreme point descriptors to be determined according to the new reduction ratio s''; determine whether the number of new target frame image extreme point descriptors to be determined is greater than or equal to the new target frame image extreme point descriptor number threshold; if so, return to the above S3753 and output the target frame image extreme point descriptors; if not, determine whether the number of iterations of the iteration counter is greater than or equal to the maximum number of iterations threshold; if so, output the current new reduction ratio s''; if not, use the new reduction ratio as the initial reduction ratio, and return to the above step S103 until the number of new target frame image extreme point descriptors to be determined is greater than or equal to the new target frame image extreme point descriptor number threshold or the number of iterations of the iteration counter is greater than or equal to the maximum number of iterations threshold.
[0155] It should be noted that the above-mentioned embodiment of the present application analyzes the brightness values of image pixels to determine whether brightness distortion occurs in the video frame image information, and then calculates the second reference window under the brightness distortion condition by gradient descent to obtain a new second reference window, thereby ensuring that in the case of large changes in lighting, the reduction ratio is reasonably adjusted to improve the robustness of target object image detection and recognition.
[0156] In summary, the target object recognition and processing method of the industrial inspection process proposed in the example of the present invention provides input data for subsequent image recognition processing by acquiring video information containing the target object; acquiring multiple continuous video frame image information according to the video information, and performing independent recognition processing on each frame; analyzing and recognizing according to the SIFT feature information in the image information of each video frame, acquiring the target object image, improving the detection and matching effect of the target object through the SIFT feature information, and recognizing the target object in each frame image;
[0157] By converting the color video frame image into a grayscale image, the image information is simplified and the influence of color on subsequent feature extraction is removed; further, by performing Gaussian filtering on the grayscale image, a Gaussian pyramid image is obtained to smooth the image, reduce noise, and provide multiple images of different scales at the same time; by performing differential calculations on Gaussian frame images at adjacent scales, different changes in the scale space are provided, which is helpful for detecting key points in the image; by determining the position and spatial scale of the extreme point, a basis is provided for subsequent feature extraction and matching; in further operations, gradient calculations are performed on the extreme point to extract the local features of the key point, which is helpful for describing the structural information in the image; descriptors are generated based on the gradient direction and gradient value, and the key point is converted into a specific feature vector to facilitate subsequent matching;
[0158] By calculating the covariance matrix and judging the matching value and weight, the accurate matching of the extreme point descriptors of the target frame image can be improved; setting the matching threshold can filter out those extreme point descriptors that are not credible enough, thereby reducing the false recognition rate; further, by performing secondary screening processing on the descriptors to be determined, by traversing the descriptor numbers in the second subwindow, and selecting the second descriptor number corresponding to the largest matching value in the second reference window as the extreme point descriptor of the target frame image, the accuracy of screening can be improved; further, when the number of extreme point descriptors of the target frame image to be determined is insufficient, the embodiment of the present application can dynamically reduce the proportion of the second reference window and re-screen, thereby ensuring that the number of extreme point descriptors of the output target frame image meets expectations; the performance and accuracy of the system can be further improved; by establishing a reference window and calculating the covariance matrix, the stability of the algorithm to image changes can be enhanced;
[0159] Finally, the target object image is obtained by matching the preset descriptors of the sample target object image, thereby improving the recognition speed and accuracy of the target object image;
[0160] Furthermore, in the process of determining the size of the second reference window, the brightness values of the image pixels are analyzed to determine whether the video frame image information has brightness distortion, and the second reference window under the brightness distortion is calculated by gradient descent to obtain a new second reference window, thereby ensuring that the reduction ratio is reasonably adjusted to improve the robustness of target object image detection and recognition when the illumination changes greatly;
[0161] Marking is performed according to the target object image to obtain the target object of each video frame image corresponding to the video information, and the recognition result is reflected in the entire video information so that the user can understand the position and appearance of the target object in each frame; thereby achieving accurate recognition and marking of the video information containing the target object and reflecting the recognition result in the entire video information, so that the user can understand the position and appearance of the target object in each frame, or in the subsequent video information processing process, only the marked target object image can be processed without identifying and analyzing each video frame image one by one, thereby improving the video information processing efficiency.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. A person skilled in the art may modify the technical solutions described in the above embodiments, or replace part or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying and processing target objects in an industrial inspection process, characterized in that: The steps are as follows: Obtain video information containing the target object; Acquire a plurality of continuous video frame image information according to the video information; Analyze and identify the SIFT feature information in each of the video frame image information to obtain the target object image; Marking the target object image to obtain the target object of each video frame image corresponding to the video information; The step of analyzing and identifying the target object image according to the SIFT feature information in each of the video frame image information includes the following steps: Grayscale the video frame image information to obtain a grayscale frame image; Performing Gaussian filtering on the grayscale frame image to obtain a Gaussian pyramid image; the Gaussian pyramid image includes a plurality of Gaussian frame images of different scales; Calculate Gaussian difference scale space for Gaussian frame images at adjacent scales; Detecting according to the Gaussian difference scale space to obtain multiple extreme points; Calculate and obtain the gradient direction and gradient value of each extreme point; Generate a frame image extreme point descriptor according to the gradient direction and the gradient value; Screening each of the frame image extreme point descriptors to obtain a target frame image extreme point descriptor; According to the target frame image extreme point descriptor, the target object image in the video frame image information is obtained by matching the sample target object image extreme point descriptor of a preset sample target object image; The step of screening the extreme point descriptors of each frame image to obtain the extreme point descriptor of the target frame image includes the following steps: Labeling each of the extreme point descriptors of the frame image to obtain a descriptor number n; Establishing a first reference window of size a×b, dividing the video frame image information by using the first reference window and the descriptor number to obtain a plurality of first sub-windows; Calculate the covariance matrix R' based on the pixel values of each pixel point in the first sub-window; An inverse matrix R is obtained based on the covariance matrix calculation; the center point of the first sub-window is the frame image extreme point descriptor corresponding to the descriptor number; Calculate and obtain the matching value p and the matching weight w of the inverse matrix based on the inverse matrix R; Determine whether the matching value p is greater than or equal to a preset matching value threshold, and at the same time, determine whether the matching weight w is greater than or equal to a preset matching weight threshold; If the matching value p is greater than or equal to a preset matching value threshold and the matching weight w is greater than or equal to a preset matching weight threshold, then determining the frame image extreme point descriptor corresponding to the descriptor number as the descriptor to be determined; Repeat the above operation until all the descriptor numbers are traversed to obtain multiple descriptors to be determined; Performing secondary identification processing on each of the to-be-determined descriptors, and during the secondary identification processing, setting a second descriptor number for the current plurality of to-be-determined descriptors; Setting a plurality of second reference windows a'×b'; The target frame image extreme point descriptors are obtained by screening according to the second reference window and each of the second descriptor numbers.
2. The target object identification and processing method in an industrial inspection process according to claim 1 is characterized in that: The covariance matrix R' is calculated as follows: ; Wherein, hh is: the sum of the squares of the differences between the pixel values of the upper right and lower left pixels in all first reference windows; gg is the sum of squares of the differences between the pixel values of the upper left and lower right pixels in all first reference windows; hg and gh are both the sum of the products of the difference between the pixel values of the upper right and lower left pixels and the difference between the pixel values of the upper left and lower right pixels in all first reference windows.
3. The target object identification and processing method in an industrial inspection process according to claim 2 is characterized in that: The size relationship between the first reference window and the second reference window is: a'>a; b'>b.
4. The target object identification and processing method in an industrial inspection process according to claim 3 is characterized in that: The matching value p is calculated as follows: ; The matching weight w is calculated as follows: ; Where trR is the trace of the inverse matrix R.
5. The target object identification and processing method in an industrial inspection process according to claim 4 is characterized in that: The matching value of the inverse matrix represents the membership value of the extreme point descriptor of the current frame image as the extreme point descriptor of the target frame image; The matching weight w of the inverse matrix represents the credibility of the extreme point descriptor of the current frame image as the extreme point descriptor of the target frame image.
6. The target object identification and processing method in an industrial inspection process according to claim 5 is characterized in that: Screening according to the second reference window and each of the second descriptor numbers to obtain the target frame image extreme point descriptor includes the following steps: The current video frame image information is divided according to the second reference window to obtain a plurality of second sub-windows; the second sub-windows include a plurality of second descriptor numbers; Traversing each of the second descriptor numbers in each of the second sub-windows, determining whether the matching value corresponding to the second descriptor number is the largest, and if so, determining that the to-be-determined descriptor corresponding to the second descriptor number is the to-be-determined target frame image extreme point descriptor; Repeat the above operation to obtain multiple extreme point descriptors of the target frame image to be determined; Counting the number z of the target frame image extreme point descriptors to be determined; judging whether the number z of the target frame image extreme point descriptors to be determined is greater than or equal to a preset target frame image extreme point descriptor number threshold v; if so, outputting each of the target frame image extreme point descriptors to be determined as the target frame image extreme point descriptors; If not, the second reference window is reduced by a ratio of s to obtain a new second reference window, and the above operation is returned based on the new second reference window to obtain multiple new target frame image extreme point descriptors to be determined, until the number z of the target frame image extreme point descriptors to be determined is greater than or equal to the preset target frame image extreme point descriptor number threshold v.
7. The target object identification and processing method in an industrial inspection process according to claim 6 is characterized in that: The second reference window is reduced by a ratio s to obtain a new second reference window, including the following steps: According to the matching value p of the to-be-determined target frame image extreme point descriptor corresponding to each current second sub-window, the matching value standard deviation p' is calculated; Calculate and obtain the reduction ratio s according to the target frame image extreme point descriptor number threshold v and the matching value standard deviation p'; The reduction ratio s is calculated as follows: .
8. The target object identification and processing method in an industrial inspection process according to claim 7 is characterized in that: The second reference window is reduced by a ratio of s to obtain a new second reference window, and the following operation steps are also included: Obtaining the brightness value of each pixel of the current video frame image information; generating a brightness histogram according to the brightness value; and analyzing and determining whether there is brightness distortion in the current video frame image information according to the brightness histogram; The brightness distortion mentioned above refers to the uneven brightness caused by the current video frame image information being affected by lighting or blocked by shadows; If yes, then set the initial reduction ratio s', and preset the iteration counter and the maximum iteration number threshold; the iteration number of the iteration counter is initially 0; Initially increase the iteration counter by one, and obtain the reduction ratio gradient based on the initial reduction ratio s' according to the preset loss function calculation ; A new reduction ratio s'' is calculated based on the reduction ratio gradient and the initial reduction ratio s'; the new reduction ratio s'' is calculated as follows: ; In the formula, To reduce the proportional gradient; a is the learning rate; According to the new reduction ratio s'', obtain new extreme point descriptors of the target frame image to be determined and the new number of extreme point descriptors of the target frame image to be determined; determine whether the new number of extreme point descriptors of the target frame image to be determined is greater than or equal to the target frame image extreme point descriptor number threshold; if so, return to the above operation and output the target frame image extreme point descriptors; if not, determine whether the number of iterations of the iteration counter is greater than or equal to the maximum number of iterations threshold; if so, output the current new reduction ratio s''; if not, use the new reduction ratio as the initial reduction ratio, and return to the above steps until the new number of extreme point descriptors of the target frame image to be determined is greater than or equal to the target frame image extreme point descriptor number threshold or the number of iterations of the iteration counter is greater than or equal to the maximum number of iterations threshold.
