A fiber core point cloud positioning method based on bayes theory and related equipment
Patent Information
- Application Number
- CN202410981060.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2044-07-22
AI Technical Summary
成像过程中,每一幅图像都依据预先确定的纤芯位置并生成纤芯点云,由于振镜特性的变化导致成像过程中纤芯位置变化,进而导致纤芯点云定位不准确,致使图像质量劣化
[0041]综上,本申请实施例提出的方法,包括:在初始点云图中遍历每个纤芯,将上述纤芯及其第一预设邻域的点确定为初始点云,以生成N个上述初始点云,其中,上述第一预设邻域是与上述纤芯紧邻的S像素邻域,同一个初始点云内的各点具有相同的非零像素值,N个初始点云的像素值均不相同,上述初始点云的像素值固定不变;将待定义点临近的初始点云中的像素值确定为上述待定义点云的像素值,其中,上述待定义点为上述初始点云外的任一点;计算待定义点在该点与第二预设领域组成的数据集的各像素值后验概率,其中,上述第二预设邻域为与上述待定义点紧邻的Q像素邻域;根据上述待定义点的像素值将其归为与之像素值相同的点云中,以获取最终点云图。本申请实施例提出的方法通过对每个纤芯及其邻域进行精确定位和固定像素值,可以在初始点云图中准确标识纤芯位置,从而在后续步骤中提高点云图的精度和稳定性。通过从初始点云到待定义点云的分级处理,能有效地管理和分类点云数据。通过多次计算后验概率并选择概率较高的值作为点云图中的像素标签值,能够更准确地反映各点云的属性。本方法提供了一种自动化的点云处理流程,可以根据需要调整邻域大小和后验概率计算的次数,从而适应不同的应用场景和需求,增强了方法的通用性和可扩展性。通过更精确的点云定位,可以减少由设备特性变化引起的成像误差,从而提高图像的整体质量和诊断价值。
Smart Images

