Image data transmission method and device, equipment, storage medium and program product
By transmitting only target pixel points that differ from the previous frame of the image data in the endoscope display system, the problem of reducing data transmission stability caused by excessive image data is solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- CN202411756157.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-25
AI Technical Summary
In the endoscope display system, excessive amount of image data leads to a decrease in data transmission stability.
By acquiring the current frame image and the previous frame image, the target pixel points to be transmitted are determined based on the grayscale difference, and only these target pixel points are transmitted to update the display image of the receiver.
It effectively reduces the amount of data transmitted and bandwidth usage, and improves the stability of image data transmission.
Smart Images

Figure CN119893034A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to an image data transmission method, device, equipment, storage medium and program product. Background Art
[0002] In the display system of the endoscope, the image signal processor processes the image data collected by the image sensor. Then, the processed image data is sent to the display device through a cable, and the display device displays, records, and takes photos of the processed image data. During the use of the endoscope, the image signal processor will continuously transmit multiple frames of image data to the display device. The amount of data to be transmitted is large, so it often takes up a large amount of transmission bandwidth, which reduces the stability of data transmission. Summary of the invention
[0003] In view of this, the present invention provides an image data transmission method, device, equipment, storage medium and program product to solve the problem of reduced data transmission stability caused by excessive image data volume.
[0004] In a first aspect, the present invention provides a method for image data transmission, the method comprising:
[0005] Get the current frame image and the previous frame image;
[0006] Determining a target pixel point to be transmitted in the current frame image based on a grayscale difference between the current frame image and the previous frame image;
[0007] The target pixel point is transmitted to a receiving party, so that the receiving party updates the currently displayed image according to the received target pixel point.
[0008] In this method, when transmitting image data to the receiver, only the target pixels in the current frame image that are different from the previous frame image are transmitted. Therefore, there is no need to transmit the data of the entire image frame, which can effectively reduce the amount of data to be transmitted. With the reduction in the amount of data transmitted, the bandwidth resources occupied by data transmission will also be reduced accordingly, which helps to improve the stability of image data transmission.
[0009] In some implementations, determining the target pixel to be transmitted in the current frame image based on the grayscale difference between the current frame image and the previous frame image includes:
[0010] Performing a differential operation on the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image;
[0011] Obtaining a first grayscale difference threshold;
[0012] When the target grayscale difference value of any image pixel point between the current frame image and the previous frame image is greater than the first grayscale difference threshold, the image pixel point is used as the target pixel point.
[0013] In this method, when the grayscale difference between the current frame image and the previous frame image is greater than the first grayscale difference threshold, the image pixel is used as the target pixel to be transmitted. Therefore, the recognition accuracy of the pixel that is different between the current frame image and the previous frame image can be improved, so as to further reduce the transmission of the same pixel and reduce the bandwidth occupation, thereby improving the stability of image data transmission.
[0014] In some implementations, determining the target pixel to be transmitted in the current frame image based on the grayscale difference between the current frame image and the previous frame image further includes:
[0015] When the target grayscale difference value of any image pixel point between the current frame image and the previous frame image is less than or equal to the first grayscale difference threshold, obtaining the grayscale difference accumulated value corresponding to the image pixel point;
[0016] Based on the sum of the grayscale difference accumulated value and the corresponding target grayscale difference value, updating the grayscale difference accumulated value of the image pixel;
[0017] The target pixel is determined based on the updated grayscale difference accumulated value corresponding to the image pixel.
[0018] In this method, when the target grayscale difference of any image pixel is less than or equal to the first grayscale difference threshold, it is further determined whether the image pixel needs to be used as the target pixel to be transmitted based on the accumulated grayscale difference of multiple consecutive frames of images corresponding to the image pixel. Therefore, it is possible to avoid the situation where the image pixel undergoes a significant change after multiple consecutive frames of images, but the changed image pixel is not transmitted, so as to further ensure the accuracy of the image generated by the receiving party.
[0019] In some implementations, determining the target pixel based on the updated grayscale difference accumulated value corresponding to the image pixel includes:
[0020] Obtaining a second grayscale difference threshold;
[0021] When the updated grayscale difference accumulated value corresponding to the image pixel point is greater than the second grayscale difference threshold, the image pixel point is used as the target pixel point, and the grayscale difference accumulated value corresponding to the image pixel point is set to zero.
[0022] In this method, when the updated grayscale difference cumulative value corresponding to the image pixel is greater than the second grayscale difference threshold, the image pixel is used as the target pixel to be transmitted, and the grayscale difference cumulative value corresponding to the image pixel is set to zero. Therefore, the recognition accuracy of the target pixel to be transmitted can be further improved.
[0023] In some implementations, performing a differential operation on the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image includes:
[0024] Performing unified region division on the current frame image and the previous frame image to obtain a plurality of first image regions of the current frame image and a plurality of second image regions of the previous frame image, wherein the first image regions correspond to the second image regions;
[0025] Calculating a first average grayscale value of each of the first image regions and a second average grayscale value of each of the second image regions;
[0026] Obtaining a regional grayscale difference value of each of the first image regions based on a difference value between the first average grayscale value and the corresponding second average grayscale value;
[0027] The regional grayscale difference is used as the target grayscale difference of each image pixel in the corresponding first image region.
[0028] In this method, the current frame image and the previous frame image are divided into regions, and the difference in the average grayscale value of the image region at the same position between the current frame image and the previous frame image is used as the target grayscale difference of each image pixel point in the image region. Therefore, the image pixel points that need to be transmitted in the current frame image can be judged using the divided image region as the minimum unit, thereby improving the efficiency of image pixel point judgment, and further improving the efficiency of image data transmission to ensure the real-time performance of image data.
[0029] In some implementations, obtaining the first grayscale difference threshold includes:
[0030] At every preset period, statistical analysis is performed on the grayscale difference of the image acquired within the preset period to obtain a statistical analysis feature of the grayscale difference;
[0031] The first grayscale difference threshold is determined based on the statistical analysis feature.
[0032] In this method, the first grayscale difference threshold is dynamically adjusted by the statistical analysis characteristics of the grayscale difference of the image within a preset period. Therefore, the grayscale difference judgment threshold between the current frame image and the previous frame image can be adaptively adjusted as the environment changes, so as to improve the accuracy of the judgment of the changed pixel points between the two frames of images.
[0033] In a second aspect, the present invention provides an image data transmission device, the device comprising:
[0034] An image data acquisition module is used to acquire the current frame image and the previous frame image;
[0035] A transmission data selection module, used to determine a target pixel point to be transmitted in the current frame image based on a grayscale difference between the current frame image and the previous frame image;
[0036] The image data transmission module is used to transmit the target pixel point to a receiving party, so that the receiving party updates the currently displayed image according to the received target pixel point.
[0037] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image data transmission method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image data transmission method of the first aspect or any corresponding embodiment thereof.
[0039] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the image data transmission method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 is a flowchart of an image data transmission method according to an embodiment of the present invention;
[0042] Figure 2 is a structural block diagram of an image data transmission device according to an embodiment of the present invention;
[0043] Figure 3 is a structural block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0045] In the soft endoscope display system of the endoscope, the image signal processor (ISP) processes the image data collected by the image sensor. Then, the processed image data is sent to the display device (such as a video board) through a cable, and the display device displays, records and photographs the processed image data. During the use of the endoscope, the image signal processor will continuously transmit multiple frames of image data to the display device, and the amount of data to be transmitted is large. Therefore, in order to meet the real-time transmission of image data, the cable needs to provide a larger transmission rate, which requires a large amount of transmission bandwidth, resulting in reduced data transmission stability.
[0046] In view of this, according to an embodiment of the present invention, an embodiment of an image data transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] In this embodiment, a method for transmitting image data is provided, which can be used for the image signal processor of the endoscope mentioned above. Figure 1 FIG. 1 is a flow chart of an image data transmission method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0048] Step S101, obtaining the current frame image and the previous frame image.
[0049] It should be noted that the current frame image and the previous frame image are obtained by processing the image data collected by the image sensor by the image signal processor.
[0050] Step S102, based on the grayscale difference between the current frame image and the previous frame image, determine the target pixel point to be transmitted in the current frame image.
[0051] Specifically, the inter-frame difference method can be used to detect the grayscale value difference of the image pixel between the current frame image and the previous frame image. If the grayscale value difference is greater than a preset grayscale difference threshold, the image pixel is used as the target pixel to be transmitted.
[0052] Step S103: transmitting the target pixel point to a receiver, so that the receiver updates the currently displayed image according to the received target pixel point.
[0053] Specifically, the target pixel carries its position information in the current frame image. The receiver updates the pixel of the corresponding area in the current display image to the target pixel based on the position information, and obtains and displays the updated display image.
[0054] Exemplarily, assuming that the receiving party is a display device, if the display device is currently displaying the n-1th frame image, after the image signal processor transmits the target pixel point of the nth frame image to the display device, the display device can update the pixel point at the same position as the target pixel point in the currently displayed n-1th frame image according to the target pixel point to restore the nth frame image.
[0055] The image data transmission method provided in this embodiment, in the process of transmitting image data to the receiving party, only transmits the target pixel points in the current frame image that are different from the previous frame image. Therefore, it is not necessary to transmit the data of the entire image frame, thereby effectively reducing the amount of data to be transmitted. With the reduction of the amount of data transmitted, the bandwidth resources occupied by the data transmission will also be reduced accordingly, thereby helping to improve the stability of image data transmission.
[0056] In some optional implementations, the step S102 of determining the target pixel to be transmitted in the current frame image based on the grayscale difference between the current frame image and the previous frame image includes:
[0057] Step a1, performing a differential operation on the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image.
[0058] Specifically, a differential operation is performed on image pixels at the same position in the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image.
[0059] Alternatively, each frame of image is divided into regions, and the target grayscale difference of each image pixel in the image region is determined by comparing the average grayscale value of the image region between the current frame of image and the previous frame of image.
[0060] Step a2, obtaining a first grayscale difference threshold.
[0061] Specifically, a fixed threshold may be selected as the first grayscale difference threshold based on past experience, or the first grayscale difference threshold may be determined by using a threshold segmentation method such as a maximum fuzzy entropy method or a maximum between-class method.
[0062] It can be understood that the selection of the first grayscale difference threshold should be able to be used to determine image pixels that have undergone significant changes or differences between two consecutive image frames, and at the same time, be able to avoid misjudgment caused by slight grayscale value changes.
[0063] Step a3: when the target grayscale difference of any image pixel between the current frame image and the previous frame image is greater than a first grayscale difference threshold, the image pixel is taken as the target pixel.
[0064] It can be understood that the target grayscale difference value of each image pixel is compared with the first grayscale difference threshold value. If the target grayscale difference value of any image pixel is less than or equal to the first grayscale difference threshold value, it indicates that the image pixel has no significant change between the current frame image and the previous frame image. If the target grayscale difference value of any image pixel is greater than the first grayscale difference threshold value, it indicates that the image pixel has significant change between the current frame image and the previous frame image. Therefore, it is necessary to send the pixel points with significant changes to the receiver so that the receiver can update the displayed image according to the received pixel points.
[0065] The image data transmission method provided in this embodiment uses the image pixel as the target pixel to be transmitted when the pixel grayscale difference between the current frame image and the previous frame image is greater than the first grayscale difference threshold. Therefore, the recognition accuracy of the pixel that is different between the current frame image and the previous frame image can be improved, so as to further reduce the transmission of the same pixel and reduce the bandwidth occupation, thereby improving the stability of image data transmission.
[0066] In addition, the image data transmission method provided in this embodiment also includes: when the target grayscale difference of any image pixel between the current frame image and the previous frame image is less than or equal to the first grayscale difference threshold, saving the target grayscale difference of the image pixel.
[0067] It can be understood that when transmitting an image, assuming that the image displayed on the display device at this time is the n-1th frame image, before the image signal processor transmits the processed nth frame image to the display device, it is necessary to first determine whether there are image pixels with significant changes in the nth frame image. If there are image pixels with significant changes in the nth frame image, the image pixels with significant changes in the nth frame image are transmitted. If there are no image pixels with significant changes in the nth frame image, the n-1th frame image is retained.
[0068] In some optional embodiments, the above step a1 of performing a differential operation on the current frame image and the previous frame image to obtain a target grayscale difference value for each image pixel in the current frame image includes: performing unified area division on the current frame image and the previous frame image respectively to obtain multiple first image areas of the current frame image and multiple second image areas of the previous frame image, the first image areas corresponding to the second image areas; calculating a first average grayscale value of each first image area and a second average grayscale value of each second image area; obtaining a regional grayscale difference value of each first image area based on the difference between the first average grayscale value and the corresponding second average grayscale value; and using the regional grayscale difference value as the target grayscale difference value for each image pixel in the corresponding first image area.
[0069] The image data transmission method provided in this embodiment divides the current frame image and the previous frame image into regions, and uses the difference in average grayscale values of the image region at the same position between the current frame image and the previous frame image as the target grayscale difference of each image pixel point in the image region. Therefore, the image pixel points that need to be transmitted in the current frame image can be judged by using the divided image region as the minimum unit, thereby improving the efficiency of image pixel point judgment, and further improving the efficiency of image data transmission to ensure the real-time performance of image data.
[0070] Furthermore, the transmitting of the target pixel to the receiver in the above step S103 includes: transmitting the first image area where the target pixel is located to the receiver in units of the first image area.
[0071] In some optional embodiments, obtaining the first grayscale difference threshold in the above step a2 includes: performing statistical analysis on the grayscale difference of the image acquired within the preset period at every preset period interval to obtain statistical analysis characteristics of the grayscale difference; and determining the first grayscale difference threshold based on the statistical analysis characteristics.
[0072] Specifically, the statistical analysis feature is an average value of grayscale differences, and the average value of grayscale differences is determined as the first grayscale difference threshold.
[0073] In addition, according to actual conditions, statistical analysis features such as the median and mode of grayscale differences may be selected to determine the first grayscale difference threshold, which is not limited here.
[0074] It should be noted that the preset period needs to be determined based on the time range of changes in human eye perception. For example, the time range of changes in human eye perception is approximately between 0.1s and 0.5s. Assuming that one frame of image is generated every 16.66ms, it takes 16.66ms*5=83ms to generate 5 frames of image, and 83ms does not reach the time range of changes in human eye perception. Therefore, 5 frames of image can be collected in a sliding form within the preset period, and the average grayscale difference of these 5 frames of image is used as the first grayscale difference threshold, and the first grayscale difference threshold is continuously updated in the subsequent process.
[0075] In addition, the first grayscale difference threshold value may be determined by using a threshold segmentation method for image processing such as the maximum inter-class method, which is not limited here.
[0076] The image data transmission method provided in this embodiment dynamically adjusts the first grayscale difference threshold value by using the statistical analysis characteristics of the grayscale difference of the image within a preset period. Therefore, the grayscale difference judgment threshold value between the current frame image and the previous frame image can be adaptively adjusted as the environment changes, so as to improve the accuracy of the judgment of the changed pixel points between the two frames of images.
[0077] In some optional implementations, the step S102 of determining the target pixel to be transmitted in the current frame image based on the grayscale difference between the current frame image and the previous frame image further includes:
[0078] Step b1, when the target grayscale difference value of any image pixel point between the current frame image and the previous frame image is less than or equal to the first grayscale difference threshold, the grayscale difference accumulated value corresponding to the image pixel point is obtained.
[0079] Step b2: updating the grayscale difference accumulated value of the image pixel based on the sum of the grayscale difference accumulated value and the corresponding target grayscale difference value.
[0080] Step b3, determining the target pixel point based on the updated grayscale difference accumulated value corresponding to the image pixel point.
[0081] The image data transmission method provided in this embodiment further determines whether the image pixel needs to be used as the target pixel to be transmitted based on the accumulated grayscale difference of the image pixel corresponding to the image pixel of the continuous multiple frames of images when the target grayscale difference of any image pixel is less than or equal to the first grayscale difference threshold. Therefore, it can avoid the situation that the image pixel undergoes a large change after the continuous multiple frames of images, but the changed image pixel is not transmitted, so as to further ensure the accuracy of the image generated by the receiving party.
[0082] For example, it is assumed that when transmitting the image pixel points of the n-1th frame image, the pixel grayscale difference corresponding to the image pixel point A between the n-1th frame image and the n-2th frame image has not changed significantly, and the image data corresponding to the image pixel point A of the n-1th frame image is not transmitted to the receiving party. In addition, the pixel grayscale value at the image pixel point A of the n-1th frame image has not changed significantly compared with the n-1th frame image, so in the first judgment, the image pixel point A in the n-th frame image is not used as the image pixel point to be transmitted. However, in essence, the grayscale value at the image pixel point A of the n-1th frame image has changed significantly.
[0083] Therefore, when the target grayscale difference of any image pixel is less than or equal to the first grayscale difference threshold, it is necessary to accumulate the target grayscale difference of the image pixel with the target grayscale difference of the previous multiple consecutive frames of images at the same position to further determine whether the image pixel needs to be transmitted, thereby ensuring the accuracy of the image generated by the receiver and improving the accuracy of the image displayed by the endoscope.
[0084] In some optional implementations, determining the target pixel point based on the updated grayscale difference accumulated value corresponding to the image pixel point in the above step b2 includes:
[0085] Step b21, obtaining a second grayscale difference threshold.
[0086] Specifically, a fixed threshold may be selected as the second grayscale difference threshold based on past experience, or the second grayscale difference threshold may be determined by using a threshold segmentation method such as a maximum fuzzy entropy method or a maximum between-class method.
[0087] It should be noted that the above-mentioned continuous frame images refer to a plurality of continuous frame images.
[0088] Step b22: when the updated grayscale difference cumulative value corresponding to the image pixel point is greater than the second grayscale difference threshold, the image pixel point is used as the target pixel point, and the grayscale difference cumulative value corresponding to the image pixel point is set to zero.
[0089] Further, when the updated grayscale difference accumulated value corresponding to the image pixel point is less than or equal to the second grayscale difference threshold, the updated grayscale difference accumulated value corresponding to the image pixel point is saved.
[0090] In the image data transmission method provided in this embodiment, when the updated grayscale difference cumulative value corresponding to the image pixel is greater than the second grayscale difference threshold, the image pixel is used as the target pixel to be transmitted, and the grayscale difference cumulative value corresponding to the image pixel is set to zero. Therefore, the recognition accuracy of the target pixel to be transmitted can be further improved.
[0091] Exemplarily, assuming that the target grayscale difference between the image pixel A of the n-th frame image and the n-1-th frame image is less than or equal to the first grayscale difference threshold, the target grayscale difference of the image pixel A is retained. When the n+1-th frame image arrives, the target grayscale difference between the n+1-th frame image and the n-th frame image is accumulated with the target grayscale difference corresponding to the original image pixel A, and then compared with the second grayscale difference threshold, and so on, until the grayscale difference accumulation value is greater than the second grayscale difference threshold, the image pixel A is used as the target pixel to be transmitted, and the grayscale difference accumulation value corresponding to the image pixel A is set to zero, so as to prevent the target grayscale difference between the image pixel of two consecutive frames of images from being less than the first grayscale difference threshold (i.e., the image pixel has not changed significantly between the two frames of images), but the total target grayscale difference of the image pixel after the target grayscale difference of multiple frames of images is accumulated is greater than the second grayscale difference threshold (i.e., the image pixel has changed significantly after multiple consecutive frames of images).
[0092] In some optional embodiments, obtaining the second grayscale difference threshold in the above step b21 includes: performing statistical analysis on the grayscale difference of the image acquired within the preset period at every preset period interval to obtain statistical analysis characteristics of the grayscale difference; and determining the second grayscale difference threshold based on the statistical analysis characteristics.
[0093] Specifically, the statistical analysis feature in step b21 is the average value of the grayscale difference. In addition, the median, mode, and other statistical analysis features of the grayscale difference can also be selected according to actual conditions to determine the second grayscale difference threshold, which is not limited here.
[0094] Further, if the statistical analysis feature is an average value of grayscale differences, the average value of grayscale differences obtained by statistics in step b21 is determined as the second grayscale difference threshold.
[0095] In addition, the second grayscale difference threshold value may be determined by using a threshold segmentation method for image processing such as the maximum inter-class method, which is not limited here.
[0096] It should be noted that the preset periods used in step a2 and step b21 when determining the grayscale difference threshold may be the same or different, and there is no limitation here.
[0097] It is understandable that fixed thresholds are less adaptable to environmental changes, and there are certain differences in the judgment results between different individuals and different scenes, which will affect the accuracy of the judgment. By determining the first and second grayscale difference thresholds through the statistical analysis characteristics of the grayscale difference of the images collected within a preset period, the thresholds can be dynamically adjusted according to environmental changes to improve the accuracy of the change detection results of the pixels in each frame of the image, thereby improving the accuracy of the real-time image displayed by the receiver and avoiding missed detections by the endoscope.
[0098] It is worth noting that the image data transmission method disclosed in the present invention, when transmitting image data between the image signal processor of the endoscope and the display device, only partially transmits the changed image pixels by comparing the differences between the image pixels of consecutive frame images. Therefore, it is not necessary to transmit the data of each pixel of each frame image, which reduces the amount of image data to be transmitted and reduces the bandwidth occupancy, thereby effectively reducing the requirements for the cable between the image signal processor and the display device. At the same time, the requirements for data transmission rate are reduced, which can improve the stability of image data transmission.
[0099] In this embodiment, an image data transmission device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0100] This embodiment provides an image data transmission device, such as Figure 2 As shown, including:
[0101] The image data acquisition module 201 is used to acquire the current frame image and the previous frame image;
[0102] The transmission data selection module 202 is used to determine the target pixel points to be transmitted in the current frame image based on the grayscale difference between the current frame image and the previous frame image;
[0103] The image data transmission module 203 is used to transmit the target pixel point to the receiving party, so that the receiving party updates the currently displayed image according to the received target pixel point.
[0104] In some optional implementations, the transmission data selection module 202 includes:
[0105] An image difference calculation unit is used to perform a difference calculation on the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image;
[0106] An inter-frame threshold value acquisition unit, used for acquiring a first grayscale difference threshold value;
[0107] The first pixel selection unit is used to select an image pixel as a target pixel when a target grayscale difference value of any image pixel between a current frame image and a previous frame image is greater than a first grayscale difference threshold.
[0108] In some optional implementations, the image difference operation unit includes:
[0109] An image region division unit, used to perform unified region division on the current frame image and the previous frame image respectively, to obtain a plurality of first image regions of the current frame image and a plurality of second image regions of the previous frame image, wherein the first image regions correspond to the second image regions;
[0110] An average grayscale calculation unit, used for calculating a first average grayscale value of each first image region and a second average grayscale value of each second image region;
[0111] A grayscale difference calculation unit, used for obtaining a regional grayscale difference value of each first image region based on a difference value between the first average grayscale value and the corresponding second average grayscale value;
[0112] The grayscale difference determination unit is used to use the regional grayscale difference as the target grayscale difference of each image pixel in the corresponding first image region.
[0113] In some optional implementations, the inter-frame threshold acquisition unit includes:
[0114] The statistical analysis subunit is used to perform statistical analysis on the grayscale difference of the image acquired within the preset period at each preset period interval to obtain the statistical analysis characteristics of the grayscale difference;
[0115] The threshold determination subunit is used to determine a first grayscale difference threshold based on the statistical analysis feature.
[0116] In some optional implementations, the transmission data selection module 202 includes:
[0117] The accumulated value acquisition unit is used to acquire the grayscale difference accumulated value corresponding to the image pixel point when the target grayscale difference value of any image pixel point between the current frame image and the previous frame image is less than or equal to the first grayscale difference threshold value;
[0118] An accumulated value updating unit, used for updating the accumulated grayscale difference value of the image pixel point based on the sum of the accumulated grayscale difference value and the corresponding target grayscale difference value;
[0119] The second pixel selection unit is used to determine the target pixel point based on the updated grayscale difference accumulated value corresponding to the image pixel point.
[0120] In some optional implementations, the second pixel selection unit includes:
[0121] The accumulated threshold value acquisition subunit is used to acquire the second grayscale difference threshold value;
[0122] The target pixel selection subunit is used to take the image pixel as the target pixel and set the grayscale difference cumulative value corresponding to the image pixel to zero when the updated grayscale difference cumulative value corresponding to the image pixel is greater than the second grayscale difference threshold.
[0123] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0124] The image data transmission device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0125] The embodiment of the present invention also provides a computer device having the above Figure 2 The image data transmission device shown.
[0126] See also Figure 3 , Figure 3 is a structural block diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the computer device includes: one or more processors 301, memory 302, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 301 is taken as an example.
[0127] The processor 301 may be a central processing unit, a network processor or a combination thereof. The processor 301 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0128] The memory 302 stores instructions executable by at least one processor 301 , so that the at least one processor 301 executes the method shown in the above embodiment.
[0129] The memory 302 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 302 may optionally include a memory remotely arranged relative to the processor 301, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The memory 302 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 302 may also include a combination of the above types of memory.
[0131] The computer device further includes a communication interface 303 for the computer device to communicate with other devices or a communication network.
[0132] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0133] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0134] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for transmitting image data, characterized in that: The method comprises: Get the current frame image and the previous frame image; Determining a target pixel point to be transmitted in the current frame image based on a grayscale difference between the current frame image and the previous frame image; The target pixel point is transmitted to a receiving party, so that the receiving party updates the currently displayed image according to the received target pixel point.
2. The image data transmission method according to claim 1, characterized in that: The determining, based on the grayscale difference between the current frame image and the previous frame image, a target pixel point to be transmitted in the current frame image includes: Performing a differential operation on the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image; Obtaining a first grayscale difference threshold; When the target grayscale difference value of any image pixel point between the current frame image and the previous frame image is greater than the first grayscale difference threshold, the image pixel point is used as the target pixel point.
3. The image data transmission method according to claim 2, characterized in that: The step of determining the target pixel point to be transmitted in the current frame image based on the grayscale difference between the current frame image and the previous frame image further includes: When the target grayscale difference value of any image pixel point between the current frame image and the previous frame image is less than or equal to the first grayscale difference threshold, obtaining the grayscale difference accumulated value corresponding to the image pixel point; Based on the sum of the grayscale difference accumulated value and the corresponding target grayscale difference value, updating the grayscale difference accumulated value of the image pixel; The target pixel is determined based on the updated grayscale difference accumulated value corresponding to the image pixel.
4. The image data transmission method according to claim 3, characterized in that: The step of determining the target pixel point based on the updated grayscale difference accumulated value corresponding to the image pixel point includes: Obtaining a second grayscale difference threshold; When the updated grayscale difference accumulated value corresponding to the image pixel point is greater than the second grayscale difference threshold, the image pixel point is used as the target pixel point, and the grayscale difference accumulated value corresponding to the image pixel point is set to zero.
5. The image data transmission method according to claim 2, characterized in that: The performing a differential operation on the current frame image and the previous frame image to obtain a target grayscale difference value of each image pixel in the current frame image includes: Performing unified region division on the current frame image and the previous frame image to obtain a plurality of first image regions of the current frame image and a plurality of second image regions of the previous frame image, wherein the first image regions correspond to the second image regions; Calculating a first average grayscale value of each of the first image regions and a second average grayscale value of each of the second image regions; Obtaining a regional grayscale difference value of each of the first image regions based on a difference value between the first average grayscale value and the corresponding second average grayscale value; The regional grayscale difference is used as the target grayscale difference of each image pixel in the corresponding first image region.
6. The image data transmission method according to claim 2, characterized in that: The obtaining of the first grayscale difference threshold comprises: At every preset period, statistical analysis is performed on the grayscale difference of the image acquired within the preset period to obtain a statistical analysis feature of the grayscale difference; The first grayscale difference threshold is determined based on the statistical analysis feature.
7. An image data transmission device, characterized in that: The device comprises: An image data acquisition module is used to acquire the current frame image and the previous frame image; A transmission data selection module, used to determine a target pixel point to be transmitted in the current frame image based on a grayscale difference between the current frame image and the previous frame image; The image data transmission module is used to transmit the target pixel point to a receiving party, so that the receiving party updates the currently displayed image according to the received target pixel point.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image data transmission method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image data transmission method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the image data transmission method according to any one of claims 1 to 6.