Optical fiber image correction method, device and computer readable storage medium

Through the fiber image correction method, the gray value and brightness correction coefficient are used to drift and parameter correct the fiber image in the microendoscope, which solves the image quality problem caused by fiber drift and achieves the stability and diagnosis of fiber image quality. accuracy.

CN113570520BActive Publication Date: 2024-09-20SUZHOU MICROVIEW MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110856709.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-28
Publication Date
2024-09-20
Estimated Expiration
2041-07-28

AI Technical Summary

Technical Problem

Fiber drift in microendoscopes causes fiber information at wrong locations to be extracted during fiber image processing, affecting image quality, and gray value deviations significantly affect the consistency of image quality.

Method used

An optical fiber image correction method is provided. By obtaining the current optical fiber image and the optical fiber center reference position, determining the brightness correction coefficient based on the grayscale value, performing brightness correction on the optical fiber image, and using the gain coefficient and offset coefficient to perform regression fitting to achieve optical fiber drift. and real-time correction of parameters.

Benefits of technology

Quickly and efficiently implement fiber drift correction, improve fiber image quality, ensure the consistency of image quality, and improve the accuracy of subsequent diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113570520B
    Figure CN113570520B
Patent Text Reader

Abstract

The present disclosure relates to a method, device and computer-readable storage medium for optical fiber image correction. The method includes: obtaining a current optical fiber image and an optical fiber center reference position; in the current optical fiber image, correcting the center position of each optical fiber unit in the current optical fiber image according to the position difference between the optical fiber center reference position and the target position determined based on the grayscale value within its neighborhood; and performing brightness correction on the current optical fiber image that has completed position correction according to the currently determined brightness correction coefficient. In this way, in the process of observing an object using a microendoscope, the collected optical fiber image can not only quickly and efficiently realize optical fiber drift correction, but also quickly and efficiently realize parameter real-time correction, thereby improving the optical fiber image quality during the observation process, ensuring the consistency of the optical fiber image quality, and improving the accuracy of subsequent diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular, to a method, a device and a computer-readable storage medium for optical fiber image correction. Background Art

[0002] Microendoscopes are widely used in medical observation and detection. Optical fibers and galvanometers are important components of microendoscopes. An entire optical fiber is usually composed of tens of thousands of optical fiber units. Usually, the center position of each optical fiber unit is fixed. In actual use, due to the limitations of the scanning accuracy of the galvanometer and the bending changes of the optical fiber during use, it is impossible to ensure that each scan is in the same position when the end face is fixed. Therefore, as time changes, the scanning position of the galvanometer and the position of the optical fiber will change, and accordingly, the center position of each optical fiber unit in an entire optical fiber will also change. This phenomenon is called fiber drift.

[0003] Figure 1 The fiber drift phenomenon is shown as an example. Figure 1 The background is a fiber grid image. The dot marks represent the center positions of each fiber unit extracted from the fiber image acquired at the current moment, and the cross marks represent the center positions of each fiber unit in a certain frame of fiber image acquired previously. Ideally, the centers of each fiber unit in the same fiber completely overlap at each moment during the same use. However, if Figure 1 As shown in the figure, due to the fiber drift phenomenon, there is a certain pixel difference in the center position between the two moments. In the image reconstruction process, it is necessary to determine the position of the center of each fiber unit to implement the fast degridding method, and the existence of fiber drift will cause the fiber information at the wrong position to be extracted during fiber image processing, which greatly affects the image quality. In addition, the deviation between the grayscale values ​​of the centers of each fiber unit will also significantly affect the image quality. Summary of the invention

[0004] In view of the above-mentioned technical problems existing in the prior art, the present invention provides a fiber optic image correction method, device and computer-readable storage medium, which can not only quickly and efficiently realize fiber drift correction for the collected fiber optic image during the process of observing an object using a microendoscope, but also quickly and efficiently realize real-time parameter correction, thereby improving the fiber optic image quality during the observation process, ensuring the consistency of the fiber optic image quality, and improving the accuracy of subsequent diagnosis.

[0005] According to the first scheme of the present disclosure, a method for correcting an optical fiber image is provided. The method may include: obtaining a current optical fiber image and an optical fiber center reference position, wherein the current optical fiber image is an optical fiber image acquired at the current moment, the optical fiber includes a plurality of optical fiber units, and the optical fiber center reference position includes the center reference position of each optical fiber unit; in the current optical fiber image, according to the position difference between the optical fiber center reference position and the target position determined based on the grayscale value within its neighborhood; according to the currently determined brightness correction coefficient, brightness correction is performed on the current optical fiber image that has completed position correction.

[0006] In some embodiments, obtaining the reference optical fiber center position includes: obtaining a pre-stored optical fiber center reference position; or extracting the center position of each optical fiber unit from a previously acquired optical fiber image, and using the extracted center position of each optical fiber unit as the optical fiber center reference position.

[0007] In some embodiments, the previously acquired optical fiber image is acquired earlier than the current optical fiber image.

[0008] In some embodiments, in the current optical fiber image, based on the position difference between the optical fiber center reference position and the target position determined based on the grayscale value in its neighborhood, correcting the center position of each optical fiber unit in the current optical fiber image includes: in the current optical fiber image, taking the center reference position of each optical fiber unit as the origin, searching in the neighborhood of each origin respectively, and determining the position with the maximum grayscale value in each neighborhood; and correcting the center position of each optical fiber unit in the current optical fiber image based on the position difference between the position with the maximum grayscale value in each neighborhood and the center reference position of each optical fiber unit in the current optical fiber image.

[0009] In some embodiments, the brightness correction coefficient is determined by the following steps: obtaining a pre-stored gain coefficient and a bias coefficient, and determining the brightness correction coefficient based on the pre-stored gain coefficient and the bias coefficient; or performing regression fitting on the grayscale values ​​of a series of optical fiber images that change over time to determine the gain coefficient and the bias coefficient; and determining the brightness correction coefficient based on the determined gain coefficient and the bias coefficient.

[0010] In some embodiments, regression fitting is performed on the grayscale values ​​of a series of optical fiber images that change over time to determine the gain coefficient and the bias coefficient, including: determining the gain coefficient and the bias coefficient based on the brightness changes over time at the center position of each optical fiber unit in the optical fiber image and the brightness relationship between the center positions of each optical fiber unit in the optical fiber image.

[0011] In some embodiments, the gain coefficient and the bias coefficient are determined according to the following formula (1) and formula (2):

[0012]

[0013]

[0014] The brightness of the current optical fiber image after position correction is corrected according to formula (3):

[0015] u i (t) = α i υ i (t)+β i Formula (3)

