Endoscopic imaging digital scanning transformation method and system based on FPGA

By utilizing the partition storage method of DDR3 and RAM in the endoptic imaging system, combining the cordic algorithm and parallel processing capabilities of FPGA, efficient polar coordinate conversion and bilinear interpolation processing are achieved, solving the problem of long polar coordinate conversion time in high-frame-rate endoptic imaging, and improving the frame rate and storage efficiency of endoptic imaging.

CN119863355APending Publication Date: 2025-04-22GUANGDONG PHOTOACOUSTIC TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411921654.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In high-resolution, high-frame-rate endopecitation imaging scenarios, the polar coordinate conversion time is long, resulting in low read and write efficiency of DDR and cannot meet the needs of high-frame-rate imaging.

Method used

By obtaining the original photoacoustic polar coordinate image and partitioning it into DDR3 memory, the data in the DDR3 memory is scanned and stored in the RAM memory based on the cordic algorithm, the photoacoustic inner angle coordinate image is obtained, and inverse index and bilinear interpolation are performed. The parallelism of FPGA and rich RAM resources are used to achieve efficient digital signal processing.

Benefits of technology

By fully utilizing the burst transmission of DDR and the parallel processing capability of FPGA, the efficiency of polar coordinate conversion and the endoscopic imaging frame rate are improved, and the storage needs of high-resolution endoscopic original frame signals are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863355A_ABST
    Figure CN119863355A_ABST
Patent Text Reader

Abstract

The invention discloses a field programmable gate array (FPGA)-based endoscopic imaging digital scanning transformation method and system. The method comprises the following steps of: acquiring an original photoacoustic endoscopic polar coordinate image, performing partition processing on the original photoacoustic endoscopic polar coordinate image and storing the original photoacoustic endoscopic polar coordinate image into a double data rate (DDR3) memory; based on a cordic algorithm, the original photoacoustic endoscopic polar coordinate image in the DDR3 memory is scanned and stored in the RAM memory, and a photoacoustic endoscopic rectangular coordinate image is obtained; according to the photoacoustic endoscopic rectangular coordinate image, performing inverse indexing on the original photoacoustic endoscopic polar coordinate image in the RAM memory to obtain RAM memory inverse index data; and performing bilinear interpolation processing and fifo three-line caching processing on the inverse index data of the RAM memory to obtain a conversion result of the photoacoustic endoscopic image. According to the method, the efficiency of polar coordinate conversion and the endoscopic imaging frame rate can be improved by utilizing burst transmission of the DDR, so that the storage of a high-resolution endoscopic original frame signal is met. The endoscopic imaging digital scanning conversion method and system based on the FPGA can be widely applied to the technical field of digital signal processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital signal processing, and in particular to an endoscopic imaging digital scan conversion method and system based on FPGA. Background Art

[0002] Endoscopic imaging includes physical imaging technologies such as ultrasonic endoscopy, OCT endoscopy, and photoacoustic endoscopy. The front-end probe is driven by the rotation of the motor to perform radial 360-degree imaging. The rotational scanning method determines that the original endoscopic data is in the form of polar coordinates. Polar coordinate conversion is required to convert the polar coordinate data into rectangular coordinate data to make it suitable for human eye observation. For high-frame rate and high-resolution endoscopic imaging scenarios such as intravascular endoscopic imaging, shortening the polar coordinate conversion time is very critical.

[0003] For high-resolution and high-frame-rate endoscopic imaging, large-capacity frame data processing and high-speed digital signal processing are pain points. To meet the needs of high-speed imaging, high-resolution endoscopic imaging has advantages in parallel and pipeline. In order to store high-resolution single-frame raw data, DDR must be used for triple cache, but the address for coordinate transformation inverse index is non-continuous. If a single address is used for a single burst DDR, the read and write efficiency of DDR will be low, resulting in a low final endoscopic imaging frame rate, which cannot meet the needs of high-frame-rate imaging. Related technologies use SRAM to access raw frame signal images, and SRAM has a faster read and write speed, but SRAM is generally small and cannot meet the storage of high-resolution endoscopic raw frame signals. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide an endoscopic imaging digital scan conversion method and system based on FPGA, which can utilize DDR burst transmission to improve the efficiency of polar coordinate conversion and endoscopic imaging frame rate, thereby meeting the storage of high-resolution endoscopic raw frame signals.

