Image transmission method, device and equipment, computer storage medium and program product

By converting the image into a two -value image and coding based on the number of the same pixels, the problem of low transmission efficiency of the existing image transmission method is solved, and more efficient image transmission is achieved.

CN119383345APending Publication Date: 2025-01-28LIAONING MOBILE COMM +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411489752.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing image transmission methods are less efficient in transmission, especially when processing large images or large images, occupying a large amount of storage space and bandwidth resources.

Method used

Based on the number of pixel points with the same pixel value of the adjacent and two -value pixels, the encoding array is sent based on the number of pixels with the same value of the two -value pixel values.

Benefits of technology

Reduce the complexity of data processing, reduce the amount of data that needs to be transmitted, and improve the efficiency of image transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383345A_ABST
    Figure CN119383345A_ABST
Patent Text Reader

Abstract

The invention discloses an image transmission method, device and equipment, a computer storage medium and a program product, and relates to the technical field of image recognition, the method is applied to an image recognition system, the image recognition system comprises a coding end and a decoding end, and the method comprises the steps that a to-be-transmitted image is converted into a binary image through the coding end, and the binary image is decoded through the decoding end; the binary image comprises binary pixel values of pixel points of the to-be-transmitted image; determining the number of adjacent pixel points with the same binary pixel value through a coding end, and coding based on the number of adjacent pixel points with the same binary pixel value to obtain a coding array; and sending the coding array to a decoding end through the coding end, and decoding the coding array through the decoding end to obtain a binary image. According to the embodiment of the invention, the image is converted into the binary image, and the coding array is coded for transmission based on the number of the pixel points with the same binary pixel value, so that the image transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image recognition technology, and in particular, relates to an image transmission method, device, equipment, computer storage medium, and program product. Background Art

[0002] The machine vision system converts the captured target into an image signal through machine vision products and transmits it to a dedicated image processing system. After the image processing is completed, the demand for fast image transmission is gradually increasing.

[0003] Existing image transmission methods often convert images into binary images for transmission. Although binary images simplify image information, they still take up a lot of storage space when processing large images or a large number of images. When communicating between the front and back ends, transmitting these binary images will take up a lot of bandwidth resources and have low transmission efficiency. Summary of the invention

[0004] The embodiments of the present application provide an image transmission method, apparatus, device, computer storage medium, and program product to solve the problem of low transmission efficiency of existing image transmission methods.

[0005] In a first aspect, an embodiment of the present application provides an image transmission method, which is applied to an image recognition system, the image recognition system includes an encoding end and a decoding end, and the method includes:

[0006] The encoding end converts the image to be transmitted into a binary image, wherein the binary image includes binary pixel values ​​of pixel points of the image to be transmitted;

[0007] The number of adjacent pixels with the same binary pixel value is determined by the encoding end, and encoding is performed based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array;

[0008] The encoding end sends the encoding array to the decoding end, so that the decoding end decodes the encoding array to obtain a binary image.

[0009] In a second aspect, an embodiment of the present application provides an image transmission device, which is applied to an image recognition system. The image recognition system includes an encoding end and a decoding end. The device includes:

[0010] A conversion module, used for converting the image to be transmitted into a binary image through the encoding end, wherein the binary image includes binary pixel values ​​of pixel points of the image to be transmitted;

[0011] An encoding module, used for determining the number of adjacent pixels with the same binary pixel value through an encoding end, and encoding based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array;

[0012] The decoding module is used to send the coded array to the decoding end through the encoding end, so as to obtain a binary image by decoding the coded array through the decoding end.

[0013] In a third aspect, an embodiment of the present application provides a terminal device, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the image transmission method of the first aspect is implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the image transmission method of the first aspect is implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image transmission method of the first aspect.

[0016] The embodiments of the present application provide an image transmission method, device, equipment, computer storage medium, and program product. The method first converts the image to be transmitted into a binary image through the encoding end to obtain the binary pixel values ​​of the pixel points of the image to be transmitted; the binarization process converts the image into an image containing only two pixel values, which reduces the complexity of data processing and reduces the amount of data to be transmitted. The encoding end determines the number of adjacent pixels with the same binary pixel value, and encodes based on the number of adjacent pixels with the same binary pixel value to obtain a coding array; by calculating the number of identical pixels, only the changed pixel values ​​are stored, which can further reduce the amount of data to be transmitted. Finally, the encoding end sends the coding array to the decoding end, so that the decoding end decodes the coding array to obtain a binary image. The image is converted into a binary image and encoded into a coding array based on the number of pixels with the same binary pixel value for transmission, which improves the efficiency of image transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 It is a flowchart of the image transmission method provided in the embodiment of the present application;

