B-scan image alignment method and system in optical coherence layer imaging
By performing cross-correlation analysis and optimal alignment of B-scan images in optical coherence layer imaging technology, the problem of inaccurate positioning of red blood cells in blood flow velocity measurement is solved, and a higher accuracy blood flow velocity measurement is achieved.
Patent Information
- Application Number
- CN202510533544.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-27
AI Technical Summary
When measuring blood flow velocity, the existing optical coherence layer imaging technology causes blurred B-scan image due to factors such as red blood cell spin and instability of the subject, and cannot accurately locate the red blood cell position, which affects the accurate measurement of blood flow velocity.
By using cross-correlation analysis, statistical analysis and optimization analysis methods, the scanned B-scan images are aligned to reduce image blurring, accurately locate the red blood cell position, and reduce the error in blood flow velocity measurement. The specific method includes calculating the total grayscale value of each pixel point, selecting the area where the blood vessel is located for cross-correlation analysis, moving the image position to determine the position with the largest cross-correlation coefficient, completing alignment, and selecting the optimal alignment scheme based on the expected mutual correlation coefficient, the expected coincidence degree and the key point matching rate.
By aligning the B-scan images, the error in blood flow velocity measurement is significantly reduced, the accuracy of positioning of red blood cell positions is improved, and the accurate measurement of blood flow velocity is ensured.
Smart Images