[0005] The first technical solution adopted by the present invention is: a digital scan conversion method for endoscopy imaging based on FPGA, comprising the following steps:

[0006] Obtain the original photoacoustic endoscopy polar coordinate image and perform partition processing and store it in DDR3 memory;

[0007] Based on the cordic algorithm, the original photoacoustic endoscopy polar coordinate image in the DDR3 memory is scanned and stored in the RAM memory to obtain the photoacoustic endoscopy rectangular coordinate image;

[0008] According to the photoacoustic endoscopy rectangular coordinate image, the original photoacoustic endoscopy polar coordinate image in the RAM memory is inversely indexed to obtain RAM memory inverse index data;

[0009] The RAM memory inverse index data is processed by bilinear interpolation and FIFO three-line buffering to obtain the conversion result of the photoacoustic endoscopic image.

[0010] Furthermore, the step of obtaining the original photoacoustic endoscopy polar coordinate image and performing partition processing and storing it in the DDR3 memory specifically includes:

[0011] Acquire original photoacoustic endoscopic polar coordinate images through a photoacoustic imaging system;

[0012] Partitioning the original photoacoustic endoscopy polar coordinate image into 16 equally divided photoacoustic endoscopy polar coordinate images according to a preset number of rows;

[0013] The 16 equally divided photoacoustic endoscopic polar coordinate images are stored in the DDR3 memory through a three-frame buffering method.

[0014] Furthermore, the step of scanning the original photoacoustic endoscopy polar coordinate image in the DDR3 memory and storing it in the RAM memory based on the cordic algorithm to obtain the photoacoustic endoscopy rectangular coordinate image specifically includes:

[0015] Scan the photoacoustic endoscopy polar coordinate image in the DDR3 memory by using a coordinate conversion formula to obtain the radius and angle of the photoacoustic endoscopy polar coordinate image;

[0016] According to the radius of the photoacoustic endoscopy polar coordinate image, the photoacoustic endoscopy polar coordinate image in the DDR3 memory is temporarily stored in the RAM memory;

[0017] Based on the photoacoustic endoscopy polar coordinate image in the RAM memory, scanning is performed in combination with the radius of the photoacoustic endoscopy polar coordinate image and the angle value of the photoacoustic endoscopy polar coordinate image to obtain the photoacoustic endoscopy rectangular coordinate image.

[0018] Furthermore, the coordinate conversion formula is specifically expressed as follows:

[0019]

[0020] In the above formula, r represents the radius of the photoacoustic endoscopy polar coordinate image, θ represents the angle value of the photoacoustic endoscopy polar coordinate image, and x and y represent the row coordinate and column coordinate of the rectangular coordinate, respectively.

[0021] Further, the radius of the photoacoustic endoscopic polar coordinate image maps to the row coordinate of the original photoacoustic endoscopic polar coordinate image, and the angle value of the photoacoustic endoscopic polar coordinate image maps to the column coordinate of the original photoacoustic endoscopic polar coordinate image.

[0022] Further, the step of temporarily storing the photoacoustic endoscopy polar coordinate image in the DDR3 memory to the RAM memory according to the radius of the photoacoustic endoscopy polar coordinate image specifically includes:

[0023] If the radius of the photoacoustic endoscopic polar coordinate image is greater than the original photoacoustic endoscopic polar coordinate image column length, it is assigned a value of zero;