[0016] Among them, u i (t) represents the gray value of the corrected center position of the i-th optical fiber unit in the t-th frame optical fiber image, υ i (t) represents the gray value of the center position of the ith fiber unit in the tth frame fiber image, υ j (t) represents the gray value of the center position of the jth fiber unit in the tth frame fiber image, α i represents the gain coefficient of the gray value at the center position of the i-th fiber unit, β i The bias coefficient of the gray value at the center position of the i-th fiber unit, α j The gain coefficient of the gray value at the center position of the jth fiber unit, β j The bias coefficient of the gray value at the center position of the jth fiber unit, ε ij (t) represents the error term between the gray value of the position of the center of the i-th optical fiber unit and the center of the j-th optical fiber unit in the t-th frame optical fiber image and the fitting curve.

[0017] In some embodiments, in the process of performing regression fitting on the grayscale values ​​of a series of optical fiber images that vary with time, for the center position of the optical fiber unit whose regression fitting error is greater than a preset threshold, the grayscale value of the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold is discarded; and / or, when the number of center positions of the optical fiber unit whose regression fitting error is greater than the preset threshold exceeds the preset number of positions, regression fitting of the series of optical fiber images that vary with time is abandoned.

[0018] In some embodiments, performing brightness correction on the current optical fiber image that has completed position correction also includes: in the current optical fiber image, dividing a graphic grid corresponding to each optical fiber unit with the center position of each corrected optical fiber unit as a vertex; for each position other than the vertex in the current optical fiber image, based on the corrected grayscale value of the center position of each corrected optical fiber unit contained in the graphic grid where the position is located, using distance-based weighted interpolation to determine the corrected grayscale value.

[0019] In some embodiments, the method may further include: storing the center position of each optical fiber unit in the current optical fiber image that has completed position correction, to obtain the optical fiber center reference position.

[0020] According to the second scheme of the present disclosure, a fiber optic image correction device is provided. The device may include an acquisition module, a drift correction module, and a brightness correction module. The acquisition module may be configured to acquire a current fiber optic image and a fiber optic center reference position, wherein the current fiber optic image is an image of the fiber optic acquired at the current moment, the fiber optic includes a plurality of fiber optic units, and the fiber optic center reference position includes a center reference position of each fiber optic unit. The drift correction module may be configured to correct the center position of each fiber optic unit in the current fiber optic image according to the position difference between the fiber optic center reference position and a target position determined based on grayscale values ​​within its neighborhood. The brightness correction module may be configured to perform brightness correction on the current fiber optic image that has completed position correction according to a currently determined brightness correction coefficient.

[0021] In some embodiments, the acquisition module is further configured to: acquire the pre-stored optical fiber center reference position; or extract the center position of each optical fiber unit from a previously acquired optical fiber image, and use the extracted center position of each optical fiber unit as the optical fiber center reference position.

[0022] In some embodiments, the previously acquired optical fiber image is acquired earlier than the current optical fiber image.

[0023] In some embodiments, the drift correction module is further configured as follows: in the current optical fiber image, the central reference position of each optical fiber unit is used as the origin, and the neighborhood range of each origin is searched respectively to determine the position with the largest grayscale value in each neighborhood range; based on the position difference between the position with the largest grayscale value in each neighborhood range and the central reference position of each optical fiber unit in the current optical fiber image, the central position of each optical fiber unit in the current optical fiber image is corrected.

[0024] In some embodiments, the optical fiber image correction device also includes a correction coefficient determination module, which is configured to: obtain pre-stored gain coefficients and bias coefficients, and determine the brightness correction coefficient based on the pre-stored gain coefficients and bias coefficients; or perform regression fitting on the grayscale values ​​of a series of optical fiber images that change over time to determine the gain coefficients and bias coefficients; and determine the brightness correction coefficient based on the determined gain coefficients and bias coefficients.

[0025] In some embodiments, the correction coefficient determination module is further configured to determine the gain coefficient and the bias coefficient based on the brightness changes over time at the center positions of the corresponding optical fiber units in the optical fiber image and the brightness relationship between the center positions of the optical fiber units in the optical fiber image.

[0026] In some embodiments, the gain coefficient and the bias coefficient are determined according to the following formula (1) and formula (2):

[0027]

[0028]

[0029] The brightness of the current optical fiber image after position correction is corrected according to formula (3):

[0030] u i (t) = α i υ i (t)+β i Formula (3)

[0031] Among them, u i (t) represents the gray value of the corrected center position of the i-th optical fiber unit in the t-th frame optical fiber image, υ i (t) represents the gray value of the center position of the ith fiber unit in the tth frame fiber image, υ j (t) represents the gray value of the center position of the jth fiber unit in the tth frame fiber image, α i represents the gain coefficient of the gray value at the center position of the i-th fiber unit, β i The bias coefficient of the gray value at the center position of the i-th fiber unit, α j The gain coefficient of the gray value at the center position of the jth fiber unit, β j The bias coefficient of the gray value at the center position of the jth fiber unit, ε ij (t) represents the error term between the gray value of the position of the center of the i-th optical fiber unit and the center of the j-th optical fiber unit in the t-th frame optical fiber image and the fitting curve.

[0032] In some embodiments, the correction coefficient determination module is specifically configured to, in the process of performing regression fitting on the grayscale values ​​of the series of optical fiber images that change over time: for the center position of the optical fiber unit whose regression fitting error is greater than a preset threshold, discard the grayscale value of the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold; and / or when the number of center positions of the optical fiber unit whose regression fitting error is greater than the preset threshold exceeds the preset number of positions, abandon the regression fitting of the series of optical fiber images that change over time.

[0033] In some embodiments, the optical fiber image correction device also includes a grid division module, which is configured to: in the current optical fiber image, divide the graphic grid corresponding to each optical fiber unit with the center position of each corrected optical fiber unit as the vertex; for each position other than the vertex in the current optical fiber image, based on the corrected grayscale value of the center position of each corrected optical fiber unit contained in the graphic grid where it is located, determine the corrected grayscale value by using distance-based weighted interpolation.

[0034] In some embodiments, the optical fiber image correction device further includes a storage module configured to store the center position of each optical fiber unit in the current optical fiber image that has completed position correction, and obtain the optical fiber center reference position.

[0035] According to a third solution of the present disclosure, a fiber optic image correction device is provided. The fiber optic image correction device includes a processor and a memory, the memory stores computer executable instructions, and when the processor executes the computer executable instructions, the fiber optic image correction method according to each embodiment of the present disclosure can be implemented.

[0036] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the optical fiber image correction method according to various embodiments of the present disclosure can be implemented.

