A method, system and medium for improving the frame rate of an X-ray detector
Through the dynamic compression algorithm and the image comparison compression algorithm, the problems of hardware cost and image transmission bandwidth when increasing the frame rate of X-ray flatbed detectors are solved, and efficient frame rate improvement and image quality retention are achieved.
Patent Information
- Application Number
- CN202411080338.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-08
AI Technical Summary
When increasing the frame rate, existing X-ray flat panel detectors need to increase hardware cost and complexity, and the image transmission bandwidth is huge, making it difficult to meet the needs of high frame rate, resulting in limited diagnostic efficiency and image quality.
The dynamic compression algorithm and the inter-image comparison compression algorithm are used to compress multiple frames of images into a small number of compressed images. Through dynamic acquisition and inter-image comparison processing, the imaging frame rate of the detector is significantly improved, avoiding hardware updates, and only software firmware updates are required.
It significantly improves the imaging and image production frame rate of the detector, reduces hardware costs, ensures image quality, does not lose any image information, and has a wide range of applications.
Smart Images

Figure CN118612370B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image compression technology, and in particular to a method, system and medium for improving the frame rate of an X-ray detector. Background Art
[0002] X-ray flat panel detectors play a key role in fields such as medical imaging and industrial non-destructive testing. They are used to capture X-rays that pass through the human body or objects and convert them into digital images. Frame rate is an important indicator to measure the performance of X-ray flat panel detectors. Frame rate, usually expressed in fps (frames per second), refers to the number of images that the X-ray flat panel detector can capture and process per second. In short, it is the working speed of the detector or the imaging speed. In dynamic imaging applications, high frame rate is crucial in application scenarios that require continuous imaging, such as cardiovascular angiography, gastrointestinal angiography, or dynamic bone assessment. It ensures that doctors or technicians can clearly observe the continuous changes of fast-moving organs or structures, improving the accuracy and timeliness of diagnosis. In terms of reducing motion blur, high frame rate can effectively reduce image blur caused by the object being examined or physiological movement (such as heart beating, breathing movement), thereby obtaining clearer and more accurate images, which is especially important for the observation of fine structures. In a busy clinical environment, high frame rate detectors can shorten examination time and increase patient throughput, while also reducing the accumulation of radiation dose caused by repeated shooting. In situations where dynamic video needs to be generated, higher frame rates can provide smoother and more natural visual effects, helping doctors analyze functional and dynamic information.
[0003] Take the mainstream X-ray flat panel detectors at home and abroad as an example: under the condition of 43cm*43cm in size and 3072*3072 pixels of amorphous silicon TFT, the size of each picture is 18.874MByte, at 30fps, that is, 30 images per second, which means that 18.874MByte*30=566.23MByte needs to be generated and transmitted per second, which is approximately equal to 4.5298Gbit / s when converted into bits. This is undoubtedly a very huge amount of data. In order to transmit such a large amount of data, a 10G Ethernet communication interface with a bandwidth of 10G must be used, and in order to increase the frame rate to a higher level, 2*2, 3*3 binning image compression can only be performed at the expense of resolution. In order to achieve high frame rate, the current technical solution requires customized double-sided readout amorphous silicon TFTs with higher cost, double the number of AFE analog front-end chips, and 10G SFP+ optical fiber interface of 10G Ethernet to ensure high frame rate. In summary, the existing technical solutions have very high hardware cost and hardware complexity. Effective technical solutions are urgently needed to address the above problems. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, system and medium for improving the frame rate of an X-ray detector. By compressing a number of single-frame images into N compressed images in sequence based on a dynamic compression algorithm and an image comparison compression algorithm, the imaging and output frame rate of the detector can be significantly improved. The scope of application is very wide, and the image quality can be maintained without losing any image information.
[0005] The embodiment of the present application also provides a method for improving the frame rate of an X-ray detector, comprising:
[0006] receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and dividing the X-ray image into single frames to obtain a plurality of single-frame images;
[0007] Sort a number of single-frame images according to acquisition time nodes to obtain an image combination, where the image combination includes a first frame image, a second frame image, a third frame image, ... an Nth frame image, where N is a positive integer;
[0008] Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image;
[0009] Compare and compress the previous frame image with the current frame image based on the image comparison compression algorithm to obtain a primary compression result, and perform secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image, and ... an N frame image corresponding to the second frame to the Nth frame;
[0010] The generated N compressed images are transmitted to the host computer for storage.
[0011] Optionally, in the method for improving the frame rate of an X-ray detector described in an embodiment of the present application, receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and segmenting the X-ray image into single frames to obtain a plurality of single frame images specifically includes:
[0012] According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image;
[0013] The lower computer collects X-ray images to obtain video clips, and the video clips are segmented according to video frames to obtain single-frame images.
[0014] Optionally, in the method for improving the frame rate of an X-ray detector described in an embodiment of the present application, setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing a first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image specifically includes:
[0015] The compression window size is set, and the lower computer starts to collect the first frame of image, and performs compression processing while collecting according to the compression window size to obtain the first compressed image;
[0016] After the first frame of image is acquired, the original image before compression is saved;
[0017] The host computer generates a transmission instruction, transmits the first compressed image based on the transmission instruction, and analyzes the transmission response status;
[0018] If the host computer completes the response, the first compressed image is transmitted to the host computer, and the host computer marks the first compressed image transmitted this time and saves it.
[0019] Optionally, in the method for improving the frame rate of the X-ray detector described in the embodiment of the present application, the previous frame image is compared and compressed with the current frame image based on the image comparison compression algorithm to obtain a compression result, which specifically includes:
[0020] The second frame of image is collected, and compared and compressed with the first frame of image according to the size of the compression window;
[0021] After the second frame of image is acquired, the uncompressed original image of the second frame of image is saved and replaces the first frame of image, and is used for comparison and compression of the third frame of image;
[0022] The third frame image, the fourth frame image to the Nth frame image are compressed and transmitted in the same way to obtain all the compression results.
[0023] Optionally, in the method for improving the frame rate of an X-ray detector described in an embodiment of the present application, performing secondary compression on the primary compression result according to the pixel data information specifically includes:
[0024] Obtain pixel data information, compare the pixel data information with set standard pixel information, and obtain a pixel deviation rate;
[0025] Determining whether the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold;
[0026] If the pixel deviation rate is greater than or equal to the set pixel deviation rate threshold, then generating adjustment information, and correcting the pixel data error according to the adjustment information;
[0027] If the pixel deviation rate is less than the set pixel deviation rate threshold, the first compression result is compressed twice.
[0028] Optionally, in the method for improving the frame rate of the X-ray detector described in the embodiment of the present application, after the generated N compressed images are transmitted to the host computer for storage, the method further includes:
[0029] Receive a decompression instruction, and based on the decompression instruction, control the host computer to receive the first frame image to decompress the data in the window, obtain the original image of the first frame image, and save it as a decompression standard comparison image;
[0030] The host computer receives the second frame image, decompresses the data in the window according to the window size, obtains the decompression result, compares the decompression result with the first frame image, performs secondary decompression, obtains the complete original image of the second frame image, replaces the original image of the first frame image, and saves it as the standard comparison image;
[0031] The host computer receives the third frame image, and repeats the processing method of the second frame image, and replaces the previous decompression standard comparison image with the obtained complete original image of the third frame image, and decompresses all single frame image information in the same way.
[0032] In a second aspect, an embodiment of the present application provides a system for improving a frame rate of an X-ray detector, the system comprising: a memory and a processor, the memory comprising a program of a method for improving a frame rate of an X-ray detector, and the program of the method for improving a frame rate of an X-ray detector, when executed by the processor, implements the following steps:
[0033] receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and dividing the X-ray image into single frames to obtain a plurality of single-frame images;
[0034] Sort a number of single-frame images according to acquisition time nodes to obtain an image combination, where the image combination includes a first frame image, a second frame image, a third frame image, ... an Nth frame image, where N is a positive integer;
[0035] Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image;
[0036] Compare and compress the previous frame image with the current frame image based on the image comparison compression algorithm to obtain a primary compression result, and perform secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image, and ... an N frame image corresponding to the second frame to the Nth frame;
[0037] The generated N compressed images are transmitted to the host computer for storage.
[0038] Optionally, in the system for improving the frame rate of an X-ray detector described in an embodiment of the present application, receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and segmenting the X-ray image into single frames to obtain a plurality of single frame images specifically includes:
[0039] According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image;
[0040] The lower computer collects X-ray images to obtain video clips, and the video clips are segmented according to video frames to obtain single-frame images.
[0041] Optionally, in the system for improving the frame rate of an X-ray detector described in an embodiment of the present application, setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing a first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image specifically includes:
[0042] The compression window size is set, and the lower computer starts to collect the first frame of image, and performs compression processing while collecting according to the compression window size to obtain the first compressed image;
[0043] After the first frame of image is acquired, the original image before compression is saved;
[0044] The host computer generates a transmission instruction, transmits the first compressed image based on the transmission instruction, and analyzes the transmission response status;
[0045] If the host computer completes the response, the first compressed image is transmitted to the host computer, and the host computer marks the first compressed image transmitted this time and saves it.
[0046] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a method program for improving the frame rate of an X-ray detector. When the method program for improving the frame rate of an X-ray detector is executed by a processor, the steps of the method for improving the frame rate of an X-ray detector as described in any one of the above items are implemented.
[0047] As can be seen from the above, the embodiment of the present application provides a method, system and medium for improving the frame rate of an X-ray detector, by receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, dividing the X-ray image into single frames, and obtaining a plurality of single-frame images; sorting the plurality of single-frame images according to the acquisition time node to obtain an image combination, wherein the image combination includes a first frame image, a second frame image, a third frame image...an N-th frame image; setting compression window parameters to obtain pixel data information within the window, dynamically compressing the first frame image within the compression window based on a dynamic compression algorithm to obtain a first compressed image; comparing and compressing the previous frame image with the current frame image based on an inter-image comparison compression algorithm to obtain a primary compression result, performing secondary compression on the primary compression result according to the pixel data information, and generating a second frame compressed image, a third frame compressed image...an N-th frame image corresponding to the second frame to the N-th frame in a one-to-one manner; transmitting the generated N compressed images to a host computer for storage; the present invention can significantly improve the imaging and image output frame rate of the detector, has a very wide range of application, and can achieve image quality without losing any image information. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A flowchart of a method for improving the frame rate of an X-ray detector provided in an embodiment of the present application,
[0050] Figure 2 A flow chart of a single frame segmentation method for an X-ray image according to a method for improving the frame rate of an X-ray detector provided in an embodiment of the present application;
[0051] Figure 3 A flow chart of a first compressed image acquisition method for improving the frame rate of an X-ray detector provided in an embodiment of the present application;
[0052] Figure 4 A flowchart of a method for improving the frame rate of an X-ray detector provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of a compression algorithm within a compression window of a method for improving the frame rate of an X-ray detector provided in an embodiment of the present application;
[0054] Figure 6 A schematic diagram of an inter-image compression algorithm for a method of improving the frame rate of an X-ray detector provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0056] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0057] Please refer to Figure 1 and Figure 4 As shown, the method for improving the frame rate of the X-ray detector is used in a terminal device, and the method for improving the frame rate of the X-ray detector includes the following steps:
[0058] S101, receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and segmenting the X-ray image into single frames to obtain a plurality of single-frame images;
[0059] S102, sorting a plurality of single-frame images according to acquisition time nodes to obtain an image combination, wherein the image combination includes a first frame image, a second frame image, a third frame image, ... an Nth frame image, where N is a positive integer;
[0060] S103, setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image;
[0061] S104, comparing and compressing the previous frame image with the current frame image based on an inter-image comparison compression algorithm to obtain a primary compression result, and performing secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image, and ... an N frame image corresponding to the second frame to the Nth frame;
[0062] S105, transmitting the generated N compressed images to a host computer for storage.
[0063] It should be noted that the present invention is based on the combination of a dynamic compression algorithm and an image contrast compression algorithm. It does not require any hardware updates (including changes to the communication interface and the number of photosensitive devices). It only requires updating the software firmware to achieve a significant increase in the frame rate, which can save a lot of costs for tablet products.
[0064] Please refer to Figure 2 As shown, according to an embodiment of the present invention, receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and segmenting the X-ray image into single frames to obtain a plurality of single frame images, specifically includes:
[0065] S201, according to the upper computer receiving the dynamic acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image;
[0066] S202, based on the lower computer collecting X-ray images to obtain video clips, the video clips are segmented according to video frames to obtain single frame images.
[0067] Specifically, Figure 5 As shown, it is assumed that the image resolution is 8*8.
[0068] [0x2018,0x2064,0x2064,0x206e,0x206e,0x209c,0x20a9,0x20d3]
[0069] [0x20cc,0x20a7,0x20c4,0x206e,0x206e,0x209c,0x20a9,0x20d3]
[0070] [0x20cc,0x20a7,0x20c4,0x20ef,0x20c8,0x20f3,0x20ed,0x20ea]
[0071] [0x20ee,0x20d2,0x20ea,0x2113,0x2108,0x210e,0x210f,0x2121]
[0072] [0x2123,0x2132,0x211a,0x2149,0x2146,0x2152,0x2140,0x213c]
[0073] [0x214e,0x2146,0x214c,0x2137,0x211f,0x2113,0x210c,0x2103]
[0074] [0x20ff,0x2118,0x2124,0x20ee,0x20c8,0x20df,0x20d8,0x20d5]
[0075] [0x20c6,0x20c6,0x20f6,0x2118,0x210d,0x2121,0x2118,0x211b]
[0076] Set the window size to 8. The first to enter the compression window is
[0077] [0x2018, 0x2064, 0x2064, 0x206e, 0x206e, 0x209c, 0x20a9, 0x20d3], the minimum value 0x2018 is obtained, and the new sequence is obtained after substituting it into the difference formula:
[0078] [0x00,0x4c,0x4c,0x56,0x56,0x84,0x91,0xbb]
[0079] The maximum value is 0xBB, so we get the compression table 20bit = [7,0x2018] = 0b01110010000000011000;
[0080] So we get the final window compressed data set:
[0081] [0x72018,0x00,0x4c,0x4c,0x56,0x56,0x84,0x91,0xbb]. Compared with the data set before compression, the compression ratio is 65%. In actual use, the compression ratio will be further improved because the window is larger and there are more pixels.
[0082] The subsequent data can be deduced in this way to obtain the final image compressed data set:
[0083] [0x72018,0x0,0x4C,0x4C,0x56,0x56,0x84,0x91,0xBB]
[0084] [0x6206E,0x5E,0x39,0x56,0x0,0x0,0x2E,0x3B,0x65]
[0085] [0x620A7,0x25,0x0,0x1D,0x48,0x21,0x4C,0x46,0x43]
[0086] [0x620D2,0x1C,0x0,0x18,0x41,0x36,0x3C,0x3D,0x4F]
[0087] [0x5211A,0x9,0x18,0x0,0x2F,0x2C,0x38,0x26,0x22]
[0088] [0x62103,0x4B,0x43,0x49,0x34,0x1C,0x10,0x9,0x0]
[0089] [0x620C8,0x37,0x50,0x5C,0x26,0x0,0x17,0x10,0xD]
[0090] [0x620C6,0x0,0x0,0x30,0x52,0x47,0x5B,0x52,0x55].
[0091] Receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, segmenting the X-ray image into single frames, and obtaining a plurality of single-frame images, further comprising:
[0092] According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image;
[0093] Randomly obtain two frames of images, analyze the similarity between the two frames of images, and determine whether the similarity is greater than or equal to a set similarity threshold;
[0094] If it is greater than or equal to the set similarity threshold, the video segment between the two frames of images is taken as the target segmentation segment, the boundary frame is set according to the target segmentation segment, and the initial boundary frame and the end boundary frame are set according to the boundary frame;
[0095] According to the initial boundary frame and the end boundary frame, a single frame image in the target segmentation segment is obtained in sequence;
[0096] If it is less than the set similarity threshold, the two frames of images are randomly selected again.
[0097] It should be noted that by analyzing the boundary frames of the collected X-ray images, removing repeated video segments, setting the initial boundary frame and the end boundary frame of the target segmented segment according to the time node, and performing single-frame segmentation between the initial boundary frame and the end boundary frame, an accurate and non-repetitive single-frame image is obtained.
[0098] Please refer to Figure 3 As shown, Figure 3 is a flow chart of a method for obtaining a first compressed image in some embodiments of the present application. According to an embodiment of the present invention, setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image specifically includes:
[0099] S301, setting the compression window size, the lower computer starts to collect the first frame of image, and performs compression processing while collecting according to the compression window size to obtain a first compressed image;
[0100] S302, after the first frame of image is acquired, the original image before compression is saved;
[0101] S303, the host computer generates a transmission instruction, transmits the first compressed image based on the transmission instruction, and analyzes the transmission response status;
[0102] S304: If the host computer completes the response, the first compressed image is transmitted to the host computer, and the host computer marks the first compressed image transmitted this time and saves it.
[0103] According to an embodiment of the present invention, a previous frame image is compared and compressed with a current frame image based on an inter-image comparison compression algorithm to obtain a compression result, which specifically includes:
[0104] The second frame of image is collected, and compared and compressed with the first frame of image according to the size of the compression window;
[0105] After the second frame of image is acquired, the uncompressed original image of the second frame of image is saved and replaces the first frame of image, and is used for comparison and compression of the third frame of image;
[0106] The third frame image, the fourth frame image to the Nth frame image are compressed and transmitted in the same way to obtain all the compression results.
[0107] It should be noted that if Figure 6 As shown, the principle of the image contrast compression algorithm is as follows: according to the characteristics of X-ray images, when dynamically shooting X-ray images, a large number of images are continuously shot at a certain frame rate, and these images are often shot at different angles of a target object. The similarity between all images is very large, and the background environment of the images is basically very similar. Based on such characteristics, an image contrast compression algorithm is designed.
[0108] Specifically, the specific steps of the image comparison compression algorithm are as follows:
[0109] After the first image is acquired, the original value of the image is used as the compression ratio to cache the graph Dx;
[0110] After acquiring the next image Ex, subtract the compressed comparison image from the next image to generate a new image compression data image Fx = Ex-Dx; Dx, each pixel value of Ex is a 16-bit unsigned integer value, and Fx represents the subtraction of two images to generate positive and negative signs. Each pixel value of Fx becomes 17 bits, and the highest bit is the sign bit;
[0111] Fx will expand the data by X bits relative to Ex, but will not lead to a decrease in compression efficiency, because the subsequent dynamic compression algorithm of the image in the window will eliminate this sign bit.
[0112] According to an embodiment of the present invention, performing secondary compression on a primary compression result according to pixel data information specifically includes:
[0113] Obtain pixel data information, compare the pixel data information with set standard pixel information, and obtain a pixel deviation rate;
[0114] Determine whether the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold;
[0115] If the pixel deviation rate is greater than or equal to the set pixel deviation rate threshold, then generating adjustment information, and correcting the pixel data error according to the adjustment information;
[0116] If the pixel deviation rate is less than the set pixel deviation rate threshold, the first compression result is compressed twice.
[0117] It should be noted that by analyzing the abnormal deviation information of the pixel data information, the pixel deviation rate is obtained, and it is analyzed whether the pixel deviation rate meets the requirements, so as to dynamically adjust the pixel data error according to the analysis result.
[0118] According to an embodiment of the present invention, after the generated N compressed images are transmitted to a host computer for storage, the method further includes:
[0119] Receive a decompression instruction, and based on the decompression instruction, control the host computer to receive the first frame image to decompress the data in the window, obtain the original image of the first frame image, and save it as a decompression standard comparison image;
[0120] The host computer receives the second frame image, decompresses the data in the window according to the window size, obtains the decompression result, compares the decompression result with the first frame image, performs secondary decompression, obtains the complete original image of the second frame image, replaces the original image of the first frame image, and saves it as the standard comparison image;
[0121] The host computer receives the third frame image, and repeats the processing method of the second frame image, and replaces the previous decompression standard comparison image with the obtained complete original image of the third frame image, and decompresses all single frame image information in the same way.
[0122] It should be noted that, in the process of parsing the compressed image, the data in the window is decompressed according to the window size and compared with the corresponding frame image, thereby achieving secondary decompression and improving the decompression accuracy.
[0123] According to the embodiment of the present invention, the principle of the dynamic compression algorithm of the image in the window is as follows: according to the characteristics of X-ray images, the grayscale values of pixels in a large number of line segments are very similar, because the size of the TFT pixels used in medical images is very small relative to the contents photographed, so the grayscale changes in the same area are mostly very slow. In X-ray shooting, the contents generally only occupy a part of the screen, and most of the image content is the background part, and the grayscale values of a large number of background parts are very similar. Therefore, based on the above image characteristics, the mathematical (frame of refraction) compression algorithm is borrowed, and it is improved and compressed multiple times by adding more references, and a differential array is constructed on the basis of the original sequence.
[0124] Specifically, k is added to the elements of the interval [L,R] [L,R] [L,R], where k is a selected constant and can be any value.
[0125] The difference array d[L]=kd[L]+k; d[L+1]=kd[L+1]+k; ...; d[R]= kd[R]+k; kd[L,R] is the value stored and transmitted after compression.
[0126] k is saved as the prefix part of the compressed data in the interval in a certain format. After the host computer obtains the data sequence, the differential array calculates the prefix part and restores the updated sequence.
[0127] Furthermore, the steps of the dynamic compression algorithm of the image in the window are as follows:
[0128] First, set up an image data window. The width of the window is generally selected as a common divisor of the total amount of image data. For example, a flat-panel detector with 1280*1024 pixels generally chooses a window of 1280 or 640, 320, or 160. The selection of the window width should also be based on the processing power of the actual device software, cache size and other factors. In theory, different window sizes will have different compression rates for different types of images, so the window size is generally flexibly selected by the user.
[0129] Move the pixel data sequence into the window, set the window size to x, record the data set in the window at this time as Vx, start compression after the window data is full, and establish a 24-bit window compression reference table;
[0130] Find the minimum data in the window, keep the data unchanged, and put the minimum data into the high 16 bits of the compression reference table;
[0131] Starting from the first pixel data in the window, store the difference between the first pixel data and the minimum data, that is, B(n) = V(n) - V(min), and get a new data set Bx; where B(n) represents the data after difference, V(n) represents the original data before difference, V(min) represents the data with the smallest grayscale value in the entire window, and n represents the Nth pixel value.
[0132] The largest number in the statistical data set Bx is taken modulo to obtain the number of bits K that the maximum data value needs to occupy. Since the maximum pixel grayscale value is 65535, the maximum K value is 16. Then subtract 1 from the K value, so the K value itself occupies a maximum of 4 bits. After calculating the K value, store it in the last 4 bits of the window compression reference table;
[0133] The window compression reference table (20 bit = 16 bit + 4 bit) and the data set Bx are combined to form a compressed data set Cx of the image data in the window.
[0134] In a second aspect, an embodiment of the present application provides a system for improving a frame rate of an X-ray detector, the system comprising: a memory and a processor, the memory comprising a program of a method for improving a frame rate of an X-ray detector, and when the program of the method for improving a frame rate of an X-ray detector is executed by the processor, the following steps are implemented:
[0135] receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and dividing the X-ray image into single frames to obtain a plurality of single-frame images;
[0136] Sort a number of single-frame images according to acquisition time nodes to obtain an image combination, where the image combination includes a first frame image, a second frame image, a third frame image, ... an Nth frame image, where N is a positive integer;
[0137] Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image;
[0138] Compare and compress the previous frame image with the current frame image based on the image comparison compression algorithm to obtain a primary compression result, and perform secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image, and ... an N frame image corresponding to the second frame to the Nth frame;
[0139] The generated N compressed images are transmitted to the host computer for storage.
[0140] It should be noted that the present invention is based on the combination of a dynamic compression algorithm and an image contrast compression algorithm. It does not require any hardware updates (including changes to the communication interface and the number of photosensitive devices). It only requires updating the software firmware to achieve a significant increase in the frame rate, which can save a lot of costs for tablet products.
[0141] According to an embodiment of the present invention, receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and segmenting the X-ray image into single frames to obtain a plurality of single frame images specifically includes:
[0142] According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image;
[0143] The lower computer collects X-ray images to obtain video clips, and the video clips are segmented according to video frames to obtain single-frame images.
[0144] According to an embodiment of the present invention, receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and segmenting the X-ray image into single frames to obtain a plurality of single frame images specifically includes:
[0145] According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image;
[0146] Randomly obtain two frames of images, analyze the similarity between the two frames of images, and determine whether the similarity is greater than or equal to a set similarity threshold;
[0147] If it is greater than or equal to the set similarity threshold, the video segment between the two frames of images is taken as the target segmentation segment, the boundary frame is set according to the target segmentation segment, and the initial boundary frame and the end boundary frame are set according to the boundary frame;
[0148] According to the initial boundary frame and the end boundary frame, a single frame image in the target segmentation segment is obtained in sequence;
[0149] If it is less than the set similarity threshold, the two frames of images are randomly selected again.
[0150] It should be noted that by analyzing the boundary frames of the collected X-ray images, removing repeated video segments, setting the initial boundary frame and the end boundary frame of the target segmented segment according to the time node, and performing single-frame segmentation between the initial boundary frame and the end boundary frame, an accurate and non-repetitive single-frame image is obtained.
[0151] According to an embodiment of the present invention, setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing a first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image specifically includes:
[0152] The compression window size is set, and the lower computer starts to collect the first frame of image, and performs compression processing while collecting according to the compression window size to obtain the first compressed image;
[0153] After the first frame of image is acquired, the original image before compression is saved;
[0154] The host computer generates a transmission instruction, transmits the first compressed image based on the transmission instruction, and analyzes the transmission response status;
[0155] If the host computer completes the response, the first compressed image is transmitted to the host computer, and the host computer marks the first compressed image transmitted this time and saves it.
[0156] According to an embodiment of the present invention, a previous frame image is compared and compressed with a current frame image based on an inter-image comparison compression algorithm to obtain a compression result, which specifically includes:
[0157] The second frame of image is collected, and compared and compressed with the first frame of image according to the size of the compression window;
[0158] After the second frame of image is acquired, the uncompressed original image of the second frame of image is saved and replaces the first frame of image, and is used for comparison and compression of the third frame of image;
[0159] The third frame image, the fourth frame image to the Nth frame image are compressed and transmitted in the same way to obtain all the compression results.
[0160] It should be noted that the principle of the inter-image contrast compression algorithm is as follows: according to the characteristics of X-ray images, when dynamically taking X-ray images, a large number of images are taken continuously at a certain frame rate, and these images are often taken at different angles of a target object. The similarity between all images is very large, and the background environment of the images is basically very similar. Based on such characteristics, an inter-image contrast compression algorithm is designed.
[0161] Specifically, the specific steps of the image comparison compression algorithm are as follows:
[0162] After the first image is acquired, the original value of the image is used as the compression ratio to cache the graph Dx;
[0163] After acquiring the next image Ex, subtract the compressed comparison image from the next image to generate a new image compression data image Fx = Ex-Dx; Dx, each pixel value of Ex is a 16-bit unsigned integer value, and Fx represents the subtraction of two images to generate positive and negative signs. Each pixel value of Fx becomes 17 bits, and the highest bit is the sign bit;
[0164] Fx will expand the data by X bits relative to Ex, but will not lead to a decrease in compression efficiency, because the subsequent dynamic compression algorithm of the image in the window will eliminate this sign bit.
[0165] According to an embodiment of the present invention, performing secondary compression on a primary compression result according to pixel data information specifically includes:
[0166] Obtain pixel data information, compare the pixel data information with set standard pixel information, and obtain a pixel deviation rate;
[0167] Determine whether the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold;
[0168] If the pixel deviation rate is greater than or equal to the set pixel deviation rate threshold, then generating adjustment information, and correcting the pixel data error according to the adjustment information;
[0169] If the pixel deviation rate is less than the set pixel deviation rate threshold, the first compression result is compressed twice.
[0170] It should be noted that by analyzing the abnormal deviation information of the pixel data information, the pixel deviation rate is obtained, and it is analyzed whether the pixel deviation rate meets the requirements, so as to dynamically adjust the pixel data error according to the analysis result.
[0171] According to an embodiment of the present invention, after the generated N compressed images are transmitted to a host computer for storage, the method further includes:
[0172] Receive a decompression instruction, and based on the decompression instruction, control the host computer to receive the first frame image to decompress the data in the window, obtain the original image of the first frame image, and save it as a decompression standard comparison image;
[0173] The host computer receives the second frame image, decompresses the data in the window according to the window size, obtains the decompression result, compares the decompression result with the first frame image, performs secondary decompression, obtains the complete original image of the second frame image, replaces the original image of the first frame image, and saves it as the standard comparison image;
[0174] The host computer receives the third frame image, and repeats the processing method of the second frame image, and replaces the previous decompression standard comparison image with the obtained complete original image of the third frame image, and decompresses all single frame image information in the same way.
[0175] It should be noted that, in the process of parsing the compressed image, the data in the window is decompressed according to the window size and compared with the corresponding frame image, thereby achieving secondary decompression and improving the decompression accuracy.
[0176] According to the embodiment of the present invention, the principle of the dynamic compression algorithm of the image in the window is as follows: according to the characteristics of X-ray images, the grayscale values of pixels in a large number of line segments are very similar, because the size of the TFT pixels used in medical images is very small relative to the contents photographed, so the grayscale changes in the same area are mostly very slow. In X-ray shooting, the contents generally only occupy a part of the screen, and most of the image content is the background part, and the grayscale values of a large number of background parts are very similar. Therefore, based on the above image characteristics, the mathematical (frame of refraction) compression algorithm is borrowed, and it is improved and compressed multiple times by adding more references, and a differential array is constructed on the basis of the original sequence.
[0177] Specifically, k is added to the elements of the interval [L,R] [L,R] [L,R], where k is a selected constant and can be any value.
[0178] The difference array d[L]=kd[L]+k; d[L+1]=kd[L+1]+k; ...; d[R]= kd[R]+k; kd[L,R] is the value stored and transmitted after compression.
[0179] k is saved as the prefix part of the compressed data in the interval in a certain format. After the host computer obtains the data sequence, the differential array calculates the prefix part and restores the updated sequence.
[0180] Furthermore, the steps of the dynamic compression algorithm of the image in the window are as follows:
[0181] First, set up an image data window. The width of the window is generally selected as a common divisor of the total amount of image data. For example, a flat-panel detector with 1280*1024 pixels generally chooses a window of 1280 or 640, 320, or 160. The selection of the window width should also be based on the processing power of the actual device software, cache size and other factors. In theory, different window sizes will have different compression rates for different types of images, so the window size is generally flexibly selected by the user.
[0182] Move the pixel data sequence into the window, set the window size to x, record the data set in the window at this time as Vx, start compression after the window data is full, and establish a 24-bit window compression reference table;
[0183] Find the minimum data in the window, keep the data unchanged, and put the minimum data into the high 16 bits of the compression reference table;
[0184] Starting from the first pixel data in the window, store the difference between the first pixel data and the minimum data, that is, B(n) = V(n) - V(min), and get a new data set Bx; where B(n) represents the data after difference, V(n) represents the original data before difference, V(min) represents the data with the smallest grayscale value in the entire window, and n represents the Nth pixel value.
[0185] The largest number in the statistical data set Bx is taken modulo to obtain the number of bits K that the maximum data value needs to occupy. Since the maximum pixel grayscale value is 65535, the maximum K value is 16. Then subtract 1 from the K value, so the K value itself occupies a maximum of 4 bits. After calculating the K value, store it in the last 4 bits of the window compression reference table;
[0186] The window compression reference table (20 bit = 16 bit + 4 bit) and the data set Bx are combined to form a compressed data set Cx of the image data in the window.
[0187] A third aspect of the present invention provides a computer-readable storage medium, which includes a method program for improving the frame rate of an X-ray detector. When the method program for improving the frame rate of an X-ray detector is executed by a processor, the steps of the method for improving the frame rate of an X-ray detector as described above are implemented.
[0188] The present invention discloses a method, system and medium for improving the frame rate of an X-ray detector. The method includes receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, dividing the X-ray image into single frames, and obtaining a plurality of single-frame images; sorting the plurality of single-frame images according to acquisition time nodes to obtain an image combination, wherein the image combination includes a first frame image, a second frame image, a third frame image ... an Nth frame image; setting compression window parameters to obtain pixel data information within the window, dynamically compressing the first frame image within the compression window based on a dynamic compression algorithm to obtain a first compressed image; comparing and compressing the previous frame image with the current frame image based on an inter-image comparison compression algorithm to obtain a primary compression result, performing secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image ... an Nth frame image corresponding to the second frame to the Nth frame in a one-to-one manner; transmitting the generated N compressed images to a host computer for storage; the present invention can significantly improve the imaging and image output frame rate of the detector, has a very wide range of application, and can achieve image quality without loss of any image information.
[0189] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0190] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0191] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0192] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, the aforementioned program can be stored in a readable storage medium, and when the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0193] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A method for improving the frame rate of an X-ray detector, characterized in that: include: receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and dividing the X-ray image into single frames to obtain a plurality of single-frame images; Sort a number of single-frame images according to acquisition time nodes to obtain an image combination, where the image combination includes a first frame image, a second frame image, a third frame image, ... an Nth frame image, where N is a positive integer; Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image; Compare and compress the previous frame image with the current frame image based on the image comparison compression algorithm to obtain a primary compression result, and perform secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image, and ... an N frame compressed image corresponding to the second frame image to the Nth frame image; The generated N compressed images are transmitted to the host computer for storage; Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image, specifically includes: The compression window size is set, and the lower computer starts to collect the first frame of image, and performs compression processing while collecting according to the compression window size to obtain the first compressed image; After the first frame of image is acquired, the original image before compression is saved; The host computer generates a transmission instruction, transmits the first compressed image based on the transmission instruction, and analyzes the transmission response status; If the host computer completes the response, the first compressed image is transmitted to the host computer, and the host computer marks the first compressed image transmitted this time and saves it; Based on the image comparison compression algorithm, the previous frame image is compared and compressed with the current frame image to obtain a compression result, which specifically includes: The second frame of image is collected, and compared and compressed with the first frame of image according to the size of the compression window; After the second frame of image is acquired, the uncompressed original image of the second frame of image is saved and replaces the first frame of image, and is used for comparison and compression of the third frame of image; The third frame image, the fourth frame image, to the Nth frame image are compressed and transmitted in the same manner to obtain all the compression results; Receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, segmenting the X-ray image into single frames, and obtaining a plurality of single-frame images, further comprising: According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image; Randomly obtain two frames of images, analyze the similarity between the two frames of images, and determine whether the similarity is greater than or equal to a set similarity threshold; If it is greater than or equal to the set similarity threshold, the video segment between the two frames of images is taken as the target segmentation segment, the boundary frame is set according to the target segmentation segment, and the initial boundary frame and the end boundary frame are set according to the boundary frame; According to the initial boundary frame and the end boundary frame, a single frame image in the target segmentation segment is obtained in sequence; If it is less than the set similarity threshold, two frames of images are randomly selected again; The second compression of the first compression result according to the pixel data information specifically includes: Obtain pixel data information, compare the pixel data information with set standard pixel information, and obtain a pixel deviation rate; Determining whether the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold; If the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold, then generating adjustment information, and correcting the pixel data error according to the adjustment information; If the pixel deviation rate is less than the set pixel deviation rate threshold, the primary compression result is compressed twice; The steps of the dynamic compression algorithm for the image in the window include: Set the image data window, and select the common divisor of the total amount of image data as the width of the window; Move the pixel data sequence into the window, set the window size to x, record the data set in the window as Vx, compress the window data after it is full, and establish a 24-bit window compression reference table; Find the minimum data in the window, keep the data unchanged, and put the minimum data into the high 16 bits of the compressed reference table; from the first pixel data in the window, store the difference with the minimum data, B(n) = V(n) -V (min), and get the new data set Bx; Where B(n) represents the data after difference, V(n) represents the original data before difference, V (min) represents the data with the smallest gray value in the overall window, and n represents the Nth pixel value; Count the largest modulus number in the statistical data set Bx to get the number of digits K that the maximum data value needs to occupy, then subtract 1 from the K value and store it in the last 4 bits of the window compression reference table; The window compression reference table and the data set Bx are merged to form a compressed data set Cx of the image data in the window; The specific steps of the image contrast compression algorithm include: After the first image is acquired, the original value of the image is used as the compression ratio to cache the image Dx; After collecting the next image Ex, subtract the compressed comparison image from the next image to generate a new image compression data image Fx = Ex-Dx; Dx, Ex, each pixel value is a 16-bit unsigned integer value, Fx represents the subtraction of two images, generating positive and negative signs, each pixel value of Fx becomes 17 bits, and the highest bit is the sign bit.
2. The method for improving the frame rate of an X-ray detector according to claim 1, characterized in that: Receive acquisition instructions, dynamically acquire X-ray images based on the acquisition instructions, and segment the X-ray images into single frames to obtain a number of single-frame images, specifically including: According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image; The lower computer collects X-ray images to obtain video clips, and the video clips are segmented according to video frames to obtain single-frame images.
3. The method for improving the frame rate of an X-ray detector according to claim 2, characterized in that: After the generated N compressed images are transmitted to the host computer for storage, the following steps are also included: Receive a decompression instruction, and based on the decompression instruction, control the host computer to receive the first frame image to decompress the data in the window, obtain the original image of the first frame image, and save it as a decompression standard comparison image; The host computer receives the second frame image, decompresses the data in the window according to the window size, obtains the decompression result, compares the decompression result with the first frame image, performs secondary decompression, obtains the complete original image of the second frame image, replaces the original image of the first frame image, and saves it as the standard comparison image; The host computer receives the third frame image, and repeats the processing method of the second frame image, and replaces the previous decompression standard comparison image with the obtained complete original image of the third frame image, and decompresses all single frame image information in the same way.
4. A system for improving the frame rate of an X-ray detector, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of a method for improving the frame rate of an X-ray detector, and when the program of the method for improving the frame rate of an X-ray detector is executed by the processor, the following steps are implemented: receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, and dividing the X-ray image into single frames to obtain a plurality of single-frame images; Sort a number of single-frame images according to acquisition time nodes to obtain an image combination, where the image combination includes a first frame image, a second frame image, a third frame image, ... an Nth frame image, where N is a positive integer; Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image; Compare and compress the previous frame image with the current frame image based on the image comparison compression algorithm to obtain a primary compression result, and perform secondary compression on the primary compression result according to the pixel data information to generate a second frame compressed image, a third frame compressed image, and ... an N frame compressed image corresponding to the second frame image to the Nth frame image; The generated N compressed images are transmitted to the host computer for storage; Setting compression window parameters, obtaining pixel data information in the window, and dynamically compressing the first frame image in the compression window based on a dynamic compression algorithm to obtain a first compressed image, specifically includes: The compression window size is set, and the lower computer starts to collect the first frame of image, and performs compression processing while collecting according to the compression window size to obtain the first compressed image; After the first frame of image is acquired, the original image before compression is saved; The host computer generates a transmission instruction, transmits the first compressed image based on the transmission instruction, and analyzes the transmission response status; If the host computer completes the response, the first compressed image is transmitted to the host computer, and the host computer marks the first compressed image transmitted this time and saves it; Based on the image comparison compression algorithm, the previous frame image is compared and compressed with the current frame image to obtain a compression result, which specifically includes: The second frame of image is collected, and compared and compressed with the first frame of image according to the size of the compression window; After the second frame of image is acquired, the uncompressed original image of the second frame of image is saved and replaces the first frame of image, and is used for comparison and compression of the third frame of image; The third frame image, the fourth frame image, to the Nth frame image are compressed and transmitted in the same manner to obtain all the compression results; Receiving an acquisition instruction, dynamically acquiring an X-ray image based on the acquisition instruction, segmenting the X-ray image into single frames, and obtaining a plurality of single-frame images, further comprising: According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image; Randomly obtain two frames of images, analyze the similarity between the two frames of images, and determine whether the similarity is greater than or equal to a set similarity threshold; If it is greater than or equal to the set similarity threshold, the video segment between the two frames of images is taken as the target segmentation segment, the boundary frame is set according to the target segmentation segment, and the initial boundary frame and the end boundary frame are set according to the boundary frame; According to the initial boundary frame and the end boundary frame, a single frame image in the target segmentation segment is obtained in sequence; If it is less than the set similarity threshold, two frames of images are randomly selected again; The second compression of the first compression result according to the pixel data information specifically includes: Obtain pixel data information, compare the pixel data information with set standard pixel information, and obtain a pixel deviation rate; Determining whether the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold; If the pixel deviation rate is greater than or equal to a set pixel deviation rate threshold, then generating adjustment information, and correcting the pixel data error according to the adjustment information; If the pixel deviation rate is less than the set pixel deviation rate threshold, the primary compression result is compressed twice; The steps of the dynamic compression algorithm for the image in the window include: Set the image data window, and select the common divisor of the total amount of image data as the width of the window; Move the pixel data sequence into the window, set the window size to x, record the data set in the window as Vx, compress the window data after it is full, and establish a 24-bit window compression reference table; Find the minimum data in the window, keep the data unchanged, and put the minimum data into the high 16 bits of the compressed reference table; from the first pixel data in the window, store the difference with the minimum data, B(n) = V(n) -V (min), and get the new data set Bx; Where B(n) represents the data after difference, V(n) represents the original data before difference, V (min) represents the data with the smallest gray value in the overall window, and n represents the Nth pixel value; Count the largest modulus number in the statistical data set Bx to get the number of digits K that the maximum data value needs to occupy, then subtract 1 from the K value and store it in the last 4 bits of the window compression reference table; The window compression reference table and the data set Bx are merged to form a compressed data set Cx of the image data in the window; The specific steps of the image contrast compression algorithm include: After the first image is acquired, the original value of the image is used as the compression ratio to cache the image Dx; After collecting the next image Ex, subtract the compressed comparison image from the next image to generate a new image compression data image Fx = Ex-Dx; Dx, Ex, each pixel value is a 16-bit unsigned integer value, Fx represents the subtraction of two images, generating positive and negative signs, each pixel value of Fx becomes 17 bits, and the highest bit is the sign bit.
5. The system for improving the frame rate of an X-ray detector according to claim 4, characterized in that: Receive acquisition instructions, dynamically acquire X-ray images based on the acquisition instructions, and segment the X-ray images into single frames to obtain a number of single-frame images, specifically including: According to the upper computer receiving the dynamic receiving acquisition instruction, the upper computer transmits the received acquisition instruction to the lower computer, and the lower computer acquires the X-ray image; The lower computer collects X-ray images to obtain video clips, and the video clips are segmented according to video frames to obtain single-frame images.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a method program for improving the frame rate of an X-ray detector. When the method program for improving the frame rate of an X-ray detector is executed by a processor, the steps of the method for improving the frame rate of an X-ray detector as described in any one of claims 1 to 3 are implemented.