[0024] If the radius of the photoacoustic endoscopy polar coordinate image is smaller than the original photoacoustic endoscopy polar coordinate image column length, all the DDR partition data where the polar coordinates are located is retrieved through the polar coordinate address and stored in the corresponding external RAM memory;

[0025] When the polar coordinate address is located in the next partition, the DDR corresponding partition module is burst read again to store the corresponding data in the next RAM memory, and the operation is repeated until the preset number of RAM memories are filled.

[0026] Further, the step of performing inverse indexing on the original photoacoustic endoscopy polar coordinate image in the RAM memory according to the photoacoustic endoscopy rectangular coordinate image to obtain the RAM memory inverse index data specifically includes:

[0027] According to the photoacoustic endoscopy rectangular coordinate image, the original photoacoustic endoscopy polar coordinate image in the RAM memory is inversely indexed. When the inverse indexed data is not in the RAM memory, the corresponding DDR memory partition is accessed according to the polar coordinate address and the corresponding data is taken out, overwriting the data in the RAM memory, and then inverse indexing is performed to obtain the RAM memory inverse index data.

[0028] Further, the step of performing bilinear interpolation processing and FIFO three-line buffer processing on the RAM memory inverse index data to obtain the conversion result of the photoacoustic endoscopic image specifically includes:

[0029] Perform bilinear interpolation on the RAM memory inverse index data, and store the interpolation results in other partitions of the DDR memory in row arrangement;

[0030] Perform coordinate transformation on the interpolation results in the DDR3 memory and store them in other partitions of the RAM memory;

[0031] The converted interpolation results stored in the RAM memory are taken out in bursts for three-row FIFO buffering, and the blank position coordinates between the polar coordinate conversion column data are bilinearly interpolated to obtain the image data after bilinear interpolation;

[0032] The bilinear interpolated image data is cached across clock domains through FIFO, and stored in other partitions of DDR memory according to the three-frame cache method to obtain the conversion result of the photoacoustic endoscopic image.

[0033] The second technical solution adopted by the present invention is: an endoscopic imaging digital scan conversion system based on FPGA, comprising:

[0034] The first module is used to obtain the original photoacoustic endoscopy polar coordinate image and perform partition processing and store it in the DDR3 memory;

[0035] The second module is used to scan the original photoacoustic endoscopy polar coordinate image in the DDR3 memory and store it in the RAM memory based on the cordic algorithm to obtain the photoacoustic endoscopy rectangular coordinate image;

[0036] The third module is used to perform inverse indexing on the original photoacoustic endoscopy polar coordinate image in the RAM memory according to the photoacoustic endoscopy rectangular coordinate image to obtain the RAM memory inverse index data;

[0037] The fourth module is used to perform bilinear interpolation processing and FIFO three-line cache processing on the RAM memory inverse index data to obtain the conversion result of the photoacoustic endoscopic image.

[0038] The beneficial effects of the method and system of the present invention are as follows: the present invention obtains the original photoacoustic endoscopy polar coordinate image and performs partition processing and stores it in the DDR3 memory, and then scans the original photoacoustic endoscopy polar coordinate image in the DDR3 memory based on the cordic algorithm and stores it in the RAM memory to obtain the photoacoustic endoscopy rectangular coordinate image, uses FPGA as the core processor, cooperates with the off-chip DDR3 memory, and utilizes the abundant RAM and DSP resources inside the FPGA to perform digital signal processing on the original data. The FPGA naturally has parallel characteristics, and the digital scanning reverse index and bilinear interpolation are both implemented by data pipeline operation to achieve lower digital signal processing delay. Further, according to the photoacoustic endoscopy rectangular coordinate image, the original photoacoustic endoscopy polar coordinate image in the RAM memory is scanned and stored in the RAM memory. The photoacoustic endoscopic polar coordinate image is first inversely indexed to obtain the RAM memory inverse index data, and finally the RAM memory inverse index data is bilinearly interpolated and processed by three-line FIFO cache to obtain the conversion result of the photoacoustic endoscopic image. The original endoscopic polar coordinate image data is stored in DDR through block storage, and the DDR is burst read to RAM during coordinate inverse indexing, which makes full use of the burst transmission of DDR, improves the read and write bandwidth utilization of DDR, reduces the number of DDR accesses, greatly improves the efficiency of polar coordinate conversion, and finally improves the endoscopic imaging frame rate. Among them, both coordinate inverse indexing and bilinear interpolation adopt data pipeline processing, divide the processing steps into parts, reduce data processing delay, and make full use of the parallelism of FPGA. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flow chart of the steps of a digital scan conversion method for endoscopy imaging based on FPGA of the present invention;