[0037] By utilizing the fiber optic image correction method, fiber optic image correction device, and medium of the various embodiments of the present invention, when observing an object using a microendoscope, the collected fiber optic image can not only quickly and efficiently realize fiber drift correction, but also quickly and efficiently realize real-time parameter correction, thereby improving the fiber optic image quality during the observation process, ensuring the consistency of the fiber optic image quality, and improving the accuracy of subsequent diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In the drawings, which are not necessarily drawn to scale, the same reference numerals may describe similar components in different views. The same reference numerals with letter suffixes or different letter suffixes may represent different instances of similar components. The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the description and claims, serve to illustrate the disclosed embodiments. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.

[0039] Figure 1 A schematic diagram showing the optical fiber drift phenomenon according to the prior art;

[0040] Figure 2 A flowchart showing a method for correcting an optical fiber image according to an embodiment of the present disclosure is shown;

[0041] Figure 3(a)-Figure 3(c) Partial comparison diagrams of an original gridded image, an optical fiber image without drift correction and after de-gridding, and an optical fiber image after optical fiber drift correction and de-gridding using an optical fiber image correction method according to an embodiment of the present disclosure are respectively shown;

[0042] FIG4( a) is a schematic diagram showing a drift correction of the center of an optical fiber unit according to an embodiment of the present disclosure;

[0043] FIG4( b ) shows a schematic diagram of a graphical grid according to an embodiment of the present disclosure;

[0044] Figure 5 A schematic diagram showing the grayscale values ​​of the centers of two optical fiber units as vertices being fitted according to a regression method according to an embodiment of the present disclosure;

[0045] FIG6( a ) shows a partial diagram of a fiber image obtained by discarding data of some fiber units with large fitting deviations according to an embodiment of the present disclosure;

[0046] FIG6( b ) shows a partial illustration of a fiber image obtained without discarding data of a portion of fiber units with large fitting deviations according to an embodiment of the present disclosure;

[0047] Figure 7 A diagram showing a fiber optic image correction device according to an embodiment of the present disclosure; and

[0048] Figure 8 A block diagram of a fiber optic image correction device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the present disclosure is described in detail below in conjunction with the drawings and specific implementation methods. The embodiments of the present disclosure are further described in detail below in conjunction with the drawings and specific implementation methods, but are not intended to limit the present disclosure.

[0050] The words "first", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different parts. The words "include" or "comprise" and similar words mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of including other elements. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0051] In the present disclosure, when a specific device is described as being located between a first device and a second device, there may or may not be an intermediate device between the specific device and the first device or the second device. When a specific device is described as being connected to other devices, the specific device may be directly connected to the other devices without an intermediate device, or may not be directly connected to the other devices but have an intermediate device.

[0052] Figure 2 FIG. 4 is a flow chart showing a method for correcting an optical fiber image according to an embodiment of the present disclosure. Figure 2 As shown, the optical fiber image correction method includes step 101, step 102 and step 103.

[0053] In step 101, a current optical fiber image and an optical fiber center reference position may be obtained, wherein the current optical fiber image is an optical fiber image collected at the current moment, the optical fiber includes a plurality of optical fiber units, and the optical fiber center reference position includes the center reference position of each optical fiber unit.

[0054] For the current optical fiber image, the center reference position of each optical fiber unit is intended to represent the base center position of each optical fiber unit when no optical fiber drift occurs (or the amount of drift occurs is very small). It is also intended to represent the base center position of each optical fiber unit based on which the center position is corrected when the optical fiber drifts.

[0055] In some embodiments, the optical fiber center reference position may be pre-stored. For example, the optical fiber center reference position may be specifically preset and stored for the optical fiber image to be corrected, and directly called when correcting the optical fiber image to be corrected.

[0056] In some embodiments, the optical fiber center reference position may also be extracted from the center position of each optical fiber unit in a previously acquired optical fiber image, and the extracted center position of each optical fiber unit is used as the optical fiber center reference position.

[0057] In some embodiments, the current fiber image and the previously acquired fiber image may be two adjacent frames of images in terms of acquisition timing. For example, the acquisition time of the previously acquired fiber image may be one unit time prior to the current fiber image, so as to achieve a more sensitive preliminary calibration in the time domain. In some other embodiments, the acquisition time of the current fiber image and the previously acquired fiber image may differ by several signal acquisition periods. For example, the acquisition time of the previously acquired fiber image may be multiple unit time prior to the current fiber image (for example, 20), so as to reduce the computing load of the device while ensuring the effect of the preliminary calibration compared to the moment-by-moment preliminary calibration.

[0058] In step 102, the center position of each fiber unit in the current fiber image can be corrected according to the position difference between the fiber center reference position and the target position determined based on the gray value in its neighborhood. In this way, the offset of the center position of the fiber unit caused by the fiber drift between the previous and next time can be eliminated, and then the offset change of the position of the subsequent graphic grid divided by the center position of each fiber unit as the vertex can be eliminated. Among them, the center of each fiber unit is the center of each fiber unit that constitutes the entire optical fiber.

[0059] Specifically, for the current optical fiber image without position correction, the center position of each optical fiber unit therein is unknown, so in the current optical fiber image without position correction, the center reference position of each optical fiber unit is first used as the center position of each optical fiber unit.

[0060] Optionally, a corresponding position correction scheme can be adopted for the center position of each optical fiber unit in the current optical fiber image according to the position difference between the position with the maximum gray value in each neighborhood range in the current optical fiber image and the center reference position of each optical fiber unit in the current optical fiber image. It should be noted that since the correction is made according to the difference condition, correction may or may not be required. The above position difference condition can be reflected by the distance difference between the two positions. For example, when the distance difference reaches a certain threshold, the center position of the corresponding optical fiber unit in the current optical fiber image is corrected; otherwise, it is considered that the optical fiber drift at this location is not serious and is within an acceptable range, and the center position of the corresponding optical fiber unit in the current optical fiber image is not corrected. The size of the above threshold can be set according to demand. The correction in this embodiment can be understood as a position correction.

[0061] In some embodiments, when the difference reaches a certain threshold, the position with the maximum gray value in the neighborhood of each origin can be directly used as the corrected center position of the corresponding optical fiber unit in the current optical fiber image.

[0062] In some embodiments, the center position of each optical fiber unit in the current optical fiber image that has completed position correction is stored to obtain an optical fiber center reference position. The optical fiber center reference position is the optical fiber center reference position pre-stored in the above text and is also the latest optical fiber center reference position.

[0063] Through steps 101 and 102, the correction of fiber drift can be achieved quickly and efficiently, and the image reconstruction deviation caused by fiber drift can be reduced. When the fiber drift phenomenon is serious, the correction method according to the present disclosure can completely eliminate the influence of the position deviation caused by fiber drift on the subsequent fiber image processing.

[0064] Figure 3(a)-Figure 3(c)A comparison diagram of the original gridded fiber image, the fiber image without drift correction and after de-gridding is shown, and the fiber image after fiber drift correction and de-gridding using the fiber image correction method according to the embodiment of the present disclosure is shown. A grid will be formed in the fiber image corresponding to each fiber unit, and de-gridding is usually required. Specifically, the grayscale value of the remaining positions can be interpolated based on the grayscale value at the center position of the fiber unit, thereby achieving a de-gridding effect. It can be seen that the correction method according to each embodiment of the present disclosure can eliminate the adverse effect of the offset change of the center position of the fiber unit on the image quality after the de-gridding algorithm is executed.

[0065] In some embodiments, in the current optical fiber image, according to the position difference between the optical fiber center reference position and the target position determined based on the grayscale value in its neighborhood, the center position of each optical fiber unit in the current optical fiber image is corrected, including: in the current optical fiber image, the center reference position of each optical fiber unit is used as the origin, and the neighborhood of each origin is searched respectively to determine the position with the largest grayscale value in each neighborhood; according to the position with the largest grayscale value in each neighborhood and the position difference between the center reference position of each optical fiber unit in the current optical fiber image, the center position of each optical fiber unit in the current optical fiber image is corrected. In this embodiment, the target position determined based on the grayscale value refers to the position with the largest grayscale value. The implementation method of the center position of each optical fiber unit in the current optical fiber image according to the difference condition described above can be combined with this.

[0066] Specifically, the neighborhood range of each origin refers to the range formed by N pixels adjacent to each origin, and the size of N can be set according to actual needs, for example, N is equal to 10. As mentioned above, a whole optical fiber is usually composed of tens of thousands of optical fiber units, each of which has its own central reference position, and the neighborhood range with this as the origin is also tens of thousands in total.

[0067] It should be noted that the number of difference status results obtained is the same as the number of corresponding fiber units in the fiber image. Whether to correct the center position of each fiber unit in the current fiber image depends on the difference result corresponding to the center position of the fiber unit, so the center positions of all fiber units in the current fiber image may be corrected, or only the center positions of some fiber units in the current fiber image may be corrected, or the center positions of all fiber units in the current fiber image may not be corrected. For example, when the difference result corresponding to the center position of a certain fiber unit A in the current fiber image reaches a certain threshold, the center position of the fiber unit A is corrected; when the difference result does not reach a certain threshold, the center position of the fiber unit A is not corrected. The fiber unit A can be any fiber unit in the current fiber image.

[0068] In the current optical fiber image, a neighborhood search is performed based on the determined origin (i.e., the central reference position of each optical fiber unit), and the neighborhood is searched for the center position that is likely to be corrected. Two key parameters can be set for the neighborhood search, one is the search range, and the other is the search judgment criterion. The former can be dynamically selected according to the size range of the optical fiber unit, so that the search range is not larger than the size of the optical fiber unit itself. The latter can be adopted in a variety of ways. Preferably, the position with the largest grayscale value can be searched within each neighborhood range as the center position of each optical fiber unit in the corrected current optical fiber image. The inventors take into account that the signal grayscale value of the center position of the optical fiber unit under ideal conditions is the largest relative to the grayscale value of each point within the entire size range of the optical fiber unit. By setting a search range that is not larger than the size of the optical fiber unit itself and combining the search for the grayscale maximum value, the actual center position of each optical fiber unit in the current optical fiber image can be efficiently and accurately found, thereby realizing optical fiber drift correction.

[0069] Take a fiber unit as an example, and illustrate it with reference to FIG4(a). Fiber unit 301 is a fiber unit in the entire fiber. Fork-shaped mark position 302 indicates the center reference position of fiber unit 301. The center reference position can be extracted from the fiber image previously acquired, or can be acquired from the pre-stored fiber center reference position. FIG4(a) shows that the center reference position, i.e., fork-shaped mark position 302, is displayed in the current fiber image; fork-shaped mark position 302 is the uncorrected center position of fiber unit 301 in the current fiber image. Fork-shaped mark position 302 is used as the origin, and a search neighborhood range 304 is set within the size of fiber unit 301. The position with the maximum gray value in the neighborhood range 304 is searched as dot mark position 303. When the distance difference between dot mark position 303 and fork mark position 302 reaches a certain threshold, the position with the largest gray value (i.e., dot mark position 303) in the current fiber image is used as the corrected center position of fiber unit 301. When the distance difference between the dot mark position 303 and the cross mark position 302 does not reach a certain threshold, the center position of the optical fiber unit 301 is not corrected, that is, the center position of the optical fiber unit 301 is still the cross mark position 302. Through the above process, the correction of the center position of the optical fiber unit 301 is completed.

[0070] According to the correction method disclosed in the present invention, the deterioration of image quality caused by optical fiber drift can be avoided, and the consistency of image quality during the image acquisition process can be ensured.

[0071] After the drift correction is completed, in step 103, brightness correction may be performed on the current optical fiber image that has completed position correction according to the currently determined brightness correction coefficient.

[0072] By executing steps 101 to 103, when observing an object using a microendoscope, the collected optical fiber image can not only quickly and efficiently realize optical fiber drift correction, but also quickly and efficiently realize real-time parameter correction, thereby improving the optical fiber image quality during the observation process, ensuring the consistency of the optical fiber image quality, and improving the accuracy of subsequent diagnosis.

[0073] The present disclosure performs real-time brightness correction on the optical fiber image based on the continuity principle of observing natural objects through optical fibers. Specifically, considering that the size of each optical fiber unit constituting the entire optical fiber bundle is extremely small, and the spacing between the optical fiber units is in the order of microns, for observing natural images, it can be approximately considered that the natural image will not undergo a sudden change within this scale, that is, the natural image observed at this scale is continuous.

[0074] In some embodiments, the brightness correction coefficient may be determined by the following steps: obtaining a pre-stored gain coefficient and a bias coefficient, and determining the brightness correction coefficient according to the pre-stored gain coefficient and the bias coefficient.

[0075] Specifically, the brightness correction coefficient is composed of a gain coefficient and a bias coefficient, so this embodiment can be understood as the brightness correction coefficient is also pre-stored, and is directly called when the brightness correction is performed on the optical fiber image to be brightness corrected. This method can achieve fast and real-time correction of optical fiber image parameters.