[0019] Figure 2 It is a flowchart of a method for obtaining a coding array provided in an embodiment of the present application;

[0020] Figure 3It is a flowchart of a method for decoding to obtain a binary image provided by an embodiment of the present application;

[0021] Figure 4 It is a flowchart of a method for converting a transmission image into a binary image provided by an embodiment of the present application;

[0022] Figure 5 is a structural schematic diagram of an image transmission device provided in an embodiment of the present application;

[0023] Figure 6 It is a structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0025] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0026] In the prior art, when transmitting images, the images uploaded by the front end are often directly transmitted to the back end, and the images are identified and the colors are extracted according to the color extraction model preset by the back end. However, since storing images requires a lot of storage space, especially when processing a large number of images, this leads to a shortage of storage resources. In addition, when the front and back ends communicate, transmitting these images will occupy a lot of bandwidth resources, making the transmission efficiency of the existing image transmission method low.

[0027] In order to solve the existing technology, the embodiments of the present application provide an image transmission method, device, equipment, computer storage medium, and program product. The method first converts the image to be transmitted into a binary image through the encoding end to obtain the binary pixel values ​​of the pixel points of the image to be transmitted; the binarization process converts the image into an image containing only two pixel values, which reduces the complexity of data processing and reduces the amount of data to be transmitted. The encoding end determines the number of adjacent pixels with the same binary pixel value, and encodes based on the number of adjacent pixels with the same binary pixel value to obtain a coding array; by calculating the number of identical pixels, only the changed pixel values ​​are stored, which can further reduce the amount of data to be transmitted. Finally, the encoding end sends the coding array to the decoding end, so that the decoding end decodes the coding array to obtain a binary image. The image is converted into a binary image and encoded into a coding array based on the number of pixels with the same binary pixel value for transmission, which improves the efficiency of image transmission.

[0028] The image transmission method provided in the embodiment of the present application is introduced below with reference to the accompanying drawings.

[0029] Figure 1 The flowchart of an image transmission method provided by an embodiment of the present application is shown. The method is applied to an image recognition system, and the image recognition system includes an encoding end and a decoding end. Figure 1 As shown, the method may include the following steps: S101 to S103.

[0030] S101, converting an image to be transmitted into a binary image through an encoding end, where the binary image includes binary pixel values ​​of pixels of the image to be transmitted.

[0031] In some embodiments, the binary pixel values ​​of the pixel points of the image to be transmitted are 255 and 0, and each pixel point of the image to be transmitted is traversed, and the pixel values ​​of the pixel points of the image to be transmitted are converted into binary pixel values ​​according to preset conditions. For example, when the pixel value of the pixel point of the image to be transmitted meets the preset condition, the binary pixel value is 255, and when the pixel value of the pixel point of the image to be transmitted does not meet the preset condition, the binary pixel value is 0.

[0032] In some embodiments, the preset condition may be a set threshold or a set threshold range. When the pixel value is higher than the set threshold or within the set threshold range, it is considered that the preset condition is met. When the pixel value is lower than the set threshold or outside the set threshold range, it is considered that the preset condition is not met.

[0033] By converting the image to be transmitted into a binary image, the image data is simplified. The binary image only contains two pixel values, which can greatly reduce the complexity of the image and facilitate subsequent encoding and transmission.

[0034] S102, determining the number of adjacent pixels with the same binary pixel value through the encoding end, and encoding based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array.

[0035] In some embodiments, the encoding end traverses the binary pixel values ​​of the binary image pixels of the image to be transmitted, and checks whether each pixel has the same binary pixel value as its adjacent pixel. When adjacent pixels with the same binary pixel value are found, the encoding end records the number of these pixels, generates a code value to represent the number of these pixels, and finally generates a code array according to the code value sequence.

[0036] By encoding adjacent pixels with the same binary pixel value, adjacent pixels with the same binary pixel value can be represented by the number of pixels. The amount of data after encoding is smaller, the transmission of duplicate data is reduced, and the transmission efficiency is improved.