[0040] Figure 2 It is a structural block diagram of an endoscopic imaging digital scan conversion system based on FPGA of the present invention;

[0041] Figure 3 It is a schematic diagram of the step framework of digital scan conversion for endoscopic imaging provided by a specific embodiment of the present invention;

[0042] Figure 4 is a schematic diagram of digital scan conversion processing of an original endoscopic image provided by a specific embodiment of the present invention;

[0043] Figure 5 It is a schematic diagram of the principle of digital scan conversion address reverse indexing provided by a specific embodiment of the present invention. DETAILED DESCRIPTION

[0044] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only provided for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0045] Reference Figure 1 and Figure 3 The present invention provides an endoscopic imaging digital scan conversion method based on FPGA, the method comprising the following steps:

[0046] S100, obtaining the original photoacoustic endoscopy polar coordinate image and performing partition processing and storing it in the DDR3 memory;

[0047] Specifically, an original photoacoustic endoscopic polar coordinate image is acquired through a photoacoustic imaging system; the original photoacoustic endoscopic polar coordinate image is partitioned into 16 equally divided photoacoustic endoscopic polar coordinate images according to a preset number of rows; and the 16 equally divided photoacoustic endoscopic polar coordinate images are stored in a DDR3 memory through a three-frame buffering method.

[0048] In this embodiment, a DDR3 memory and four RAMs (recorded as RAM1, RAM2, RAM3, and RAM4) are provided. For one frame of original photoacoustic endoscopic polar coordinate image, the endoscopic signal acquisition data of a single laser excitation is a row, and the total number of rows is divided into 16 equal parts and stored in different partitions in the DDR. The partition addresses are not continuous. The original photoacoustic endoscopic polar coordinate image data coming into the FPGA through the ADC first passes through other digital processing units, and then is stored in the DDR according to the 16 equal partitions.

[0049] S200, based on the cordic algorithm, scanning the original photoacoustic endoscopy polar coordinate image in the DDR3 memory and storing it in the RAM memory to obtain the photoacoustic endoscopy rectangular coordinate image;

[0050] Specifically, the photoacoustic endoscopy polar coordinate image in the DDR3 memory is scanned by a coordinate conversion formula to obtain the radius of the photoacoustic endoscopy polar coordinate image and the angle value of the photoacoustic endoscopy polar coordinate image; according to the radius of the photoacoustic endoscopy polar coordinate image, the photoacoustic endoscopy polar coordinate image in the DDR3 memory is temporarily stored in the RAM memory; based on the photoacoustic endoscopy polar coordinate image in the RAM memory, the radius of the photoacoustic endoscopy polar coordinate image and the angle value of the photoacoustic endoscopy polar coordinate image are combined to perform scanning to obtain the photoacoustic endoscopy rectangular coordinate image.

[0051] First, a summary of this embodiment is given. A row scan of a rectangular coordinate image is started to obtain rectangular coordinates through the row scan. According to the polar coordinate address corresponding to the inverse index of the rectangular coordinate, all the DDR partition data where the polar coordinates are located is taken out through the polar coordinate address and stored in RAM1. When the data scanned again is located in another DDR partition, all the data in this partition is taken out and stored in RAM2. The operation is repeated until four RAMs are full.