[0076] In some embodiments, the brightness correction coefficient can also be determined by the following steps: regression fitting is performed on the grayscale values ​​of a series of optical fiber images that change over time to determine the gain coefficient and the bias coefficient; based on the determined gain coefficient and the bias coefficient, the brightness correction coefficient is determined. As an example but not a limitation, the regression fitting can be a linear regression fitting. Through the brightness correction coefficient determined in this way, the brightness correction is performed in real time on the current optical fiber image that has completed the position correction, and in practice, an optical fiber image with balanced brightness is obtained, achieving a good correction effect, thereby ensuring the consistency of the optical fiber image quality.

[0077] Specifically, the brightness correction coefficient is composed of a gain coefficient and a bias coefficient. The brightness correction coefficient in the present disclosure is calculated in real time based on a series of optical fiber images that change over time, and is continuously updated as the number of images increases. Each time a new optical fiber image is obtained, the brightness correction of the newly obtained optical fiber image is performed based on the current brightness correction coefficient.

[0078] Optionally, a series of optical fiber images that have completed position correction and change over time can be used for regression fitting of their grayscale values, or a series of optical fiber images that have not completed position correction and change over time can be used for regression fitting of their grayscale values. Preferably, the series of optical fiber images that have completed position correction and change over time are used for regression fitting of their grayscale values, so the obtained gain coefficient and bias coefficient are more accurate, so the brightness correction coefficient determined based on the gain coefficient and bias coefficient is also more accurate, and the use of the above brightness correction coefficient for optical fiber image correction can also further improve the effect of image correction.

[0079] In some embodiments, the gain coefficient and the bias coefficient may be determined based on the brightness variation of the center position of each optical fiber unit in the optical fiber image over time and the brightness relationship between the center positions of each optical fiber unit in the optical fiber image over time.

[0080] For example, the gain coefficient and the offset coefficient may be determined according to the following formula (1) and formula (2):

[0081]

[0082]

[0083] The brightness correction of the current optical fiber image after position correction can be performed according to formula (3):

[0084] u i (t) = α i υ i (t)+β i Formula (3),

[0085] Among them, u i (t) represents the gray value of the center position of the ith fiber unit in the tth frame of the fiber image after correction, υ i (t) represents the gray value of the center position of the ith fiber unit in the tth frame fiber image, υ j (t) represents the gray value of the center position of the jth fiber unit in the tth frame fiber image, α i represents the gain coefficient of the gray value at the center position of the i-th fiber unit, β i The bias coefficient of the gray value at the center position of the i-th fiber unit, α j The gain coefficient of the gray value at the center position of the jth fiber unit, β j The bias coefficient of the gray value at the center position of the jth fiber unit, ε ij (t) represents the error term between the gray value of the center position of the i-th optical fiber unit and the center position of the j-th optical fiber unit in the t-th frame optical fiber image and the fitting curve.

[0086] It should be noted that in some cases, when the center position of the i-th fiber unit is abandoned for linear regression fitting, α i and β i The value of will be empty, u i (t) is equal to v i (t), which means that the grayscale value at the center position of the i-th optical fiber unit is not corrected.

[0087] Specifically, according to formula (1) to formula (3), for the center position of each pair of optical fiber units, such as the center position of the i-th optical fiber unit and the center position of the j-th optical fiber unit, the gain coefficient α can be obtained by solving the overdetermined equation based on the gray value information of the center position of the pair of optical fiber units in a series of optical fiber images in the time domain. i and the bias coefficient β i As the brightness correction coefficient of the gray value of the center position of the i-th optical fiber unit. For example, the brightness correction coefficient of the gray value of the center position of each optical fiber unit can be obtained by iteratively solving the different expressions of the correction coefficients of the center position of an optical fiber unit in different optical fiber pairs (closely related to the difference in light transmission performance).

[0088] In some embodiments, the brightness correction of the current optical fiber image that has completed position correction also includes: in the current optical fiber image, dividing the graphic grid corresponding to each optical fiber unit with the center position of each corrected optical fiber unit as the vertex; for each position other than the vertex in the current optical fiber image, based on the corrected gray value of the center position of each corrected optical fiber unit contained in the graphic grid where it is located, using distance-based weighted interpolation, determine the corrected gray value. In this way, the gray value correction of other positions except the center position of each optical fiber unit in the current optical fiber image is completed, and the optical fiber image after drift and brightness correction and grid removal can be obtained, and the optical fiber image has high smoothness and low noise, that is, the image quality is better.

[0089] For example, the graphic mesh may be a triangular mesh constructed by a Delaunay triangular mesh, as shown in FIG4( b), triangular meshes 307a-307f-307g, triangular meshes 307a-307b-307g, triangular meshes 307b-307g-307c, triangular meshes 307g-307c-307d, triangular meshes 307e-307g-307d and triangular meshes 307f-307g-307e, 307a-307g represent the center positions of each optical fiber unit after correction and serve as the vertices of the graphic meshes corresponding to each optical fiber.

[0090] Next, as shown in Figure 4(b), for position 306, the grayscale value of position 306 can be determined based on the corrected grayscale values ​​of each vertex 307a, 307f and 307g of the triangular mesh 307a-307f-307g surrounding it, for example, by weighted summation according to distance, which can also be called the reconstructed grayscale value of position 306.

[0091] In some embodiments, each vertex and its brightness correction coefficient may be stored for use with drift-corrected optical fiber images acquired over a period of time, so as to facilitate rapid reconstruction and updating of the optical fiber image.

[0092] In some embodiments, a large amount of data may be acquired to perform orthogonal regression fitting of the grayscale value of the center position of the optical fiber unit to obtain a brightness correction coefficient. However, the fitting results obtained may be different depending on the data collected. In some embodiments, during the process of performing regression fitting on the grayscale values ​​of a series of optical fiber images that change over time, a regression fitting error may be calculated.

[0093] For example, Figure 5 As shown, the grayscale value of the center position of the fiber unit marked by the solid circle has a small deviation from the regression line y=1.0479x-1526.0267, while the grayscale value of the center position of the fiber unit marked by the hollow circle has a large deviation from the regression line y=1.0479x-1526.0267, which means that the regression fitting error of the grayscale value of the center position of the fiber unit marked by the hollow circle is large. The x-axis represents the grayscale value v of the center position of the i-th fiber unit as it changes with time i (t), the y-axis represents the gray value v of the center position of the j-th fiber unit as time changes j In some embodiments, the regression fitting error can also be a deviation estimated before the regression fitting calculation is performed, for example, i (t) and v j (t), including but not limited to the Pearson correlation coefficient, etc., to represent the regression fitting error.