[0037] S103, sending the coded array to the decoding end through the encoding end, so that the decoding end decodes the coded array to obtain a binary image.

[0038] In some embodiments, the encoding end may send through a lossless compression algorithm (GNU zip, gzip) or an Extremely Fast Compression algorithm (LZ4) to further compress the encoding array and reduce the amount of transmitted data.

[0039] In some embodiments, the encoded array may be encrypted and transmitted using the Advanced Encryption Standard (AES) algorithm to enhance the security of data transmission.

[0040] The encoding end sends the encoding array only to the decoding end, and the decoding end receives the encoding array and decodes it, which can accurately reconstruct the original binary image under the premise of achieving efficient data transmission, ensuring the integrity and accuracy of the image data.

[0041] The encoding end converts the image to be transmitted into a binary image to obtain the binary pixel values ​​of the pixels of the image to be transmitted; the binarization process converts the image into an image containing only two pixel values, which reduces the complexity of data processing and reduces the amount of data that needs to be transmitted. The encoding end determines the number of adjacent pixels with the same binary pixel values, and encodes based on the number of adjacent pixels with the same binary pixel values ​​to obtain a coding array; by calculating the number of identical pixels and only storing the changed pixel values, the amount of data that needs to be transmitted can be further reduced. Finally, the encoding end sends the coding array to the decoding end, so that the decoding end can decode the coding array to obtain a binary image. The image is converted into a binary image and encoded into a coding array based on the number of pixels with the same binary pixel values ​​for transmission, which improves the efficiency of image transmission.

[0042] In some embodiments, Figure 2 As shown, the number of adjacent pixels with the same binary pixel value is determined by the encoding end, and encoding is performed based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array, which may include: S201 and S202.

[0043] S201, determining the number of adjacent pixels with the same binary pixel value through the encoding end, and combining it with the preset symbol value corresponding to the binary pixel value to obtain multiple encoding values.

[0044] In some embodiments, different encoding strategies may be used for different image regions. For example, different symbol values ​​may be used for edge regions and smooth regions of an image.

[0045] In some embodiments, when obtaining the encoding value, the encoding end may utilize multi-threading or parallel processing technology to simultaneously process different parts of the image to speed up the encoding process.

[0046] S202, the encoding end stores the encoding value into a preset encoding array to obtain an encoding array of the image to be transmitted.

[0047] By encoding the number of adjacent pixels with the same binary pixel value, and representing the continuous same pixel points with a combination of number and symbol value, the amount of data can be significantly reduced, the bandwidth requirement is reduced, and the data transmission speed is increased. In addition, the encoded data occupies less storage space, so there is reason to save storage resources.

[0048] In some embodiments, the number of adjacent pixels having the same binary pixel value is determined by the encoder, and combined with a preset symbol value corresponding to the binary pixel value to obtain multiple encoding values, which may include:

[0049] Create two variables: state value previous and count value count. The state value previous is used to record the binary pixel value of the previous pixel, and the count value count is used to record the number of consecutive identical pixels. The initial value is 0.

[0050] The binary pixel value matrix of the binary image is extended horizontally and traversed in sequence. If the binary pixel value of the traversed pixel point is the same as the state value, the count value is increased by one; when the binary pixel value of the traversed pixel point is different from the state value, the count value is multiplied by the symbol value corresponding to the binary pixel value and added to the preset coding array, the state value is saved as the new binary pixel value, and the count value is reset to record the number of adjacent pixels with the same new binary pixel value. All the above processes are repeated until the traversal is completed.

[0051] In one example, suppose the image matrix is The image matrix is ​​extended horizontally. First, there are two consecutive 255 pixels in the image matrix, so the encoding value of the first position in the encoding array is 2. Secondly, the image matrix has two 0 pixels, so the encoding value of the second position in the encoding array is -2. In this way, the image matrix is ​​traversed and the encoding array is finally converted to {2, -2, 1, -5, 2, -1, 3}.

[0052] In some embodiments, the encoding array is sent to the decoding end through the encoding end, and the decoding end storage format is {imageID, width, height, M}, where imageID is the image ID, width is the image height, height is the image width, and M is the encoding array.

[0053] In some embodiments, Figure 3 As shown, decoding the encoding array by the decoding end to obtain a binary image may include: S301 to S303.

[0054] S301, obtaining, by a decoding end based on a code value of a code array, the number of adjacent pixel points having the same preset symbol value and binary pixel value;

[0055] S302, obtaining, by a decoding end, a binary pixel value of a pixel point corresponding to a coding value based on a binary pixel value corresponding to a preset symbol value and the number of adjacent pixels having the same binary pixel value;

[0056] S303, obtaining a binary image of the image to be transmitted according to the binary pixel values ​​at the decoding end.

[0057] By decoding the coding array, the binary pixel value of each pixel only needs to be determined based on the symbol value in the coding value and the number of adjacent pixels. The decoding end can quickly reconstruct the original binary image, avoiding the use of complex image decoding algorithms and improving decoding efficiency.

[0058] In some embodiments, obtaining the binary pixel value of the pixel point corresponding to the coded value based on the binary pixel value corresponding to the preset symbol value and the number of adjacent pixels with the same binary pixel value by the decoding end may include:

[0059] Use the width and height returned by the backend to create a two-dimensional matrix S of size width*height, where S(i, j) represents the binary pixel value with abscissa i and ordinate j. M(k) represents the coded number at position k in the coding array.

[0060] Traverse the encoding array. If M(k)>0, S(i, j)=255, and the elements in S are set to M(k) 255s in succession; if M(k)<0, S(i, j)=0, and the elements in S are set to M(k) 0s in succession until the encoding array is traversed.

[0061] In an example, assuming that the encoding array is {2, -2, 1, -5, 2, -1, 3}, when m(1) is 2, the pixel matrix sets two consecutive 255 pixel points, and when m(2) is -2, the pixel matrix sets two consecutive 0 pixel points. Through this method, the decoding is finally completed to transform the encoding array into a pixel matrix.

[0062] In some embodiments, the encoding end may be a front-end browser.

[0063] By converting and encoding the images to be transmitted through the front-end browser, the amount of data transmitted can be reduced, thereby reducing the bandwidth consumption caused by front-end and back-end communication; the data has been compressed and optimized before being sent to the back-end, reducing the data processing burden of the back-end server.

[0064] In some embodiments, the encoding end uses the WebAssembly programming language format when encoding. The WebAssembly programming language format allows developers to compile codes written in other programming languages ​​into bytecodes, improves the performance of web pages, and enables the direct running of codes in browsers.

[0065] Among them, select the image and upload it to the browser, use the image library reading function to read the image to get the Mat object, and store it in the front-end browser cache space for subsequent processing.

[0066] In some embodiments, Figure 4 As shown, the image to be transmitted is converted into a binary image by the encoding end, and the binary image includes binary pixel values ​​of pixel points of the image to be transmitted, which may include: S401 to S403.

[0067] S401, the encoding end obtains the pixel value of the pixel point of the image to be transmitted;

[0068] S402, the encoding end determines whether the pixel value of the pixel point of the image to be transmitted is within a set threshold range of a preset color space, and obtains a determination result;

[0069] S403: The encoding end determines a binary pixel value for a pixel of the image to be transmitted according to the determination result.

[0070] By converting the image into a binary image, the data volume and processing difficulty of the binary image are smaller than those of the original image to be transmitted, which can simplify the data and make the subsequent processing and transmission process more efficient. In addition, in the process of converting the image to be transmitted into a binary image, the color space and the set threshold range can be set as needed, which improves the flexibility of image conversion.

[0071] In some embodiments, the encoding end determines whether the pixel value of the pixel point of the image to be transmitted is within the set threshold range of the preset color space, and before obtaining the judgment result, the encoding end creates a width and height of the same size as the original Figure 1 The same matrix S is used to store the extraction results. S(i, j) is used to represent the pixel with abscissa i and ordinate j. The value is 255 or 0:

[0072]

[0073] In some embodiments, when the binary pixel value is 255, the preset sign value may be positive; and when the binary pixel value is 0, the preset sign value may be negative.

[0074] The use of positive and negative sign values ​​provides an intuitive representation for binary pixels. By using positive and negative sign values, only the change in sign value and the number of consecutive pixels with the same sign value need to be recorded, which can simplify the encoding logic and help compress data more efficiently.

[0075] In some embodiments, the preset color space may include at least one of the following:

[0076] RGB color space, HSV color space and HSL color space.