[0052] Furthermore, in the present embodiment, the original photoacoustic endoscopic polar coordinate image adopts three-frame caching. When the third frame is cached, the first frame is subjected to data scan conversion, and after completion, it is continuously burst-stored in the DDR again; when the scan conversion of the first frame of the original endoscopic polar coordinate image is completed, the data caching of the third frame of the original photoacoustic endoscopic polar coordinate image is completed, and the DDR is read and written alternately to ensure the parallelism of data processing.

[0053] According to the polar coordinate address corresponding to the inverse index of the rectangular coordinate, first use the rectangular coordinate to polar coordinate formula to obtain the polar coordinate. The formula is:

[0054]

[0055] In the above formula, r represents the radius of the photoacoustic endoscopy polar coordinate image, θ represents the angle value of the photoacoustic endoscopy polar coordinate image, and x and y represent the row coordinate and column coordinate of the rectangular coordinate, respectively.

[0056] Further, it should be noted that the corresponding radius and angle values ​​are obtained in real time in FPGA through the cordic algorithm, wherein the cordic algorithm specifically converts the rectangular coordinates obtained by the row scan into polar coordinates according to the coordinate conversion formula, the radius maps the row coordinates of the original photoacoustic endoscopy polar coordinate image, θ(x, y)*clos / 2π maps the column coordinates of the original photoacoustic endoscopy polar coordinate image, clos is the number of columns of the original photoacoustic endoscopy polar coordinate image, and θ(x, y) represents the angle value of converting the rectangular coordinates into polar coordinates;

[0057] like Figure 4As shown, it is a schematic diagram of the digital scan conversion processing of the original photoacoustic endoscopy polar coordinate image in this embodiment, wherein the original photoacoustic endoscopy polar coordinate image is divided into 16 blocks according to rows and stored in the DDR, and the original column data is used as the radius, and the original polar coordinate data is evenly distributed on the circumference of the new image, and the angle interval of each column data is 360 degrees / rows. The position greater than the radius from the center is directly assigned a value of zero, and the original polar coordinate column data is distributed on the circumference of the new rectangular coordinate circle, and there is an interval between each column data. Bilinear interpolation is performed on the intervals between columns to smooth the image. The original photoacoustic endoscopy polar coordinate image is an image of rows*clos size, and becomes an image of (2*clos-1)*(2*clos-1) size after polar coordinate rotation.

[0058] When the polar coordinate radius is greater than the original photoacoustic endoscopy polar coordinate image column length, the value here is assigned to zero. When the polar coordinate radius is less than the original endoscopy imaging data column length, all the data of the DDR partition where the polar coordinate is located is taken out through the polar coordinate address and stored in the corresponding external RAM. When the polar coordinate address is located in the next partition, the DDR corresponding partition module is burst read again to store the corresponding data in the next RAM. Repeat the operation until four RAMs are full. If the fifth to eighth partitions appear, the four RAMs are used alternately to temporarily store the original photoacoustic endoscopy polar coordinate images.

[0059] The original photoacoustic endoscopy polar coordinate image is stored in 16 DDR partitions according to the blocks. When performing digital scan conversion, the original blocks of up to 8 partitions will be crossed. In this embodiment, by defining RAM1, RAM2, RAM3, and RAM4 to alternately store the original photoacoustic endoscopy polar coordinate image taken out from DDR in a burst, it can meet the situation that the row scan spans up to 8 partitions, and make full use of the burst transmission of DDR.

[0060] In addition, it should be noted that the cordic algorithm is an optimized pure RTL implementation code, not an IP module that comes with the FPGA development tool.

[0061] S300, performing inverse indexing on the original photoacoustic endoscopy polar coordinate image in the RAM memory according to the photoacoustic endoscopy rectangular coordinate image, to obtain RAM memory inverse index data;