Figure CN120070517A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical coherence tomography, and particularly relates to a method and system for aligning B-scan images in optical coherence tomography. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] Optical Coherence Tomography (OCT) technology, as a new type of three-dimensional tomography technology, is widely used in the field of medical image processing due to its non-contact, non-invasive, fast imaging speed, high detection sensitivity and other characteristics. Due to these characteristics, it has certain applications in measuring the blood flow velocity of blood vessels.
[0004] There is important research on OCT imaging in measuring blood flow velocity. However, during the B-scan (two-dimensional cross-sectional scan) of red blood cells, various uncontrollable factors such as the self-rotation of the measured red blood cells in the blood vessel and the fact that the measured person cannot remain stationary will affect the measurement. This makes some images blurred during the measurement process, that is, the information of red blood cells obtained by B-scan always has a larger range than the actual one. Only the approximate velocity calculation can be carried out through the range of the area where red blood cells exist, and the specific position of red blood cells cannot be accurately determined to calculate the accurate blood flow velocity. Summary of the Invention
[0005] To solve the deficiencies of the prior art, the present invention provides a method and system for aligning B-scan images in optical coherence tomography. By using cross-correlation analysis, statistical analysis and optimization analysis, the scanned B-scan images are aligned to reduce the ambiguity during B-scan, more accurately locate the specific position of red blood cells, and reduce the error in blood flow velocity measurement.
[0006] To achieve the above object, the present invention adopts the following technical solutions: In the first aspect, the present invention provides a method for aligning B-scan images in optical coherence tomography.
[0007] A method for aligning B-scan images in optical coherence tomography includes the following processes: Obtain multiple B-scan images with the same size at the same position through optical coherence layer scanning, and the number and position of pixel points included in each B-scan image are the same; Calculate the total gray value of each pixel point to obtain a gray value map, where each pixel point on the gray value map corresponds to a calculated total gray value; Taking the first pixel point of the gray value map as the center and the number of pixels occupied by the blood vessel on the gray value map as the diameter, enclose a circular area. In the circular area, select two B-scan images for cross-correlation analysis, move the image position, determine the position with the maximum cross-correlation coefficient to complete alignment, and sequentially align the remaining B-scan images to obtain an alignment scheme; Taking multiple other pixel points of the gray value map as the center, obtain multiple alignment schemes, and select the optimal alignment scheme according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching rate.
[0008] As a further limitation of the first aspect of the present invention, calculating the total gray value of any pixel point ( ), including: Set the number of B-scan images as N, and the gray value at the pixel point ( ) of each B-scan image is , then the total gray value of ( ) is: .
[0009] As a further limitation of the first aspect of the present invention, the first pixel point is the pixel point with the maximum gray value, the multiple other pixel points do not include the first pixel point, and the gray values of the multiple other pixel points are all greater than the set threshold.
[0010] As a further limitation of the first aspect of the present invention, selecting two B-scan images for cross-correlation analysis, moving the image position, and determining the position with the maximum cross-correlation coefficient to complete alignment, including: Taking two adjacent sides of the B-scan image as the X-axis and Y-axis respectively, setting up an XOY rectangular coordinate system, fixing one B-scan as the first B-scan, moving the other B-scan along the X-axis, and taking the other B-scan as the second B-scan to find the image position when the cross-correlation coefficient is the largest; then fixing the X-axis, moving the position of the second B-scan along the Y-axis, and finding the image position when the cross-correlation coefficient is the largest again. The position at this time is the aligned position of these two B-scans.
[0011] As a further limitation of the first aspect of the present invention, sequentially aligning the remaining B-scan images to obtain an alignment scheme, including: Taking the first B-scan as the fixed B-scan image, calibrate each of the remaining B-scan images in sequence; or, assuming the number of B-scan images is N, taking the calibrated second B-scan as the fixed B-scan image, calibrate the third B-scan, taking the calibrated third B-scan as the fixed B-scan image, calibrate the fourth B-scan, and taking the calibrated (N - 1)th B-scan as the fixed B-scan image, calibrate the Nth B-scan.
[0012] As a further limitation of the first aspect of the present invention, assuming the width of the selected blood vessel is , and the resolution of the imaging device is , determine the number of pixels occupied by the blood vessel in the image as , where represents rounding up.
[0013] As a further limitation of the first aspect of the present invention, select the optimal alignment scheme according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching, including: Calculate the alignment evaluation result : , where is the weight of the expected cross-correlation coefficient, is the weight of the expected coincidence degree, is the weight of the key point matching rate, , is the expected cross-correlation coefficient, is the expected coincidence degree, is the key point matching rate.
[0014] As a further limitation of the first aspect of the present invention, the expected cross-correlation coefficient is: = , in the formula, is the cross-correlation coefficient between the first B-scan and the th B-scan in the region S, is the total number of B-scan samples minus the reference sample number 1, and S is the total area of the aligned B-scan pattern.
[0015] As a further limitation of the first aspect of the present invention, the expected coincidence degree is: , where is the number of coincidence points between the first B-scan and the th B-scan in the region S, S is the total area of the aligned B-scan pattern, is the total number of pixel points, It is the total number of B-scan samples taken minus the number of reference samples, which is 1.
[0016] As a further limitation of the first aspect of the present invention, the total area of the aligned B-scan pattern is: , where X and Y are the original length and width of the B-scan respectively, and the unit of both is the number of pixels. is the maximum value of the right shift of the X-axis during alignment. is the maximum value of the left movement of the X-axis during alignment. is the maximum value of the right shift of the Y-axis during alignment. is the maximum value of the left movement of the Y-axis during alignment.
[0017] As a further limitation of the first aspect of the present invention, the key point matching rate is : , where is the number of selected key points. is the number of B-scans with the same gray value as the reference B-scan image at the selected key points.
[0018] In a second aspect, the present invention provides a B-scan image alignment system in optical coherence layer imaging.
[0019] A B-scan image alignment system in optical coherence layer imaging includes: An image acquisition unit configured to: obtain multiple B-scan images of the same size at the same position through optical coherence layer scanning, and the number and position of pixel points included in each B-scan image are the same; A total gray value calculation unit configured to: calculate the total gray value of each pixel point to obtain a gray value map, and each pixel point on the gray value map corresponds to a calculated total gray value; An alignment scheme generation unit configured to: with the first pixel point of the gray value map as the center and the number of pixels occupied by blood vessels on the gray value map as the diameter, enclose a circular area. In the circular area, select two B-scan images for cross-correlation analysis, move the image position, determine the position with the maximum cross-correlation coefficient to complete alignment, and sequentially align the remaining B-scan images to obtain an alignment scheme; An alignment scheme optimization unit configured to: with multiple other pixel points of the gray value map as the center, obtain multiple alignment schemes, and select the optimal alignment scheme according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching rate.
[0020] In a third aspect, the present invention provides a computer device, including: a processor and a computer-readable storage medium; A processor suitable for executing a computer program; A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the B-scan image alignment method in optical coherence layer imaging as described in the first aspect of the present invention.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, and the computer program is adapted to be loaded and executed by a processor to implement the B-scan image alignment method in optical coherence layer imaging as described in the first aspect of the present invention.
[0022] In a fifth aspect, the present invention provides a computer program product including a computer program, and when the computer program is executed by a processor, it implements the B-scan image alignment method in optical coherence layer imaging as described in the first aspect of the present invention.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The present invention innovatively proposes a B-scan image alignment strategy in optical coherence layer imaging. By using cross-correlation analysis, statistical analysis, and optimization analysis, the scanned B-scan images are aligned to reduce the ambiguity during B-scan, more accurately locate the specific position of red blood cells, and reduce the error in blood flow velocity measurement.
[0024] 2. The present invention innovatively proposes a B-scan image alignment strategy in optical coherence layer imaging. Taking multiple other pixel points of the grayscale value map as the center, multiple alignment schemes are obtained, and the optimal alignment scheme is selected according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching rate, ensuring the accuracy of the alignment scheme.
[0025] 3. The present invention takes a certain pixel point of the grayscale value map as the center and the number of pixels occupied by blood vessels on the grayscale value map as the diameter to enclose a circular area, and aligns two B-scan images in the circular area. By combining the number of pixels occupied by blood vessels, the accuracy of the B-scan image is further ensured.
[0026] The advantages of the additional aspects of the present invention will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The specification drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.
[0028] Figure 1Schematic flowchart of the B-scan image alignment method in optical coherence tomography according to Embodiment 1 of the present invention; Figure 2 Schematic diagram of the grayscale value image provided by Embodiment 1 of the present invention; Figure 3 Schematic diagram of image misalignment provided by Embodiment 1 of the present invention; Figure 4 Schematic diagram of an optical coherence tomography B-scan image alignment system according to Embodiment 2 of the present invention; Figure 5 Schematic diagram of a computer device provided by Embodiment 3 of the present invention. Detailed implementation manners
[0029] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0030] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0031] In the case of no conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other.
[0032] Embodiment 1: The purpose of aligning B-scan images (i.e., two-dimensional tomographic images) in optical coherence tomography is mainly to obtain high-quality and distortion-free three-dimensional images. Specifically, B-scan image alignment plays a crucial role in OCT imaging, and its reasons and purposes mainly include: (1) Three-dimensional reconstruction: In OCT imaging, by acquiring multiple B-scan images of a sample at different positions and then aligning and superimposing these images, the three-dimensional structure of the sample can be reconstructed; B-scan image alignment is a key step in realizing this process, which ensures the correct spatial correspondence of each two-dimensional image, so as to accurately restore the three-dimensional shape of the sample.
[0033] (2) Distortion elimination: Due to factors such as the possible slight movement of the sample, the error of the scanning system, or the noise in the data acquisition process, a single B-scan image may have certain distortion; through B-scan image alignment, these distortions can be corrected, making the reconstructed three-dimensional image more accurate and real.
[0034] (3) Improving resolution: Aligning multiple B-scan images can also improve the resolution of the images to a certain extent. Since each B-scan image is obtained by scanning the sample from different angles, they contain information about the sample in different directions. By integrating and aligning this information, a more detailed and clear image can be obtained.
[0035] (4) Assisting in diagnosis: In medical diagnosis, OCT technology is often used to obtain high-resolution images of internal tissues of the human body. Aligning B-scan images can ensure the accuracy and reliability of these images, thus providing a more accurate basis for diagnosis for doctors. For example, in the diagnosis of ophthalmic diseases, the aligned OCT images can help doctors more clearly observe the layered structure and pathological conditions of the retina.
[0036] In summary, the purpose of aligning B-scan images in optical coherence tomography is to obtain high-quality, distortion-free three-dimensional images, thereby improving the accuracy and reliability of diagnosis. In practical applications, this usually requires the assistance of advanced image processing algorithms and technologies to achieve.
[0037] Given that the existing methods cannot accurately determine the specific position of red blood cells to calculate the accurate blood flow rate, this implementation method proposes a method for aligning B-scan images in optical coherence tomography, including the following processes: S1: Determine the relationship between the blood vessel width and the resolution of the OCT device.
[0038] Assume that the width of the selected blood vessel is μm, and the resolution of the imaging device is μm. Determine the number of pixels occupied by the blood vessel in the image as: where, represents rounding up.
[0039] More specifically, it is necessary to determine the number of pixels occupied by the blood vessel in the actual imaging picture according to the accuracy of the device. Taking capillaries as an example, the inner diameter of capillaries is generally 6μm - 9μm. Assuming the resolution of the imaging device is 2μm, then capillaries should occupy 3 - 5 pixel points in the image. To ensure that imaging data will not be lost, the present invention can take 5 as the number of pixels occupied by the selected capillaries to facilitate determining the proper range space of the blood vessel.
[0040] S2: Obtain multiple B-scan images of the same position through OCT scanning.
[0041] Here, assume there are N B-scan images, and each B-scan image is rectangular. The sizes of each B-scan image are the same, and the number and positions of the pixel points included are the same.
[0042] S3: Calculate the sum of the grayscale values at each pixel point.
[0043] Suppose a total of N B-scan images are counted, and the total number of pixel points in the obtained B-scan images is , in the order from top left to bottom right, the pixel points are respectively denoted as ( , ).
[0044] Assume that the sum of the grayscale values at ( , ) is calculated. Let the grayscale values of each B-scan image at ( , ) be respectively. Then the total grayscale statistical value at ( , ) is: (1); Calculate the statistical grayscale values of each other pixel point in this way.
[0045] More specifically, in the imaging picture displayed by B-scan, assume that one B-scan is scanned one hundred times, that is, one hundred B-scan images are obtained in one cross-section. By counting the grayscale values of each point of these one hundred B-scan images and then performing a summation operation, and denoting this value as the grayscale statistical value, the sum of the grayscale values obtained at each pixel point can be obtained. Thus, we can get a statistically obtained data graph, which reflects the grayscale distribution of the one hundred selected B-scan images at each pixel point.
[0046] S4: Obtain the total grayscale value of each pixel point according to the statistical grayscale value.
[0047] According to the statistical result, obtain a grayscale value graph, as shown in Figure 2 . Mark the total grayscale value counted on each pixel point. Specifically, it includes ( , ), ( , ) ··· ( , ), ( , ) ··· ( , ) ··· ( , ) and other total grayscale values at pixel points.
[0048] S5: Align the B-scan using cross-correlation.
[0049] Taking the pixel with the largest gray value in the obtained image (i.e., the first pixel point) as the center and the number of pixels a corresponding to the blood vessel as the diameter, a circular area is demarcated. Within this area, two B-scan images are selected for cross-correlation analysis, and the cross-correlation coefficient is r. On this basis, one of the B-scans (i.e., the first B-scan) is fixed, and the other B-scan (i.e., the second B-scan) is moved along the X-axis, and the cross-correlation coefficient is recalculated. The image position when the cross-correlation coefficient r is the largest is found. Then, the X-axis is fixed, and the position of the other B-scan is moved along the Y-axis, and the image position when the cross-correlation coefficient r is the largest is found again. This position is the position after alignment of these two B-scans.
[0050] Then, the remaining images are finally aligned with the B-scan in the above manner. Specifically, taking the first B-scan as the fixed B-scan image, the calibration of each of the remaining B-scan images is carried out in sequence. Or, in some other implementation manners, assuming the number of B-scan images is N, taking the calibrated second B-scan as the fixed B-scan image, the calibration of the third B-scan is carried out, taking the calibrated third B-scan as the fixed B-scan image, the calibration of the fourth B-scan is carried out, and taking the calibrated (N - 1)th B-scan as the fixed B-scan image, the calibration of the Nth B-scan is carried out.
[0051] More specifically, the present invention selects a pixel point with the highest statistical value as the reference point. From the knowledge of probability statistics, the possibility of this point being the true value of the blood vessel is the greatest. Then, returning to the original B-scan image, in the first B-scan image obtained by scanning, taking this point as the center and a diameter of five pixel points (the number of pixel points occupied by capillaries in the device resolution), a circular area is made. Within this area, the first B-scan image and the second B-scan image are selected, and the area demarcated in the first B-scan image is mapped to the second B-scan image, and the cross-correlation between the two images in the selected area is analyzed.
[0052] When the cross-correlation within the two areas is higher, it indicates that the two pictures are better aligned. On the contrary, the alignment is worse. After calculating the cross-correlation for the first time, the second B-scan is moved as a whole along the X-axis in units of pixel points, and the position with the largest cross-correlation when moving along the X-axis is found. Then, this operation is repeated along the Y-axis until the point with the largest cross-correlation is found. Then, the above operation is repeated for the third to the hundredth B-scan images to obtain one alignment scheme.
[0053] In this implementation, preferably, when the alignment of the two pictures is completed in the above manner, still taking the first picture as a reference, find the area for cross-correlation analysis. With the center of the original selected area as the center of the circle, on the basis of the area with pixel points as the diameter, increase the radius by one pixel point, that is, increase the diameter by two pixel points, and perform cross-correlation analysis on the two pictures that have been aligned again. Since the alignment method with the highest cross-correlation has been found within the original cross-correlation analysis range, after expanding the range, the cross-correlation coefficient r will decrease. If the degree of decrease in the cross-correlation coefficient is not very obvious, it proves that the previous alignment result is better; otherwise, it proves that the previously selected alignment method is slightly lacking.
[0054] S6: Repeat the experiment and select the optimal solution.
[0055] After the B-scan alignment in S5 is completed, according to the graph of the total pixel gray value statistics, select another point with a higher total gray value statistics that is different from the area selected in S5 as the center (it can also be understood as other pixel points with a total gray value greater than the set threshold), delimit the area for cross-correlation analysis, and then perform alignment. Thus, multiple different alignment solutions can be obtained. Compare the different alignment solutions obtained. Among the results after alignment, select the optimal alignment solution according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching rate.
[0056] During the B-scan alignment process, since it is necessary to move and align the B-scan pictures along the X and Y axes, it will cause misalignment of the pictures after alignment, as Figure 3 shown. During the process of S5, find the maximum value of the rightward shift of the X axis when aligning each picture and the maximum value of the leftward movement . Similarly, find the maximum values of the upward and downward shifts of the Y axis and . Since the offset amount is very small compared to the entire B-scan image, discard the part that deviates from the selected reference image after alignment as invalid values. The total area of the B-scan graph after alignment can be obtained as: (2); where S is the total area of the B-scan graph after B-scan alignment, and X and Y are the original length and width of the B-scan, respectively, with the unit of pixel number.
[0057] It can be seen from this that when different sample points are selected for registration operations, due to the differences in the offset amounts during the registration of each image, the S values of the finally obtained B-scan images are different. Therefore, it is not possible to simply compare using the total area of the angiography. For this reason, the present invention proposes a method for testing the alignment effect of B-scan, which evaluates the alignment effect of B-scan from three directions, namely the expected cross-correlation coefficient , the expected coincidence degree and the key point matching rate .
[0058] The expected cross-correlation coefficient is: = (3); In the formula, is the cross-correlation coefficient between the first B-scan and the th B-scan in the region S, is the total number of B-scan samples taken minus the reference sample number 1.
[0059] The expected coincidence degree is: (4); In the formula, is the number of coincidence points between the first B-scan and the th B-scan in the region S. The specific calculation method is to compare the aligned first B-scan and the th B-scan in the region S, and record the number of points where the gray values are the same in the same region of the th B-scan and the reference image, which is the number of coincidence points. In the formula, S is the total number of pixel points, and n is the total number of B-scan samples taken minus the reference sample number 1.
[0060] The key point matching rate is: (5); In the formula, m is the number of selected key points, is the number of B-scans with the same gray value as the reference B-scan image at the selected key points. The selection basis of the key points can be selected according to the gray value total map statistically obtained in the previous third step.
[0061] The final B-scan alignment evaluation result is: (6); In the formula, is the weight of the expected cross-correlation coefficient, is the weight of the expected coincidence degree, is the weight of the key point matching rate, .
[0062] Embodiment 2: As Figure 4 shown, this implementation provides a B-scan image alignment system in optical coherence layer imaging, including: An image acquisition unit, configured to: obtain multiple B-scan images with the same size at the same position through optical coherence layer scanning, and the number and position of pixel points included in each B-scan image are the same; A total gray value calculation unit, configured to: calculate the total gray value of each pixel point to obtain a gray value map, and each pixel point on the gray value map corresponds to a calculated total gray value; An alignment scheme generation unit, configured to: take the first pixel point of the gray value map as the center, and use the number of pixels occupied by blood vessels on the gray value map as the diameter to enclose a circular area. In the circular area, select two B-scan images for cross-correlation analysis, move the image position, determine the position with the maximum cross-correlation coefficient to complete alignment, and sequentially align the remaining B-scan images to obtain an alignment scheme; An alignment scheme optimization unit, configured to: take multiple other pixel points of the gray value map as the center to obtain multiple alignment schemes, and select the optimal alignment scheme according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching rate.
[0063] For the specific working process of each unit, see the introduction in Embodiment 1 and will not be elaborated here.
[0064] It can be understood that the above units can be separately or all combined into one or several other units to form, or some of them can be further split into multiple smaller units with functional division to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of this application. The above units are divided based on logical functions. In actual applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of this application, the system can also include other units. In actual applications, these functions can also be assisted by other units and can be realized by the cooperation of multiple units.
[0065] According to another embodiment of the present application, the system described in this embodiment can be constructed, and the method of Embodiment 1 of the present application can be implemented by running a computer program (including program code) capable of executing the respective steps involved in the corresponding method described in Embodiment 1 on a general computing device such as a computer including processing elements and storage elements such as a Central Processing Unit (CPU), a Random Access Memory (RAM), and a Read-Only Memory (ROM). The computer program can be recorded on a computer-readable recording medium, for example, and loaded into the above computing device through the computer-readable recording medium and run therein.
[0066] Embodiment 3: As Figure 5 shown, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. Among them, the processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 can be connected through a bus or other means.
[0067] Among them, the communication interface 1002 is used to receive and send data. The computer-readable storage medium 1003 can be stored in the memory of the electronic device. The computer-readable storage medium 1003 is used to store a computer program, and the computer program includes program instructions. The processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.
[0068] The processor 1001 (or CPU (Central Processing Unit, central processor)) is the computing core and control core of the electronic device, and is adapted to implement one or more instructions, specifically adapted to load and execute one or more instructions to implement the corresponding method flow or corresponding function.
[0069] The processor 1001 is configured to execute the following process: Obtain multiple B-scan images of the same size at the same position through optical coherence layer scanning, and the number and position of pixel points included in each B-scan image are the same; Calculate the total gray value of each pixel point to obtain a gray value map, and each pixel point on the gray value map corresponds to a calculated total gray value; Centering on the first pixel point of the grayscale value image, with the number of pixels occupied by blood vessels on the grayscale value image as the diameter, a circular area is delineated. In the circular area, two B-scan images are selected for cross-correlation analysis. The image position is moved to determine the position with the maximum cross-correlation coefficient to complete alignment. The remaining B-scan images are aligned in sequence to obtain an alignment scheme. Centering on multiple other pixel points of the grayscale value image, multiple alignment schemes are obtained, and the optimal alignment scheme is selected according to the expected cross-correlation coefficient, expected coincidence degree, and key point matching rate.
[0070] For the specific working process, see the introduction in Embodiment 1 and will not be elaborated here.
[0071] Embodiment 4: This implementation provides a computer-readable storage medium (Memory). A computer-readable storage medium is a memory device in an electronic device for storing programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the electronic device and, of course, the extended storage medium supported by the electronic device. The computer-readable storage medium provides a storage space, and this storage space stores the processing system of the electronic device.
[0072] Moreover, in this storage space, one or more instructions suitable for being loaded and executed by the processor are also stored. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it can also be at least one computer-readable storage medium located far from the aforementioned processor.
[0073] In one embodiment, one or more instructions are stored in the computer-readable storage medium; the processor loads and executes one or more instructions stored in the computer-readable storage medium to implement the following process: Multiple B-scan images of the same size at the same position are obtained through optical coherence layer scanning, and the number and position of pixel points included in each B-scan image are the same; The total grayscale value of each pixel point is calculated to obtain a grayscale value image, and each pixel point on the grayscale value image corresponds to a calculated total grayscale value; Centering on the first pixel point of the grayscale value image, with the number of pixels occupied by blood vessels on the grayscale value image as the diameter, a circular area is delineated. In the circular area, two B-scan images are selected for cross-correlation analysis. The image position is moved to determine the position with the maximum cross-correlation coefficient to complete alignment. The remaining B-scan images are aligned in sequence to obtain an alignment scheme. Centered on multiple other pixel points of the grayscale value map, multiple alignment schemes are obtained, and the optimal alignment scheme is selected according to the expected cross-correlation coefficient, the expected coincidence degree, and the key point matching rate.
[0074] For the specific working process, see the introduction in Embodiment 1 and will not be elaborated here.
[0075] Embodiment 5: This implementation provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the following process: Obtain multiple B-scan images with the same size at the same position through optical coherence layer scanning, and the number and position of pixel points included in each B-scan image are the same; Calculate the total grayscale value of each pixel point to obtain a grayscale value map, and each pixel point on the grayscale value map corresponds to a calculated total grayscale value; Centered on the first pixel point of the grayscale value map, with the number of pixels occupied by the blood vessel on the grayscale value map as the diameter, delineate a circular area. In the circular area, select two B-scan images for cross-correlation analysis, move the image position, determine the position with the maximum cross-correlation coefficient to complete alignment, and perform sequential alignment on the remaining B-scan images to obtain an alignment scheme; Centered on multiple other pixel points of the grayscale value map, multiple alignment schemes are obtained, and the optimal alignment scheme is selected according to the expected cross-correlation coefficient, the expected coincidence degree, and the key point matching rate.
[0076] For the specific working process, see the introduction in Embodiment 1 and will not be elaborated here.
[0077] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this application can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but this implementation should not be considered to exceed the scope of this application.
[0078] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data processing device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)), etc.
[0079] The foregoing is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A B-scan image alignment method in optical coherence layer imaging, characterized in that: The process includes: Obtain multiple B-scan images of the same size at the same location through optical coherence layer scanning, and the number and position of pixels contained in each B-scan image are the same; Calculate the total grayscale value of each pixel to obtain a grayscale value map, where each pixel on the grayscale value map corresponds to a calculated total grayscale value; A circular area is defined with the first pixel point of the gray value image as the center and the number of pixels occupied by the blood vessel on the gray value image as the diameter. In the circular area, two B-scan images are selected for cross-correlation analysis. The image positions are moved to determine the position with the largest cross-correlation coefficient to complete the alignment. The remaining B-scan images are aligned in turn to obtain an alignment solution. Taking multiple other pixel points of the gray value map as the center, multiple alignment schemes are obtained, and the optimal alignment scheme is selected according to the expected mutual correlation coefficient, the expected overlap degree and the key point matching rate.
2. The B-scan image alignment method in optical coherence layer imaging according to claim 1, characterized in that: Calculate any pixel point ( ), including: Assume that the number of B-scan images is N, and the pixel points of each B-scan image ( ) is ,but( ) is: .
3. The B-scan image alignment method in optical coherence layer imaging according to claim 1, characterized in that: The first pixel point is a pixel point with the largest grayscale value, the multiple other pixel points do not include the first pixel point, and the grayscale values of the multiple other pixel points are all greater than a set threshold.
4. The B-scan image alignment method in optical coherence layer imaging according to claim 1, characterized in that: Select two B-scan images to perform cross-correlation analysis, move the image positions, and determine the position with the largest cross-correlation coefficient to complete the alignment, including: The two adjacent edges of the B-scan image are the X-axis and the Y-axis respectively, and the XOY rectangular coordinate system is set. One of the B-scans is fixed as the first B-scan, and the other B-scan is moved along the X-axis. The other B-scan is used as the second B-scan to find the image position when the cross-correlation coefficient is the largest; then the X-axis is fixed, the second B-scan position is moved along the Y-axis, and the image position when the cross-correlation coefficient is the largest again is found. The position at this time is the position after the two B-scans are aligned.
5. The B-scan image alignment method in optical coherence layer imaging according to claim 4, characterized in that: The remaining B-scan images are aligned in sequence to obtain an alignment scheme, including: Taking the first B-scan as a fixed B-scan image, calibrate the remaining B-scan images in sequence; or, assuming that the number of B-scan images is N, taking the calibrated second B-scan as a fixed B-scan image, calibrate the third B-scan, taking the calibrated third B-scan as a fixed B-scan image, calibrate the fourth B-scan, and taking the calibrated N-1th B-scan as a fixed B-scan image, calibrate the Nth B-scan.
6. The B-scan image alignment method in optical coherence layer imaging according to any one of claims 1 to 4, characterized in that: Assume that the width of the selected vessel is , the imaging device resolution is , determine the number of pixels occupied by blood vessels in the image ,in, Represents round up.
7. The B-scan image alignment method in optical coherence layer imaging according to claim 1, characterized in that: The optimal alignment scheme is selected based on the expected correlation coefficient, expected overlap and key point matching, including: Calculate the alignment evaluation results : ,in, is the weight of the expected cross-correlation coefficient, is the weight of the expected overlap, is the weight of the key point matching rate, , is the expected mutual correlation coefficient, is the expected overlap, is the key point matching rate.
8. The B-scan image alignment method in optical coherence layer imaging according to claim 7, characterized in that: Expected Correlation Coefficient for: = ; In the formula, The first B-scan and the The mutual correlation coefficient of each B-scan in region S is: is the total number of B-scan samples minus the number of reference samples 1, and S is the total area of the B-scan pattern after alignment.
9. The B-scan image alignment method in optical coherence layer imaging according to claim 7, characterized in that: Expected overlap for: ; in, The first B-scan and the The number of overlapping points of each B-scan in area S, where S is the total area of the B-scan graph after alignment. is the total number of pixels, It is the total number of B-scan samples taken minus the number of reference samples 1.
10. The B-scan image alignment method in optical coherence layer imaging according to claim 8 or 9, characterized in that: Total area of B-scan pattern after alignment for: ; Among them, X and Y are the original length and width of B-scan, both in pixels. is the maximum value of the X-axis rightward deviation during alignment, is the maximum value of the X-axis moving to the left during alignment, is the maximum value of the Y-axis rightward offset during alignment, The maximum value of the Y axis moving to the left during alignment.
11. The B-scan image alignment method in optical coherence layer imaging according to claim 7, characterized in that: The key point matching rate is : ; in, is the number of selected key points, is the number of B-scans with the same grayscale value as the reference B-scan image at the selected key points.
12. A B-scan image alignment system in optical coherence layer imaging, characterized in that: include: The image acquisition unit is configured to: obtain a plurality of B-scan images of the same size at the same position through optical coherence layer scanning, wherein the number and position of pixels contained in each B-scan image are the same; The total grayscale value calculation unit is configured to: calculate the total grayscale value of each pixel to obtain a grayscale value map, where each pixel on the grayscale value map corresponds to a calculated total grayscale value; The alignment scheme generating unit is configured to: take the first pixel point of the gray value map as the center and the number of pixels occupied by the blood vessel on the gray value map as the diameter, circle a circular area, select two B-scan images in the circular area, perform cross-correlation analysis on them, move the image positions, determine the position with the largest cross-correlation coefficient to complete the alignment, and align the remaining B-scan images in turn to obtain the alignment scheme; The alignment scheme optimization unit is configured to obtain multiple alignment schemes with multiple other pixel points of the gray value map as the center, and select the optimal alignment scheme according to the expected mutual correlation coefficient, the expected overlap degree and the key point matching rate.
13. A computer device, characterized in that: include: A processor and a computer readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for B-scan image alignment in optical coherence layer imaging according to any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the B-scan image alignment method in optical coherence layer imaging according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method for B-scan image alignment in optical coherence layer imaging according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Systems and methods for performing gabor optical coherence tomographic angiography
CN112136182A
Optical coherence tomography retina image correction method and device
CN114343565A
Method for improving quality of scanned image based on multi-frame registration and averaging algorithm
CN115829891A
Blood vessel imaging method, device and equipment and storage medium
CN117942041A
Image processing device and control method thereof, distance detection device, imaging device, program
JP2020021126A