[0094] In the process of performing regression fitting on the grayscale values ​​of a series of optical fiber images that change with time, for the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold, the grayscale value of the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold can be discarded, and the remaining data can be used to perform regression fitting. The brightness correction coefficient obtained by such regression fitting is used to perform brightness correction, and the obtained optical fiber image is shown in Figure 6 (a). In some embodiments, in the process of performing regression fitting on the grayscale values ​​of a series of optical fiber images that change with time, when the number of center positions of the optical fiber unit whose regression fitting error is greater than the preset threshold exceeds the number of preset positions, the linear regression fitting of the series of optical fiber images that change with time can be abandoned. At this time, no brightness correction coefficient is obtained, and the grayscale value of the position corresponding to the brightness correction coefficient in the current optical fiber image is retained. For the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold, it is considered that the brightness correction coefficient obtained by regression fitting distorts the grayscale value of the center position too much. Retaining the uncorrected grayscale value can reflect the real grayscale information and avoid excessive distortion of the real grayscale information. The brightness correction coefficient obtained by such regression fitting is used for brightness correction, and the obtained optical fiber image is shown in Figure 6(b), which retains more real grayscale information and has a better image effect. Relatively speaking, if the regression fitting error is less than or equal to the center position of the optical fiber unit with a preset threshold, it is considered that the brightness correction coefficient obtained by regression fitting is appropriate, and can be used for brightness correction to obtain an optical fiber image with balanced and reasonable brightness.

[0095] Specifically, when the number of the center positions of the optical fiber units whose regression fitting errors are greater than the preset threshold exceeds the number of preset positions, it is considered that the linear regression fitting has deviated from the real property of the brightness of the optical fiber image changing with time, and the linear regression fitting of the series of optical fiber images changing with time is abandoned. When the number of the center positions of the optical fiber units whose regression fitting errors are greater than the preset threshold exceeds the number of preset positions, if the brightness correction coefficient of the gray value of the center position of each optical fiber unit is still determined by regression fitting and brightness correction is performed accordingly, it will lead to a more serious non-smoothing phenomenon, and even drown out the real image details.

[0096] The above processing can not only obtain relatively good image quality, but also avoid the situation where a local image is affected by the imaging object or system and the entire image is discarded, that is, the imaging quality and imaging efficiency are improved at the same time.

[0097] Figure 7 FIG. 7 is a diagram of a fiber optic image correction device 700 according to an embodiment of the present disclosure. The fiber optic image correction device 700 may include an acquisition module 701, a drift correction module 702, and a brightness correction module 703, configured to respectively perform Figure 2 Step 101, step 102 and step 103 shown in FIG.

[0098] Specifically, the acquisition module 701 can be configured to acquire the current fiber image and the fiber center reference position, wherein the current fiber image is the fiber image collected at the current moment, the fiber includes a plurality of fiber units, and the fiber center reference position includes the center reference position of each fiber unit. The drift correction module 702 can be configured to correct the center position of each fiber unit in the current fiber image according to the position difference between the fiber center reference position and the target position determined based on the gray value in its neighborhood. The brightness correction module 703 can be configured to perform brightness correction on the current fiber image that has completed the position correction according to the currently determined brightness correction coefficient. By using the fiber image correction device 700, in the process of observing an object using a microendoscope, the collected fiber image can not only quickly and efficiently realize the fiber drift correction, but also quickly and efficiently realize the real-time parameter correction, thereby improving the fiber image quality during the observation process, ensuring the consistency of the fiber image quality, and improving the accuracy of subsequent diagnosis.

[0099] In some embodiments, the acquisition module is further configured to: acquire a pre-stored optical fiber center reference position; or extract the center position of each optical fiber unit from a previously acquired optical fiber image, and use the extracted center position of each optical fiber unit as the optical fiber center reference position.

[0100] In some embodiments, the previously acquired optical fiber image is acquired earlier than the current optical fiber image.

[0101] In some embodiments, the drift correction module 702 can be further configured as follows: in the current optical fiber image, the central reference position of each optical fiber unit is used as the origin, and the neighborhood range of each origin is searched to determine the position with the maximum grayscale value in each neighborhood range; according to the position difference between the position with the maximum grayscale value in each neighborhood range and the central reference position of each optical fiber unit in the current optical fiber image, the central position of each optical fiber unit in the current optical fiber image is corrected. After correction, the image quality deterioration caused by optical fiber drift can be avoided, and the consistency of image quality during image acquisition can be ensured.

[0102] In some embodiments, the optical fiber image correction device 700 further includes a storage module, which can be configured to store the center position of each optical fiber unit in the current optical fiber image that has completed position correction, and obtain the optical fiber center reference position.

[0103] In some embodiments, the optical fiber image correction device 700 also includes a correction coefficient determination module, which can be configured to: obtain pre-stored gain coefficients and bias coefficients, and determine a brightness correction coefficient based on the pre-stored gain coefficients and bias coefficients; or perform regression fitting on the grayscale values ​​of a series of optical fiber images that change over time to determine the gain coefficients and bias coefficients; and determine the brightness correction coefficient based on the determined gain coefficients and bias coefficients.

[0104] Specifically, for example, the correction coefficient determination module can be further configured to determine the gain coefficient and the bias coefficient based on the brightness changes over time at the center position of each optical fiber unit in the optical fiber image and the brightness relationship between the center positions of each optical fiber unit in the optical fiber image.

[0105] In some embodiments, the correction coefficient determination module may be further configured to determine the gain coefficient and the offset coefficient according to the following formula (1) and formula (2):

[0106]

[0107]

[0108] The brightness correction module 703 is further configured to perform brightness correction on the current optical fiber image that has completed position correction according to formula (3):

[0109] u i (t) = α i υ i (t)+β i Formula (3)

[0110] Among them, u i (t) represents the gray value of the corrected center position of the i-th optical fiber unit in the t-th frame optical fiber image, υ i (t) represents the gray value of the center position of the ith fiber unit in the tth frame fiber image, υ j (t) represents the gray value of the center position of the jth fiber unit in the tth frame fiber image, α i represents the gain coefficient of the gray value at the center position of the i-th fiber unit, β i The bias coefficient of the gray value at the center position of the i-th fiber unit, α j The gain coefficient of the gray value at the center position of the jth fiber unit, β j The bias coefficient of the gray value at the center position of the jth fiber unit, ε ij (t) represents the error term between the gray value of the center position of the i-th optical fiber unit and the center position of the j-th optical fiber unit in the t-th frame optical fiber image and the fitting curve.

[0111] In some embodiments, the optical fiber image correction device 700 further includes a grid division module, which can be configured as follows: in the current optical fiber image, the center position of each optical fiber unit after correction is used as the vertex to divide the graphic grid corresponding to each optical fiber unit; for each position other than the vertex in the current optical fiber image, based on the corrected gray value of the center position of each optical fiber unit after correction contained in the graphic grid where it is located, the corrected gray value is determined by using the weighted interpolation based on the distance. Thus, a final optical fiber image with high smoothness and low noise can be obtained.