Figure CN118941634B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of image processing, and more specifically, this application relates to a fiber core point cloud localization method and related equipment based on Bayesian theory. Background Technology
[0002] A microendoscopy is a medical device that, through channels such as gastroscopes and colonoscopes, can be inserted into the human body to obtain local histological images, enabling precise diagnosis of minute lesions, gastrointestinal diseases, and early gastrointestinal cancers. The scanning control module of a microendoscopy has two important components: a resonant mirror and a galvanometer mirror. The resonant mirror's function is to rapidly scan light in the horizontal direction, hence it is also called an X-ray mirror. The galvanometer mirror's function is to scan light in the vertical direction, hence it is also called a Y-ray mirror. Together, they obtain a two-dimensional planar image.
[0003] The resonant mirror and galvanometer mirror contain sophisticated electronic components whose characteristics change with the ambient temperature. During imaging, each image generates a fiber core point cloud based on a predetermined fiber core position. Changes in the mirror characteristics cause variations in the fiber core position during imaging, leading to inaccurate fiber core point cloud localization and consequently, image quality degradation. Therefore, it is necessary to propose a more accurate fiber core point cloud localization method. Summary of the Invention
[0004] The summary section introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. This summary section is not intended to limit the key and essential technical features of the claimed technical solution, nor is it intended to determine the scope of protection of the claimed technical solution.
[0005] Firstly, this application proposes a fiber core point cloud localization method based on Bayesian theory, the method comprising:
[0006] In the initial point cloud map, each fiber core is traversed, and the points of the fiber core and its first preset neighborhood are determined as the initial point cloud to generate N initial point clouds. The first preset neighborhood is the S-pixel neighborhood that is adjacent to the fiber core. Each point in the same initial point cloud has the same non-zero pixel value. The pixel values of the N initial point clouds are all different, and the pixel values of the initial point clouds are fixed.
[0007] The pixel values in the initial point cloud adjacent to the point to be defined are determined as the pixel values of the point cloud to be defined, wherein the point to be defined is any point outside the initial point cloud.
[0008] Calculate the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is the Q-pixel neighborhood that is immediately adjacent to the point to be defined.
[0009] Based on the pixel values of the points to be defined, they are assigned to point clouds with the same pixel values to obtain the final point cloud map.
[0010] In one feasible implementation, the above-described traversal of each fiber core in the initial point cloud map includes:
[0011] The above-mentioned fused image is obtained by performing a fusion operation on a multi-frame original image dataset.
[0012] Fiber positioning is performed on the above fused image to obtain a set of fiber core coordinates, wherein the set of fiber core coordinates includes the fiber core coordinate values of each fiber core.
[0013] Generate an initial point cloud map of the same size as the fused image described above, wherein all pixel values in the initial point cloud map are initialized to 0;
[0014] Based on the above fiber core coordinate set, each fiber core is traversed in the above initial point cloud map, and the pixel value of each initial point cloud is generated randomly or according to a preset rule.
[0015] In one feasible implementation, determining the pixel values of the initial point cloud adjacent to the point to be defined as the pixel values of the point cloud to be defined includes:
[0016] The pixel values of the P initial point clouds adjacent to the point to be defined are determined as candidate categories;
[0017] A pixel value is randomly selected from the above candidate categories and determined as the pixel value of the point cloud to be defined.
[0018] In one feasible implementation, the calculation of the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood includes:
[0019] Calculate the prior probability based on the pixel values in the point cloud images of the above categories;
[0020] Calculate the mean and variance of pixels at each category location in the above fused image, and calculate the conditional probability in the point cloud image of the above category based on the mean and variance.
[0021] The posterior probability is calculated based on the prior probability and the conditional probability described above.
[0022] In one feasible implementation, the calculation is repeated M times according to the above-mentioned prior probability, conditional probability and posterior probability calculation method, so as to take the larger value of the posterior probability as the pixel label value of the point to be defined, and update the pixel value of the point on the point cloud map with the above-mentioned pixel label value.
[0023] In one feasible implementation, the calculation of conditional probability based on the mean and variance includes:
[0024] The conditional probability P(X|Y) is calculated based on the following formula:
[0025]
[0026] Where X represents the value of the random variable, μ represents the mean, and e represents the variance.
[0027] In one feasible implementation, the calculation of the posterior probability based on the prior probability and the conditional probability includes:
[0028] The posterior probability P(Y|X) is calculated based on the following formula:
[0029] P(Y|X)=P(Y)*P(X|Y)
[0030] Where P(X|Y) is the conditional probability mentioned above, and P(Y) is the prior probability mentioned above.
[0031] In one feasible implementation, it further includes:
[0032] If the posterior probability is less than the threshold, the pixel value of that point is set to 0, making it part of the background image.
[0033] In one feasible implementation, S is less than Q.
[0034] Secondly, embodiments of this application propose a fiber core point cloud localization device based on Bayesian theory, comprising:
[0035] The first determining unit is used to traverse each fiber core in the initial point cloud map, determine the fiber core and the points of its first preset neighborhood as the initial point cloud, so as to generate N initial point clouds. The first preset neighborhood is an S-pixel neighborhood that is adjacent to the fiber core. Each point in the same initial point cloud has the same non-zero pixel value. The pixel values of the N initial point clouds are all different. The pixel values of the initial point clouds are fixed.
[0036] The second determining unit is used to determine the pixel value in the initial point cloud adjacent to the point to be defined as the pixel value of the point cloud to be defined, wherein the point to be defined is any point outside the initial point cloud.
[0037] The calculation unit is used to calculate the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is the Q-pixel neighborhood that is adjacent to the point to be defined.
[0038] The acquisition unit is used to classify the pixel value of the point to be defined into a point cloud with the same pixel value to obtain the final point cloud map.
[0039] Thirdly, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the Bayesian theory-based fiber core point cloud localization method as described in any of the first aspects above.
[0040] Fourthly, this application also proposes a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps of the Bayesian theory-based fiber core point cloud localization method of any one of the first aspects.
[0041] In summary, the method proposed in this application includes: traversing each fiber core in an initial point cloud map, determining the fiber core and points in its first preset neighborhood as initial point clouds to generate N initial point clouds, wherein the first preset neighborhood is an S-pixel neighborhood adjacent to the fiber core, each point in the same initial point cloud has the same non-zero pixel value, the pixel values of the N initial point clouds are all different, and the pixel values of the initial point clouds are fixed; determining the pixel values in the initial point clouds adjacent to the point to be defined as the pixel values of the point to be defined, wherein the point to be defined is any point outside the initial point clouds; calculating the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is a Q-pixel neighborhood adjacent to the point to be defined; and classifying the point to be defined into a point cloud with the same pixel value to obtain a final point cloud map. The method proposed in this application accurately identifies the fiber core position in the initial point cloud image by precisely locating each fiber core and its neighborhood and fixing pixel values, thereby improving the accuracy and stability of the point cloud image in subsequent steps. Through hierarchical processing from the initial point cloud to the point cloud to be defined, point cloud data can be effectively managed and classified. By calculating the posterior probability multiple times and selecting the value with the higher probability as the pixel label value in the point cloud image, the attributes of each point cloud can be more accurately reflected. This method provides an automated point cloud processing workflow, which can adjust the neighborhood size and the number of posterior probability calculations as needed, thereby adapting to different application scenarios and requirements and enhancing the method's versatility and scalability. More accurate point cloud positioning can reduce imaging errors caused by changes in device characteristics, thereby improving the overall image quality and diagnostic value.
[0042] The fiber core point cloud localization method based on Bayesian theory proposed in this application, along with other advantages, objectives, and features of this application, will be partly apparent from the following description and partly understood by those skilled in the art through research and practice of this application. Attached Figure Description
[0043] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0044] Figure 1 A flowchart illustrating a fiber core point cloud localization method based on Bayesian theory, provided for an embodiment of this application;
[0045] Figure 2 A schematic diagram of a first preset neighborhood provided in an embodiment of this application;
[0046] Figure 3 This application provides a schematic diagram of a second preset neighborhood.
[0047] Figure 4 A schematic diagram illustrating the principle of conditional probability calculation provided in this application embodiment;
[0048] Figure 5 A structural schematic diagram of a fiber core point cloud positioning device based on Bayesian theory provided for embodiments of this application;
[0049] Figure 6 This is a schematic diagram of a fiber core point cloud positioning electronic device provided in an embodiment of this application. Detailed Implementation
[0050] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The technical solutions of the embodiments of this application will now be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0051] Please see Figure 1 This is a flowchart illustrating a fiber core point cloud localization method based on Bayesian theory, provided in an embodiment of this application. Specifically, it may include:
[0052] S110. Traverse each fiber core in the initial point cloud map, and determine the points of the fiber core and its first preset neighborhood as the initial point cloud to generate N initial point clouds. The first preset neighborhood is the S-pixel neighborhood that is adjacent to the fiber core. Each point in the same initial point cloud has the same non-zero pixel value. The pixel values of the N initial point clouds are all different. The pixel values of the initial point clouds are fixed.
[0053] For example, before point cloud localization, each fiber core needs to be traversed in the initial point cloud map. The points of each fiber core and its first preset neighborhood are determined. Here, the "first preset neighborhood" refers to the region of S pixels immediately adjacent to the fiber core, where S can be 4. Each fiber core and its neighborhood are defined as an initial point cloud, thus generating a total of N initial point clouds. Points within the same initial point cloud have the same non-zero pixel value, while the pixel values of different initial point clouds are different. The pixel values of these initial point clouds remain fixed during subsequent processing. The first preset neighborhood is as follows: Figure 2 As shown.
[0054] S120. Determine the pixel value in the initial point cloud near the point to be defined as the pixel value of the point cloud to be defined, wherein the point to be defined is any point outside the initial point cloud.
[0055] For example, any point located outside the initial point cloud (referred to as the undefined point), where an undefined point is any point outside the initial point cloud, has its pixel value determined by the pixel value of any one of the P neighboring initial point clouds, where P can be 3. Its pixel value will be determined as the pixel value of a neighboring initial point cloud. This step involves starting from the location of the undefined point and searching for whether there are any initial point clouds around it; if so, the pixel value of the undefined point will be set to the pixel value of a neighboring initial point cloud.
[0056] S130. Calculate the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is the Q-pixel neighborhood that is adjacent to the point to be defined.
[0057] For example, the next step is to calculate the posterior probability of each pixel value in the dataset within its second preset neighborhood for the point to be defined. Here, the "second preset neighborhood" refers to the Q-pixel neighborhood immediately adjacent to the point to be defined, where Q can be 8. The second preset neighborhood is as follows: Figure 3 As shown, Bayesian theory is used to estimate the probability of each possible pixel value of the point to be defined, given the values of its surrounding pixels.
[0058] S140. Based on the pixel values of the points to be defined above, classify them into the point cloud with the same pixel values to obtain the final point cloud map;
[0059] For example, based on the pixel value probabilities calculated above, the point to be defined will be classified into a point cloud with the same pixel value. In this way, the final point cloud map can be progressively expanded and improved, ensuring that each point is correctly classified into the corresponding point cloud.
[0060] In summary, the method proposed in this application accurately identifies the fiber core position in the initial point cloud image by precisely locating each fiber core and its neighborhood and fixing pixel values, thereby improving the accuracy and stability of the point cloud image in subsequent steps. Through hierarchical processing from the initial point cloud to the point cloud to be defined, point cloud data can be effectively managed and classified. By calculating the posterior probability multiple times and selecting the value with the higher probability as the pixel label value in the point cloud image, the attributes of each point cloud can be more accurately reflected. This method provides an automated point cloud processing workflow, which can adjust the neighborhood size and the number of posterior probability calculations as needed, thereby adapting to different application scenarios and requirements and enhancing the method's versatility and scalability. More accurate point cloud positioning can reduce imaging errors caused by changes in device characteristics, thereby improving the overall image quality and diagnostic value.
[0061] In some examples, the above traversal of each fiber core in the initial point cloud map includes:
[0062] The above-mentioned fused image is obtained by performing a fusion operation on a multi-frame original image dataset.
[0063] Fiber positioning is performed on the above fused image to obtain a set of fiber core coordinates, wherein the set of fiber core coordinates includes the fiber core coordinate values of each fiber core.
[0064] Generate an initial point cloud map of the same size as the fused image described above, wherein all pixel values in the initial point cloud map are initialized to 0;
[0065] Based on the above fiber core coordinate set, each fiber core is traversed in the above initial point cloud map, and the pixel value of each initial point cloud is generated randomly or according to a preset rule.
[0066] For example, N frames are selected from multiple original images for fusion. These images may originate from different points in time or from different angles. Fusing these images can improve image quality and the integrity of information. The fusion operation can use various image processing techniques, such as multi-image overlay, HDR (High Dynamic Range) technology, or more advanced deep learning methods to improve the sharpness and detail of the final image.
[0067] Fiber localization is performed on the acquired fused image. This typically involves image recognition techniques, such as edge detection, pattern recognition, or deep learning algorithms, to accurately identify the location of the fiber cores. Coordinate values for each core are obtained during the localization process; these coordinates identify the core's precise location in the image, providing foundational data for subsequent processing steps such as point cloud generation.
[0068] Based on the size of the fused image, a point cloud map is generated, with all pixel values initially set to 0. This blank point cloud map will be used in subsequent processing steps. Using the fiber core coordinates identified in the fused image, the pixel values at the corresponding point cloud locations are set to specific values. These pixel values can be generated randomly or incrementally in traversal order, marking the fiber core locations. These marked points and their neighborhoods (e.g., 4-pixel neighborhoods) will be used in later steps to define and classify the surrounding point cloud.
[0069] The method proposed in this embodiment can extract richer information from multi-frame image data and utilize the high quality and accuracy of the fused image to perform high-precision fiber optic positioning and point cloud map generation.
[0070] In some examples, the pixel values of the initial point cloud adjacent to the point to be defined are determined as the pixel values of the point cloud to be defined, including:
[0071] The pixel values of the P initial point clouds adjacent to the point to be defined are determined as candidate categories;
[0072] A pixel value is randomly selected from the above candidate categories and determined as the pixel value of the point cloud to be defined.
[0073] For example, for a given point to be defined (i.e., any point outside the initial point cloud), determine its P nearest neighbors in the initial point cloud. "Nearest neighbor" can be defined based on some geometric distance or connectivity, such as the nearest neighbor algorithm or other spatial distance calculation methods. From these P nearest neighbors in the initial point cloud, the pixel values of each point cloud are collected, and these values constitute a "candidate class". This class contains all pixel value options that could be assigned to the point to be defined.
[0074] From the obtained candidate categories, a pixel value is randomly selected. This selected pixel value will be determined as the pixel value of the point cloud to be defined. This step completes the setting of the pixel value of the point to be defined, giving the points in this point cloud data specific attribute values.
[0075] This embodiment introduces randomness to avoid local extrema problems that deterministic algorithms may overlook, resulting in more robust classification results. The selection of P point clouds can be flexibly set according to actual application needs, making this method adaptable to different environments and requirements. It provides a relatively simple and effective method for estimating and correcting pixel values of unknown categories in point cloud images, which is particularly useful in applications requiring extremely high pixel classification accuracy.
[0076] In some examples, in one feasible implementation, the above calculation of the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood includes:
[0077] Calculate the prior probability based on the pixel values in the point cloud images of the above categories;
[0078] Calculate the mean and variance of pixels at each category location in the above fused image, and calculate the conditional probability in the point cloud image of the above category based on the mean and variance.
[0079] The posterior probability is calculated based on the prior probability and the conditional probability described above.
[0080] For example, the mean and variance of pixels at each category location in the fused image are calculated. The fused image is composed of multiple image layers and contains rich background and target information. The mean provides the average brightness or color information of pixels in each category, while the variance reflects the dispersion or consistency of these pixel values.
[0081] The pixel values in the category point cloud are set as prior probabilities, which are the initial probabilities that each pixel belongs to a certain category without considering the fused image data.
[0082] Conditional probabilities are calculated using the mean and variance of the fused image. This means that a given pixel value indicates that the pixel belongs to a specific category. This can be achieved based on a normal distribution or other statistical distribution models. Conditional probabilities can be calculated based on the degree to which a pixel value deviates from the category mean.
[0083] The posterior probability is the probability obtained by combining the prior probability and the conditional probability, calculated according to Bayes' theorem. It represents the updated probability of a pixel belonging to each category after observing a specific pixel value.
[0084] In some examples, the calculation is repeated M times according to the above-mentioned prior probability, conditional probability and posterior probability calculation method, so that the larger value of the posterior probability is used as the pixel label value of the point to be defined, and the pixel value of the point is updated to the above-mentioned pixel label value on the point cloud map.
[0085] For example, by repeating this series of calculations M times, the posterior probability estimate can be further optimized and adjusted. Finally, the class with the highest posterior probability is selected as the pixel label value in each point cloud image. This repeated calculation helps stabilize the posterior probability estimate, especially in cases of complex or noisy data.
[0086] The method proposed in this application calculates posterior probabilities by combining prior knowledge and observational data, which significantly improves classification accuracy. It allows for dynamic updates of prior and conditional probabilities, adapts to new data inputs, and possesses learning capabilities.
[0087] In some examples, the conditional probability calculated based on the mean and variance mentioned above includes:
[0088] The conditional probability P(X|Y) is calculated based on the following formula:
[0089]
[0090] Where x represents the value of the random variable, μ represents the mean, and e represents the variance.
[0091] In some examples, the calculation of the posterior probability based on the prior probability and the conditional probability includes:
[0092] The posterior probability P(Y|X) is calculated based on the following formula:
[0093] P(Y|X)=P(Y)*P(X|Y)
[0094] Where P(X|Y) is the conditional probability mentioned above, and P(Y) is the prior probability mentioned above.
[0095] In some examples, the above method further includes setting the pixel value of the point to 0 when the posterior probability is less than a threshold, so that it becomes part of the background image.
[0096] For example, by calculating the posterior probability multiple times, each pixel in the point cloud is assigned a label value representing the most likely category. A preset threshold, determined based on experience or statistical analysis, is set to distinguish between labels with high confidence and those with low confidence. The threshold setting depends on the specific application requirements and the desired image quality. The label values of all point clouds are checked, and any label value below the preset threshold is set to zero. These points will not be classified into any specific category but will be treated as background or uncertain areas.
[0097] After filtering, all point clouds with non-zero label values are merged into a single point cloud to generate the final point cloud image. This ensures that the final image contains only data with high confidence, thus improving the overall image quality and reliability. Removing low-confidence labels significantly reduces image noise.
[0098] In some examples, S is less than Q.
[0099] For example, by setting the value of Q to be larger than that of S, the posterior probability can have a sufficient number of samples, thus increasing the accuracy of the calculation.
[0100] In some examples, the final point cloud map can be obtained in the following ways:
[0101] S210. Adjust the laser power to a suitable value to obtain an image with optimal brightness, and take N frames of original images.
[0102] S220. Take the average value of N frames to obtain the fused image I. mean .
[0103] S230, Generate initial point cloud map I cloud I cloud Size and fused image I mean Consistent, the pixel values of all points are initialized to 0.
[0104] S240, in I mean Position the fiber core and obtain the fiber core coordinate set {C} n}, n=1,2,…N, where N is the number of fiber cores.
[0105] S250, Marked point cloud region:
[0106] S2501, Traversing {C} n};
[0107] S2502, in I cloud General Cn The pixel values of the points in the first preset neighborhood are labeled as n, and N initial point clouds are generated. The pixel values of the initial point clouds remain unchanged in the subsequent steps.
[0108] S260, Generate candidate categories {Cls} for undefined points outside the initial point cloud region. n}, n=1,2…,TT is the number of points outside the initial point cloud region, and the pixel values of the three nearest neighboring point clouds of point pt are taken as candidate categories, Cls pt ={C1,C2,C3}.
[0109] S270. Randomly assign the pixel values of points outside the initial point cloud region to one of the candidate categories.
[0110] S280. Calculate the posterior probability of a point outside the initial point cloud region within its 3x3 neighborhood:
[0111] S2801. Calculate the prior probabilities of each category:
[0112] Assume I cloud The pixel values (category) of a 3x3 neighborhood of a point pt are as follows: Figure 4 As shown:
[0113] Calculating the prior probability yields:
[0114] P(Y=101)=3 / 9
[0115] P(Y=102)=2 / 9
[0116] P(Y=103)=2 / 9
[0117] P(Y=104)=2 / 9
[0118] S2802, in I mean The mean and variance of the pixels at the corresponding positions for each category are calculated above.
[0119] S2803, According to the formula Calculate the conditional probability P(X|Y) and obtain
[0120] P(X|Y=101)
[0121] P(X|Y=102)
[0122] P(X|Y=103)
[0123] P(X|Y=104)
[0124] S2804. Calculate the post-verification probability P(Y|X) using the formula P(Y)=P(Y)*P(X|Y), and obtain...
[0125] P(Y=101|X)
[0126] P(Y=102|X)
[0127] P(Y=103|X)
[0128] P(Y=104|X)
[0129] S2805. Take the label value v corresponding to the maximum value of the calculation result in S2804, and update the pixel value of point pt to v on the point cloud map.
[0130] S290. Repeat step S280 multiple times until the set number of iterations is reached and then stop.
[0131] S300, minimum suppression.
[0132] Determine whether the posterior probability of each point in step S300 is less than the threshold Trd. If so, mark the point as 0 in the point cloud image.
[0133] S310. Group points with the same pixel value in the point cloud image into one point cloud to obtain the final point cloud image.
[0134] Please see Figure 5 The present application provides a structural schematic diagram of a fiber core point cloud localization device based on Bayesian theory, which may include:
[0135] The first determining unit 21 is used to traverse each fiber core in the initial point cloud map, determine the fiber core and the points of its first preset neighborhood as the initial point cloud, so as to generate N initial point clouds. The first preset neighborhood is an S-pixel neighborhood that is adjacent to the fiber core. Each point in the same initial point cloud has the same non-zero pixel value. The pixel values of the N initial point clouds are all different. The pixel values of the initial point clouds are fixed.
[0136] The second determining unit 22 is used to determine the pixel value in the initial point cloud adjacent to the point to be defined as the pixel value of the point cloud to be defined, wherein the point to be defined is any point outside the initial point cloud.
[0137] The calculation unit 23 is used to calculate the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is the Q-pixel neighborhood that is adjacent to the point to be defined.
[0138] The acquisition unit 24 is used to classify the pixel value of the point to be defined into a point cloud with the same pixel value to obtain the final point cloud map.
[0139] like Figure 6As shown, this application embodiment also provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements the steps of any of the above-described methods for fiber core point cloud positioning.
[0140] Since the electronic device described in this embodiment is the device used to implement the fiber core point cloud positioning device based on Bayesian theory in this application embodiment, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in this application embodiment. Therefore, how the electronic device implements the method in this application embodiment will not be described in detail here. Any device used by those skilled in the art to implement the method in this application embodiment is within the scope of protection of this application.
[0141] In practical implementation, when the computer program 311 is executed by the processor, it can achieve the following: Figure 1 Any of the corresponding implementation methods in the embodiments.
[0142] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0143] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0144] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0145] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0146] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0147] This application also provides a computer program product, which includes computer software instructions. When the computer software instructions are run on a processing device, the processing device executes the fiber core point cloud positioning process in the corresponding embodiment.
[0148] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0149] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0150] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0151] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0152] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0153] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0154] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A fiber core point cloud localization method based on Bayesian theory, characterized in that, include: In the initial point cloud map, each fiber core is traversed, and the points of the fiber core and its first preset neighborhood are determined as the initial point cloud to generate N initial point clouds. The first preset neighborhood is an S-pixel neighborhood that is adjacent to the fiber core. Each point in the same initial point cloud has the same non-zero pixel value. The pixel values of the N initial point clouds are all different, and the pixel values of the initial point clouds are fixed. The pixel values in the initial point cloud adjacent to the point to be defined are determined as the pixel values of the point cloud to be defined, wherein the point to be defined is any point outside the initial point cloud; Calculate the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is the Q-pixel neighborhood that is immediately adjacent to the point to be defined; The point to be defined is assigned to a point cloud with the same pixel value to obtain the final point cloud map.
2. The fiber core point cloud localization method based on Bayesian theory according to claim 1, characterized in that, The step of traversing each fiber core in the initial point cloud map includes: A fusion operation is performed on a multi-frame original image dataset to obtain the fused image; Fiber positioning is performed on the fused image to obtain a set of fiber core coordinates, wherein the set of fiber core coordinates includes the fiber core coordinate values of each fiber core. Generate an initial point cloud map of the same size as the fused image, wherein all pixel values in the initial point cloud map are initialized to 0; Based on the fiber core coordinate set, each fiber core is traversed in the initial point cloud map, and the pixel value of each initial point cloud is generated randomly or according to a preset rule.
3. The fiber core point cloud localization method based on Bayesian theory according to claim 2, characterized in that, The step of determining the pixel values of the initial point cloud adjacent to the point to be defined as the pixel values of the point cloud to be defined includes: The pixel values of the P initial point clouds adjacent to the point to be defined are determined as candidate categories; A pixel value is randomly selected from the candidate categories and determined as the pixel value of the point cloud to be defined.
4. The fiber core point cloud localization method based on Bayesian theory according to claim 3, characterized in that, The calculation of the posterior probability of each pixel value of the point to be defined in the dataset composed of the point and the second preset neighborhood includes: Calculate the prior probability based on the pixel values in the point cloud image of the aforementioned category; Calculate the mean and variance of pixels at each category location in the fused image, and calculate the conditional probability in the category point cloud image based on the mean and variance. The posterior probability is calculated based on the prior probability and the conditional probability.
5. The fiber core point cloud localization method based on Bayesian theory according to claim 4, characterized in that, The calculation is repeated M times according to the calculation method of the prior probability, the conditional probability and the posterior probability, so that the larger value of the posterior probability is used as the pixel label value of the point to be defined, and the pixel value of the point is updated to the pixel label value on the point cloud map.
6. The fiber core point cloud localization method based on Bayesian theory according to claim 4, characterized in that, The calculation of conditional probability based on the mean and the variance includes: The conditional probability P(X|Y) is calculated based on the following formula. : Where x represents the value of the random variable, μ represents the mean, and e represents the variance.
7. The fiber core point cloud localization method based on Bayesian theory according to claim 6, characterized in that, The step of calculating the posterior probability based on the prior probability and the conditional probability includes: The posterior probability P(Y|X) is calculated based on the following formula: P(Y|X)=P(Y)*P(X|Y) Wherein, P(X|Y) is the conditional probability, and P(Y) is the prior probability.
8. The fiber core point cloud localization method based on Bayesian theory according to claim 1, characterized in that, Also includes: If the posterior probability is less than the threshold, the pixel value of that point is set to 0, making it part of the background image.
9. The fiber core point cloud localization method based on Bayesian theory according to claim 1, characterized in that, S is less than Q.
10. A fiber core point cloud positioning device based on Bayesian theory, characterized in that, include: The first determining unit is used to traverse each fiber core in the initial point cloud map, determine the fiber core and the points of its first preset neighborhood as the initial point cloud, so as to generate N initial point clouds, wherein the first preset neighborhood is an S-pixel neighborhood that is adjacent to the fiber core, each point in the same initial point cloud has the same non-zero pixel value, the pixel values of the N initial point clouds are all different, and the pixel values of the initial point clouds are fixed. The second determining unit is used to determine the pixel value in the initial point cloud adjacent to the point to be defined as the pixel value of the point cloud to be defined, wherein the point to be defined is any point outside the initial point cloud; The calculation unit is used to calculate the posterior probability of each pixel value of the point to be defined in the dataset formed by the point and the second preset neighborhood, wherein the second preset neighborhood is the Q-pixel neighborhood that is immediately adjacent to the point to be defined. The acquisition unit is used to classify the point to be defined into a point cloud with the same pixel value to obtain the final point cloud map.
Citation Information
Patent Citations
Point cloud noise reduction method and device, electronic equipment and computer readable storage medium
CN111798398A
Radar point cloud densification method and related equipment
CN117710782A