[0077] Different color spaces have different advantages in representing and processing color information. Supporting multiple color spaces makes it possible to adapt to different application scenarios and needs. Users can choose the most appropriate color space according to their needs.

[0078] Among them, the RGB color space is a red, green, and blue color space, which represents various colors by combining different values ​​of red, green, and blue. R is the value of red, G is the value of green, and B is the value of blue.

[0079] The color interval format of the RGB color space is expressed as:

[0080]

[0081] Among them, channel 1 represents red R, the range is [0, 255]; channel 2 represents green G, the range is [0, 255]; channel 3 represents blue B, the range is [0, 255].

[0082] The HSV color space is a hue, saturation, and value color space. Different colors are represented by hue, saturation, and value values. H is the hue value, S is the saturation value, and V is the value of value.

[0083] The color interval format of the HSV color space is expressed as:

[0084]

[0085] Among them, the hue range is [0, 360]; the range is [0, 100]; the lightness range is [0, 100].

[0086] The HSL color space is a hue, saturation, and brightness color space. Different colors are represented by hue, saturation, and brightness values. H is the hue value, S is the saturation value, and L is the brightness value.

[0087] The color interval format of the HSL color space is expressed as:

[0088]

[0089] Among them, the hue range is [0, 360]; the saturation range is [0, 100]; the brightness range is [0, 100].

[0090] In some embodiments, the encoder determines whether the pixel value of a pixel of the image to be transmitted is within a set threshold range of a preset color space, and obtains a determination result, including:

[0091] Traverse the pixels of the image to be transmitted, determine whether the pixel value is within the color range, and fill the result into the S matrix. The binary image matrix P uses P(i, j) to represent the pixel with abscissa i and ordinate j. The determination method is as follows:

[0092] The discriminant formula of RGB color space is:

[0093]

[0094] The discriminant formula of HSV color space is:

[0095]

[0096] The discriminant formula of HSL color space is:

[0097]

[0098] Figure 5 An image transmission device 500 provided in an embodiment of the present application is shown, and the device is applied to an image recognition system, and the image recognition system includes an encoding end and a decoding end. Figure 5 As shown, the device may include:

[0099] A conversion module 501, configured to convert the image to be transmitted into a binary image through an encoding end, wherein the binary image includes binary pixel values ​​of pixels of the image to be transmitted;

[0100] The encoding module 502 is used to determine the number of adjacent pixels with the same binary pixel value through the encoding end, and perform encoding based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array;

[0101] The decoding module 503 is used to send the coding array to the decoding end through the coding end, so that the decoding end decodes the coding array to obtain a binary image.

[0102] In some embodiments, the image transmission device 500 may further include:

[0103] A determination module, used to determine the number of adjacent pixels with the same binary pixel value through the encoding end, and combine it with the preset symbol value corresponding to the binary pixel value to obtain multiple encoding values;

[0104] The storage module is used to store the coding value into a preset coding array through the coding end to obtain the coding array of the image to be transmitted.

[0105] In some embodiments, the decoding module 503 is further used to obtain the number of adjacent pixel points having the same preset symbol value and binary pixel value based on the code value of the code array by the decoding end;

[0106] The determination module is further used to obtain the binary pixel value of the pixel point corresponding to the coding value based on the binary pixel value corresponding to the preset symbol value and the number of adjacent pixels with the same binary pixel value through the decoding end;

[0107] The determination module is also used to obtain a binary image of the image to be transmitted according to the binary pixel value through the decoding end.

[0108] In some embodiments, the encoding end is a front-end browser.

[0109] In some embodiments, the image transmission device 500 may further include:

[0110] An acquisition module, used by the encoding end to acquire pixel values ​​of pixels of the image to be transmitted;

[0111] A judgment module, used for the encoding end to judge whether the pixel value of the pixel point of the image to be transmitted is within a set threshold range of a preset color space, and obtain a judgment result;

[0112] The determination module is also used by the encoding end to determine the binary pixel value for the pixel point of the image to be transmitted according to the judgment result.

[0113] In some embodiments, in the determination module, when the binary pixel value is 255, the preset sign value is positive; when the binary pixel value is 0, the preset sign value is negative.

[0114] In some embodiments, the color space preset in the determination module includes at least one of the following:

[0115] RGB color space, HSV color space and HSL color space.

