Pipeline product positioning method and system
By segmenting the particle area, building a fluctuation distribution map of the movement law and adjusting the matching weight, the positioning accuracy problem of pipeline products under occlusion is solved, and higher positioning accuracy is achieved.
Patent Information
- Application Number
- CN202510985018.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-07-17
AI Technical Summary
In the prior art, when the pipe product is blocked by other objects during movement, the positioning accuracy is reduced, and the occlusion interference cannot be accurately eliminated, affecting the positioning accuracy.
By obtaining the particle area in the pipeline product video, segmenting it into sub-regions, calculating the possibility of occlusion, building a movement law fluctuation distribution map, combining light differences and motion prediction, adjusting the matching weight, and using particle filtering algorithm to locate the pipeline product area.
It improves the accuracy of pipeline product positioning, accurately eliminates occlusion interference, and enhances the accuracy and reliability of positioning.
Smart Images

Figure CN120495706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a pipeline product positioning method and system. Background Art
[0002] Currently, pipeline manufacturing workshops often use radio frequency identification (RFID) or ultra-wideband (UWB) tags affixed to the surface of materials as unique identifiers. These tags are detected and identified using radio frequency identification (RFID) and ultra-wideband (UWB) technologies to obtain location information. This information is then transmitted to the material management system to locate pipeline materials. RFID and ultra-wideband technologies are relatively expensive, making them costly for pipeline positioning.
[0003] Visual positioning locates the position of materials by analyzing their images. This low-cost positioning method can be used to locate pipeline products. The particle filter algorithm is a commonly used visual positioning method. During the positioning process, this method determines the probability that each particle is a pipeline product by analyzing the similarity between each particle and a matching template. During movement, pipeline products may be obscured by other objects, which reduces the similarity between the pipeline product and the matching template, leading to positioning errors. Therefore, how to eliminate the interference of obstructions on pipeline product positioning and achieve accurate pipeline product positioning is the research focus of this invention.
[0004] The patent document with authorization announcement number CN114972421B discloses a workshop material identification, tracking and positioning method and system. The method in the patent document only uses the existing target tracking algorithm for tracking processing, and does not involve how to eliminate the interference of occlusion on material positioning. Therefore, the method in the patent document cannot solve the problem of this solution. Summary of the Invention
[0005] In order to solve the problem of how to eliminate the interference of obstructions on pipeline product positioning and achieve accurate pipeline product positioning, the present invention provides a pipeline product positioning method and system.
[0006] In a first aspect, the present invention provides a pipeline product positioning method, which adopts the following technical solution: A pipeline product positioning method comprises the following steps: Obtain a pipeline product video, where the pipeline product video includes several frames of pipeline product images; Get the preset matching template, use the target tracking algorithm based on the matching template to obtain several particle areas in the current frame pipeline product image, divide the particle area into several sub-areas, and calculate the possibility that any sub-area is an occlusion area , obtain the pipeline product area in the pipeline product image of the previous preset number of frames and record it as the reference area, obtain the suspected occlusion area in the reference area, construct a movement law fluctuation distribution map of the suspected occlusion area, and obtain the possibility that the sub-region belongs to the suspected occlusion area in the current frame according to the distribution position of the distance between the sub-region and the predicted area of the suspected occlusion area in the current frame in the movement law fluctuation histogram. S represents the similarity between the sub-region and the best matching area in the matching template, G represents the degree of light difference between the sub-region and the best matching area in the matching template, K represents the possibility that the sub-region belongs to the suspected occlusion area in the current frame, and norm() represents the linear normalization function; The matching weight of each sub-region is set according to the possibility of each sub-region being blocked, and the matching degree between the particle region and the matching template is calculated based on the matching weight. Based on the matching degree, the pipeline product region in the pipeline product image of the current frame is located using the particle filter algorithm.
[0007] The present invention controls the contribution of each sub-region in the matching according to the occlusion of each sub-region in the particle region, thereby more accurately calculating the matching value and providing a data basis for improving positioning accuracy; further, since the similarity between the occluded region and the matching template is low, and the light difference will also lead to a low similarity with the matching template, the occlusion of each sub-region is relatively accurately reflected by eliminating the interference of the light difference in the similarity calculation; further, since the occluded region has the characteristics of motion rules, the motion prediction is combined to more accurately and comprehensively judge the probability of each sub-region belonging to the occluded region; further, since there will be prediction deviations in motion prediction, when analyzing the probability of each sub-region belonging to the occluded region by means of motion prediction, the probability of each sub-region belonging to the occluded region is more accurately obtained by analyzing the distribution of the prediction deviations.
[0008] Preferably, the obtaining of the pipeline product area in the preset number of frames of pipeline product images before recording as a reference area includes: The target tracking algorithm is used to track the pipeline product images of the previous preset number of frames to obtain the pipeline product area in the pipeline product images of the previous preset number of frames, which is recorded as the reference area.
[0009] Preferably, obtaining the suspected occlusion area in the reference area includes: The reference area is divided into several sub-areas, and the possibility of each sub-area of the reference area being an occluded area is calculated. All sub-areas of the reference area are clustered into two categories according to the possibility of the occluded area. The mean of the possibility of the occluded area of all sub-areas in each category is calculated, and the area composed of sub-areas in the category with a larger mean value of the possibility of the occluded area is recorded as a suspected occluded area.
[0010] The present invention segments the suspected occlusion area through a relatively simple cluster analysis. This implementation method is simpler but has lower implementation efficiency.
[0011] Preferably, the step of constructing a movement regularity fluctuation distribution map of the suspected occlusion area includes: Recording a preset number of frames of pipeline product images as reference pipeline product images, and obtaining a motion region in the reference pipeline product images; If the suspected occlusion area belongs to a motion area, the motion area to which the suspected occlusion area belongs is used as the study area, and a predicted area of the study area in the next frame of the reference pipeline product image and a predicted area of the pipeline product in the next frame of the reference pipeline product image are obtained; the intersection of the predicted area of the pipeline product in the next frame of the reference pipeline product image and the predicted area of the study area in the next frame of the reference pipeline product image is used as the predicted area of the suspected occlusion area in the next frame of the reference pipeline image; If the suspected occlusion area does not belong to the motion area, the intersection of the suspected occlusion area and the predicted area of the pipeline product in the reference management image of the next frame is used as the predicted area of the suspected occlusion area in the next frame; The distance between the geometric center of the suspected occlusion area and the predicted area in a frame of reference pipeline product image is used as the movement law fluctuation amount of the suspected occlusion area obtained based on the frame of reference pipeline product image; the movement law fluctuation amount of the suspected occlusion area is statistically analyzed, and the statistical histogram obtained is recorded as the movement law fluctuation distribution map.
[0012] The present invention analyzes the static and moving conditions of the object blocking the pipeline product respectively, and predicts the suspected blocking area relatively accurately.
[0013] Preferably, obtaining the predicted area of the study area in the next frame of reference pipeline product image and the predicted area of the pipeline product in the next frame of reference pipeline product image includes: The vector formed by the geometric center of the reference area in the reference pipeline product image of one frame and the previous frame is recorded as the translation index of the pipeline product; the rotation angle between the line connecting any key point and the geometric center of the reference area in the reference pipeline product image of one frame and the line connecting the corresponding key point and the geometric center of the reference interval in the reference pipeline product image of the previous frame is recorded as the rotation index of the pipeline product; After translating the pipeline product according to the translation index, the pipeline product is rotated around the geometric center according to the rotation index to obtain a predicted area of the pipeline product in the next frame of the reference pipeline product image; Get the predicted area of the study area in the next frame of reference pipeline product image.
[0014] The present invention takes both rotation and translation into consideration and predicts the region position more accurately.
[0015] Preferably, obtaining the possibility that the sub-region belongs to the suspected occlusion region in the current frame according to the distribution position of the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame in the movement regularity fluctuation histogram includes: If the sub-region belongs to the predicted region of the suspected occlusion region in the current frame, the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame is set to 0. If the sub-region does not belong to the predicted region of the suspected occlusion region in the current frame, the geometric center of the sub-region and the predicted region of the suspected occlusion region in the current frame are connected by a line, and the distance from the intersection of the connecting line and the predicted region to the geometric center of the sub-region is used as the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame, which is recorded as the deviation distance. Obtain the probability value at the point where the value in the movement regularity fluctuation distribution map is equal to the deviation distance, and record it as the possibility that the sub-region belongs to the suspected occlusion region in the current frame.
[0016] The present invention reflects the possibility that the sub-region belongs to the suspected occlusion area in the current frame by using the probability of the corresponding position in the distance positioning movement law fluctuation distribution diagram between the sub-region and the predicted area of the suspected occlusion area, effectively eliminating the interference of prediction deviation and improving the accuracy of occlusion judgment.
[0017] Preferably, the method for obtaining the degree of light difference between the sub-region and the best matching region in the matching template includes: The brightness difference between the subregion and the best matching region in the matching template is obtained by subtracting the brightness mean value of the subregion from the brightness mean value of the subregion and the best matching region in the matching template.
[0018] In a second aspect, the present invention provides a pipeline product positioning system, which adopts the following technical solutions: A pipeline product positioning system includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned pipeline product positioning method is implemented.
[0019] By adopting the above technical solution, the above pipeline product positioning method is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is made based on the memory and the processor for easy use.
[0020] The present invention has the following technical effects: The present invention controls the contribution of each sub-region in the matching according to the occlusion of each sub-region in the particle region, thereby more accurately calculating the matching value and providing a data basis for improving positioning accuracy; Furthermore, since the similarity between the occluded area and the matching template is low, and the light difference will also lead to a low similarity with the matching template, the occlusion of each sub-area can be reflected more accurately by eliminating the interference of light difference in the similarity calculation; Furthermore, since the occlusion area has motion characteristics, the probability of each sub-area belonging to the occlusion area can be more accurately and comprehensively determined by combining motion prediction; Furthermore, since motion prediction may have prediction deviations, when analyzing the probability of each sub-region belonging to the occlusion area through motion prediction, the probability of each sub-region belonging to the occlusion area can be more accurately obtained by analyzing the distribution of the prediction deviations. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding numbers represent the same or corresponding parts.
[0022] Figure 1 The present invention is a flowchart of a pipeline product positioning method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0024] It should be understood that when the terms "first," "second," and the like are used in the claims, description, and drawings of the present invention, they are merely used to distinguish between different objects, rather than to describe a specific order. The terms "comprise" and "comprising" used in the description and claims of the present invention indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.
[0025] The embodiment of the present invention discloses a pipeline product positioning method, referring to Figure 1 , including steps S1 to S3: S1: Obtain a pipeline product video, which includes several frames of pipeline product images.
[0026] Specifically, a pipeline product video is collected, and each frame of the pipeline product video is recorded as a pipeline product image.
[0027] S2: Obtain a preset matching template, use a target tracking algorithm based on the matching template to obtain several particle regions in the current frame pipeline product image, divide the particle region into several sub-regions, and calculate the possibility that any sub-region is an occlusion region.
[0028] It should be noted that the particle filter algorithm searches for and locates products by generating particles in areas where they may be located. The precise location of the product is determined based on the similarity between the particles and a matching template. If a pipeline product is partially obscured, the image information at the obscured location will differ from the matching template, making it impossible to accurately locate the product using the similarity between the particles and the matching template. To reduce the impact of occlusion on similarity analysis, the weight of occluded regions in the particle is reduced when calculating similarity. To adjust the weights, the likelihood that each region within the particle is an occluded region must be analyzed.
[0029] S20: Acquire a preset matching template, and acquire a plurality of particle regions in the pipeline product image of the current frame using a target tracking algorithm based on the matching template.
[0030] Preferably, as an example, a preset matching template is obtained, and a target tracking algorithm is used based on the matching template to obtain several particle regions in the current frame pipeline product image, including: An image is collected for each pipeline product, the name of the pipeline product to be located and tracked is input, and the corresponding pipeline product image is retrieved based on the pipeline product name as a matching template for the pipeline product to be located and tracked.
[0031] Based on the matching template, the particle filter algorithm is used to perform positioning analysis on each frame of the pipeline product image in turn. During the positioning analysis process, several particle areas in the current frame of the pipeline product image are obtained.
[0032] S21: Divide the particle region into several sub-regions.
[0033] Preferably, as an example, the particle region is divided into several sub-regions, including: The particle region is evenly divided into a preset number of sub-regions. This embodiment is described by taking 25 as an example of the preset number. Other embodiments may take other values, and this embodiment does not impose any specific limitation.
[0034] S22: Calculate the possibility that any sub-region is an occluded region.
[0035] It should be noted that the similarity between the occluded area and the corresponding area of the matching template will be lower than the similarity between the non-occluded area and the corresponding area of the matching template; at the same time, the changes in the occluded area will have a certain movement regularity, so this feature can be combined to analyze the possibility of each sub-area being an occluded area.
[0036] Preferably, as an example, calculating the possibility that any sub-region is an occlusion region includes:
[0037] Among them, the pipeline product area in the pipeline product image of the previous preset number of frames is obtained and recorded as the reference area, the suspected occlusion area in the reference area is obtained, and a movement law fluctuation distribution map of the suspected occlusion area is constructed. The possibility that the sub-region belongs to the suspected occlusion area in the current frame is obtained according to the distribution position of the distance between the sub-region and the predicted area of the suspected occlusion area in the current frame in the movement law fluctuation histogram. S represents the similarity between the sub-region and the best matching area in the matching template, G represents the degree of light difference between the sub-region and the best matching area in the matching template, K represents the possibility that the sub-region belongs to the suspected occlusion area in the current frame, norm() represents the linear normalization function, and X represents the possibility that the sub-region is the occlusion area.
[0038] It is understandable that the occlusion area predicted by the motion law may not be accurate, which may result in other areas outside the predicted occlusion area being the occlusion area. Therefore, it is necessary to analyze the deviation of the occlusion area prediction to obtain the distribution histogram of the deviation, and then judge the possibility of the sub-region being the occlusion area based on the position of the deviation between the sub-region and the predicted occlusion area in the distribution histogram. The possibility that the sub-region belongs to the suspected occlusion area in the current frame reflects the situation that the sub-region is inferred to be the occlusion area based on the movement law. Since light changes will also lead to a decrease in similarity, when using similarity to judge whether the sub-region is an occlusion area, the influence of light needs to be excluded. It reflects that the sub-region is inferred to be an occluded region based on similarity.
[0039] It should be added that the pipeline product area in the pipeline product image of the preset number of frames before acquisition is recorded as the reference area, including: The particle filter algorithm is used to track each frame of the pipeline product image in sequence, and the pipeline product area located in a preset number of frames of the pipeline product image before the current frame of the pipeline product image is obtained and recorded as the reference area.
[0040] The above embodiments involve suspected occlusion areas, fluctuation distribution maps of the movement patterns of suspected occlusion areas, and the possibility that the sub-area belongs to the suspected occlusion area in the current frame, the degree of light difference, and the best matching area. The following needs to explain the method for determining the suspected occlusion areas, fluctuation distribution maps of the movement patterns of suspected occlusion areas, and the possibility that the sub-area belongs to the suspected occlusion area in the current frame, the degree of light difference, and the best matching area.
[0041] S220: Acquire a suspected occlusion area in the reference area.
[0042] Preferably, as an example, obtaining the suspected occlusion area in the reference area includes: The reference area is divided into several sub-areas, and the possibility of each sub-area of the reference area being an occluded area is calculated. All sub-areas of the reference area are clustered into two categories according to the possibility of the occluded area. The mean of the possibility of the occluded area of all sub-areas in each category is calculated, and the area composed of sub-areas in the category with a larger mean value of the possibility of the occluded area is recorded as a suspected occluded area.
[0043] In particular, if there aren't a pre-set number of previous pipeline product images, the likelihood of each subregion being occluded cannot be exploited, and thus the suspected occlusion region cannot be segmented based on this likelihood. For such pipeline product images, we simply calculate the similarity between each subregion of the reference region and the best matching region of the matching template. Based on this similarity, we cluster all subregions of the reference region into two categories. The region consisting of subregions in the category with the lowest similarity and lowest mean value is considered the suspected occlusion region.
[0044] S221: Construct a movement pattern fluctuation distribution map of the suspected occlusion area.
[0045] It should be noted that the movement prediction of suspected occlusion areas includes two situations: one is that the object of the pipeline product does not move, so the changes in the occlusion area can be predicted through the motion trajectory of the pipeline product; the other is that the object occluding the pipeline product moves, and the occlusion area needs to be predicted in combination with the pipeline product and the object occluding the pipeline product.
[0046] Preferably, as an example, constructing a movement regularity fluctuation distribution map of the suspected occlusion area includes: Recording a preset number of frames of pipeline product images as reference pipeline product images, and obtaining a motion region in the reference pipeline product images; If the suspected occlusion area belongs to a moving area, the moving area to which the suspected occlusion area belongs is used as the study area, and the vector formed by the geometric center of the reference area in the reference pipeline product image of one frame and the previous frame is recorded as the translation index of the pipeline product; the rotation angle between the line connecting any key point and the geometric center of the reference area in the reference pipeline product image of one frame and the line connecting the corresponding key point and the geometric center of the reference interval in the reference pipeline product image of the previous frame is recorded as the rotation index of the pipeline product; after translating the pipeline product according to the translation index, the pipeline product is rotated around the geometric center according to the rotation index to obtain the predicted area of the pipeline product in the next frame of the reference pipeline product image; the predicted area of the study area in the next frame of the reference pipeline product image is obtained; and the intersection of the predicted area of the pipeline product in the next frame of the reference pipeline product image and the predicted area of the study area in the next frame of the reference pipeline product image is used as the predicted area of the suspected occlusion area in the next frame of the reference pipeline image; If the suspected occlusion area does not belong to the motion area, the intersection of the suspected occlusion area and the predicted area of the pipeline product in the reference management image of the next frame is used as the predicted area of the suspected occlusion area in the next frame; The distance between the geometric center of the suspected occlusion area and the predicted area in a frame of reference pipeline product image is used as the movement law fluctuation amount of the suspected occlusion area obtained based on the frame of reference pipeline product image; the movement law fluctuation amount of the suspected occlusion area is statistically analyzed, and the statistical histogram obtained is recorded as the movement law fluctuation distribution map.
[0047] It is understood that when the suspected occlusion area belongs to the moving area, it means that the object occluding the pipeline product is a moving object. In this case, the occlusion area is predicted based on the motion patterns of the moving object and the pipeline product. If the suspected occlusion area does not belong to the moving area, it means that the object occluding the pipeline product is a stationary object, and the position of the stationary object in the next frame remains unchanged. At the same time, since stationary objects cannot be detected, the suspected occlusion area can be used to represent the stationary object. Therefore, the suspected occlusion area is used as the predicted area for the stationary object in the next frame, and the intersection of the suspected occlusion area, the predicted area of the pipeline product in the next frame, and the occlusion area is used as the predicted area for the suspected occlusion area in the next frame.
[0048] It should be added that the method for obtaining the motion area includes: processing the pipeline product video using a frame difference method to obtain a frame difference image, and obtaining the area surrounded by pixels with a value of 255 in the frame difference image as the motion area.
[0049] It should be further supplemented that the method for obtaining the rotation index includes: obtaining the angle between a line connecting a key point and the geometric center in the reference area of a frame of reference pipeline product image and a line connecting the corresponding key point and the geometric center in the reference area of the previous frame of reference pipeline product image; if the line connecting a key point and the geometric center in the reference area of a frame of reference pipeline product image is in a clockwise direction of the line connecting the corresponding key point and the geometric center in the reference area of the previous frame of reference pipeline product image, then the angle is used as the rotation index; if the line connecting a key point and the geometric center in the reference area of a frame of reference pipeline product image is in a counterclockwise direction of the line connecting the corresponding key point and the geometric center in the reference area of the previous frame of reference pipeline product image, then the negative value of the angle is used as the rotation index.
[0050] S222: Obtain the possibility that the sub-region belongs to the suspected occlusion region in the current frame according to the distribution position of the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame in the movement regularity fluctuation histogram.
[0051] Preferably, as an example, obtaining the possibility that the sub-region belongs to the suspected occlusion region in the current frame according to the distribution position of the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame in the movement regularity fluctuation histogram includes: If the sub-region belongs to the predicted region of the suspected occlusion region in the current frame, the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame is set to 0. If the sub-region does not belong to the predicted region of the suspected occlusion region in the current frame, the geometric center of the sub-region and the predicted region of the suspected occlusion region in the current frame are connected by a line, and the distance from the intersection of the connecting line and the predicted region to the geometric center of the sub-region is used as the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame, which is recorded as the deviation distance. Obtain the probability value at the point where the value in the movement regularity fluctuation distribution map is equal to the deviation distance, and record it as the possibility that the sub-region belongs to the suspected occlusion region in the current frame.
[0052] It is understandable that due to the existence of prediction deviations, some areas may deviate from the predicted area of the suspected occlusion area, but may also belong to the suspected occlusion area. Therefore, the distribution of the probability of occurrence of each prediction deviation is analyzed, and the probability of the sub-area belonging to the suspected occlusion area is judged based on the distribution position of the distance prediction deviation between the sub-area and the predicted area of the suspected occlusion area.
[0053] S223: Obtain the best matching region of the sub-region in the matching template.
[0054] Preferably, as an example, obtaining the best matching area of the sub-area in the matching template includes: The region in the matching template that has the greatest similarity to the sub-region is taken as the best matching region.
[0055] S224: Obtain the degree of light difference between the sub-region and the best matching region in the matching template.
[0056] It should be noted that the brightness difference of the same object at different positions is mainly affected by light interference, so the brightness difference can be used to reflect the light difference.
[0057] Preferably, as an example, obtaining the degree of light difference between the sub-region and the best matching region in the matching template includes: Obtain the brightness value of each pixel in the sub-region and the brightness value of each pixel in the best matching region of the sub-region in the matching template, and subtract the brightness mean value of the sub-region in the best matching region of the sub-region in the matching template from the brightness mean value of the sub-region to obtain the degree of light difference between the sub-region and the best matching region in the matching template.
[0058] S3: Setting a matching weight for each sub-region according to the possibility of each sub-region being blocked, calculating the matching degree between the particle region and the matching template according to the matching weight, and locating the pipeline product region in the pipeline product image of the current frame using a particle filter algorithm based on the matching degree.
[0059] S30: setting a matching weight for each sub-region according to the possibility of each sub-region being blocked, and calculating a matching degree between the particle region and the matching template according to the matching weight.
[0060] Preferably, as an example, setting a matching weight for each sub-region according to the possibility of each sub-region being blocked, and calculating the matching degree between the particle region and the matching template according to the matching weight, including: The proportion of the reciprocal of the probability of each subregion being occluded to the reciprocal of the probability of all subregions being occluded in the particle region is used as the matching weight of each subregion, and the similarity between each subregion and the corresponding region in the matching template is used as the matching degree of the subregion.
[0061] The matching weight is used as the weight, and the matching degree of all sub-regions in the particle region is weighted summed to obtain the matching degree between the particle region and the matching template.
[0062] It can be understood that by setting a lower weight for a sub-region with a high possibility of being occluded, more emphasis is placed on information without occlusion to obtain the matching degree, thereby reflecting a more accurate matching value.
[0063] S31: Locate the pipeline product area in the pipeline product image of the current frame using a particle filter algorithm based on the matching degree.
[0064] An embodiment of the present invention further discloses a pipeline product positioning system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a pipeline product positioning method according to the present invention is implemented.
[0065] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0066] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as resistive random access memory, dynamic random access memory, static random access memory, enhanced dynamic random access memory, high bandwidth memory, hybrid memory cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium may be part of, accessible to, or connectable to the device.
[0067] While several embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.
[0068] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A pipeline product positioning method, characterized in that: Including steps: Obtain a pipeline product video, where the pipeline product video includes several frames of pipeline product images; Get the preset matching template, use the target tracking algorithm based on the matching template to obtain several particle areas in the current frame pipeline product image, divide the particle area into several sub-areas, and calculate the possibility that any sub-area is an occlusion area , obtain the pipeline product area in the pipeline product image of the previous preset number of frames and record it as the reference area, obtain the suspected occlusion area in the reference area, construct a movement law fluctuation distribution map of the suspected occlusion area, and obtain the possibility that the sub-region belongs to the suspected occlusion area in the current frame according to the distribution position of the distance between the sub-region and the predicted area of the suspected occlusion area in the current frame in the movement law fluctuation histogram. S represents the similarity between the sub-region and the best matching area in the matching template, G represents the degree of light difference between the sub-region and the best matching area in the matching template, K represents the possibility that the sub-region belongs to the suspected occlusion area in the current frame, and norm() represents the linear normalization function; The matching weight of each sub-region is set according to the possibility of each sub-region being blocked, and the matching degree between the particle region and the matching template is calculated based on the matching weight. Based on the matching degree, the pipeline product region in the pipeline product image of the current frame is located using the particle filter algorithm.
2. A pipeline product positioning method according to claim 1, characterized in that: The pipeline product area in the pipeline product image of the preset number of frames before obtaining is recorded as a reference area, including: The target tracking algorithm is used to track the pipeline product images of the previous preset number of frames to obtain the pipeline product area in the pipeline product images of the previous preset number of frames, which is recorded as the reference area.
3. A pipeline product positioning method according to claim 1, characterized in that: The obtaining of the suspected occlusion area in the reference area includes: The reference area is divided into several sub-areas, and the possibility of each sub-area of the reference area being an occluded area is calculated. All sub-areas of the reference area are clustered into two categories according to the possibility of the occluded area. The mean of the possibility of the occluded area of all sub-areas in each category is calculated, and the area composed of sub-areas in the category with a larger mean value of the possibility of the occluded area is recorded as a suspected occluded area.
4. A pipeline product positioning method according to claim 1, characterized in that: The step of constructing a movement regularity fluctuation distribution map of the suspected occlusion area includes: Recording a preset number of frames of pipeline product images as reference pipeline product images, and obtaining a motion region in the reference pipeline product images; If the suspected occlusion area belongs to a motion area, the motion area to which the suspected occlusion area belongs is used as the study area, and a predicted area of the study area in the next frame of the reference pipeline product image and a predicted area of the pipeline product in the next frame of the reference pipeline product image are obtained; the intersection of the predicted area of the pipeline product in the next frame of the reference pipeline product image and the predicted area of the study area in the next frame of the reference pipeline product image is used as the predicted area of the suspected occlusion area in the next frame of the reference pipeline image; If the suspected occlusion area does not belong to the motion area, the intersection of the suspected occlusion area and the predicted area of the pipeline product in the reference management image of the next frame is used as the predicted area of the suspected occlusion area in the next frame; The distance between the geometric center of the suspected occlusion area and the predicted area in a frame of reference pipeline product image is used as the movement law fluctuation amount of the suspected occlusion area obtained based on the frame of reference pipeline product image; the movement law fluctuation amount of the suspected occlusion area is statistically analyzed, and the statistical histogram obtained is recorded as the movement law fluctuation distribution map.
5. A pipeline product positioning method according to claim 4, characterized in that: The obtaining of the predicted area of the study area in the next frame of the reference pipeline product image and the predicted area of the pipeline product in the next frame of the reference pipeline product image includes: The vector formed by the geometric center of the reference area in the reference pipeline product image of one frame and the previous frame is recorded as the translation index of the pipeline product; the rotation angle between the line connecting any key point and the geometric center of the reference area in the reference pipeline product image of one frame and the line connecting the corresponding key point and the geometric center of the reference interval in the reference pipeline product image of the previous frame is recorded as the rotation index of the pipeline product; After translating the pipeline product according to the translation index, the pipeline product is rotated around the geometric center according to the rotation index to obtain a predicted area of the pipeline product in the next frame of the reference pipeline product image; Get the predicted area of the study area in the next frame of reference pipeline product image.
6. A pipeline product positioning method according to claim 1, characterized in that: The obtaining, based on the distribution position of the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame in the movement regularity fluctuation histogram, of the possibility that the sub-region belongs to the suspected occlusion region in the current frame includes: If the sub-region belongs to the predicted region of the suspected occlusion region in the current frame, the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame is set to 0. If the sub-region does not belong to the predicted region of the suspected occlusion region in the current frame, the geometric center of the sub-region and the predicted region of the suspected occlusion region in the current frame are connected by a line, and the distance from the intersection of the connecting line and the predicted region to the geometric center of the sub-region is used as the distance between the sub-region and the predicted region of the suspected occlusion region in the current frame, which is recorded as the deviation distance. Obtain the probability value at the point where the value in the movement regularity fluctuation distribution map is equal to the deviation distance, and record it as the possibility that the sub-region belongs to the suspected occlusion region in the current frame.
7. A pipeline product positioning method according to claim 1, characterized in that: The method for obtaining the degree of light difference between the sub-region and the best matching region in the matching template includes: The brightness difference between the subregion and the best matching region in the matching template is obtained by subtracting the brightness mean value of the subregion from the brightness mean value of the subregion and the best matching region in the matching template.
8. A pipeline product positioning system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a pipeline product positioning method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Anti-occlusion target tracking method based on particle filtering and weighting Surf
CN105405151A
Anti-shielding particle filtering target tracking method based on integral histogram
CN107507222A
Deburring equipment of tool jig and automatic burr positioning method
CN119810067A
Extraction and rapid screening system for image features of green passing vehicles on expressway
CN120125834A
Method for tracking multiple objects using particle filter
KR1020090043016A