[0062] Specifically, according to the photoacoustic endoscopy rectangular coordinate image, the original photoacoustic endoscopy polar coordinate image in the RAM memory is inversely indexed. When the inverse indexed data is not in the RAM memory, the corresponding DDR memory partition is accessed according to the polar coordinate address and the corresponding data is taken out, overwriting the data in the RAM memory, and then inverse indexing is performed to obtain the RAM memory inverse index data.

[0063] In this embodiment, when the rectangular coordinate image is scanned row by row, the data in the four RAMs are respectively inversely indexed according to the rectangular coordinates obtained by the row scanning. When the inversely indexed data is not in the four RAMs, the corresponding DDR partition is accessed according to the polar coordinate address and the corresponding data is taken out, the data in the RAM is overwritten, and the data in the RAM is inversely indexed again. The operation is repeated until the rectangular coordinate image row scanning is completed, and the original photoacoustic endoscopy polar coordinate image is converted into a rectangular coordinate image.

[0064] like Figure 5 As shown, it is a schematic diagram of the reverse index of the digital scan conversion address of this embodiment, wherein when the DDR partition cache starts to cache the third frame of the original endoscopic polar coordinate image, the row scan is started, and the rectangular coordinates of the row and column are counted by the row scan, and the polar coordinates corresponding to the rectangular coordinates are obtained by the reverse index to map the original photoacoustic endoscopic polar coordinate image coordinates, wherein the polar diameter of the polar coordinates maps the row coordinates of the original photoacoustic endoscopic polar coordinate image, and θ(x, y)*clos / 2π maps the column coordinates of the original photoacoustic endoscopic polar coordinate image, wherein clos is the column length of the original photoacoustic endoscopic polar coordinate image. After the original photoacoustic endoscopic polar coordinate image is obtained, all the data of the partition corresponding to the DDR is burst-transferred and stored in the RAM. If the reverse index has the coordinates, the data is directly read from the RAM, and the coordinates without the reverse index are retrieved from the DDR through burst transmission, which greatly reduces the number of burst transmissions of the DDR and improves the utilization efficiency of the DDR bandwidth.

[0065] S400, performing bilinear interpolation processing and FIFO three-line buffer processing on the RAM memory inverse index data to obtain a conversion result of the photoacoustic endoscopy image.

[0066] Specifically, bilinear interpolation is performed on the inverse index data of the RAM memory, and the interpolation results are stored in other partitions of the DDR memory in row arrangement; coordinate conversion is performed on the interpolation results in the DDR3 memory and stored in other partitions of the RAM memory; the interpolation results after conversion stored in the RAM memory are taken out in bursts and cached in three rows of the FIFO, and the coordinates of the blank positions between the polar coordinate conversion column data are bilinearly interpolated to obtain image data after bilinear interpolation; the image data after bilinear interpolation is cached across the clock domain through the FIFO, and stored in other partitions of the DDR memory according to the three-frame cache method to obtain the conversion result of the photoacoustic endoscopic image.

[0067] In this embodiment, the data obtained by the inverse index RAM is bilinearly interpolated and stored again in other partitions of the DDR according to row arrangement; the three frames of cached original photoacoustic endoscopy polar coordinate images are converted into rectangular coordinate images in step S200 and then stored in other partitions of the DDR. At this time, no partition processing is performed and they are stored continuously according to the address.

[0068] The endoscopic image is converted into a rectangular coordinate image and stored in the DDR, and then the FIFO three-line cache is performed according to the burst fetching, and the blank coordinate position of the original photoacoustic endoscopic polar coordinate image converted into the rectangular coordinate image is bilinearly interpolated; specifically: the endoscopic image is converted into a rectangular coordinate image and stored in the DDR, and the data is cached in three lines using the FIFO, and the blank position coordinates between the polar coordinate conversion column data are bilinearly interpolated, so that the converted image is smoother and the image edge jagged problem is reduced.

[0069] The image data obtained through bilinear interpolation is cached across clock domains through FIFO, and then stored in other partitions of DDR in a three-frame cache manner, and finally the endoscopic image data is output to an external device.

