CN-118138765-B - Image transmission method, device, detector, terminal equipment and storage medium
Abstract
The embodiment of the application provides an image transmission method, an image transmission device, a detector, terminal equipment and a storage medium, wherein the image transmission method, the detector, the terminal equipment and the storage medium are applied to the detector in an image processing system, and the image processing system also comprises the terminal equipment, and the method comprises the following steps: acquiring an image to be transmitted, determining a first position of an object region and a second position of a null field region in the image to be transmitted, wherein the null field region is a region without an object in the image to be transmitted, clipping the image to be transmitted from the image to be transmitted based on the first position, calculating a null field index corresponding to the null field region according to a pixel value of the null field region corresponding to the second position, and transmitting the image to a terminal device so that the terminal device can reconstruct the image based on the image to be transmitted and the null field index to obtain a transmitted image. Therefore, only the object image and the empty field index are required to be transmitted to the terminal equipment, the transmission of the data volume can be reduced, the image transmission efficiency is improved, and the cost and the development complexity of image transmission are reduced.
Inventors
- XU KAI
- WANG XIAOJIANG
- RAN YOUMING
Assignees
- 杭州睿影科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20231214
Claims (18)
- 1. An image transmission method, characterized by being applied to a detector in an image processing system, the image processing system further comprising a terminal device, the method comprising: Collecting an image to be transmitted; determining a first position of an object region in the image to be transmitted and a second position of a null field region, wherein the null field region is a region in the image to be transmitted, in which no object exists; based on the first position, cutting out an object image from the image to be transmitted; According to the pixel value of the empty field region corresponding to the second position, calculating to obtain an empty field index corresponding to the empty field region, wherein the empty field index is used for restoring an image of the empty field region in the image reconstruction process, and the empty field index at least comprises one of average value, standard deviation, maximum value, minimum value, median and duty ratio and uniformity of pixel points within the standard deviation of the average value preset multiple; And transmitting the object image and the empty field index to the terminal equipment so that the terminal equipment can reconstruct the image based on the object image and the empty field index to obtain a transmitted image.
- 2. The method of claim 1, wherein the step of determining a first location of an object region and a second location of a null field region in the image to be transmitted comprises: identifying an object region in the image to be transmitted by adopting an object identification algorithm to obtain a first initial position of the object region; Identifying a null field area in the image to be transmitted by adopting a null field identification algorithm to obtain a second initial position of the null field area; Comparing the first initial position with the second initial position to obtain a comparison result; and adjusting the first initial position according to the comparison result to obtain a first position of the object region, and adjusting the second initial position according to the comparison result to obtain a second position of the empty field region.
- 3. The method according to claim 2, wherein the step of identifying the empty field region in the image to be transmitted using an empty field identification algorithm to obtain a second initial position of the empty field region comprises: and identifying the empty field region in the image to be transmitted according to the image characteristics corresponding to the empty field region to obtain a second initial position of the empty field region, wherein the image characteristics at least comprise the characteristic that the pixel value of the image meets Gaussian noise.
- 4. The method according to claim 2, wherein the step of adjusting the first initial position according to the comparison result to obtain a first position of the object region, and adjusting the second initial position according to the comparison result to obtain a second position of the empty field region comprises: Determining a first boundary and a second boundary of the position deviation within a preset deviation range according to the comparison result, wherein the first boundary is a boundary represented by the first initial position, and the second boundary is a boundary represented by the second initial position; and calculating the position average value of the first boundary and the second boundary aiming at the first boundary and the second boundary, and obtaining the first position of the object region and the second position of the empty field region as the boundary between the object region and the empty field region.
- 5. The method of claim 1, wherein the image processing system further comprises a sensor; the step of determining a first position of an object region and a second position of a null field region in the image to be transmitted comprises: acquiring a sensor image shot by the sensor; Determining a first position of an object region in the image to be transmitted according to the position of the object region in the sensor image and the position relation between the sensor and the detector; And determining a second position of the empty field area according to the first position.
- 6. The method according to any of claims 1-5, characterized in that before the step of transmitting the object image and the null field indicator to the terminal device, the method further comprises: and compressing the object image to obtain a compressed object image.
- 7. An image transmission method, characterized by being applied to a terminal device in an image processing system, the image processing system further comprising a detector, the method comprising: Receiving an object image transmitted by the detector and a null field index, wherein the object image is obtained by cutting based on a first position of an object region in the image to be transmitted, the null field index is obtained by calculating according to a pixel value of the null field region in the image to be transmitted, the null field index is used for restoring the image of the null field region in the image reconstruction process, and the null field index at least comprises one of a mean value, a standard deviation, a maximum value, a minimum value, a median and a duty ratio and uniformity of a pixel point within a preset multiple standard deviation of the mean value; And carrying out image reconstruction based on the object image and the empty field index to obtain a transmitted image.
- 8. The method of claim 7, wherein the step of reconstructing an image based on the object image and the empty field index to obtain a transmitted image comprises: filling the object image into a preset blank image according to the first position to obtain a first image, wherein the size of the preset blank image is the same as that of the image to be transmitted; Reconstructing a null field image according to the null field index to obtain a second image, wherein the size of the second image is the same as that of the image to be transmitted; based on the first position, removing the area corresponding to the object area in the second image to obtain a null field image; and superposing the first image and the empty field image to obtain the transmitted image.
- 9. The method of claim 8, wherein prior to the step of superimposing the first image and the empty field image to obtain the transmitted image, the method further comprises: according to the pixel value of the empty field image, calculating an empty field index of the empty field image to be used as a reconstructed empty field index; calculating a difference value between the reconstructed empty field index and the empty field index transmitted by the detector; if the difference value is not in the preset difference value range, adjusting the pixel value of the empty field image to obtain an adjusted image; and taking the adjusted image as a null field image, returning to the pixel value according to the null field image, and calculating a null field index of the null field image to be used as a step of reconstructing the null field index until the difference value is within the preset difference value range.
- 10. An image transmission apparatus for use in a detector in an image processing system, the image processing system further comprising a terminal device, the apparatus comprising: the image acquisition module to be transmitted is used for acquiring the image to be transmitted; The position determining module is used for determining a first position of an object region and a second position of a null field region in the image to be transmitted, wherein the null field region is a region in the image to be transmitted, and no object exists in the region; the object image clipping module is used for clipping the image to be transmitted to obtain an object image based on the first position; The empty field index calculation module is used for calculating and obtaining an empty field index corresponding to the empty field area according to the pixel value of the empty field area corresponding to the second position, wherein the empty field index is used for restoring an image of the empty field area in the image reconstruction process and at least comprises one of a mean value, a standard deviation, a maximum value, a minimum value, a median and the uniformity of the pixel point within a standard deviation of a preset multiple of the mean value; And the image and index transmission module is used for transmitting the object image and the empty field index to the terminal equipment so that the terminal equipment can reconstruct the image based on the object image and the empty field index to obtain a transmitted image.
- 11. The apparatus of claim 10, wherein the location determination module comprises: the first initial position acquisition sub-module is used for identifying an object region in the image to be transmitted by adopting an object identification algorithm to obtain a first initial position of the object region; The second initial position acquisition sub-module is used for identifying the empty field region in the image to be transmitted by adopting an empty field identification algorithm to obtain a second initial position of the empty field region; the comparison result obtaining sub-module is used for comparing the first initial position with the second initial position to obtain a comparison result; The position acquisition sub-module is used for adjusting the first initial position according to the comparison result to obtain a first position of the object region, and adjusting the second initial position according to the comparison result to obtain a second position of the empty field region; The second initial position obtaining sub-module includes: The second initial position acquisition unit is used for identifying the empty field region in the image to be transmitted according to the image characteristics corresponding to the empty field region to obtain a second initial position of the empty field region, wherein the image characteristics at least comprise the characteristic that the pixel value of the image meets Gaussian noise; The position acquisition sub-module includes: The boundary determining unit is used for determining a first boundary and a second boundary of the position deviation within a preset deviation range according to the comparison result, wherein the first boundary is the boundary represented by the first initial position, and the second boundary is the boundary represented by the second initial position; A position obtaining unit, configured to calculate, for the first boundary and the second boundary, a position average value of the first boundary and the second boundary, as a boundary between the object region and the empty field region, to obtain a first position of the object region and a second position of the empty field region; The image processing system further comprises a sensor; The location determination module includes: the sensor image determining sub-module is used for acquiring a sensor image shot by the sensor; A first position determining sub-module, configured to determine a first position of an object region in the image to be transmitted according to a position of the object region in the sensor image and a positional relationship between the sensor and the detector; A second position determining sub-module for determining a second position of the empty field region according to the first position; The apparatus further comprises: And the compressed object image acquisition module is used for carrying out compression processing on the object image before the step of transmitting the object image and the empty field index to the terminal equipment to obtain a compressed object image.
- 12. An image transmission apparatus for use in a terminal device in an image processing system, the image processing system further comprising a detector, the apparatus comprising: the image and index receiving module is used for receiving the object image transmitted by the detector and an empty field index, wherein the object image is obtained by cutting based on a first position of an object area in the image to be transmitted, the empty field index is obtained by calculating according to a pixel value of the empty field area in the image to be transmitted, the empty field index is used for restoring the image of the empty field area in the image reconstruction process, and the empty field index at least comprises one of a mean value, a standard deviation, a maximum value, a minimum value, a median and the duty ratio and uniformity of the pixel point within a preset multiple standard deviation of the mean value; and the transmission image acquisition module is used for reconstructing an image based on the object image and the empty field index to obtain a transmitted image.
- 13. The apparatus of claim 12, wherein the transmission image acquisition module comprises: The first image acquisition sub-module is used for filling the object image into a preset blank image according to the first position to obtain a first image, wherein the size of the preset blank image is the same as that of the image to be transmitted; the second image acquisition sub-module is used for reconstructing the empty field image according to the empty field index to obtain a second image, wherein the size of the second image is the same as that of the image to be transmitted; The empty field image acquisition sub-module is used for eliminating the area corresponding to the object area in the second image based on the first position to obtain an empty field image; a transmission image acquisition sub-module, configured to superimpose the first image and the empty field image to obtain the transmitted image; The apparatus further comprises: A reconstructed empty field index calculation module, configured to calculate, before the step of superimposing the first image and the empty field image to obtain the transmitted image, an empty field index of the empty field image according to a pixel value of the empty field image, as a reconstructed empty field index; The difference value calculation module is used for calculating the difference value between the reconstructed empty field index and the empty field index transmitted by the detector; The image adjusting acquisition module is used for adjusting the pixel value of the empty field image to obtain an adjusted image if the difference value is not in a preset difference value range; and the index calculation return module is used for taking the adjusted image as a null field image, returning the pixel value according to the null field image, calculating the null field index of the null field image, and taking the null field index as a step of reconstructing the null field index until the difference value is within the preset difference value range.
- 14. An image processing system, characterized in that the system comprises a detector and a terminal device, wherein: The detector is used for acquiring an image to be transmitted, determining a first position of an object region and a second position of a null field region in the image to be transmitted, cutting the image to be transmitted from the image to be transmitted based on the first position, calculating a null field index corresponding to the null field region according to a pixel value of the null field region corresponding to the second position, transmitting the object image and the null field index to the terminal equipment so that the terminal equipment performs image reconstruction based on the object image and the null field index to obtain a transmitted image, wherein the null field region is a region without an object in the image to be transmitted, and the null field index is used for recovering the image of the null field region in the image reconstruction process and at least comprises one of a mean value, a standard deviation, a maximum value, a minimum value, a median and a duty ratio and uniformity of the pixel point within a mean value preset multiple standard deviation; the terminal equipment is used for receiving the object image and the empty field index transmitted by the detector, carrying out image reconstruction based on the object image and the empty field index to obtain a transmitted image, wherein the object image is obtained by cutting based on a first position of an object region in an image to be transmitted, and the empty field index is obtained by calculating according to pixel values of the empty field region in the image to be transmitted.
- 15. The system of claim 14, further comprising a sensor, wherein: The sensor is used for shooting a sensor image so that the detector can acquire the sensor image, determining a first position of an object area in the image to be transmitted according to the position of the object area in the sensor image and the position relation between the sensor and the detector, and determining a second position of the empty field area according to the first position.
- 16. A kind of detector is provided, which is composed of a detector, characterized by comprising the following steps: a memory for storing a computer program; A processor for implementing the method of any of claims 1-6 when executing a program stored on a memory.
- 17. A terminal device, comprising: a memory for storing a computer program; A processor for implementing the method of any of claims 7-9 when executing a program stored on a memory.
- 18. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-9.
Description
Image transmission method, device, detector, terminal equipment and storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to an image transmission method, an image transmission device, a detector, a terminal device, and a storage medium. Background The detector is widely applied in the fields of industrial detection, medical detection and the like. In the process of using the detector, the image acquired by the detector needs to be transmitted to the terminal equipment for image viewing and processing, and in the process of transmitting the image from the detector to the terminal equipment, the frame rate of the image is greatly limited by the bandwidth of the data link. For the detector with low frame rate, the common interface is gigabit network, and the interface is widely applied between terminal equipment and route, so the requirement on hardware of the terminal equipment is lower and the suitability is stronger. However, for a high frame rate detector, many interfaces are used, such as a tera-net, a dual-net port, and a Camera-link interface. The adaptability of the terminal equipment is low no matter which interface is used, a tera-network card or two network interfaces or an adaptive Camera-link interface is needed, and the development of the drive of different interfaces can make the software of the terminal equipment very complex, and meanwhile, the cost of more hardware is increased for the detector, so that the cost and the development complexity of the detector for transmitting images to the terminal equipment are both high. Disclosure of Invention An embodiment of the application aims to provide an image transmission method, an image transmission device, a detector, a terminal device and a storage medium, so as to reduce the cost and development complexity of image transmission. The specific technical scheme is as follows: in a first aspect, an embodiment of the present application provides an image transmission method, which is applied to a detector in an image processing system, where the image processing system further includes a terminal device, and the method includes: Collecting an image to be transmitted; determining a first position of an object region in the image to be transmitted and a second position of a null field region, wherein the null field region is a region in the image to be transmitted, in which no object exists; based on the first position, cutting out an object image from the image to be transmitted; According to the pixel value of the empty field area corresponding to the second position, calculating to obtain an empty field index corresponding to the empty field area; And transmitting the object image and the empty field index to the terminal equipment so that the terminal equipment can reconstruct the image based on the object image and the empty field index to obtain a transmitted image. Optionally, the step of determining the first position of the object region and the second position of the empty field region in the image to be transmitted includes: identifying an object region in the image to be transmitted by adopting an object identification algorithm to obtain a first initial position of the object region; Identifying a null field area in the image to be transmitted by adopting a null field identification algorithm to obtain a second initial position of the null field area; Comparing the first initial position with the second initial position to obtain a comparison result; and adjusting the first initial position according to the comparison result to obtain a first position of the object region, and adjusting the second initial position according to the comparison result to obtain a second position of the empty field region. Optionally, the step of identifying the empty field region in the image to be transmitted by adopting an empty field identification algorithm to obtain a second initial position of the empty field region includes: and identifying the empty field region in the image to be transmitted according to the image characteristics corresponding to the empty field region to obtain a second initial position of the empty field region, wherein the image characteristics at least comprise the characteristic that the pixel value of the image meets Gaussian noise. Optionally, the step of adjusting the first initial position according to the comparison result to obtain a first position of the object area, and adjusting the second initial position according to the comparison result to obtain a second position of the empty field area includes: Determining a first boundary and a second boundary of the position deviation within a preset deviation range according to the comparison result, wherein the first boundary is a boundary represented by the first initial position, and the second boundary is a boundary represented by the second initial position; and calculating the position average v