[0112] In some embodiments, the correction coefficient determination module can be specifically configured as follows: in the process of regressing and fitting the grayscale values ​​of the series of optical fiber images that change over time: for the center position of the optical fiber unit whose regression fitting error is greater than a preset threshold, the grayscale value of the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold is discarded; and / or, when the number of the center positions of the optical fiber unit whose regression fitting error is greater than the preset threshold exceeds the number of preset positions, the regression fitting of the series of optical fiber images that change over time is abandoned. Such processing can not only obtain relatively good image quality, but also avoid the situation where the entire image is discarded due to the influence of the imaging object or system on the local image, that is, the imaging quality and imaging efficiency are improved at the same time.

[0113] Figure 8 FIG. 8 is a block diagram of an optical fiber image correction device 800 according to an embodiment of the present disclosure. Figure 8 As shown, the optical fiber image correction device 800 may include a processor 804 and a memory 805, and the memory 805 may store computer executable instructions. When the processor 804 executes the computer executable instructions, it may implement the optical fiber image correction method according to various embodiments of the present disclosure. For example, the processor 804 may be configured to: obtain a current optical fiber image and an optical fiber center reference position, wherein the current optical fiber image is an image of an optical fiber collected at the current moment, the optical fiber includes a plurality of optical fiber units, and the optical fiber center reference position includes a center reference position of each optical fiber unit; in the current optical fiber image, according to the position difference between the optical fiber center reference position and the target position determined based on the gray value within its neighborhood, the center position of each optical fiber unit in the current optical fiber image is corrected; according to the currently determined brightness correction coefficient, the current optical fiber image that has completed the position correction is brightness corrected. By utilizing the fiber optic image correction device 800, when observing an object using a microendoscope, the collected fiber optic image can not only be quickly and efficiently corrected for fiber drift, but also quickly and efficiently correct parameters in real time, thereby improving the fiber optic image quality during the observation process, ensuring the consistency of the fiber optic image quality, and improving the accuracy of subsequent diagnosis.

[0114] The memory 805 is an example of a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the optical fiber image correction method according to various embodiments of the present disclosure can be implemented.

[0115] The optical fiber image correction device 800 can be a dedicated computer, a general-purpose computer or even in the cloud. For example, the optical fiber image correction device 800 can be a customized computer to perform optical fiber signal data acquisition and processing tasks. Figure 8 As shown in , the optical fiber image correction device 800 may further include a communication interface 803 , a storage 806 and a display 807 .

[0116] The communication interface 803 may include a network adapter, a cable connector, a serial connector, a USB connector, a parallel connector, a high-speed data transmission adapter (such as optical fiber, USB 3.0, Thunderbolt interface, etc.), a wireless network adapter (such as a WiFi adapter), a telecommunication (3G, 4G / LTE, 5G, etc.) adapter, etc. The optical fiber image correction device 800 may be connected to other components through the communication interface 803, such as but not limited to the optical fiber assembly of the microscope, the image signal acquisition assembly, etc. In some embodiments, the communication interface 803 may be configured to receive the current optical fiber image and the optical fiber center reference position. In some embodiments, the communication interface 803 may be configured to receive a series of optical fiber images including the current optical fiber image, such as but not limited to the previously acquired optical fiber image for extracting the center position of each optical fiber unit as the optical fiber center reference position.

[0117] The processor 804 may be a processing device including one or more general-purpose processing devices, such as a microprocessor, a central processing unit (CPU), a graphics processing unit (GPU), etc. More specifically, the processor may be a complex instruction set computing (CISC) microprocessor, a reduced instruction set computing (RISC) microprocessor, a very long instruction word (VLIW) microprocessor, a processor running other instruction sets, or a processor running a combination of instruction sets. The processor 804 may also be one or more special-purpose processing devices, such as an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), a system on a chip (SoC), etc. The processor 804 may be communicatively coupled to the memory 805 and configured to execute computer-executable instructions stored thereon to perform the fiber image correction method such as described in various embodiments of the present disclosure.

[0118] Memory 805 / storage 806 may be a non-transitory computer-readable medium, such as read-only memory (ROM), random access memory (RAM), phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), electrically erasable programmable read-only memory (EEPROM), other types of random access memory (RAM), flash disks or other forms of flash memory, cache, registers, static memory, compact disk read-only memory (CD-ROM), digital versatile disks (DVD) or other optical storage, cassettes or other magnetic storage devices, or any other possible non-transitory medium used to store information or instructions that can be accessed by a computer device.

[0119] In some embodiments, the storage 806 may store data received, used, or generated while executing a computer program, such as, but not limited to, the center position of each fiber unit in a previously acquired fiber image, the center position of each fiber unit before correction of the current fiber image, the center position of each fiber unit after correction of the current fiber image, the calculated gain coefficient, the bias coefficient, the de-gridding image after fiber drift correction, the de-gridding image after drift correction and brightness correction, etc. In some embodiments, the storage 805 may load computer executable instructions from the storage 806 to implement the fiber image correction method according to various embodiments of the present disclosure. In some embodiments, the storage 805 may store computer executable instructions, such as one or more programs for the fiber image correction method according to various embodiments of the present disclosure. The various modules according to various embodiments of the present disclosure may be implemented as program modules on the storage 805 and / or the storage 806.

[0120] In some embodiments, the display 807 may include a liquid crystal display (LCD), a light emitting diode display (LED), a plasma display, or any other type of display, and provide a graphical user interface (GUI) presented on the display for user input and image / data display, such as an original gridded image, a drift-corrected de-gridded image, a drift-corrected and brightness-corrected de-gridded image, and the like. The display may include many different types of materials, such as plastic or glass, and may be touch-sensitive to receive commands from the user. For example, the display may include a substantially rigid touch-sensitive material, such as Gorilla Glass™, or a substantially flexible touch-sensitive material, such as Willow Glass™.

[0121] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present disclosure with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims are to be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the enforcement of this application, which examples are to be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0122] The order of the various steps in the present disclosure is merely exemplary and not restrictive. The execution order of the steps may be adjusted without affecting the implementation of the present disclosure (without destroying the required logical relationship between the steps), and the various embodiments obtained after the adjustment still fall within the scope of the present disclosure.

[0123] All terms (including technical terms or scientific terms) used in the present disclosure have the same meanings as those understood by ordinary technicians in the field to which the present disclosure belongs, unless otherwise specifically defined. It should also be understood that terms defined in general dictionaries, such as general dictionaries, should be interpreted as having meanings consistent with their meanings in the context of the relevant technology, and should not be interpreted in an idealized or extremely formal sense, unless explicitly defined herein.