[0070] Reference Figure 2 , an endoscopic imaging digital scan conversion system based on FPGA, comprising:

[0071] The first module 201 is used to obtain the original photoacoustic endoscopy polar coordinate image and perform partition processing and store it in the DDR3 memory;

[0072] The second module 202 is used to scan the original photoacoustic endoscopy polar coordinate image in the DDR3 memory and store it in the RAM memory based on the cordic algorithm to obtain the photoacoustic endoscopy rectangular coordinate image;

[0073] The third module 203 is used to perform inverse indexing on the original photoacoustic endoscopy polar coordinate image in the RAM memory according to the photoacoustic endoscopy rectangular coordinate image to obtain RAM memory inverse index data;

[0074] The fourth module 204 is used to perform bilinear interpolation processing and FIFO three-line buffer processing on the RAM memory inverse index data to obtain a conversion result of the photoacoustic endoscopic image.

[0075] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0076] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A digital scan conversion method for endoscopy imaging based on FPGA, characterized in that: The following steps are involved: Obtain the original photoacoustic endoscopy polar coordinate image and perform partition processing and store it in DDR3 memory; Based on the cordic algorithm, the original photoacoustic endoscopy polar coordinate image in the DDR3 memory is scanned and stored in the RAM memory to obtain the photoacoustic endoscopy rectangular coordinate image; According to the photoacoustic endoscopy rectangular coordinate image, the original photoacoustic endoscopy polar coordinate image in the RAM memory is inversely indexed to obtain RAM memory inverse index data; The RAM memory inverse index data is processed by bilinear interpolation and FIFO three-line buffering to obtain the conversion result of the photoacoustic endoscopic image.

2. The FPGA-based endoscopic imaging digital scan conversion method according to claim 1, characterized in that: The step of obtaining the original photoacoustic endoscopy polar coordinate image and performing partition processing and storing it in the DDR3 memory specifically includes: Acquire original photoacoustic endoscopic polar coordinate images through a photoacoustic imaging system; Partitioning the original photoacoustic endoscopy polar coordinate image into 16 equally divided photoacoustic endoscopy polar coordinate images according to a preset number of rows; The 16 equally divided photoacoustic endoscopic polar coordinate images are stored in the DDR3 memory through a three-frame buffering method.

3. The FPGA-based endoscopic imaging digital scan conversion method according to claim 2, characterized in that: The step of scanning the original photoacoustic endoscopy polar coordinate image in the DDR3 memory and storing it in the RAM memory based on the cordic algorithm to obtain the photoacoustic endoscopy rectangular coordinate image specifically includes: Scan the photoacoustic endoscopy polar coordinate image in the DDR3 memory by using a coordinate conversion formula to obtain the radius and angle of the photoacoustic endoscopy polar coordinate image; According to the radius of the photoacoustic endoscopy polar coordinate image, the photoacoustic endoscopy polar coordinate image in the DDR3 memory is temporarily stored in the RAM memory; Based on the photoacoustic endoscopy polar coordinate image in the RAM memory, scanning is performed in combination with the radius of the photoacoustic endoscopy polar coordinate image and the angle value of the photoacoustic endoscopy polar coordinate image to obtain the photoacoustic endoscopy rectangular coordinate image.

4. The FPGA-based endoscopic imaging digital scan conversion method according to claim 3, characterized in that: The coordinate conversion formula is specifically expressed as follows: In the above formula, r represents the radius of the photoacoustic endoscopy polar coordinate image, θ represents the angle value of the photoacoustic endoscopy polar coordinate image, and x and y represent the row coordinate and column coordinate of the rectangular coordinate, respectively.

5. The FPGA-based endoscopic imaging digital scan conversion method according to claim 4, characterized in that: The radius of the photoacoustic endoscopic polar coordinate image maps to the row coordinate of the original photoacoustic endoscopic polar coordinate image, and the angle value of the photoacoustic endoscopic polar coordinate image maps to the column coordinate of the original photoacoustic endoscopic polar coordinate image.

