Optical fiber image calibration method for optical fiber image calibration device, optical fiber image calibration device, and computer-readable storage medium
The optical fiber image calibration method addresses the optical fiber drift issue by calibrating central positions and performing luminance adjustments, resulting in improved image quality and diagnostic accuracy for medical observations.
Patent Information
- Application Number
- JP2024529861
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-07-28
- Filing Date
- 2022-07-26
- Publication Date
- 2025-04-16
- Estimated Expiration
- 2042-07-26
AI Technical Summary
The optical fiber drift phenomenon in microscopic endoscopes, caused by limitations in scanning accuracy of galvano mirrors and bending changes of optical fibers, leads to inconsistent end face positions, affecting image quality and accuracy in medical observations.
A method for optical fiber image calibration that involves obtaining current and reference optical fiber images, calibrating the central position of each optical fiber unit based on position differences, and performing luminance calibration using determined coefficients, thereby addressing the optical fiber drift and improving image quality.
The method enables rapid and efficient drift calibration and real-time parameter adjustment, significantly improving the quality of optical fiber images during medical observations and enhancing the accuracy of subsequent diagnoses.
Smart Images

Figure 0007663212000011 
Figure 0007663212000012 
Figure 0007663212000013
Abstract
Description
[Technical field]
[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application claims priority to a Chinese patent application filed with the China Patent Office on July 28, 2021, bearing application number 202110856709.1 and entitled "Optical fiber image calibration method, apparatus and computer-readable storage medium", the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the field of image processing, and in particular to a fiber optic image calibration method, apparatus and computer readable storage medium. [Background technology]
[0003] Microscope endoscopes are widely used in medical observation and detection, and optical fibers and galvanometer mirrors are both important components of a microscope endoscope. An optical fiber generally consists of tens of thousands of optical fiber units, and the center position of each optical fiber unit is usually fixed. In the actual use process, due to the limitations of the scanning accuracy of the galvanometer mirror and the bending change of the optical fiber during use, it cannot be guaranteed that the end face will be exactly the same position every time it is scanned when it is fixed. Therefore, with the change in time, the scanning position of the galvanometer mirror and the position of the optical fiber change, and the center position of each optical fiber unit in an optical fiber also changes accordingly. This phenomenon is called optical fiber drift.
[0004] FIG. 1 illustrates the optical fiber drift phenomenon. The background of FIG. 1 is an optical fiber mesh image, the position of the circle point mark represents the center position of each optical fiber unit extracted from the optical fiber image acquired at the current time, and the position of the cross mark represents the center position of each optical fiber unit in the optical fiber image of a frame acquired before this. Ideally, the center of each optical fiber unit in the same optical fiber is completely overlapped at each time in the same use process, but as shown in FIG. 1, due to the optical fiber drift phenomenon, there is a certain pixel difference between the center positions at the two times. In the image reconstruction process, in order to implement the method for quick mesh removal, it is necessary to determine the center position of each optical fiber unit, and due to the existence of optical fiber drift, when processing the optical fiber image, optical fiber information of the wrong position is extracted, which greatly affects the quality of the image. In addition, the deviation between the grayscale values of the centers of each optical fiber unit also significantly affects the quality of the image. Summary of the Invention [Problem to be solved by the invention]
[0005] In view of the above-mentioned technical problems in the prior art, the present application provides a method, apparatus, and computer-readable storage medium for optical fiber image calibration, which not only can quickly and efficiently realize optical fiber drift calibration for optical fiber images collected during the process of observing an object with a microscopic endoscope, but also can quickly and efficiently realize real-time calibration of parameters, thereby improving the quality of the optical fiber images during the observation process, ensuring the consistency of the quality of the optical fiber images, and enhancing the accuracy of subsequent diagnosis. [Means for solving the problem]
[0006] According to a first aspect of the present application, there is provided an optical fiber image calibration method, which may include: acquiring a current optical fiber image and an optical fiber center reference position, the current optical fiber image being an optical fiber image collected at a current time, the optical fiber including a plurality of optical fiber units, and the optical fiber center reference position including a center reference position of each optical fiber unit, calibrating the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position and a target position determined based on a grayscale value within a vicinity thereof in the current optical fiber image, and performing brightness calibration on the current optical fiber image for which position calibration has already been completed based on a currently determined brightness calibration coefficient.
[0007] In some embodiments, obtaining the optical fiber center reference position includes obtaining a pre-stored optical fiber center reference position, or extracting a center position of each optical fiber unit from a previously acquired optical fiber image and setting the extracted center position of each optical fiber unit as the optical fiber center reference position.
[0008] In some embodiments, the previously acquired fiber-optic image has an acquisition time earlier than the current fiber-optic image.
[0009] In some embodiments, calibrating the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position in the current optical fiber image and a target position determined based on the gradation value within the neighboring range includes: searching within a neighborhood range of each origin in the current optical fiber image, using the center reference position of each optical fiber unit as an origin, to determine a position with the maximum gradation value within each neighborhood range; and calibrating the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the position with the maximum gradation value within each neighborhood range and the center reference position of each optical fiber unit in the current optical fiber image.
[0010] In some embodiments, the brightness calibration coefficients are determined by the steps of: obtaining pre-stored gain coefficients and bias coefficients; and determining the brightness calibration coefficients based on the pre-stored gain coefficients and bias coefficients; or performing regression fitting on a series of time-varying grayscale values of an optical fiber image to determine gain coefficients and bias coefficients; and determining the brightness calibration coefficients based on the determined gain coefficients and bias coefficients.
[0011] In some embodiments, performing regression fitting on the time-varying grayscale values of the series of optical fiber images to determine gain coefficients and bias coefficients includes determining the gain coefficients and bias coefficients based on the change in brightness over time of the center position of each corresponding optical fiber unit in the optical fiber image and the change in brightness relationship between the center positions of each optical fiber unit in the optical fiber image over time.
[0012] In some embodiments, the gain factor and the bias factor are determined based on the following equations (1) and (2):
number
number
[0013] In some embodiments, in the process of performing regression fitting on the gradation values of a series of optical fiber images that change over time, for center positions of optical fiber units whose regression fitting error is greater than a preset threshold, the gradation values of the center positions of the optical fiber units whose regression fitting error is greater than a preset threshold are discarded, and / or, when the number of center positions of optical fiber units whose regression fitting error is greater than a preset threshold exceeds the number of preset positions, the regression fitting on the series of optical fiber images that change over time is discarded.
[0014] In some embodiments, performing brightness calibration on the current optical fiber image for which position calibration has already been completed further includes dividing a graphics mesh corresponding to each optical fiber unit in the current optical fiber image with the center position of each optical fiber unit after calibration as a vertex, and determining a calibrated grayscale value for each position other than the vertices in the current optical fiber image based on the calibrated grayscale value of the center position of each optical fiber unit after calibration included in the graphics mesh in which the position is located, using distance-based weighted interpolation.
[0015] In some embodiments, the method may further include storing a center position of each optical fiber unit in the current optical fiber image for which position calibration has already been completed, to obtain the optical fiber center reference position.
[0016] According to a second aspect of the present application, there is provided an optical fiber image calibration device. The device may include an acquisition module, a drift calibration module, and a brightness calibration module. The acquisition module may be configured to acquire a current optical fiber image and an optical fiber center reference position, the current optical fiber image being an image of an optical fiber collected at a current time, the optical fiber including a plurality of optical fiber units, and the optical fiber center reference position including a center reference position of each optical fiber unit. The drift calibration module may be configured to calibrate the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position and a target position determined based on a grayscale value within a vicinity thereof in the current optical fiber image. The brightness calibration module may be configured to perform brightness calibration on the current optical fiber image for which position calibration has already been completed, based on a currently determined brightness calibration coefficient.
[0017] In some embodiments, the acquisition module is configured to selectively acquire the optical fiber center reference position that has been stored in advance, or extract a center position of each optical fiber unit from a previously acquired optical fiber image, and set the extracted center position of each optical fiber unit as the optical fiber center reference position.
[0018] In some embodiments, the previously acquired fiber-optic image has an acquisition time earlier than the current fiber-optic image.
[0019] In some embodiments, the drift calibration module is configured to selectively search within a neighborhood range of each origin in the current optical fiber image, using the center reference position of each optical fiber unit as an origin, determine a position of maximum gradation value within each neighborhood range, and calibrate the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the position of maximum gradation value within each neighborhood range and the center reference position of each optical fiber unit in the current optical fiber image.
[0020] In some embodiments, the optical fiber image calibration device further includes a calibration coefficient determination module configured to retrieve pre-stored gain coefficients and bias coefficients, and determine the brightness calibration coefficients based on the pre-stored gain coefficients and bias coefficients, or perform regression fitting on a series of time-varying grayscale values of the optical fiber image to determine gain coefficients and bias coefficients, and determine the brightness calibration coefficients based on the determined gain coefficients and bias coefficients.
[0021] In some embodiments, the calibration coefficient determination module is configured to selectively determine the gain coefficients and the bias coefficients based on a change in brightness over time of a corresponding central position of each optical fiber unit in the optical fiber image and a change in brightness relationship over time between the central positions of each optical fiber unit in the optical fiber image.
[0022] In some embodiments, the gain factor and the bias factor are determined based on the following equations (1) and (2):
number
number
[0023] In some embodiments, the calibration coefficient determination module is specifically configured to, in the process of performing regression fitting on the grayscale values of a series of optical fiber images that change over time, discard the grayscale values of the center positions of the optical fiber units whose regression fitting error is greater than a preset threshold, and / or discard the regression fitting on the series of optical fiber images that change over time when the number of center positions of the optical fiber units whose regression fitting error is greater than a preset threshold exceeds the number of preset positions.
[0024] In some embodiments, the optical fiber image calibration device further includes a mesh division module configured to divide a graphics mesh corresponding to each optical fiber unit in the current optical fiber image using the central position of each optical fiber unit after calibration as a vertex, and to determine a calibrated gray scale value for each position other than the vertices in the current optical fiber image using distance-based weighted interpolation based on the calibrated gray scale value of the central position of each optical fiber unit after calibration included in the graphics mesh in which it is located.
[0025] In some embodiments, the optical fiber image calibration device further includes a memory module configured to store the center position of each optical fiber unit in the current optical fiber image for which position calibration has already been completed, and obtain the optical fiber center reference position.
[0026] According to a third aspect of the present application, there is provided a fiber optic image calibration apparatus, the fiber optic image calibration apparatus including a processor and a memory, the memory storing computer executable instructions, the processor executing the computer executable instructions being capable of implementing a fiber optic image calibration method according to any one of the embodiments of the present application.
[0027] According to a fourth aspect of the present application, there is provided a computer-readable storage medium having computer-executable instructions stored thereon, the computer-executable instructions being capable of implementing a method for optical fiber image calibration according to any one of the embodiments of the present application when executed by a processor.
[0028] According to a fifth aspect of the present application, there is provided computer-executable instructions, which, when executed by a processor, realise a fiber optic image calibration method according to any one of the embodiments of the present application. Effect of the Invention
[0029] By using the optical fiber image calibration method, optical fiber image calibration device, and medium of any one of the embodiments of the present application, it is not only possible to quickly and efficiently realize optical fiber drift calibration for the optical fiber images collected during the process of observing an object with a microscope endoscope, but also possible to quickly and efficiently realize real-time parameter calibration, thereby improving the quality of the optical fiber images during the observation process, ensuring the consistency of the quality of the optical fiber images, and enhancing the accuracy of subsequent diagnosis. [Brief description of the drawings]
[0030] In the drawings, the same reference numerals may describe similar parts in different views, although the drawings are not necessarily drawn to scale. The same reference numerals with alphabetical suffixes or different alphabetical suffixes may represent different instances of similar parts. The drawings generally illustrate various embodiments by way of example, and not by way of limitation, and are used to explain the disclosed embodiments together with the description and claims. Such embodiments are exemplary and are not intended to be all or exclusive embodiments of the present apparatus or method. [Figure 1]1 shows a schematic diagram of the optical fiber drift phenomenon according to the prior art; [Diagram 2] 1 shows a flow chart of a fiber optic image calibration method according to an embodiment of the present application. [Diagram 3] 13A and 13B are local comparison diagrams of an original image with a mesh, an optical fiber image after the mesh has been removed but no drift calibration has been performed, and an optical fiber image after the optical fiber drift calibration has been performed and the mesh has been removed using an optical fiber image calibration method according to an embodiment of the present application. [Figure 4] 1A shows a schematic diagram of performing drift calibration on the center of an optical fiber unit according to an embodiment of the present application, and FIG. 1B shows a schematic diagram of a graphics mesh according to an embodiment of the present application. [Diagram 5] FIG. 13 shows a schematic diagram of fitting the central grayscale values of two optical fiber units, which are vertices, based on a regression method according to an embodiment of the present application; [Figure 6] 1A shows a diagram of a local portion of an optical fiber image obtained when data of a part of optical fiber units with a large fitting deviation is discarded according to an embodiment of the present application, and FIG. 1B shows a diagram of a local portion of an optical fiber image obtained when data of a part of optical fiber units with a large fitting deviation is not discarded according to an embodiment of the present application. [Figure 7] 1 shows a diagram of a fiber optic image calibration device according to an embodiment of the present application. [Figure 8] FIG. 1 shows a block diagram of a fiber optic image calibration device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0031] In order to make the technical solution of the present application more easily understandable to those skilled in the art, the present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments. The following describes the embodiments of the present application in more detail in conjunction with the accompanying drawings and specific embodiments, but is not intended to be limiting to the present application.
[0032] The terms "first", "second" and similar terms used in this application do not denote any order, quantity or importance, but are merely used to distinguish different parts. Similar terms such as "comprise" or "include" mean that the element before the term includes the elements listed after the term, and do not exclude the possibility of including other elements. Terms such as "top", "bottom", "left", "right" and the like are only used to indicate relative positional relationships, and when the absolute positions of the described objects are changed, the relative positions may change accordingly.
[0033] In this application, 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 another device, the specific device may be directly connected to the other device without an intermediate device, or may have an intermediate device without being directly connected to the other device.
[0034] 2 shows a flow chart of the optical fiber image calibration method according to an embodiment of the present application. As shown in FIG. 2, the optical fiber image calibration method includes steps 101, 102 and 103.
[0035] In step 101, a current optical fiber image and an optical fiber center reference position can be obtained, where the current optical fiber image is an optical fiber image collected at a current time, the optical fiber includes multiple optical fiber units, and the optical fiber center reference position includes the center reference position of each optical fiber unit.
[0036] For the current optical fiber image, the central reference position of each optical fiber unit is intended to represent the reference central position of each optical fiber unit when the optical fiber does not drift (or the amount of drift is very small), and is also intended to represent the calibrated central position of each optical fiber unit as the reference central position when the optical fiber drifts.
[0037] In some embodiments, the optical fiber center reference position may be a pre-stored one, for example, the optical fiber center reference position may be pre-set and stored for the optical fiber image to be calibrated, and then directly called when calibrating the optical fiber image to be calibrated.
[0038] In some embodiments, the optical fiber center reference position may be determined by 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.
[0039] In some embodiments, the current optical fiber image and the previously acquired optical fiber image may be images of two frames adjacent in the time sequence of acquisition, for example, the acquisition time of the previously acquired optical fiber image may be one unit time earlier than the current optical fiber image in order to realize pre-calibration with higher sensitivity in the time domain. Also, in some embodiments, the acquisition times of the current optical fiber image and the previously acquired optical fiber image may differ by multiple signal acquisition periods, for example, the acquisition time of the previously acquired optical fiber image may be multiple (for example, 20) unit times earlier than the current optical fiber image in order to reduce the computational load of the device and ensure the effect of pre-calibration compared to sequential pre-calibration.
[0040] In step 102, the center position of each optical fiber unit in the current optical fiber image can be calibrated based on the position difference between the optical fiber center reference position in the current optical fiber image and the target position determined based on the gradation value within the vicinity thereof. In this way, the offset of the center position of the optical fiber unit caused by the optical fiber drift occurring back and forth in time can be eliminated, and then the offset change of the position of the graphics mesh divided with the center position of each optical fiber unit as the vertex can be further eliminated. The center of each optical fiber unit is the center of each optical fiber unit constituting the entire optical fiber.
[0041] Specifically, since the center position of each optical fiber unit is unknown for the current optical fiber image for which positional calibration has not been performed, the center reference position of each optical fiber unit is first set to the center position of each optical fiber unit in the current optical fiber image for which positional calibration has not been performed.
[0042] Alternatively, a corresponding position calibration plan may be used for the center position of each optical fiber unit in the current optical fiber image based on the position difference situation between the position with the maximum grayscale 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. Note that, since calibration is based on the difference situation, it may be necessary to calibrate or may not be necessary to calibrate. The position difference situation can be represented by a distance difference between two positions, for example, only when the distance difference reaches a certain threshold, the center position of the corresponding optical fiber unit in the current optical fiber image is calibrated, and in the opposite case, it is considered that the optical fiber drift here is not serious and is within the allowable range, and the center position of the corresponding optical fiber unit in the current optical fiber image is not calibrated. The magnitude of the threshold may be set according to demand. The calibration in this embodiment may be understood as a position calibration.
[0043] In some embodiments, when the difference reaches a certain threshold, the position with the maximum gray level value within the neighborhood of each origin may be directly used as the calibrated center position of the corresponding optical fiber unit in the current optical fiber image.
[0044] In some embodiments, the center position of each optical fiber unit in the current optical fiber image, which has already been subjected to position calibration, is stored to obtain an optical fiber center reference position, which is the above-mentioned pre-stored optical fiber center reference position and also the latest optical fiber center reference position.
[0045] Through steps 101 and 102, the calibration of optical fiber drift can be quickly and efficiently realized, and the image reconstruction deviation caused by the optical fiber drift can be weakened. When the optical fiber drift phenomenon is serious, the calibration method of the present application can completely eliminate the influence of the position deviation caused by the optical fiber drift on the subsequent processing of the optical fiber image.
[0046] 3(a)-(c) show comparative diagrams between an original optical fiber image with mesh, an optical fiber image after the mesh is removed without performing drift calibration, and an optical fiber image after the optical fiber drift calibration is performed and the mesh is removed by the optical fiber image calibration method according to the embodiment of the present application. In the optical fiber image, a mesh is formed corresponding to each optical fiber unit, and a mesh removal process is generally required. Specifically, the grayscale value at the center position of the optical fiber unit can be interpolated to obtain the grayscale value at other positions, thereby realizing the mesh removal effect. As can be seen, the calibration method according to any one of the embodiments of the present application can eliminate the adverse effect on the image quality after the mesh removal algorithm is performed, which is caused by the offset change of the center position of the optical fiber unit.
[0047] In some embodiments, calibrating the center position of each optical fiber unit in the current optical fiber image based on the position difference situation between the optical fiber center reference position and the target position determined based on the grayscale value in the neighborhood range in the current optical fiber image includes: searching within the neighborhood range of each origin in the current optical fiber image with the center reference position of each optical fiber unit as the origin, respectively, to determine the position with the maximum grayscale value in each neighborhood range; and calibrating the center position of each optical fiber unit in the current optical fiber image based on the position difference situation between the position with the maximum grayscale value in each neighborhood range and the center reference position of each optical fiber unit in the current optical fiber image. In this embodiment, the target position determined based on the grayscale value means the position with the maximum grayscale value. The above-mentioned implementation of calibrating the center position of each optical fiber unit in the current optical fiber image based on the difference situation may be combined with this.
[0048] Specifically, the neighborhood of each origin means a range consisting of N pixels adjacent to each origin, where the size of N may be set according to actual needs, for example, N is equal to 10. As mentioned above, the entire optical fiber generally consists of tens of thousands of optical fiber units, each of which has its own central reference position, and there are a total of tens of thousands of neighborhoods with this as the origin.
[0049] The number of the obtained difference situation results is the same as the number of the corresponding optical fiber units in the optical fiber image. Whether or not to calibrate the center position of each optical fiber unit in the current optical fiber image depends on the difference result corresponding to the center position of this optical fiber unit, so there is a possibility that the center positions of all the optical fiber units in the current optical fiber image are calibrated, there is a possibility that only the center positions of some of the optical fiber units in the current optical fiber image are calibrated, and there is also a possibility that none of the center positions of all the optical fiber units in the current optical fiber image are calibrated. For example, when the difference result corresponding to the center position of a certain optical fiber unit A in the current optical fiber image reaches a certain threshold, the center position of this optical fiber unit A is calibrated, and when this difference result does not reach the certain threshold, the center position of this optical fiber unit A is not calibrated. This optical fiber unit A may be any one of the optical fiber units in the current optical fiber image.
[0050] In the current optical fiber image, a neighborhood search is performed based on the already determined origin (i.e., the center reference position of each optical fiber unit), and a neighborhood that is likely to be the center position after calibration is searched for. To perform the neighborhood search, two key parameters, one of which is a search range and the other of which is a search criterion, may be set. In order that the search range is not larger than the size of the optical fiber unit itself, the former may be dynamically selected based on the size range of the optical fiber unit. The latter may use a plurality of forms, and selectively, the position with the maximum gradation value in each neighborhood range may be searched for as the center position of each optical fiber unit in the current optical fiber image after calibration. Considering that the signal gradation value of the center position of the optical fiber unit under ideal conditions is the largest compared to the gradation values of each point within the entire size range of the optical fiber unit, the inventors set a search range not larger than the size of the optical fiber unit itself and combine it with the search gradation maximum value, so that the actual center position of each optical fiber unit in the current optical fiber image can be efficiently and accurately found, thereby realizing the optical fiber drift calibration based on this.
[0051] Hereinafter, one optical fiber unit will be taken as an example and described with reference to FIG. 4(a). The optical fiber unit 301 is one optical fiber unit in the entire optical fiber, and the X-shaped mark position 302 represents the center reference position of the optical fiber unit 301. This center reference position may be extracted from a previously acquired optical fiber image, or may be acquired from a previously stored optical fiber center reference position. FIG. 4(a) shows that the center reference position, i.e., the X-shaped mark position 302, is displayed in the current optical fiber image, and the X-shaped mark position 302 is the center position of the optical fiber unit 301 in the current optical fiber image where calibration has not been performed. The X-shaped mark position 302 is set as the origin and a search neighborhood range 304 is set within the size of the optical fiber unit 301, and the position of the maximum grayscale value in the neighborhood range 304 is searched for as the circle point mark position 303. When the distance difference between the circle dot mark position 303 and the X mark position 302 reaches a certain threshold, the position with the maximum gradation value in the current optical fiber image (i.e., the circle dot mark position 303) is set as the center position after calibration of the optical fiber unit 301. When the distance difference between the circle dot mark position 303 and the X mark position 302 does not reach a certain threshold, the center position of the optical fiber unit 301 is not calibrated, that is, the center position of the optical fiber unit 301 is still the X mark position 302. Through the above process, the calibration of the center position of the optical fiber unit 301 is completed.
[0052] The calibration method of the present application can avoid image quality degradation caused by optical fiber drift and ensure image quality consistency during the image collection process.
[0053] After the drift calibration is completed, in step 103, the brightness calibration can be performed on the current optical fiber image, which has already been positionally calibrated, based on the currently determined brightness calibration coefficients.
[0054] By performing steps 101 to 103, in the process of observing an object with a microscope endoscope, not only can optical fiber drift calibration be quickly and efficiently realized for the collected optical fiber image, but also real-time calibration of parameters can be quickly and efficiently realized, thereby improving the quality of the optical fiber image in the observation process, ensuring the consistency of the quality of the optical fiber image, and enhancing the accuracy of subsequent diagnosis.
[0055] This application performs real-time brightness calibration on optical fiber images 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 beam is extremely small and the distance between each optical fiber unit is on the order of microns, it can be approximately considered that the observation of natural images does not cause any mutations in the natural images at this scale, that is, the natural images observed and obtained at this scale are continuous.
[0056] In some embodiments, the luminance calibration coefficients may be determined by obtaining pre-stored gain and bias coefficients and determining the luminance calibration coefficients based on the pre-stored gain and bias coefficients.
[0057] Specifically, since the brightness calibration coefficient is composed of a gain coefficient and a bias coefficient, this embodiment can be understood as the brightness calibration coefficient being stored in advance and being directly called when performing brightness calibration on the optical fiber image to be brightness calibrated, and this embodiment can realize rapid and real-time calibration of optical fiber image parameters.
[0058] In some embodiments, the brightness calibration coefficient may be determined by performing regression fitting on the grayscale values of a series of optical fiber images that change with time to determine a gain coefficient and a bias coefficient, and determining the brightness calibration coefficient according to the determined gain coefficient and bias coefficient. By way of example and without limitation, the regression fitting may be a linear regression fitting. With the brightness calibration coefficient thus determined, the current optical fiber image that has already been positionally calibrated can be subjected to real-time brightness calibration, so as to obtain a practically brightness-balanced optical fiber image, and achieve a good calibration effect, thereby ensuring the consistency of the quality of the optical fiber image.
[0059] Specifically, the brightness calibration coefficients are composed of a gain coefficient and a bias coefficient. The brightness calibration coefficients in this application are calculated in real time based on a series of optical fiber images that change with time, and are updated as the number of images increases. Every time a new frame of optical fiber image is obtained, brightness calibration is performed on the newly obtained optical fiber image based on the current brightness calibration coefficients.
[0060] Alternatively, a series of optical fiber images that have already been calibrated and change over time may be selected to perform regression fitting of the grayscale values, or a series of optical fiber images that have not been calibrated and change over time may be selected to perform regression fitting of the grayscale values. If a series of optical fiber images that have already been calibrated and change over time are selected to perform regression fitting of the grayscale values, the accuracy of the obtained gain coefficients and bias coefficients is higher, so that the brightness calibration coefficients determined based on the gain coefficients and bias coefficients are also more accurate, and the effect of image calibration can be further improved by performing optical fiber image calibration using the brightness calibration coefficients.
[0061] In some embodiments, the gain and bias coefficients may be determined based on the change in brightness over time of the central position of each optical fiber unit in the optical fiber image and the change in brightness relationship over time between the central positions of each optical fiber unit in the optical fiber image.
[0062] For example, the gain coefficient and the bias coefficient may be determined based on the following equations (1) and (2):
number
number
[0063] In some cases, if the linear regression fitting for the center position of the i-th optical fiber unit is discarded, α i and β i The value of u becomes NULL. i (t) is v i (t), which indicates that the gradation value at the center position of the i-th optical fiber unit is not calibrated.
[0064] Specifically, based on the formulas (1) to (3), for the center position of each optical fiber unit pair, for example, the center position of the i-th optical fiber unit and the center position of the j-th optical fiber unit, an overdetermined equation is calculated based on the gradation value information in a series of optical fiber images in the time domain at the center position of this optical fiber unit pair to obtain a gain coefficient α i and the bias coefficient β i can be obtained as the brightness calibration coefficient of the gray scale value at the center position of the i-th optical fiber unit. For example, the brightness calibration coefficient of the gray scale value at the center position of each optical fiber unit can be iteratively obtained based on the difference in the calibration coefficient (closely related to the difference in light transmission performance) between different optical fiber pairs at the center position of one optical fiber unit.
[0065] In some embodiments, performing brightness calibration on the current optical fiber image that has already completed position calibration further includes: dividing a graphics mesh corresponding to each optical fiber unit in the current optical fiber image with the center position of each optical fiber unit after calibration as a vertex; and for each position other than the vertex in the current optical fiber image, determining a calibrated grayscale value based on the calibrated grayscale value of the center position of each optical fiber unit after calibration included in the graphics mesh in which it is located by using distance-based weighted interpolation. Thus, the grayscale value calibration of other positions other than the center positions of each optical fiber unit in the current optical fiber image is completed, and a optical fiber image after drift and brightness are calibrated and mesh is removed can be obtained, and the optical fiber image has high smoothness and low noise, i.e., better image quality.
[0066] For example, the graphics mesh may be a triangular mesh constructed by a Delaunay triangular mesh, and may be triangular mesh 307a-307f-307g, triangular mesh 307a-307b-307g, triangular mesh 307b-307g-307c, triangular mesh 307g-307c-307d, triangular mesh 307e-307g-307d, and triangular mesh 307f-307g-307e, as shown in (b) of FIG. 4, where 307a-307g represent the center position of each optical fiber unit after calibration and are the vertices of the graphics mesh of each corresponding optical fiber.
[0067] Then, as shown in (b) of FIG. 4, for position 306, a tone value for position 306 may be determined based on the calibrated tone values of each vertex 307a, 307f, and 307g of the surrounding triangular mesh 307a-307f-307g, for example by performing a weighted sum based on distance, which may be referred to as the reconstructed tone value of position 306.
[0068] In some embodiments, the vertices and brightness calibration coefficients for each vertex may be stored to facilitate rapid reconstruction and updating of the optical fiber image using drift-calibrated optical fiber images collected over a period of time.
[0069] In some embodiments, a large amount of data may be acquired, and the brightness calibration coefficient may be obtained by performing orthogonal regression fitting of the grayscale value at the center position of the optical fiber unit. However, the fitting result obtained may differ depending on the conditions of the collected data. In some embodiments, the regression fitting error may be calculated during the process of performing regression fitting on the grayscale values of a series of optical fiber images that change with time.
[0070] For example, as shown in FIG. 5, the deviation of the gradation value distance regression curve y=1.0479x-1526.0267 at the center position of the optical fiber unit marked with a black circle is small, but the deviation of the gradation value distance regression curve y=1.0479x-1526.0267 at the center position of the optical fiber unit marked with a white circle is large, which means that the regression fitting error of the gradation value at the center position of the optical fiber unit marked with a white circle is large. The x-axis represents the gradation value v that changes with time at the center position of the i-th optical fiber unit. i (t), and the y-axis represents the gradation value v j (t). In some embodiments, the regression fitting error may be an estimate of the deviation without performing the regression fitting calculation, such as, but not limited to, the Pearson correlation coefficient, v i (t) and v j The correlation parameter (t) may represent the regression fitting error.
[0071] 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 positions of the optical fiber units where the regression fitting error is greater than a preset threshold, the grayscale values of the center positions of the optical fiber units where the regression fitting error is greater than a preset threshold can be discarded, and regression fitting can be performed using other data. FIG. 6(a) shows an optical fiber image obtained by performing brightness calibration using the brightness calibration coefficient obtained by regression fitting in this way. 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, if the number of center positions of the optical fiber units where the regression fitting error is greater than a preset threshold exceeds the number of positions that are preset, the linear regression fitting for the series of optical fiber images that change with time can be discarded, in which case the brightness calibration coefficient is not obtained, and in this case the grayscale value of the position corresponding to this brightness calibration coefficient in the current optical fiber image is retained. For the center positions of the optical fiber units where the regression fitting error is greater than a preset threshold, it is considered that the brightness calibration coefficient obtained by regression fitting distorts the grayscale value of this center position too much, and by retaining the grayscale value that is not calibrated, the actual grayscale information can be reflected and excessive distortion of the actual grayscale information can be avoided. The optical fiber image obtained by performing the brightness calibration using the brightness calibration coefficient obtained by regression fitting in this way is shown in Figure 6(b), which retains more actual gradation information and has a better image effect. Meanwhile, for the center position of the optical fiber unit where the regression fitting error is below a preset threshold, the brightness calibration coefficient obtained by regression fitting is considered to be appropriate. When used for brightness calibration, a reasonable optical fiber image with balanced brightness can be obtained.
[0072] Specifically, when the number of the optical fiber unit center positions whose regression fitting error is greater than the preset threshold exceeds the preset number of positions, the linear regression fitting considers that the brightness of the optical fiber image has already deviated from the true attribute that changes with time, and thus discards the linear regression fitting for the series of optical fiber images that change with time.When the number of the optical fiber unit center positions whose regression fitting error is greater than the preset threshold exceeds the preset number of positions, if the brightness calibration coefficient of the grayscale value of the optical fiber unit center position is still determined by regression fitting and brightness calibration is performed based on it, it will cause serious non-smoothing and even eliminate the actual image details.
[0073] The above process can obtain good image quality and can avoid the whole image being discarded due to the influence of the imaging object or system on the local image, thus improving both imaging quality and imaging efficiency at the same time.
[0074] 7 shows a diagram of a fiber-optic image calibration apparatus 700 according to an embodiment of the present application, which may include an acquisition module 701, a drift calibration module 702, and a brightness calibration module 703 configured to perform steps 101, 102, and 103 shown in FIG.
[0075] Specifically, the acquisition module 701 may be configured to acquire a current optical fiber image and an optical fiber center reference position, where the current optical fiber image is an optical fiber image collected at a current time, 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. The drift calibration module 702 may be configured to calibrate the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position and a target position determined based on the grayscale value in the vicinity range of the optical fiber center reference position in the current optical fiber image. The brightness calibration module 703 may be configured to perform brightness calibration on the current optical fiber image that has already been subjected to position calibration based on the currently determined brightness calibration coefficient. By using the optical fiber image calibration device 700, in the process of observing an object with a microscopic endoscope, not only can the optical fiber drift calibration be quickly and efficiently realized for the collected optical fiber image, but also the real-time calibration of parameters can be quickly and efficiently realized, thereby improving the quality of the optical fiber image in the observation process, ensuring the consistency of the quality of the optical fiber image, and enhancing the accuracy of subsequent diagnosis.
[0076] In some embodiments, the acquisition module is configured to selectively acquire a pre-stored optical fiber center reference position or extract a center position of each optical fiber unit from a previously acquired optical fiber image, and set the extracted center position of each optical fiber unit as the optical fiber center reference position.
[0077] In some embodiments, the previously acquired fiber-optic image has an acquisition time earlier than the current fiber-optic image.
[0078] In some embodiments, the drift calibration module 702 may be configured to selectively use the center reference position of each optical fiber unit in the current optical fiber image as an origin, search within the neighborhood of each origin, determine the position of the maximum grayscale value in each neighborhood, and calibrate the center position of each optical fiber unit in the current optical fiber image according to the position difference situation between the position of the maximum grayscale value in each neighborhood and the center reference position of each optical fiber unit in the current optical fiber image. After calibration, it is possible to avoid image quality deterioration caused by optical fiber drift and ensure the consistency of image quality in the image collection process.
[0079] In some embodiments, the optical fiber image calibration device 700 further includes a storage module, which may be configured to store the center position of each optical fiber unit in the current optical fiber image for which position calibration has already been completed, and obtain the optical fiber center reference position.
[0080] In some embodiments, the optical fiber image calibration device 700 further includes a calibration coefficient determination module, which may be configured to obtain pre-stored gain coefficients and bias coefficients, and determine brightness calibration coefficients based on the pre-stored gain coefficients and bias coefficients, or perform regression fitting on a series of time-varying grayscale values of the optical fiber image to determine gain coefficients and bias coefficients, and determine brightness calibration coefficients based on the determined gain coefficients and bias coefficients.
[0081] Specifically, for example, the calibration coefficient determination module may be configured to selectively determine gain coefficients and bias coefficients based on the change in brightness over time of the central position of each optical fiber unit in the optical fiber image and the change in brightness relationship between the central positions of each optical fiber unit in the optical fiber image over time.
[0082] In some embodiments, the calibration coefficient determination module may be configured to selectively determine the gain and bias coefficients based on Equations (1) and (2) below:
number
number
[0083] In some embodiments, the optical fiber image calibration device 700 may further include a mesh division module, which may be configured to divide a graphics mesh corresponding to each optical fiber unit in the current optical fiber image with the center position of each optical fiber unit after calibration as a vertex, and for each position other than the vertex in the current optical fiber image, determine a calibrated grayscale value based on the calibrated grayscale value of the center position of each optical fiber unit after calibration included in the graphics mesh in which it is located, using weighted interpolation based on distance, thereby finally obtaining an optical fiber image with high smoothness and low noise.
[0084] In some embodiments, the calibration coefficient determination module may be specifically configured to, in the process of performing regression fitting on the grayscale values of the series of optical fiber images that change with time, discard the grayscale values of the center positions of the optical fiber units whose regression fitting error is greater than a preset threshold value, and / or discard the regression fitting on the series of optical fiber images that change with time when the number of center positions of the optical fiber units whose regression fitting error is greater than a preset threshold value exceeds the number of preset positions. Through such processing, good image quality can be obtained, and the discarding of the entire image due to the influence of the imaging target or system on the local image can be avoided, that is, the imaging quality and the imaging efficiency can be improved at the same time.
[0085] 8 shows a block diagram of a fiber optic image calibration device 800 according to an embodiment of the present application. As shown in FIG. 8, the fiber optic image calibration device 800 may include a processor 804 and a memory 805, and computer executable instructions may be stored in the memory 805. When the processor 804 executes the computer executable instructions, the fiber optic image calibration method according to any one of the embodiments of the present application can be realized. For example, the processor 804 may be configured to obtain a current optical fiber image and an optical fiber center reference position, the current optical fiber image is an image of an optical fiber collected at a current time, the optical fiber includes a plurality of optical fiber units, the optical fiber center reference position includes a center reference position of each optical fiber unit, calibrate the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position and a target position determined based on the grayscale value in the vicinity thereof in the current optical fiber image, and perform brightness calibration on the current optical fiber image for which position calibration has already been completed based on the currently determined brightness calibration coefficient. By using this optical fiber image calibration device 800, not only can optical fiber drift calibration be quickly and efficiently performed on the optical fiber images collected during the process of observing an object with a microscope endoscope, but also real-time parameter calibration can be quickly and efficiently performed, thereby improving the quality of the optical fiber images during the observation process, ensuring the consistency of the quality of the optical fiber images, and enhancing the accuracy of subsequent diagnosis.
[0086] The memory 805 is an example of a computer-readable storage medium in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the optical fiber image calibration method according to any one of the embodiments of the present application can be realized.
[0087] The fiber optic image calibration device 800 may be a special-purpose computer, a general-purpose computer, or a cloud. For example, the fiber optic image calibration device 800 may be a computer customized to perform fiber optic signal data acquisition and processing tasks. As shown in FIG. 8 , the fiber optic image calibration device 800 may further include a communication interface 803, a storage device 806, and a display 807.
[0088] 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 (e.g., fiber optic, USB 3.0, Thunderbolt, etc.), a wireless network adapter (e.g., WiFi adapter), a telecommunications (3G, 4G / LTE, 5G, etc.) adapter, etc. The fiber optic image calibration device 800 may be connected to other components via the communication interface 803, such as, but not limited to, a fiber optic component of a microscope, an image signal acquisition component, etc. In some embodiments, the communication interface 803 may be configured to receive a current fiber optic image and a fiber optic center reference position. In some embodiments, the communication interface 803 may be configured to receive a series of fiber optic images including a current fiber optic image, such as, but not limited to, previously acquired fiber optic images for extracting a center position of each fiber optic unit as a fiber optic center reference position.
[0089] The processor 804 may be one or more processing devices including 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 executing other instruction sets, or a processor executing a combination of instruction sets. The processor 804 may further be one or more application specific 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 is communicatively coupled to the memory 805 and configured to execute computer executable instructions stored therein to perform, for example, the fiber optic image calibration method described in any one of the embodiments of the present application.
[0090] The 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 disk or other forms of flash, cache, registers, static memory, optical disk read only memory (CD-ROM), digital versatile optical disk (DVD) or other optical memory, cassette tape or other magnetic storage device, or any other possible non-transitory medium used to store information or instructions accessible by a computing device, etc.
[0091] In some embodiments, the storage device 806 can store data received, used, or generated while executing the computer program, such as, but not limited to, the center position of each optical fiber unit in a previously acquired optical fiber image, the center position of each optical fiber unit before calibration of the current optical fiber image, the center position of each optical fiber unit after calibration of the current optical fiber image, the calculated gain coefficient, bias coefficient, mesh-removed image after optical fiber drift calibration, mesh-removed image after drift calibration and brightness calibration, etc. In some embodiments, the memory 805 can load computer-executable instructions from the storage device 806 to realize the optical fiber image calibration method according to any one of the embodiments of the present application. In some embodiments, the memory 805 can store computer-executable instructions, such as one or more programs for the optical fiber image calibration method according to any one of the embodiments of the present application. Each module according to any one of the embodiments of the present application may be realized as a program module in the memory 805 and / or the storage device 806.
[0092] 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 provides a graphical user interface (GUI) presented on the display for user input and display of images / data (e.g., original meshed image, mesh removed image after drift calibration, mesh removed image after drift calibration and brightness calibration, etc.). The display may include many different types of materials (e.g., plastic or glass) and may be touch sensitive to receive commands from a user. For example, the display may include a touch material that is essentially rigid (e.g., Gorilla Glass®) or essentially flexible (e.g., Willow Glass®).
[0093] The present invention provides a method for implementing a fiber optic image calibration method according to any one of the embodiments of the present application, when the computer-executable instructions are executed by a processor. The computer-executable instructions may be stored on a medium, which may be a storage medium or a signal medium. The storage medium may be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any combination thereof, in particular, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) (or flash memory), an optical fiber, a portable optical disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any combination thereof. The signal medium may include, but is not limited to, an electric signal medium, an optical signal medium, an electric wave (electromagnetic wave) medium, or any combination thereof.
[0094] It should be noted that, although exemplary embodiments are described herein, the scope includes any and all embodiments having equivalent elements, modifications, omissions, combinations (e.g., cross-sectional aspects of various embodiments), alterations or modifications based on the present application. The elements of the claims are to be interpreted broadly based on the language employed in the claims and are not limited to the examples described in the present specification or during the practice of the present application, and the examples are to be interpreted as non-exclusive. Thus, the specification and examples are intended to be regarded as merely examples, with the true scope and spirit being indicated by the following claims and the full scope of equivalents thereto.
[0095] The order of steps in this application is not limiting, but merely exemplary. If it does not affect the realization of this application (does not destroy the logical relationships between the necessary steps), the execution order of steps can be adjusted, and various embodiments obtained after adjustment still fall within the scope of this application.
[0096] All terms used in this application (including technical or scientific terms) have the same meaning as understood by a person skilled in the art to which this application belongs, unless otherwise defined. In addition, it should be understood that terms defined in general dictionaries, etc., should not be interpreted using idealized or highly formalized meanings, unless expressly defined in this specification, but should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology.
[0097] Techniques, methods, and equipment known to those skilled in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and equipment should be considered part of the instructions.
[0098] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more aspects thereof) can be used in combination with each other. For example, one skilled in the art can use other examples upon reading the above description. Also, in the above specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that any disclosed feature that does not claim protection is required in any claim. Rather, the subject matter of the application may include less than all features of a particular disclosed embodiment. Thus, the following claims are incorporated into the detailed description as an example or example, and each claim stands on its own as a single embodiment, and these embodiments can be combined with each other in various combinations or arrangements. The scope of the claims for which protection is sought should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
Claims
1. A method for calibrating an optical fiber image of an optical fiber image calibration device, comprising: The fiber optic image calibration device includes a processor and a memory; The memory stores computer executable instructions; Execution of the computer-executable instructions by the processor obtaining a current optical fiber image and an optical fiber center reference position, the current optical fiber image being an optical fiber image collected at a current time, the optical fiber including a plurality of optical fiber units, and the optical fiber center reference position including a center reference position of each optical fiber unit; calibrating the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position and a target position determined based on the gradation value within the vicinity range of the optical fiber center reference position in the current optical fiber image; and performing brightness calibration on the current optical fiber image, the position of which has already been calibrated, based on the currently determined brightness calibration coefficient; Calibrating the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position and a target position determined based on a gradation value within a vicinity range of the optical fiber center reference position in the current optical fiber image; In the current optical fiber image, the central reference position of each of the optical fiber units is set as an origin, and a search is performed within a neighborhood range of each origin to determine a position with a maximum gradation value within each neighborhood range; calibrating the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between a position with a maximum gradation value in each of the neighboring ranges and a center reference position of each optical fiber unit in the current optical fiber image; The luminance calibration coefficients are obtaining pre-stored gain and bias coefficients and determining the luminance calibration coefficients based on the pre-stored gain and bias coefficients; or A method for optical fiber image calibration comprising the steps of: performing regression fitting on a series of grayscale values of an optical fiber image that change over time to determine gain coefficients and bias coefficients; and determining the brightness calibration coefficients based on the determined gain coefficients and bias coefficients.
2. Obtaining the optical fiber center reference position includes: retrieving, by the processor, a pre-stored optical fiber center reference position; or The optical fiber image calibration method according to claim 1, further comprising the steps of: extracting, by the processor, a center position of each optical fiber unit from a previously acquired optical fiber image; and setting the extracted center position of each optical fiber unit as the optical fiber center reference position.
3. The method of claim 2, wherein the previously acquired optical fiber image has an acquisition time earlier than the current optical fiber image.
4. Determining the gain coefficient and the bias coefficient by performing regression fitting on the grayscale values of the series of optical fiber images that change with time, 2. The method of claim 1, further comprising determining, by the processor, the gain coefficient and the bias coefficient based on a change in luminance over time of a central position of each optical fiber unit in the optical fiber image and a change in luminance relationship between central positions of each optical fiber unit in the optical fiber image over time.
5. The gain coefficient and the bias coefficient are determined by the processor based on the following equations (1) and (2): [0010] According to formula (3), perform brightness calibration on the current optical fiber image that has already been positionally calibrated; [0025] u i (t) represents the gradation value after calibration of the center position of the i-th optical fiber unit in the t-th frame of the optical fiber image; v i (t) represents the gradation value at the center position of the i-th optical fiber unit in the t-th frame of the optical fiber image, v j (t) represents the gradation value of the center position of the jth optical fiber unit in the tth frame of the optical fiber image, α i represents the gain coefficient of the gradation value at the center position of the i-th optical fiber unit, β i represents the bias coefficient of the gradation value at the center position of the i-th optical fiber unit, α j represents the gain coefficient of the gradation value at the center position of the j-th optical fiber unit, β j represents the bias coefficient of the gradation value at the center position of the j-th optical fiber unit, ε ij The optical fiber image calibration method according to claim 4, characterized in that (t) represents an error term between the gradation value and the fitting curve 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 of the optical fiber image.
6. In the process of performing regression fitting on the grayscale values of a series of optical fiber images that change over time, The processor discards the gradation value of the center position of the optical fiber unit where the regression fitting error is larger than a preset threshold value for the center position of the optical fiber unit where the regression fitting error is larger than a preset threshold value, and / or 2. The method of claim 1, wherein the processor discards regression fitting for the series of time-varying optical fiber images if the number of center positions of the optical fiber units with regression fitting errors greater than a preset threshold exceeds a preset number of positions.
7. Performing brightness calibration on the current optical fiber image for which position calibration has already been completed, Dividing, by the processor, a graphics mesh corresponding to each optical fiber unit in the current optical fiber image, with the central position of each optical fiber unit after calibration as a vertex; The optical fiber image calibration method of claim 1, further comprising: determining, by the processor, for each position other than a vertex in the current optical fiber image, a calibrated grayscale value based on the calibrated grayscale value of a center position of each of the calibrated optical fiber units included in the graphics mesh in which the position is located, using distance-based weighted interpolation.
8. The optical fiber image calibration method described in claim 1, further comprising the processor storing the center position of each optical fiber unit in the current optical fiber image for which position calibration has already been completed, and obtaining the optical fiber center reference position.
9. 1. A fiber optic image calibration device, comprising: an acquisition module configured to acquire a current optical fiber image and an optical fiber center reference position, the current optical fiber image being an optical fiber image collected at a current time, the optical fiber including a plurality of optical fiber units, and the optical fiber center reference position including a center reference position of each optical fiber unit; A drift calibration module is configured to calibrate the center position of each optical fiber unit in the current optical fiber image based on a position difference situation between the optical fiber center reference position in the current optical fiber image and a target position determined based on the grayscale value in the vicinity range of the optical fiber center reference position; a brightness calibration module configured to perform brightness calibration on the current optical fiber image that has already been positionally calibrated based on a currently determined brightness calibration coefficient; The drift calibration module includes: In the current optical fiber image, the central reference position of each of the optical fiber units is set as an origin, and a search is performed within a neighborhood range of each origin, and a position with a maximum gradation value within each neighborhood range is determined; The central position of each optical fiber unit in the current optical fiber image is calibrated based on a position difference situation between the position of the maximum gradation value in each of the neighboring ranges and the central reference position of each optical fiber unit in the current optical fiber image; The luminance calibration module includes: obtaining pre-stored gain and bias coefficients and determining the luminance calibration coefficients based on the pre-stored gain and bias coefficients; or 1. An optical fiber image calibration device, comprising: a step of performing regression fitting on a series of grayscale values of an optical fiber image that changes over time to determine a gain coefficient and a bias coefficient; and a step of determining the brightness calibration coefficient based on the determined gain coefficient and bias coefficient.
10. An optical fiber image calibration device characterized by realizing the optical fiber image calibration method described in any one of claims 1 to 8.
11. A computer-readable storage medium including the memory, wherein computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium realizes the optical fiber image calibration method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Optical fiber image collector and application method thereof
CN107995412A
Confocal endoscope image processing method and system and computer equipment
CN111415312A
Endoscope image distortion correction system based on optical fiber probe
CN113068015A
Optical fiber image correction method and device and computer readable storage medium
CN113570520A
Method and apparatus for using non-coherent optical bundles for image transmission
JP2003502891A