[0116] Figure 5 The various modules in the device shown can be implemented Figure 1 Each step in the above steps can achieve the corresponding technical effect, which will not be repeated here for the sake of brevity.

[0117] Figure 6 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application is shown.

[0118] The terminal device may include a processor 601 and a memory 602 storing computer program instructions.

[0119] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0120] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 602 may include a removable or non-removable (or fixed) medium, or the memory 602 is a non-volatile solid-state memory. The memory 602 may be inside or outside the integrated gateway disaster recovery device.

[0121] In one example, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the image transmission method according to the present disclosure.

[0122] The processor 601 reads and executes the computer program instructions stored in the memory 602 to implement Figure 1 The image transmission method in the illustrated embodiment.

[0123] In one example, the terminal device may further include a communication interface 603 and a bus 604. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 604 and communicate with each other.

[0124] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0125] Bus 604 includes hardware, software or both, and the components of terminal equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), Hyper Transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 604 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0126] In addition, in combination with the image transmission method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the image transmission methods in the above embodiment is implemented.

[0127] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the image transmission methods in the above embodiments when the computer program is processed and executed.

[0128] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0129] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or text segments used to perform the required tasks. The program or text segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link via a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The text segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0130] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0131] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0132] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. An image transmission method, characterized in that: Applied to an image recognition system, the image recognition system includes an encoding end and a decoding end, and the method includes: Converting the image to be transmitted into a binary image through the encoding end, wherein the binary image includes binary pixel values ​​of pixel points of the image to be transmitted; Determine the number of adjacent pixels with the same binary pixel value by the encoding end, and perform encoding based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array; The encoding end sends the encoding array to the decoding end, so that the decoding end decodes the encoding array to obtain the binary image.

2. The image transmission method according to claim 1, characterized in that: The step of determining the number of adjacent pixels with the same binary pixel value by the encoding end, and encoding based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array includes: The encoding end determines the number of adjacent pixels having the same binary pixel value, and combines the numbers with the preset symbol values ​​corresponding to the binary pixel values ​​to obtain a plurality of encoding values; The encoding end stores the encoding value in a preset encoding array to obtain an encoding array of the image to be transmitted.

3. The image transmission method according to claim 1, characterized in that: The decoding end decodes the encoding array to obtain the binary image, including: Obtaining, by the decoding end based on the code value of the code array, the number of adjacent pixel points having the same preset symbol value and binary pixel value; Obtaining, by the decoding end, a binary pixel value of a pixel point corresponding to the coded value based on the binary pixel value corresponding to the preset symbol value and the number of adjacent pixels with the same binary pixel value; The binary image of the image to be transmitted is obtained by the decoding end according to the binary pixel value.

4. The image transmission method according to claim 1, characterized in that: The encoding end is a front-end browser.

5. The image transmission method according to claim 4, characterized in that: The step of converting the image to be transmitted into a binary image by the encoding end, wherein the binary image includes binary pixel values ​​of pixel points of the image to be transmitted, comprises: The encoding end obtains the pixel value of the pixel point of the image to be transmitted; The encoding end determines whether the pixel value of the pixel point of the image to be transmitted is within a set threshold range of a preset color space, and obtains a determination result; The encoding end determines a binary pixel value for a pixel of the image to be transmitted according to the judgment result.

6. The image transmission method according to claim 2, characterized in that: When the binary pixel value is 255, the preset sign value is positive; when the binary pixel value is 0, the preset sign value is negative.

7. The image transmission method according to claim 5, characterized in that: The preset color space includes at least one of the following: RGB color space, HSV color space and HSL color space.

8. An image transmission device, characterized in that: Applied to an image recognition system, the image recognition system includes an encoding end and a decoding end, and the device includes: A conversion module, used for converting the image to be transmitted into a binary image through the encoding end, wherein the binary image includes binary pixel values ​​of pixel points of the image to be transmitted; An encoding module, configured to determine the number of adjacent pixels with the same binary pixel value through the encoding end, and perform encoding based on the number of adjacent pixels with the same binary pixel value to obtain an encoding array; A decoding module is used to send the encoding array to the decoding end through the encoding end, so as to decode the encoding array through the decoding end to obtain the binary image.

9. A terminal device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the image transmission method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the image transmission method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the image transmission method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Television communication method based on Internet of Things, terminal equipment and storage medium

    CN120602693A