[0124] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods, and equipment should be considered part of the specification.

[0125] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, a person of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the present disclosure. This should not be interpreted as an intention that a disclosed feature that is not required to be protected is necessary for any claim. On the contrary, the subject matter of the present invention may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present invention should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.

Claims

1. A method for optical fiber image correction, characterized in that: The optical fiber image correction method comprises: Acquire a current optical fiber image and an optical fiber center reference position, wherein the current optical fiber image is an optical fiber image collected at a current moment, the optical fiber includes a plurality of optical fiber units, and the optical fiber center reference position includes a center reference position of each optical fiber unit; In the current optical fiber image, according to the position difference between the optical fiber center reference position and the target position determined based on the gray value in its neighborhood, the center position of each optical fiber unit in the current optical fiber image is corrected; According to the currently determined brightness correction coefficient, brightness correction is performed on the current optical fiber image that has completed position correction; wherein: In the current optical fiber image, according to the position difference between the optical fiber center reference position and the target position determined based on the gray value in its neighborhood, correcting the center position of each optical fiber unit in the current optical fiber image includes: In the current optical fiber image, the central reference position of each optical fiber unit is taken as the origin, and the neighborhood range of each origin is searched to determine the position with the maximum gray value in each neighborhood range; Correcting the center position of each optical fiber unit in the current optical fiber image according to the position difference between the position with the maximum gray value within each neighborhood and the center reference position of each optical fiber unit in the current optical fiber image; The brightness correction coefficient is determined by the following steps: Acquire a pre-stored gain coefficient and a bias coefficient, and determine the brightness correction coefficient according to the pre-stored gain coefficient and the bias coefficient; or Regression fitting is performed on the grayscale values ​​of the series of optical fiber images that change with time to determine the gain coefficient and the bias coefficient; based on the determined gain coefficient and the bias coefficient, the brightness correction coefficient is determined.

2. The optical fiber image correction method according to claim 1, characterized in that: Obtaining the reference position of the optical fiber center includes: Acquiring a pre-stored reference position of the optical fiber center; or The center position of each optical fiber unit is extracted from the optical fiber image previously acquired, and the extracted center position of each optical fiber unit is used as the optical fiber center reference position.

3. The optical fiber image correction method according to claim 2, characterized in that: The previously acquired optical fiber image is acquired earlier than the current optical fiber image.

4. The optical fiber image correction method according to claim 1, characterized in that: The grayscale values ​​of the series of optical fiber images that change with time are regressed and fitted to determine the gain coefficient and bias coefficient, including: The gain coefficient and the bias coefficient are determined based on the brightness variation of the center position of each optical fiber unit in the optical fiber image over time and the brightness relationship between the center positions of each optical fiber unit in the optical fiber image over time.

5. The optical fiber image correction method according to claim 4, characterized in that: The gain coefficient and the bias coefficient are determined according to the following formula (1) and formula (2): The brightness of the current optical fiber image after position correction is corrected according to formula (3): you i (t)=a i u i (t)+β i official(3) Among them, u i (t) represents the gray value of the corrected center position of the i-th optical fiber unit in the t-th frame optical fiber image, υ i (t) represents the gray value of the center position of the ith fiber unit in the tth frame fiber image, υ j (t) represents the gray value of the center position of the jth fiber unit in the tth frame fiber image, α i represents the gain coefficient of the gray value at the center position of the i-th fiber unit, β i The bias coefficient of the gray value at the center position of the i-th fiber unit, α j The gain coefficient of the gray value at the center position of the jth fiber unit, β j The bias coefficient of the gray value at the center position of the jth fiber unit, ε ij (t) represents the error term between the gray value of the position of the center of the i-th optical fiber unit and the center of the j-th optical fiber unit in the t-th frame optical fiber image and the fitting curve.

6. The optical fiber image correction method according to claim 1, characterized in that: In the process of regression fitting of the grayscale values ​​of a series of optical fiber images that change over time, For the center position of the optical fiber unit whose regression fitting error is greater than a preset threshold, discarding the gray value of the center position of the optical fiber unit whose regression fitting error is greater than the preset threshold; and / or When the number of center positions of the optical fiber units whose regression fitting errors are greater than a preset threshold exceeds the number of preset positions, regression fitting of the series of optical fiber images that vary with time is abandoned.

7. The optical fiber image correction method according to claim 1, characterized in that: Performing brightness correction on the current optical fiber image that has completed position correction also includes: In the current optical fiber image, a graphic grid corresponding to each optical fiber unit is divided with the center position of each optical fiber unit after correction as a vertex; For each position other than the vertex in the current optical fiber image, the corrected grayscale value is determined based on the corrected grayscale value of the center position of each corrected optical fiber unit contained in the graphic grid where the position is located, using distance-based weighted interpolation.

8. The optical fiber image correction method according to claim 1, characterized in that: The method further comprises: The center position of each optical fiber unit in the current optical fiber image that has completed position correction is stored to obtain the optical fiber center reference position.

9. An optical fiber image correction device, characterized in that: include: an acquisition module, configured to acquire a current optical fiber image and an optical fiber center reference position, wherein the current optical fiber image is an optical fiber image collected at a current moment, the optical fiber includes a plurality of optical fiber units, and the optical fiber center reference position includes a center reference position of each optical fiber unit; a drift correction module configured to correct the center position of each optical fiber unit in the current optical fiber image according to the position difference between the optical fiber center reference position and the target position determined based on the gray value within the neighborhood range in the current optical fiber image; A brightness correction module is configured to perform brightness correction on the current optical fiber image that has completed position correction according to the currently determined brightness correction coefficient; wherein: The drift correction module is also configured as: In the current optical fiber image, the central reference position of each optical fiber unit is taken as the origin, and the neighborhood range of each origin is searched to determine the position with the maximum gray value in each neighborhood range; Correcting the center position of each optical fiber unit in the current optical fiber image according to the position difference between the position with the maximum gray value within each neighborhood and the center reference position of each optical fiber unit in the current optical fiber image; The brightness correction module is further configured to determine the brightness correction coefficient by the following steps: Acquire a pre-stored gain coefficient and a bias coefficient, and determine the brightness correction coefficient according to the pre-stored gain coefficient and the bias coefficient; or Regression fitting is performed on the grayscale values ​​of the series of optical fiber images that change with time to determine the gain coefficient and the bias coefficient; based on the determined gain coefficient and the bias coefficient, the brightness correction coefficient is determined.

10. An optical fiber image correction device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer executable instructions, and when the processor executes the computer executable instructions, the optical fiber image correction method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the optical fiber image correction method according to any one of claims 1 to 8 is implemented.