6. The FPGA-based endoscopic imaging digital scan conversion method according to claim 5, characterized in that: The step of temporarily storing the photoacoustic endoscopy polar coordinate image in the DDR3 memory to the RAM memory according to the radius of the photoacoustic endoscopy polar coordinate image specifically includes: If the radius of the photoacoustic endoscopic polar coordinate image is greater than the original photoacoustic endoscopic polar coordinate image column length, it is assigned a value of zero; If the radius of the photoacoustic endoscopy polar coordinate image is smaller than the original photoacoustic endoscopy polar coordinate image column length, all the DDR partition data where the polar coordinates are located is retrieved through the polar coordinate address and stored in the corresponding external RAM memory; When the polar coordinate address is located in the next partition, the DDR corresponding partition module is burst read again to store the corresponding data in the next RAM memory, and the operation is repeated until the preset number of RAM memories are filled.

7. The FPGA-based endoscopic imaging digital scan conversion method according to claim 6, characterized in that: The step of performing inverse indexing on the original photoacoustic endoscopy polar coordinate image in the RAM memory according to the photoacoustic endoscopy rectangular coordinate image to obtain the RAM memory inverse index data specifically includes: According to the photoacoustic endoscopy rectangular coordinate image, the original photoacoustic endoscopy polar coordinate image in the RAM memory is inversely indexed. When the inverse indexed data is not in the RAM memory, the corresponding DDR memory partition is accessed according to the polar coordinate address and the corresponding data is taken out, overwriting the data in the RAM memory, and then inverse indexing is performed to obtain the RAM memory inverse index data.

8. The FPGA-based endoscopic imaging digital scan conversion method according to claim 7, characterized in that: The step of performing bilinear interpolation processing and FIFO three-line buffer processing on the RAM memory inverse index data to obtain the conversion result of the photoacoustic endoscopic image specifically includes: Perform bilinear interpolation on the RAM memory inverse index data, and store the interpolation results in other partitions of the DDR memory in row arrangement; Perform coordinate transformation on the interpolation results in the DDR3 memory and store them in other partitions of the RAM memory; The converted interpolation results stored in the RAM memory are taken out in bursts for three-row FIFO buffering, and the blank position coordinates between the polar coordinate conversion column data are bilinearly interpolated to obtain the image data after bilinear interpolation; The bilinear interpolated image data is cached across clock domains through FIFO, and stored in other partitions of DDR memory according to the three-frame cache method to obtain the conversion result of the photoacoustic endoscopic image.

9. An endoscopic imaging digital scan conversion system based on FPGA, characterized in that: Includes the following modules: The first module is used to obtain the original photoacoustic endoscopy polar coordinate image and perform partition processing and store it in the DDR3 memory; The second module is used to scan the original photoacoustic endoscopy polar coordinate image in the DDR3 memory and store it in the RAM memory based on the cordic algorithm to obtain the photoacoustic endoscopy rectangular coordinate image; The third module is used to perform inverse indexing on the original photoacoustic endoscopy polar coordinate image in the RAM memory according to the photoacoustic endoscopy rectangular coordinate image to obtain the RAM memory inverse index data; The fourth module is used to perform bilinear interpolation processing and FIFO three-line cache processing on the RAM memory inverse index data to obtain the conversion result of the photoacoustic endoscopic image.

Citation Information

Patent Citations

  • Method and system used for achieving ultrasound digital scanning conversion based on dynamic random access memory (DRAM)

    CN103027707A

  • Labview-platform-based ultrasound endoscopic imaging device and method

    CN109276276A

  • Myoelectricity data identification system and method applied to DDR3 memory

    CN116439731A

  • LVDS-DVI video protocol conversion method and system

    CN117615208A

  • Scan conversion for ultrasonic imaging and apparatus using the same

    US20090062649A1