CN113516724A - Image data transmission method and device - Google Patents
Image data transmission method and device Download PDFInfo
- Publication number
- CN113516724A CN113516724A CN202110790833.2A CN202110790833A CN113516724A CN 113516724 A CN113516724 A CN 113516724A CN 202110790833 A CN202110790833 A CN 202110790833A CN 113516724 A CN113516724 A CN 113516724A
- Authority
- CN
- China
- Prior art keywords
- image data
- data frame
- target
- frame
- transmitted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 68
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000012545 processing Methods 0.000 claims abstract description 60
- 230000006835 compression Effects 0.000 claims description 38
- 238000007906 compression Methods 0.000 claims description 38
- 230000008569 process Effects 0.000 description 17
- 238000002591 computed tomography Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 5
- 238000013507 mapping Methods 0.000 description 5
- 230000015654 memory Effects 0.000 description 5
- 238000003672 processing method Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 238000012790 confirmation Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000005070 sampling Methods 0.000 description 4
- 230000003139 buffering effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
- 238000003325 tomography Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
The application discloses an image data transmission method and device. The method comprises the following steps: acquiring a target image data frame; compressing the target image data frame based on a target processing mode; storing the processed target image data frame to the cache device; and acquiring the image data frame to be transmitted from the buffer device for data transmission. According to the image data transmission method and device, the target image data frames acquired through collection are compressed, and then the processed target image data frames are stored in the cache device, so that the storage capacity of the cache device can be improved, the number of the image data frames stored in the cache device is increased, the problem of overflow of a data cache caused by excessive data retransmission or data transmission link blockage delay due to interference is effectively solved, the robustness of data frame transmission is improved, and a foundation is laid for subsequent accurate and rapid image reconstruction.
Description
Technical Field
The present application relates to the field of tomography technologies, and in particular, to a method and an apparatus for transmitting image data.
Background
An electronic Computed Tomography (CT) system generally includes a data acquisition unit, a slip ring, a data receiving card, and an image reconstruction unit. In the scanning process of the CT system, in each sampling period, the data acquisition unit acquires and generates an image data frame, and the image data frame is transmitted to the data receiving card through the slip ring in a real-time serial transmission mode so as to transmit data to the image reconstruction unit for real-time image reconstruction.
However, the slip ring is susceptible to interference, which may cause transmission errors of image data frames, resulting in loss of image data frames, and the data receiving card may not receive the image data frames, so that the data receiving card needs to perform post-processing to compensate for the loss of image data frames. In contrast, in the prior art, a buffer device is usually provided, and the image data frame is directly stored by using the buffer device. When a transmission error occurs, the temporarily backed-up image data frame may be directly read out from the buffer device and transmitted again. However, since the buffer device directly stores the image data frames and has limited storage capacity, once the image data frames have too many transmission errors, too many retransmission times or a transmission link of the data frames is blocked, a large number of collected image data frames are accumulated in the buffer device, which easily causes the risk of losing the collected image data frames due to overflow of the image data frames, and further causes scanning suspension and affects scanning efficiency.
Disclosure of Invention
In view of the above, the present invention provides a data transmission method and apparatus, and mainly aims to solve the problem that an image data frame is easy to overflow and lose due to limited storage capacity of a buffer apparatus in the prior art.
In order to solve the above problem, the present application provides a method for transmitting image data, including the following steps:
acquiring a target image data frame;
compressing the target image data frame based on a target processing mode;
storing the processed target image data frame to the cache device;
and acquiring the image data frame to be transmitted from the buffer device for data transmission.
Optionally, the compressing the target image data frame based on the target processing manner specifically includes:
determining the number of image data frames to be transmitted in the buffer device;
determining a preset condition based on the number of the image data frames to be transmitted;
and determining a target processing mode corresponding to the preset condition based on the preset condition, and compressing the target image data frame based on the target processing mode.
Optionally, the determining the number of image data frames to be transmitted in the buffer device specifically includes:
acquiring a current read address of the cache device;
acquiring a current write address of the cache device;
and determining the number of image data frames to be transmitted in the storage device based on the current read address and the current write address.
Optionally, the determining, based on the number of the image data frames to be transmitted, a preset condition that is met includes:
calculating the occupancy rate of the caching device based on the number of the image data frames to be transmitted and a preset limited value of the number of the image data frames;
determining that a first preset condition is met under the condition that the occupancy rate is smaller than or equal to a first threshold value;
determining that a second preset condition is met under the condition that the occupancy rate is judged to be greater than the first threshold value and smaller than or equal to a second threshold value;
determining that a third preset condition is met under the condition that the occupancy rate is judged to be greater than the second threshold value and less than or equal to a third threshold value;
determining that a fourth preset condition is met under the condition that the occupancy rate is larger than the third threshold value;
wherein the first threshold is less than a second threshold, the second threshold being less than the third threshold.
Optionally, the target processing manner includes any one of the following:
a non-compression processing mode corresponding to the first preset condition, a lossless compression processing mode corresponding to the second preset condition, a lossy compression processing mode at a first compression ratio corresponding to the third preset condition, and a lossy compression processing mode at a second compression ratio corresponding to the fourth preset condition.
Optionally, the image data transmission method further includes:
acquiring identification information corresponding to the target processing mode;
and associating the identification information with the processed target image data frame.
Optionally, the storing the processed target image data frame to the buffer device specifically includes:
determining a target write address based on a current write address of the cache device;
and writing the image data frame into the caching device based on the target writing address.
Optionally, the obtaining, from the buffer device, the image data frame to be transmitted for data transmission specifically includes:
and sequentially reading the image data frames according to the writing sequence of the image data frames to be transmitted written into the buffer device and the corresponding addresses of the image data frames so as to transmit the image data frames to the receiving device one by one.
Optionally, the reading of the image data frames in sequence according to the writing order in which the image data frames to be transmitted are written into the buffer device and the corresponding addresses of the image data frames to send the image data frames to the receiving device one by one specifically includes:
transmitting a target image data frame;
under the condition that a next frame image data sending instruction fed back by a receiving device is received within a preset time period, obtaining a next image data frame with a writing sequence behind the target image data frame from the cache device, and sending the next image data frame as the target image data frame;
and under the condition that a next frame image data sending instruction fed back by the receiving device is not received within a preset time period, acquiring a previous image data frame with a writing sequence before the target image data frame from the cache device, and sending the previous image data frame as the target image data frame.
In order to solve the above technical problem, the present application provides an image data transmission apparatus, including:
the acquisition module is used for acquiring and obtaining a target image data frame;
the processing module is used for compressing the target image data frame based on a target processing mode;
the storage module is used for storing the processed target image data frame to the cache device;
and the transmission module is used for acquiring the image data frame to be transmitted from the buffer device so as to transmit data.
According to the image data transmission method and device, the target image data frames acquired through collection are compressed, and then the processed target image data frames are stored in the cache device, so that the storage capacity of the cache device can be improved, the number of the image data frames stored in the cache device is increased, the problems of data buffer overflow and image data frame loss caused by excessive data retransmission or data transmission link blockage delay caused by interference are effectively solved, the robustness of data frame transmission is improved, and a foundation is laid for subsequent accurate and rapid image reconstruction.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of an image data transmission method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a caching apparatus storing an image data frame according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a transmission process of normal transmission of image data frames according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a transmission process of image data frame retransmission according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a CT scanning system in an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a communication relationship between a data acquisition unit and an image reconstruction unit in an embodiment of the present application;
fig. 7 is a flowchart of a process of data transmission in the embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It is also to be understood that although the present application has been described with reference to some specific examples, those skilled in the art are able to ascertain many other equivalents to the practice of the present application.
The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
The embodiment of the application provides a method for transmitting image data, which can be applied to a CT scanning system, in particular to a data acquisition unit in the CT scanning system, wherein the data acquisition unit can comprise a front-end data acquisition module, a data processing module, a cache device and a transmission module. The original data, namely the data actually used for image construction, is specifically transmitted in the image data transmission process, but not the constructed CT image data. As shown in fig. 1, the image data transmission method in the present application includes the steps of:
step S101, acquiring a target image data frame;
in the specific implementation process, the data acquisition module at the front end acquires the target image data frame by acquiring the X-ray data. That is, when performing a CT scan, in particular, the detector in the CT system is used to acquire the acquired X-ray data, the detector converts the X-ray data into visible light, and then the visible light is converted into an electrical signal and then transmitted to the data acquisition module, so that the data acquisition module acquires a target image data frame. The acquisition of the image data frames may be performed by acquiring X-ray data, in particular, at a predetermined sampling period.
Step S102, compressing the target image data frame based on a target processing mode;
in the specific implementation process of this step, the target processing mode may be a mode of performing compression processing at a predetermined compression ratio, that is, the data processing module performs compression processing on the target image data frame, so as to reduce the storage space occupied by the target image data frame, thereby increasing the number of image data frames stored in the cache device.
Step S103, storing the processed target image data frame to the cache device;
in the specific implementation process of this step, the image data frames may be written into the buffer device in sequence according to the acquisition sequence of the image data frames for storage. In this step, the cache device may employ a volatile static memory with a fast data access speed. The storage space of the buffer device can be recycled, that is, the data is cyclically copied in the buffer device, and the previously stored data is automatically overwritten. The data overwritten by the overwriting is the oldest image data that has been stored and transmitted and that is correctly received by the image reconstruction unit.
And step S104, acquiring the image data frame to be transmitted from the buffer device for data transmission.
In the specific implementation process of the step, the image data frames can be obtained according to a first-in first-out principle, that is, according to the storage sequence of the image data frames, and the image data frames are sent to the data receiving card of the image reconstruction unit one by one through the slip ring to reconstruct the image. Specifically, the image data frames may be transmitted one by using the transmission module.
The data transmission method in this embodiment actually includes a data transmission process and a data buffering process in parallel, that is, the data transmission process and the buffering process are performed simultaneously. The data caching process comprises the following steps: collecting a target image data frame; compressing the target image data frame based on a target processing mode; and storing the processed target image data frame to the cache device. The data transmission process comprises the following steps: and acquiring the image data frame to be transmitted from the buffer device for data transmission.
According to the method and the device, the target image data frames acquired through collection are compressed, and then the processed target image data frames are stored in the cache device, so that the storage capacity of the cache device can be improved, the number of the image data frames stored in the cache device is increased, the problems of data buffer overflow and data loss caused by excessive data retransmission or data transmission link blockage delay caused by interference are effectively solved, the robustness of data frame transmission is improved, and a foundation is laid for subsequent accurate and rapid image reconstruction.
Another embodiment of the present application provides a method for transmitting image data, which specifically includes the following steps:
step S201, acquiring a target image data frame;
step S202, determining the number of image data frames to be transmitted in the buffer device;
in the implementation process of this step, the buffer device may be provided with a plurality of buffer devices, which may be specifically volatile memories, and the number of the image data frames that have not been sent and are collected in the buffer device may be determined according to the read and write addresses of the buffer device. The method specifically comprises the following steps: acquiring a current read address of the cache device; acquiring a current write address of the cache device; and determining the number of image data frames to be transmitted in the storage device based on the current read address and the current write address.
Step S203, determining a preset condition based on the number of the image data frames to be transmitted;
when the preset condition is determined to be met, the following method can be specifically adopted: calculating to obtain the occupancy rate N/M of the cache device based on the number N of the image data frames to be transmitted and a preset number limit value M of the image data frames; under the condition that the occupancy rate is judged to be less than or equal to a first threshold value, namely when N/M is judged to be less than or equal to Z1, determining that a first preset condition is met; determining that a second preset condition is met under the condition that the occupancy rate is judged to be greater than the first threshold value and less than or equal to a second threshold value, namely when Z1< N/M ≦ Z2; determining that a third preset condition is met under the condition that the occupancy rate is judged to be greater than the second threshold value and less than or equal to a third threshold value, namely when Z2< N/M ≦ Z3; determining that a fourth preset condition is met under the condition that the occupancy rate is judged to be greater than the third threshold value, namely when Z3< N/M is judged; wherein the first threshold value Z1 is smaller than a second threshold value Z2, the second threshold value Z2 is smaller than the third threshold value Z3, i.e. Z1< Z2< Z3. In this step, the first threshold, the second threshold, and the third threshold may be set according to actual needs.
Step S204, determining a target processing mode corresponding to the preset condition based on the preset condition, and compressing the target image data frame based on the target processing mode;
the target processing method may specifically include any one or more of a non-compression processing method, a lossless compression processing method, a lossy compression processing method at a first compression ratio, and a lossy compression processing method at a second compression ratio. Specifically, the non-compression processing manner may correspond to a first preset condition, the lossless compression processing manner may correspond to a second preset condition, the lossy compression processing manner at the first compression ratio may correspond to a third preset condition, and the lossy compression processing manner at the second compression ratio may correspond to a fourth preset condition. The first compression rate is less than the second compression rate.
In the specific implementation process of this step, a mapping relationship between each preset condition and the data processing mode may be specifically pre-established, and the mapping relationship is stored in a mapping table, so as to search the mapping table based on the preset condition that is met to obtain the target processing mode. Namely, after the satisfied preset condition is determined, the target processing mode can be rapidly determined by searching the mapping table, and the processing speed of the image data frame is improved.
In the specific implementation process of the step, identification information can be configured for each processing mode in advance, and the processing mode can be uniquely represented by using the identification information. After the target image data frame is compressed by using a target processing mode, identification information corresponding to the target processing mode can be acquired; associating the identification information with the processed target image data frame; for example, the identification information may be added to a header of the processed target image data frame. Therefore, after the receiving device receives the processed target image data frame, the identification information can be used for correspondingly decompressing the processed target image data frame, so that the original target image data frame before processing can be quickly obtained, and the image reconstruction efficiency is improved.
Step S205, storing the processed target image data frame to the cache device;
in the specific implementation process of this step, the following method may be specifically adopted to store the image data frame: determining a target write address based on a current write address of the cache device; writing the image data frame into the caching device based on the target writing address; the current writing address is a storage address of an image data frame acquired in the last acquisition cycle, and the target writing address is a storage address which is adjacent to the current writing address and is not written into the image data frame in a preset time period. That is, in the present application, the cache device is divided into a plurality of storage blocks in advance, each storage block corresponds to an address, and then when acquiring and obtaining image data frames according to a predetermined acquisition period, the currently acquired image data frames are stored in the corresponding storage blocks in an address cycle manner, that is, the image data frames 15 acquired in the current acquisition period are written into the storage blocks of the cache device in a manner as shown in fig. 2; wherein the acquisition period of the image data frame 14 is the last acquisition period of the current acquisition period.
Step S206, obtaining the image data frame to be transmitted from the buffer device for data transmission.
In the specific implementation process of this step, specifically, each image data frame may be sequentially read according to a writing order in which each image data frame to be transmitted is written into the buffer device and a corresponding address of each image data frame, so as to send each image data frame to the receiving device one by one. For example, the specific transmission method is: transmitting a target image data frame; under the condition that a next frame image data sending instruction fed back by a receiving device is received within a preset time period, obtaining a next image data frame with a writing sequence behind the target image data frame from the cache device, and sending the next image data frame as the target image data frame; and under the condition that a next frame image data sending instruction fed back by the receiving device is not received within a preset time period, acquiring a previous image data frame with a writing sequence before the target image data frame from the cache device, and sending the previous image data frame as the target image data frame.
In this embodiment, when the slip ring does not receive interference and data is normally transmitted, as shown in fig. 3, after reading the image data frame 3 to be transmitted from the buffer device 11, the data transmission process may send the image data frame 3 to the slip ring 12, and send the image data frame 3 to the data receiving card 13 of the image reconstruction unit 16 by using a high-speed slip ring data channel; the request transmission/response management unit 15 detects whether a next frame image data transmission command fed back by the receiving device/receiving card 13 through the control loop 14 is received within a predetermined time period, and when the request transmission/response management unit receives the next frame image data transmission command fed back by the receiving device within the predetermined time period, acquires the image data frame 4 from the buffer device, transmits the image data frame 4 to the slip ring, and so on, and transmits the image data frames one by one.
In this embodiment, when the slip ring/high-speed data ring receives interference and cannot normally perform data transmission, as shown in fig. 4, after reading the image data frame 3 to be transmitted from the buffer device 11, the image data frame 3 is sent to the slip ring 12, and the high-speed slip ring data channel is used to send the image data frame 3 to the data receiving card 13 of the image reconstruction unit 16; the request-to-send-response management unit 15 detects whether a next frame image data sending command fed back by the receiving device/data receiving card through the control loop 14 is received within a predetermined time period, and when the request-to-send-response management unit does not receive the next frame image data sending command fed back by the receiving device within the predetermined time period, acquires the image data frame 2 from the buffer device, and then sends the image data frame 2 to the slip ring for data retransmission. In a specific implementation process of this embodiment, before data retransmission is required and the previous image data frame is sent as a target image data frame, the method further includes: and sending the data confirmation frame according to a preset time interval until receiving an instruction of sending the next frame of image data fed back by the receiving device. Namely, when data output is wrong, the data sending time can be shortened by sending the data confirmation frame, so that the data receiving card can quickly respond to reestablish the data transmission channel, and the follow-up quick data retransmission is guaranteed.
According to the method and the device, the processing mode is dynamically adjusted according to the number of the image data frames which are scraped up so as to store the target image data frames to be stored, and therefore the target image data frames can be processed more reasonably. When the number of the collected image data frames is too large, the size of the scanning data frame is reduced by paying the cost of distortion of part of non-important image data, the number of the maximum data frames which can be cached by the cache memory is increased, and the problem that the image data frames are lost due to overflow is avoided.
To further explain the above embodiments, the following description is made in detail. The structure of the CT scanning system can be as shown in fig. 5, and includes a main console 1, a fixed main control board 2, a contact ring 3, a rotating main control board 4, a data acquisition unit 5, a high-speed data ring/slip ring 6, an image reconstruction unit 7, and other components. The main control console sends the instruction to the fixed main control board, and the fixed main control board transmits some instructions of the main control console to the rotating main control board arranged on the rotating part of the rack. The rotating main control board distributes the instructions according to the destinations of the transmitted instructions and transmits the instructions to components such as a data acquisition unit and an X-ray generator, and therefore the main control board can control the components. Meanwhile, the main console receives status information from the stationary main control board or from other components such as the rotating main control board via the stationary main control board. The data detection and acquisition component consists of a detector and a data acquisition unit which are positioned on the rotating part of the stander. In performing a CT scan, X-ray data acquired by a detector is converted into light in the detector, then converted into an electrical signal, and then transmitted to a data acquisition unit, whereby the data acquisition unit acquires a frame of target image data. As shown in fig. 6 and 7, the data acquisition unit 5 may first execute step S1 to initialize the write address and the read address of the buffer, where the number of frames N of the accumulated image data is 0; the front-end data collecting module 51 of the data collecting unit executes step S2 to obtain the target image data frame; the data frame compression module 52 will execute step S3 to determine the size relationship between the occupied rate N/M of the buffer stack and the preset different thresholds Z1 and Z2 … Zn, and determine whether the data frame needs to be compressed or which compression algorithm is adopted, i.e. execute step S4 to compress the data frame, or execute step S5 to store the processed image data frame in the buffer 54, N +1 through the data frame sending module 53. The data frame sending module executes step S6 to read out a current image data frame from the buffer and send it to the data receiving card 71 in the image reconstruction unit 7 through the slip ring 6. And waiting for receiving a next image data frame sending instruction fed back by the data receiving card. Executing step S7 to determine whether the command waiting for sending the next image data frame is overtime, and executing step S8 to modify the initial reading address of the data buffer to be the address of the next image data frame of the current image data frame if the command waiting for sending the next image data frame is not overtime; executing step S9 to determine whether scanning is finished and whether transmission of each image data frame is finished, and executing step S6 to obtain the next image data frame from the buffer as the current image data frame and send the next image data frame when it is determined that scanning is not finished or transmission of each image data frame is finished until scanning is finished and transmission of each image data frame to be transmitted is finished; if the time is out, executing step S10 to send data confirmation frame to the data receiving card, executing step S11 to judge whether the next image data frame sending command is received; when the instruction of sending the next image data frame is received, step S12 is executed to modify the initial read address of the data buffer to be the address of the previous image data frame of the current image data frame, and then step S6 is executed to retrieve the previous image data frame from the buffer as the current image data frame and send the current image data frame until the scanning is finished and the transmission of each image data frame to be transmitted is completed.
In the application, after receiving a current image data frame, a data receiving card can detect the received data frame; if no error exists in the received current image frame data, sending a data frame sending request instruction to a data acquisition unit of a data sending end; if the received image data frame has a problem, a data frame command requesting to send a data frame is not sent to a data acquisition unit of a data sending end, but the identification of the data frame relevant to the problem is recorded, meanwhile, the data frame transmission method waits until a retransmission confirmation frame sent by the acquisition unit is received, and then the data acquisition unit is sent a command requesting to send a frame of original data; and returning to the step of receiving the scanned frame data until the scanning is finished.
According to the application, the static memory which is volatile and has high data access speed is used as the data buffer, so that the simple read-write control is realized. When interference exists and data transmission cannot be normally carried out, the acquired image data frames can be compressed in a dynamic compression mode, so that the occupied space is reduced, the quantity of the storable image data frames is increased, and the overflow of the image data frames is prevented. When there is no interference and data transmission can be carried out, the bandwidth margin of the sending path is utilized to quickly finish sending the original data frames accumulated in the buffer memory and restore the normal sending sequence.
In the application, because the number of CT layers is increased, the scanning rotation speed is improved, the sampling period is greatly shortened, and the data quantity of each data frame generated by the data acquisition unit in each sampling period is also increased by times, one data frame needs to be transmitted in a shorter period, so that the requirements on the bandwidth of a slip ring high-speed data channel on a data transmission link, the data processing speed of a data receiving card and the performance of the data transmission bandwidth of a PCI-E interface bus from the data receiving card to a camera are higher, and the probability of data blockage is increased. Once the data frame transmission is blocked, the data receiving end will delay sending the request of the next frame data frame, which will cause the collected data frame to be accumulated in the data buffer area in the collection unit. In the method, the target image data frames acquired through collection are compressed, and then the processed target image data frames are stored in the cache device, so that the storage capacity of the cache device can be improved, the number of the image data frames stored in the cache device is increased, the problems of data buffer overflow and data loss caused by excessive data retransmission or data transmission link blockage delay caused by interference are effectively solved, the robustness of data frame transmission is improved, and a foundation is laid for subsequent accurate and rapid image reconstruction.
Another embodiment of the present application provides an apparatus for transmitting image data, including:
the acquisition module is used for acquiring and obtaining a target image data frame;
the processing module is used for compressing the target image data frame based on a target processing mode;
the storage module is used for storing the processed target image data frame to the cache device;
and the transmission module is used for acquiring the image data frame to be transmitted from the buffer device so as to transmit data.
In this embodiment, the acquisition module acquires the target image data frame by acquiring X-ray data. That is, when performing a CT scan, in particular, the detector in the CT system is used to acquire the acquired X-ray data, the detector converts the X-ray data into visible light, and then the visible light is converted into an electrical signal and then transmitted to the data acquisition module, so that the data acquisition module acquires a target image data frame. The image data transmission apparatus in this embodiment further includes a determination module configured to: determining the number of image data frames to be transmitted in the buffer device; determining a preset condition based on the number of the image data frames to be transmitted; and determining a target processing mode corresponding to the preset condition based on the preset condition so as to enable a processing module to compress the target image data frame based on the target processing mode.
In a specific implementation process of this embodiment, the determining module is specifically configured to: acquiring a current read address of the cache device; acquiring a current write address of the cache device; and determining the number of image data frames to be transmitted in the storage device based on the current read address and the current write address.
In a specific implementation process of this embodiment, the determining module is further specifically configured to: calculating the occupancy rate of the caching device based on the number of the image data frames to be transmitted and a preset limited value of the number of the image data frames; determining that a first preset condition is met under the condition that the occupancy rate is smaller than or equal to a first threshold value; determining that a second preset condition is met under the condition that the occupancy rate is judged to be greater than the first threshold value and smaller than or equal to a second threshold value; determining that a third preset condition is met under the condition that the occupancy rate is judged to be greater than the second threshold value and less than or equal to a third threshold value; determining that a fourth preset condition is met under the condition that the occupancy rate is larger than the third threshold value; wherein the first threshold is less than a second threshold, the second threshold being less than the third threshold.
Specifically, the target processing manner in this embodiment includes any one of the following:
a non-compression processing mode corresponding to the first preset condition, a lossless compression processing mode corresponding to the second preset condition, a lossy compression processing mode at a first compression ratio corresponding to the third preset condition, and a lossy compression processing mode at a second compression ratio corresponding to the fourth preset condition.
The image data transmission device in this embodiment further includes an association module, where the association module is configured to: acquiring identification information corresponding to the target processing mode; and associating the identification information with the processed target image data frame.
The storage module in this embodiment is specifically configured to: determining a target write address based on a current write address of the cache device; writing the image data frame into the caching device based on the target writing address; the current writing address is a storage address of an image data frame acquired in the last acquisition cycle, and the target writing address is a storage address which is adjacent to the current writing address and is not written into the image data frame in a preset time period.
The transmission module in this embodiment is specifically configured to: and sequentially reading the image data frames according to the writing sequence of the image data frames to be transmitted written into the buffer device and the corresponding addresses of the image data frames so as to transmit the image data frames to the receiving device one by one.
The transmission module is further specifically configured to: transmitting a target image data frame; under the condition that a next frame image data sending instruction fed back by a receiving device is received within a preset time period, obtaining a next image data frame with a writing sequence behind the target image data frame from the cache device, and sending the next image data frame as the target image data frame; and under the condition that a next frame image data sending instruction fed back by the receiving device is not received within a preset time period, acquiring a previous image data frame with a writing sequence before the target image data frame from the cache device, and sending the previous image data frame as the target image data frame.
The image data transmission device in the application compresses the acquired target image data frame, and then stores the processed target image data frame to the cache device, so that the storage capacity of the cache device can be improved, the number of the image data frames stored by the cache device is increased, the problem that the acquired image data frame is easy to overflow and lose is effectively solved, and a foundation is laid for subsequent accurate and rapid image reconstruction.
The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application, and the protection scope of the present application is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present application and such modifications and equivalents should also be considered to be within the scope of the present application.
Claims (10)
1. A method for transmitting image data, comprising the steps of:
acquiring a target image data frame;
compressing the target image data frame based on a target processing mode;
storing the processed target image data frame to the cache device;
and acquiring the image data frame to be transmitted from the buffer device for data transmission.
2. The method according to claim 1, wherein the compressing the target image data frame based on the target processing mode specifically includes:
determining the number of image data frames to be transmitted in the buffer device;
determining a preset condition based on the number of the image data frames to be transmitted;
and determining a target processing mode corresponding to the preset condition based on the preset condition, and compressing the target image data frame based on the target processing mode.
3. The method of claim 2, wherein the determining the number of frames of image data to be transmitted in the buffer device specifically comprises:
acquiring a current read address of the cache device;
acquiring a current write address of the cache device;
and determining the number of image data frames to be transmitted in the storage device based on the current read address and the current write address.
4. The method according to claim 2, wherein the determining of the satisfied preset condition based on the number of the frames of image data to be transmitted specifically comprises:
calculating the occupancy rate of the caching device based on the number of the image data frames to be transmitted and a preset limited value of the number of the image data frames;
determining that a first preset condition is met under the condition that the occupancy rate is smaller than or equal to a first threshold value;
determining that a second preset condition is met under the condition that the occupancy rate is judged to be greater than the first threshold value and smaller than or equal to a second threshold value;
determining that a third preset condition is met under the condition that the occupancy rate is judged to be greater than the second threshold value and less than or equal to a third threshold value;
determining that a fourth preset condition is met under the condition that the occupancy rate is larger than the third threshold value;
wherein the first threshold is less than a second threshold, the second threshold being less than the third threshold.
5. The method of claim 4, wherein the target processing mode comprises any one of:
a non-compression processing mode corresponding to the first preset condition, a lossless compression processing mode corresponding to the second preset condition, a lossy compression processing mode at a first compression ratio corresponding to the third preset condition, and a lossy compression processing mode at a second compression ratio corresponding to the fourth preset condition.
6. The method of claim 2, wherein the method further comprises:
acquiring identification information corresponding to the target processing mode;
and associating the identification information with the processed target image data frame.
7. The method according to claim 1, wherein the storing the processed target image data frame to the buffer device specifically includes:
determining a target write address based on a current write address of the cache device;
and writing the image data frame into the caching device based on the target writing address.
8. The method according to claim 7, wherein the obtaining the image data frame to be transmitted from the buffer device for data transmission specifically includes:
and sequentially reading the image data frames according to the writing sequence of the image data frames to be transmitted written into the buffer device and the corresponding addresses of the image data frames so as to transmit the image data frames to the receiving device one by one.
9. The method according to claim 8, wherein the reading of the image data frames in sequence according to the writing order of the image data frames to be transmitted to the buffer device and the corresponding addresses of the image data frames to transmit the image data frames to the receiving device one by one specifically comprises:
transmitting a target image data frame;
under the condition that a next frame image data sending instruction fed back by a receiving device is received within a preset time period, obtaining a next image data frame with a writing sequence behind the target image data frame from the cache device, and sending the next image data frame as the target image data frame;
and under the condition that a next frame image data sending instruction fed back by the receiving device is not received within a preset time period, acquiring a previous image data frame with a writing sequence before the target image data frame from the cache device, and sending the previous image data frame as the target image data frame.
10. An apparatus for transmitting image data, comprising:
the acquisition module is used for acquiring and obtaining a target image data frame;
the processing module is used for compressing the target image data frame based on a target processing mode;
the storage module is used for storing the processed target image data frame to the cache device;
and the transmission module is used for acquiring the image data frame to be transmitted from the buffer device so as to transmit data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110790833.2A CN113516724B (en) | 2021-07-13 | 2021-07-13 | Image data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110790833.2A CN113516724B (en) | 2021-07-13 | 2021-07-13 | Image data transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113516724A true CN113516724A (en) | 2021-10-19 |
CN113516724B CN113516724B (en) | 2023-10-27 |
Family
ID=78066747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110790833.2A Active CN113516724B (en) | 2021-07-13 | 2021-07-13 | Image data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113516724B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115550642A (en) * | 2022-11-30 | 2022-12-30 | 湖北芯擎科技有限公司 | Multimedia link debugging method, system, equipment and medium of simulation platform |
CN115861033A (en) * | 2022-12-20 | 2023-03-28 | 北京远舢智能科技有限公司 | Image data processing method and device, computer equipment and storage medium |
WO2024139748A1 (en) * | 2022-12-26 | 2024-07-04 | 中科信息安全共性技术国家工程研究中心有限公司 | Data transmission method and apparatus, and electronic device |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0637175A2 (en) * | 1993-07-30 | 1995-02-01 | Matsushita Electric Industrial Co., Ltd. | Picture data coding apparatus |
CN103413335A (en) * | 2013-07-23 | 2013-11-27 | 沈阳东软医疗系统有限公司 | Method and device for data compression |
CN105959558A (en) * | 2016-06-08 | 2016-09-21 | 天脉聚源(北京)教育科技有限公司 | Method and device for taking and displaying picture |
KR20160120017A (en) * | 2015-04-07 | 2016-10-17 | 엔트릭스 주식회사 | System for cloud streaming service, method of image cloud streaming service using process shortering and apparatus for the same |
CN106230924A (en) * | 2016-07-28 | 2016-12-14 | 杭州迪普科技有限公司 | The compression method of message and device |
CN107622481A (en) * | 2017-10-25 | 2018-01-23 | 沈阳东软医疗系统有限公司 | Reduce the method, apparatus and computer equipment of CT picture noises |
CN108416818A (en) * | 2018-02-09 | 2018-08-17 | 沈阳东软医疗系统有限公司 | Processing method, apparatus and system, the equipment of reconstruction image |
CN110706790A (en) * | 2019-09-29 | 2020-01-17 | 东软医疗系统股份有限公司 | Data transmission method, device and equipment |
CN111067559A (en) * | 2019-12-23 | 2020-04-28 | 沈阳先进医疗设备技术孵化中心有限公司 | CT image data processing method and CT imaging system |
CN111491169A (en) * | 2020-04-22 | 2020-08-04 | 湖南国科微电子股份有限公司 | Digital image compression method, device, equipment and medium |
CN112422645A (en) * | 2020-11-03 | 2021-02-26 | 广州技象科技有限公司 | Data transmission method and device determined according to transmission data identification |
-
2021
- 2021-07-13 CN CN202110790833.2A patent/CN113516724B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0637175A2 (en) * | 1993-07-30 | 1995-02-01 | Matsushita Electric Industrial Co., Ltd. | Picture data coding apparatus |
CN103413335A (en) * | 2013-07-23 | 2013-11-27 | 沈阳东软医疗系统有限公司 | Method and device for data compression |
KR20160120017A (en) * | 2015-04-07 | 2016-10-17 | 엔트릭스 주식회사 | System for cloud streaming service, method of image cloud streaming service using process shortering and apparatus for the same |
CN105959558A (en) * | 2016-06-08 | 2016-09-21 | 天脉聚源(北京)教育科技有限公司 | Method and device for taking and displaying picture |
CN106230924A (en) * | 2016-07-28 | 2016-12-14 | 杭州迪普科技有限公司 | The compression method of message and device |
CN107622481A (en) * | 2017-10-25 | 2018-01-23 | 沈阳东软医疗系统有限公司 | Reduce the method, apparatus and computer equipment of CT picture noises |
CN108416818A (en) * | 2018-02-09 | 2018-08-17 | 沈阳东软医疗系统有限公司 | Processing method, apparatus and system, the equipment of reconstruction image |
CN110706790A (en) * | 2019-09-29 | 2020-01-17 | 东软医疗系统股份有限公司 | Data transmission method, device and equipment |
CN111067559A (en) * | 2019-12-23 | 2020-04-28 | 沈阳先进医疗设备技术孵化中心有限公司 | CT image data processing method and CT imaging system |
CN111491169A (en) * | 2020-04-22 | 2020-08-04 | 湖南国科微电子股份有限公司 | Digital image compression method, device, equipment and medium |
CN112422645A (en) * | 2020-11-03 | 2021-02-26 | 广州技象科技有限公司 | Data transmission method and device determined according to transmission data identification |
Non-Patent Citations (2)
Title |
---|
HAEYOON CHO ET AL.: "CT-Cache: Compressed Tag-Driven Cache Architecture", 2018 IEEE COMPUTER SOCIETY ANNUAL SYMPOSIUM ON VLSI, pages 94 - 99 * |
马志刚;刘欣;刘文怡;翟成瑞;: "基于高速FIFO的远程图像数据采集存储系统", 电子器件, no. 01, pages 152 - 155 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115550642A (en) * | 2022-11-30 | 2022-12-30 | 湖北芯擎科技有限公司 | Multimedia link debugging method, system, equipment and medium of simulation platform |
CN115861033A (en) * | 2022-12-20 | 2023-03-28 | 北京远舢智能科技有限公司 | Image data processing method and device, computer equipment and storage medium |
CN115861033B (en) * | 2022-12-20 | 2024-09-03 | 北京远舢智能科技有限公司 | Image data processing method, device, computer equipment and storage medium |
WO2024139748A1 (en) * | 2022-12-26 | 2024-07-04 | 中科信息安全共性技术国家工程研究中心有限公司 | Data transmission method and apparatus, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN113516724B (en) | 2023-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113516724B (en) | Image data transmission method and device | |
KR101703931B1 (en) | Surveillance system | |
CN102348115B (en) | Method and device for removing redundant images from video | |
US20190075271A1 (en) | Hardware friendly virtual frame buffer | |
CN109802684A (en) | The method and apparatus for carrying out data compression | |
CN112529785A (en) | Signal identification system based on pixel layout big data analysis | |
CN114153411A (en) | Image optimization transmission system for remote terminal management and control | |
WO2024119812A1 (en) | Image processing method, system and apparatus, image compression apparatus, and storage medium | |
CN106776374B (en) | Efficient data buffering method based on FPGA | |
CN108984323A (en) | A kind of dispatching method and system of shared memory space | |
CN110706790B (en) | Data transmission method, device and equipment | |
CN113438444B (en) | Picture transmission storage method and system | |
US11966398B2 (en) | Video data storage method, apparatus, terminal device and storage medium | |
US6836861B2 (en) | Efficient memory allocation scheme for data collection | |
CN111965406A (en) | Power grid fault recording method and device | |
CN112885102B (en) | Image shooting method, device, equipment and storage medium | |
CN113592844A (en) | Image distortion correction method and device, terminal and storage medium | |
US11003578B2 (en) | Method and system for parallel mark processing | |
CN108088441B (en) | On-orbit real-time downloading system and method for star point image of star sensor | |
CN114691603A (en) | Target information storage method, device, electronic equipment and medium | |
JP7540674B1 (en) | Data Transfer System | |
US20200196005A1 (en) | Method and apparatus for data processing | |
JP3009434B2 (en) | Data compression device | |
CN116647686B (en) | Image compression method, device, server and image compression system | |
CN115002527B (en) | Data transmission optimization method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |