An image transmission method, apparatus, device and medium
By determining the image transmission type, parallel processing and transmission of image data is solved, the problems of image transmission delay and quality loss are achieved, and the rapid transmission and efficient reconstruction of images are achieved.
Patent Information
- Application Number
- CN202410662944.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The prior art has problems of transmission delay and image quality loss in image transmission, especially in medical image transmission, where the entire image is generated and then blocked processing and transmission are performed, resulting in the delay and frame rate affecting the real-time nature of the image.
By determining that the image transmission type is complete or partial image transmission, the processing thread transmits image data line by line, reconstructs the image in parallel, reduces the transmission of irrelevant information, and realizes parallel processing and transmission of images.
On the premise of ensuring image quality, it significantly reduces transmission delay, improves image transmission speed and efficiency, and ensures rapid reconstruction and output of images at the receiving end.
Smart Images

Figure CN118540442B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image transmission, and particularly to an image transmission method, device, equipment and medium. Background Art
[0002] The generation of the original image is first captured by various forms of image sensors, which may be present in digital cameras, mobile phones, scanners or other image acquisition devices. The sensors convert the captured signals into analog signals. The analog signals generated by the sensors need to be converted into digital signals for easy processing and storage, and this process is completed by an analog-to-digital converter (ADC). The digital signals are preliminarily processed and converted into digital image data that can be further operated on. The processing includes: white balance: adjusting the color temperature to make the image color more natural; color correction: adjusting the color saturation and contrast of the image to make it more vivid and real; noise reduction: reducing the noise in the image capture process to improve the image quality, etc.
[0003] The generation of the original image is usually not a whole, but is generated line by line. Currently, in medical image transmission, in order to balance the latency and image quality, it is necessary to compress the complete image to a certain range and then transmit it after acquisition. A higher compression ratio usually means a greater loss of image quality, that is, lossy compression. At the same time, in order to reduce the transmission delay, parallel transmission is often used. The specific image transmission steps are as follows: the image sending end will process a complete frame of image such as compression and then divide it into blocks and distribute them to different threads for parallel transmission. After the image receiving end receives all the thread data of the current frame image, it performs processing and recombination. In this way, the image sending end can only perform block processing after the entire image is completely generated, and the waiting time for image generation is relatively long. The image receiving end can only generate the image after the entire image is completely transmitted, and the waiting time for the image output to complete is relatively long. The image receiving end can only generate the image after the entire image is completely transmitted, and the waiting time for the image output to complete is relatively long. Moreover, waiting for the complete image generation and image compression speed directly affects the image transmission frame rate and image latency, thereby affecting the real-time performance of the image.
[0004] In summary, how to improve the image transmission speed, reduce the transmission delay and not damage the image quality, and enable the image receiving end to clearly see the image is a technical problem to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide an image transmission method, device, equipment and medium, which can improve the image transmission speed, reduce the transmission delay and not damage the image quality, and enable the image receiving end to clearly see the image. The specific solutions are as follows:
[0006] In the first aspect, the present application discloses an image transmission method, which is applied to an image sending end and includes:
[0007] Determine the image transmission type of the current image to be transmitted collected by the image sensor;
[0008] When the image transmission type is the complete image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sender to the image receiver line by line, so that the image receiver can perform parallel reconstruction on the received current image line data;
[0009] When the image transmission type is the partial image transmission type, detect whether the current image line data is the required image line data. If so, use the processing thread to transmit the required image line data line by line to the image receiver, so that the image receiver can perform parallel reconstruction on the received required image line data.
[0010] Optionally, the determining the image transmission type of the current image to be transmitted collected by the image sensor includes:
[0011] Determine the device type of the imaging device that emits the image signal captured by the image collector;
[0012] If the device type is the full-information image acquisition device type, determine that the image transmission type of the current image to be transmitted collected by the image sensor is the complete image transmission type;
[0013] If the device type is the image acquisition device type with a fan-shaped imaging area, determine that the image transmission type of the current image to be transmitted collected by the image sensor is the partial image transmission type.
[0014] Optionally, when the image transmission type is the complete image transmission type, using each processing thread to transmit the current image line data generated line by line by the image sender to the image receiver line by line includes:
[0015] When the image transmission type is the complete image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sender and with the header information added to the image receiver line by line.
[0016] Optionally, the parallel reconstruction of the received current image line data by the image receiver includes:
[0017] Through the image receiver and according to the current line number information, column shift number information, and image data element information included in the header information, perform image filling at the corresponding positions on the received current image line data to achieve parallel image reconstruction and obtain the corresponding reconstructed image.
[0018] Optionally, when the image transmission type is the partial image transmission type, it is detected whether the current image line data is the required image line data. If so, the required image line data is transmitted row by row to the image receiving end by using a processing thread, so that the image receiving end performs parallel reconstruction on the received required image line data, including:
[0019] When the image transmission type is the partial image transmission type, the mask information of the current image to be transmitted is obtained; wherein, the mask information is used to define a specific image area of the required transmitted image, and the mask information includes: the starting position of the required image line data and the boundary position of the required image line data;
[0020] It is detected whether the header information of the current image line data meets the data position condition constructed based on the mask information. If so, it is determined that the current image line data is the required image line data, and the required image line data is transmitted row by row to the image receiving end by using a processing thread, so that the image receiving end performs parallel reconstruction on the received required image line data.
[0021] Optionally, the parallel reconstruction of the required image line data received by the image receiving end includes:
[0022] The image receiving end performs image filling on the received required image line data at the corresponding position represented by the mask information according to the current line number information, column shift number information, and image data element information included in the header information to implement image parallel reconstruction and obtain the corresponding reconstructed image.
[0023] Optionally, the image transmission method further includes:
[0024] The image receiving end determines whether the current image line data of the last row or the required image line data of the last row is filled. If so, it is determined that the image parallel reconstruction step is completed, so as to obtain and output the corresponding reconstructed image.
[0025] In a second aspect, the present application discloses an image transmission device, which is applied to an image sending end and includes:
[0026] A type determination module, configured to determine the image transmission type of the current image to be transmitted collected by an image sensor;
[0027] A first transmission module, configured to, when the image transmission type is the complete image transmission type, use each processing thread to transmit the current image line data generated row by row by the image sending end to the image receiving end, so that the image receiving end performs parallel reconstruction on the received current image line data;
[0028] A second transmission module, configured to, when the image transmission type is a partial image transmission type, detect whether the current image line data is the required image line data. If so, use a processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received required image line data.
[0029] In a third aspect, the present application discloses an electronic device, including:
[0030] A memory, configured to store a computer program;
[0031] A processor, configured to execute the computer program to implement the steps of the image transmission method disclosed above.
[0032] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the steps of the image transmission method disclosed above are implemented.
[0033] It can be seen that the present application discloses an image transmission method, which is applied to an image sending end and includes: determining the image transmission type of the current image to be transmitted collected by an image sensor; when the image transmission type is a complete image transmission type, using each processing thread to transmit the current image line data generated line by line by the image sending end to an image receiving end line by line, so that the image receiving end performs parallel reconstruction on the received current image line data; when the image transmission type is a partial image transmission type, detecting whether the current image line data is the required image line data, and if so, using a processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end performs parallel reconstruction on the received required image line data. Thus, by first determining the image transmission type of the current image to be transmitted collected by the image sensor, after determining the image transmission type, performing corresponding image transmission and image processing on the image line data generated by the image sending end according to the selected image transmission processing method. When the image transmission type is a complete image transmission type, using each processing thread to transmit each line of the image line data to the image sending end line by line, so that the image receiving end performs parallel reconstruction according to each line of the received image line data. In this way, the image sending end generates image data line by line while performing image transmission, and the image receiving end receives the image line data and reconstructs the image, thereby ensuring that the image can reach the memory of the target computer at the fastest speed. On the other hand, when the image transmission type is a partial image transmission type, while saving image transmission time and ensuring image quality, for the partial image transmission type, by detecting whether the image line data is the required image line data, only transmitting the required image line data, and only reconstructing the image of the required area during image reconstruction, reducing the transmission of irrelevant information in the entire image to be transmitted, and further improving the image transmission efficiency in the scenario that meets the real image transmission requirements. Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0035] Figure 1 It is a flowchart of an image transmission method disclosed in the present application;
[0036] Figure 2 It is a flowchart of an n-line image data transmission method disclosed in the present application;
[0037] Figure 3 It is a schematic diagram of the reconstruction of n-line image data disclosed in the present application;
[0038] Figure 4 Schematic structural diagram of an image transmission device disclosed in the present application;
[0039] Figure 5 Structural diagram of an electronic device disclosed in the present application. Specific embodiments
[0040] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0041] In the engineering application of transmitting computer screen bitmaps, the problem of image transmission lag is often encountered. Different transmission requirements exist according to different targets. In some fields, there are high requirements for the image refresh rate but low requirements for image delay, such as network video on demand; some fields focus on high requirements for network delay, such as remote control; some fields have high requirements for both indicators, such as telemedicine. In the medical image transmission scenario, if the diagnostic device and the subsequent medical image usage and processing environment are different devices, it is a common clinical requirement to exchange medical images between different devices at nearly real-time speed. If the transmitted image is only statically displayed in another device system, only the transmission quality of the image needs to be considered. Then, image transfer standards based on various wired and wireless media, such as HDMI, are sufficient to handle the task; but if the image is to be collected and processed by a remote computer system, digital transmission of the image is required. This digitalization process can be carried out at the source, and similar standards include DICOM, or an image capture card can be used at the image capture location. The common problem with these standard methods is that the real-time performance of image transmission is restricted by image transmission and compression, thus affecting the real-time nature of the image.
[0042] The generation of the original image is first captured through various forms of image sensors, which may be present in digital cameras, mobile phones, scanners, or other image capture devices. The sensors convert the captured signals into analog signals. The analog signals generated by the sensors need to be converted into digital signals for easy processing and storage. This process is completed by an analog-to-digital converter (ADC). The digital signals are preliminarily processed and converted into digital image data that can be further operated on. The processing includes: white balance: adjusting the color temperature to make the image colors more natural; color correction: adjusting the color saturation and contrast of the image to make it more vivid and real; noise reduction: reducing the noise points during the image capture process to improve the image quality, etc.
[0043] The generation of the original image is usually not a whole, but is generated line by line. Currently, in medical image transmission, in order to balance latency and image quality, it is necessary to compress the complete image to a certain range and then transmit it after acquisition. A higher compression ratio usually means a greater loss of image quality, that is, lossy compression. At the same time, parallel transmission is often used to reduce transmission latency. The specific steps of image transmission are as follows: The image sender will process a complete frame of the image, such as compressing it and then dividing it into blocks and distributing them to different threads for parallel transmission. After the image receiver receives all the thread data of the current frame image, it will process and reorganize them. In this way, the image sender can only perform block processing after the entire image is completely generated, and the waiting time for image generation is relatively long. The image receiver can only generate the image after the entire image is completely transmitted, and the waiting time for the image output to complete is relatively long. The image receiver can only generate the image after the entire image is completely transmitted, and the waiting time for the image output to complete is relatively long. Moreover, waiting for the complete image generation and image compression speed directly affects the image transmission frame rate and image latency, thus affecting the real-time performance of the image. Moreover, currently, most image senders perform block processing on the entire image, but there is a lot of useless information in the entire image, and there is too much useless information in the entire transmitted image.
[0044] Therefore, the present invention provides an image transmission solution that can improve the image transmission speed, reduce transmission latency and does not damage the image quality, and the image can be clearly seen at the image receiver.
[0045] Refer to Figure 1 As shown, an embodiment of the present invention discloses an image transmission method applied to an image sender, including:
[0046] Step S11: Determine the image transmission type of the current image to be transmitted collected by the image sensor.
[0047] In this embodiment, determine the device type of the imaging device that emits the image signal captured by the image collector; if the device type is a full-information image acquisition device type, then determine that the image transmission type of the current image to be transmitted collected by the image sensor is a complete image transmission type; if the device type is an image acquisition device type with a fan-shaped imaging area, then determine that the image transmission type of the current image to be transmitted collected by the image sensor is a partial image transmission type. It can be understood that the imaging device can be an X-ray machine, a CT scanner, a magnetic resonance imaging device, an ultrasonic diagnostic instrument, a nuclear medicine imaging device, etc., and the above devices can emit corresponding image signals so as to be captured by the image sensor in a digital camera, a mobile phone, a scanner or other image acquisition devices.
[0048] It should be noted that after the image sensor captures the current signal, the image sensor further converts the captured current signal into an analog signal. Further, this analog signal will be further converted into a digital signal in the image acquisition device, and the conversion process is completed by an analog-to-digital converter. After all conversions are completed, the current image to be transmitted is obtained. It should be noted that the conversion process is generated line by line, rather than generated as a whole. Moreover, in the face of different types of imaging devices, when the imaging device type is a full-information image acquisition device type, the image transmission type of the current image to be transmitted obtained by converting the image signal captured by the image collector is set to the full-image transmission type, and the full-image transmission type is the image transmission type for completely transmitting the entire current image to be transmitted. When the imaging device type is a fan-shaped imaging area image acquisition device type (partial information image acquisition device type), the image transmission type of the current image to be transmitted obtained by converting the image signal captured by the image collector is set to the partial-image transmission type, and the partial-image transmission type is the image transmission type for transmitting partial image information of the current image to be transmitted. For example, in the scenario of generating an ultrasound image for an ultrasound diagnostic instrument, the useful information of the ultrasound image is all within the fan-shaped area. Therefore, the device type of the ultrasound diagnostic instrument is a fan-shaped imaging area image acquisition device type. Correspondingly, the current image to be transmitted is an ultrasound image, and it is determined that the corresponding ultrasound image transmission type is the partial-image transmission type.
[0049] The following is the specific process of collecting image information through the image sensor and generating the current image to be transmitted line by line:
[0050] The image sensor (such as CMOS or CCD, etc.) is composed of a large number of photosensitive units (pixels). When light shines on the sensor, each photosensitive unit generates a corresponding electrical signal according to the received light intensity. During the acquisition process, the image sensor reads the electrical signals of these photosensitive units line by line in a certain order. Usually, there is a control circuit to coordinate this reading process to ensure accurate signal acquisition. The electrical signals of each line read are converted into digital signals, and these digital signals contain information such as the brightness and color of the pixels in that line. Then, these line-by-line digital signals are transmitted to the subsequent image processing circuit or processor. Here, some preprocessing operations may be performed, such as noise reduction and color correction. As the line-by-line signals are continuously received and processed, a complete current image to be transmitted is gradually generated.
[0051] Step S12: When the image transmission type is the full-image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sending end to the image receiving end, so that the image receiving end can perform parallel reconstruction on the received current image line data.
[0052] In this embodiment, when the image transmission type is the complete image transmission type, each processing thread is used to transmit the current image row data generated row by row by the image sender and with the header information added thereto row by row to the image receiver. It can be understood that, as Figure 2 shown, when the image transmission type is the complete image transmission type, each processing thread is used to transmit row by row the current image row data generated row by row by the image sender and with the header information added thereto respectively to the image receiver, that is, when the image sender generates one row of image data, an image transmission operation is performed on the generated current image row data through a processing thread. It should be noted that the processing threads for each image row data are not related to each other and there is no sequence. Each processes the image row data assigned to itself. Moreover, before each processing thread transmits the image row data generated by the image sender, it is necessary to perform an operation of adding the header information to each image row data. Among them, the header information specifically includes: the current row number information, the column shift number information, and the image data element information; the current row number information determines the specific row position in the image, the column shift number information represents the starting column position when filling the corresponding area of the image, and the data element information includes specific information such as the color, brightness, and grayscale of the current image row data, which is used to accurately restore and construct the specific appearance of the complete image in the corresponding row. In this way, it is convenient for the subsequent image receiver to fill and reconstruct the complete image according to the header information.
[0053] In this embodiment, when the image receiver receives the image row data, the image receiver performs image filling at the corresponding positions on the received current image row data according to the current row number information, the column shift number information, and the image data element information included in the header information to achieve parallel image reconstruction and obtain the corresponding reconstructed image. It can be understood that, as Figure 2 shown, during the transmission process of the image row data, due to network fluctuations or other factors, the time for each processing thread to transmit the image row data is not fixed. Therefore, after the image receiver receives each image row data, it directly performs image filling at the corresponding row and column positions according to the header information therein, and the specific image information such as the image color, image brightness, and image grayscale is obtained according to the image element information in the header information. In this way, when the image receiver performs image reconstruction, multiple reconstruction threads can be used for parallel reconstruction, greatly shortening the image reconstruction time, and the reconstruction process of the previous image row data does not affect the image transmission process of other image row data, and the reconstruction process of the previous image row data does not affect the reconstruction process of other image row data, and the two can be performed simultaneously.
[0054] In this embodiment, the image receiver determines whether the filling of the current image row data of the last row is completed. If so, it is determined that the parallel image reconstruction step is completed to obtain and output the corresponding reconstructed image. It can be understood that, asFigure 2 As shown, since the image reconstruction process is carried out in parallel, it is necessary to determine whether the current image line data of the last line of the entire image is filled. It should be noted that the current last line is not the last line of image data of the current image to be transmitted in the traditional sense, but the current image line data with the last line of image data received by the image receiving end as the last line. By judging whether the filling of the current image line data of the last line is completed, if the filling can be completed, it is determined that the image parallel reconstruction step has been completed to obtain and output the corresponding reconstructed image.
[0055] Step S13: When the image transmission type is a partial image transmission type, detect whether the current image line data is the required image line data. If so, use a processing thread to transmit the required image line data row by row to the image receiving end so that the image receiving end can perform parallel reconstruction on the received required image line data.
[0056] In this embodiment, when the image transmission type is a partial image transmission type, the mask information of the current image to be transmitted is obtained; wherein, the mask information is used to define a specific image area of the required transmitted image, and the mask information includes: the starting position of the required image line data and the boundary position of the required image line data; it can be understood that, as Figure 2 shown, when the image transmission type is a partial image transmission type, first generate a mask information for the image information generation area, and then the subsequent image transmission is carried out for a complete line or a fixed number of pixels within the image area covered by the mask information; based on this mask information, set the header information of the required image line data of the required transmitted image part at this time, and transmit the set required image line data including the current line number information, column shift number information, and image data element information row by row so that the image receiving end can perform parallel reconstruction on the required image line data.
[0057] In this embodiment, before image transmission, the image sending end detects whether the header information of the current image line data meets the data position condition constructed based on the mask information. If so, it is determined that the current image line data is the required image line data, and then a processing thread is used to transmit the required image line data row by row to the image receiving end so that the image receiving end can perform parallel reconstruction on the received required image line data. It can be understood that, as Figure 2As shown, in order to ensure that the reconstructed image is the required image that only contains key image information, the image sender detects the header information of the currently generated image line data row by row, and the image receiver pre-constructs a specific image area range condition, that is, a data position condition, according to the start position and boundary position of the required image line data in the mask information. Then, if the detected header information is within the specific image area range condition, it is determined that the currently generated image line data is the required image line data to be transmitted, and the required image line data is transmitted row by row using a processing thread so that the image receiver can perform parallel reconstruction on it.
[0058] In this embodiment, the image receiver fills the received required image line data at the corresponding position represented by the mask information according to the current row number information, column shift number information, and image data element information included in the header information to achieve parallel image reconstruction and obtain the corresponding reconstructed image. It can be understood that, as Figure 2 shown, the received required image line data is filled at the corresponding position represented by the mask information based on the current row number information, column shift number information, and image data element information included in the header information to achieve partial parallel image reconstruction. Among them, during the transmission process of the image line data, due to network fluctuations or other factors, the time for each processing thread to transmit the required image line data is not fixed. Therefore, after the image receiver receives the required image line data, it directly fills the image at the corresponding row and column positions according to the header information therein, and the specific image information such as image color, image brightness, and image grayscale is obtained according to the image element information in the header information. In this way, when the image receiver performs image reconstruction, multiple reconstruction threads can perform parallel reconstruction, greatly shortening the image reconstruction time, and the reconstruction process of the previous required image line data does not affect the image transmission process of other required image line data, nor does the reconstruction process of the previous required image line data affect the reconstruction process of other required image line data, and the two can be performed simultaneously. In this way, since the transmitted and reconstructed image line data is less than the image line data of the entire image, for some partial image reconstruction scenarios, through the partial image reconstruction method, the time required for image reconstruction can be shorter, and since the finally reconstructed image is a partial image, it can intuitively and conveniently enable relevant personnel to use the information contained in the image without having to re-determine the useful information from a large amount of irrelevant and useless image information.
[0059] In this embodiment, the image receiver determines whether the filling of the required image line data of the last row is completed. If so, it is determined that the parallel image reconstruction step is completed to obtain and output the corresponding reconstructed image. It can be understood that, as Figure 2As shown, since the image reconstruction process is carried out in parallel, it is necessary to determine whether the required image line data of the last line of the partial image to be transmitted is filled. It should be noted that the current last line is not the required image data of the last line of the current image to be transmitted in the traditional sense, but the current required image line data with the last line of the required image data received by the image receiving end as the last line. By judging whether the filling of the current required image line data of the last line is completed, if the filling can be completed, it is determined that the image parallel reconstruction step is completed, so as to obtain and output the corresponding reconstructed image.
[0060] The present invention performs pipelining operations on the production, transmission, and reconstruction of images, breaks the concept of the smallest frame of the image, decomposes the image in terms of lines or pixels, digitally packages it, and initiates transmission to remote users as fast as possible. In this way, the image is generated (most image sending ends generate images line by line), transmitted, and received and reconstructed remotely at the same time, so as to ensure that the image can reach the memory of the target computer at the fastest speed. As Figure 3 shown, every time a line of data is generated, the data will be transmitted. Assuming that the time for generating a line of data is t1, the time for a line of data to be transmitted from generation to the receiving end is t2, and the time for reconstructing a line of data is t3 (which can be ignored). Since the generation and transmission of each line of data are pipelining operations, assuming that the entire image has n lines, the time for generating the entire image is n×t1, and the transmission time is n×t2. Since the image is transmitted line by line, the overall transmission time includes the generation time of the entire image. At the same time, since the generation and transportation of data are carried out in parallel pipelines, the overall delay is n×t2 - n×t1. If t2 < t1, the overall delay time is only t2, while for conventional image transmission, since it is necessary to wait for the entire image to be generated, the overall delay is n×t2. Even for conventional parallel transmission, assuming the number of threads is m, the total delay is n / m×t2, and only in the extreme case of m = n can the delay reach t2. Therefore, the present invention ensures the minimization of the delay in the transmission stage. At the image receiving end, it is parallel processing, and the delay in reconstructing the entire image can be almost ignored. Compared with the current situation in medical image transmission, in order to balance latency and image quality, it is often necessary to collect the complete image, compress it to a certain range and then transmit it. A higher compression ratio usually results in a greater loss of image quality, and waiting for the generation of the complete image and the image compression speed directly affect the image transmission frame rate and image latency, thus affecting the real-time performance of the image. The present invention directly adds the corresponding header information during the process of generating the image line by line at the image sending end, directly transmits the image line data, without waiting for the complete image to be compressed and transmitted, ensures that the transmitted image quality is high-quality, and does not need to wait for the generation of the complete image and the time delay caused by image compression processing, etc. While ensuring the image quality, it further realizes high-speed image transmission and reconstruction.
[0061] It can be seen that the present application discloses an image transmission method, which is applied to an image sending end and includes: determining the image transmission type of the current image to be transmitted collected by an image sensor; when the image transmission type is a complete image transmission type, using each processing thread to transmit the current image line data generated line by line by the image sending end to an image receiving end line by line, so that the image receiving end performs parallel reconstruction on the received current image line data; when the image transmission type is a partial image transmission type, detecting whether the current image line data is the required image line data, and if so, using a processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end performs parallel reconstruction on the received required image line data. Thus, by first determining the image transmission type of the current image to be transmitted collected by the image sensor, after determining the image transmission type, performing corresponding image transmission and image processing on the image line data generated by the image sending end according to the selected image transmission processing method. When the image transmission type is a complete image transmission type, using each processing thread to transmit each line of the image line data to the image sending end line by line, so that the image receiving end performs parallel reconstruction according to each line of the received image line data. In this way, the image sending end generates image data line by line while performing image transmission, and the image receiving end receives the image line data and reconstructs the image, thereby ensuring that the image can reach the memory of the target computer at the fastest speed; on the other hand, when the image transmission type is a partial image transmission type, while saving image transmission time and ensuring image quality, for the partial image transmission type, by detecting whether the image line data is the required image line data, only transmitting the required image line data, and also only reconstructing the image of the required area during image reconstruction, reducing the transmission of irrelevant information in the entire image to be transmitted, and further improving the image transmission efficiency in the scenario that meets the real image transmission requirements.
[0062] Referring to Figure 4 as shown, the present invention also correspondingly discloses an image transmission device, which is applied to an image sending end and includes:
[0063] a type determination module 11, configured to determine the image transmission type of the current image to be transmitted collected by an image sensor;
[0064] a first transmission module 12, configured to, when the image transmission type is a complete image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sending end to an image receiving end line by line, so that the image receiving end performs parallel reconstruction on the received current image line data;
[0065] The second transmission module 13 is configured to, when the image transmission type is the partial image transmission type, detect whether the current image line data is the required image line data. If so, use a processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received required image line data.
[0066] It can be seen that the present application discloses determining the image transmission type of the current image to be transmitted collected by an image sensor; when the image transmission type is the complete image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sending end to the image receiving end, so that the image receiving end can perform parallel reconstruction on the received current image line data; when the image transmission type is the partial image transmission type, detect whether the current image line data is the required image line data. If so, use a processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received required image line data. Thus, by first determining the image transmission type of the current image to be transmitted collected by the image sensor, after determining the image transmission type, perform corresponding image transmission and image processing on the image line data generated by the image sending end according to the selected image transmission processing method. When the image transmission type is the complete image transmission type, use each processing thread to transmit each line of the image line data to the image sending end line by line, so that the image receiving end can perform parallel reconstruction according to each line of the received image line data. In this way, the image sending end generates image data line by line while performing image transmission, and the image receiving end receives the image line data and reconstructs the image, so as to ensure that the image can reach the memory of the target computer at the fastest speed; on the other hand, when the image transmission type is the partial image transmission type, while saving image transmission time and ensuring image quality, for the partial image transmission type, by detecting whether the image line data is the required image line data, only transmit the required image line data, and only reconstruct the image of the required area during image reconstruction, reducing the transmission of irrelevant information in the entire image to be transmitted, and further improving the image transmission efficiency in the scenario that meets the real image transmission requirements.
[0067] Furthermore, the embodiment of the present application also discloses an electronic device. Figure 5 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure should not be regarded as any limitation on the scope of use of the present application.
[0068] Figure 5Schematic diagram of the structure of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the image transmission method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0069] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0070] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
[0071] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a disk, or an optical disc, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be short-term storage or permanent storage.
[0072] Among them, the operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the massive data 223 in the memory 22 by the processor 21. It can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the image transmission method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by the external device received by the electronic device, but also the data collected by its own input / output interface 25, etc.
[0073] Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the foregoing disclosed image transmission method is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0074] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, reference can be made to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and reference can be made to the description in the method part for the relevant parts.
[0075] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disk, removable disk, CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the technical field.
[0076] Finally, it should also be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0077] The above has introduced the solution provided by the present invention in detail. Specific examples are used herein to illustrate the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. An image transmission method, characterized in that, Applied to the image sending end, including: Determine the image transmission type of the current image to be transmitted collected by the image sensor; When the image transmission type is the complete image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sending end to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received current image line data; When the image transmission type is the partial image transmission type, detect whether the current image line data is the required image line data. If so, use the processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received required image line data; Among them, the step of when the image transmission type is the complete image transmission type, using each processing thread to transmit the current image line data generated line by line by the image sending end to the image receiving end line by line, includes: When the image transmission type is the complete image transmission type, use each processing thread to transmit the current image line data generated line by line by the image sending end and added with header information to the image receiving end line by line; the header information includes: current line number information, column shift number information, and image data element information; Among them, the step of when the image transmission type is the partial image transmission type, detecting whether the current image line data is the required image line data. If so, using the processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received required image line data, includes: When the image transmission type is the partial image transmission type, obtain the mask information of the current image to be transmitted; among them, the mask information is used to define a specific image area of the image to be transmitted, and the mask information includes: the starting position of the required image line data, the boundary position of the required image line data; Detect whether the header information of the current image line data meets the data position condition constructed based on the mask information. If so, determine that the current image line data is the required image line data, and use the processing thread to transmit the required image line data to the image receiving end line by line, so that the image receiving end can perform parallel reconstruction on the received required image line data.
2. The image transmission method according to claim 1, wherein The step of determining the image transmission type of the current image to be transmitted collected by the image sensor includes: Determine the device type of the imaging device that emits the image signal captured by the image collector; If the device type is the full information image acquisition device type, determine that the image transmission type of the current image to be transmitted collected by the image sensor is the complete image transmission type; If the device type is the image acquisition device type with a fan-shaped imaging area, determine that the image transmission type of the current image to be transmitted collected by the image sensor is the partial image transmission type.
3. The image transmission method according to claim 1, wherein The step of performing parallel reconstruction on the received current image line data by the image receiving end includes: Through the image receiving end and according to the current line number information, column shift number information, and image data element information included in the header information, perform image filling at the corresponding positions on the received current image line data to achieve parallel image reconstruction and obtain the corresponding reconstructed image.
4. The image transmission method according to claim 1, characterized in that, Parallel reconstruction of the received required image line data is performed by the image receiving end, including: The image receiving end fills the received required image line data at the corresponding positions characterized by the mask information according to the current line number information, column shift number information, and image data element information included in the header information, so as to achieve parallel image reconstruction and obtain the corresponding reconstructed image.
5. The image transmission method according to any one of claims 1 to 4, characterized in that It also includes: The image receiving end determines whether the current image line data of the last line or the required image line data of the last line is filled. If so, it is determined that the parallel image reconstruction step is completed, so as to obtain and output the corresponding reconstructed image.
6. An image transmission device, characterized in that, Applied to the image sending end, it includes: A type determination module for determining the image transmission type of the current image to be transmitted collected by the image sensor; A first transmission module for, when the image transmission type is the complete image transmission type, using each processing thread to sequentially transmit the current image line data generated line by line by the image sending end to the image receiving end, so that the image receiving end performs parallel reconstruction on the received current image line data; A second transmission module for, when the image transmission type is the partial image transmission type, detecting whether the current image line data is the required image line data. If so, using the processing thread to sequentially transmit the required image line data to the image receiving end, so that the image receiving end performs parallel reconstruction on the received required image line data; The first transmission module is specifically used for, when the image transmission type is the complete image transmission type, using each processing thread to sequentially transmit the current image line data generated line by line by the image sending end and with the header information added to the image receiving end; the header information includes: current line number information, column shift number information, and image data element information; The second transmission module is used for, when the image transmission type is the partial image transmission type, obtaining the mask information of the current image to be transmitted; wherein, the mask information is used to define a specific image area of the required transmitted image, and the mask information includes: the starting position of the required image line data and the boundary position of the required image line data; detecting whether the header information of the current image line data meets the data position condition constructed based on the mask information. If so, it is determined that the current image line data is the required image line data, and then using the processing thread to sequentially transmit the required image line data to the image receiving end, so that the image receiving end performs parallel reconstruction on the received required image line data.
7. An electronic device, characterized in that, It includes: A memory for storing a computer program; A processor for executing the computer program to implement the steps of the image transmission method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by the processor, the steps of the image transmission method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and system for increasing frame rates of images and optical imaging touch screen system
CN104111756A
Image transmission device and method
CN106973188A