Image processing method, electronic equipment and storage medium
By encoding and image fusion of the information to be encoded on the electronic device, the problem of information leakage in confidential situations of electronic devices is solved, and the traceability display and traceability functions are realized, which improves information security and user experience.
Patent Information
- Application Number
- CN202310638599.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-03
AI Technical Summary
In office or conference venues where confidentiality is required, writing and document display using electronic devices with display screens can easily cause information leakage. The existing screen watermark cannot effectively prevent information leakage and has limited encryption effect on digital data and cannot provide Traceability basis.
By encoding the information to be encoded corresponding to the display device, adjusting the pixel value of a specific area of the target image, generating an encoded image, and fusing the target image with the encoded image to generate a fused image to realize traceless display and provide a traceability basis.
It realizes the display of encoded information invisible on electronic devices, improves the security of the information, and provides an accurate traceability basis for screenshots or sneak shots, avoids secondary leaks of information and improves user experience.
Smart Images

Figure CN119067824A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, electronic equipment and storage medium. Background Art
[0002] With the continuous development of computer technology and network technology, paperless and electronic office has gradually become popular, and various electronic devices with display screens are increasingly widely used. Such electronic devices are mainly used for writing and document display in daily office and meeting situations.
[0003] Although the use of such electronic devices can bring convenience to people's daily office work, if such electronic devices are used for writing and document display in some office or meeting situations where confidentiality is required, it is easy to cause information leakage. Summary of the invention
[0004] According to a first aspect, the present disclosure provides an image processing method, comprising: encoding first information to be encoded corresponding to a display device to obtain first encoded information; adjusting pixel values of at least one first predetermined area of an image to be encoded corresponding to a target image according to the first encoded information to obtain a first encoded image; and fusing the target image and the first encoded image to obtain a fused image.
[0005] For example, the first coding information includes at least one first coding number; wherein, according to the first coding information, adjusting the pixel value of at least one first predetermined area of the image to be encoded corresponding to the target image to obtain the first coded image includes: adjusting the pixel value of at least one first predetermined area of the image to be encoded corresponding to the target image according to at least one first predetermined pixel value respectively corresponding to at least one first coding number to obtain the first coded image, wherein the pixel value of at least one first predetermined area of the first coded image includes at least one first predetermined pixel value respectively corresponding to at least one first coding number.
[0006] For example, the number of bits of the first coding number is N, where N is a positive integer; wherein, according to at least one first predetermined pixel value corresponding to each of at least one first coding number, adjusting the pixel value of at least one first predetermined area of the image to be coded corresponding to the target image, to obtain the first coded image includes: for each first predetermined area in the at least one first predetermined area, dividing the first predetermined area into N first predetermined sub-areas, wherein the N first predetermined sub-areas include N1 first coding sub-areas and N2 second coding sub-areas, the N-bit first coding number includes N1 first coding number and N2 second coding number, and N1 and N2 are natural numbers; based on the first coding strategy, according to a first predetermined pixel value corresponding to each N1-bit first coding number, the pixel values of N1 first coding sub-regions of the image to be encoded corresponding to the target image are adjusted to obtain N1 first coding region images; based on the second coding strategy, according to a plurality of predetermined pixel values corresponding to each N2-bit second coding number, the pixel values of N2 second coding sub-regions of the image to be encoded corresponding to the target image are adjusted to obtain N2 second coding region images; and based on the N1 first coding region images and the N2 second coding region images, a first coded image is obtained.
[0007] For example, based on the first coding strategy, according to a first predetermined pixel value corresponding to each of the N1-bit first coding numbers, the pixel values of N1 first coding sub-regions of the image to be encoded corresponding to the target image are adjusted to obtain N1 first coding region images, including: for each first coding sub-region in the N1 first coding sub-regions, determining the first coding number corresponding to the first coding sub-region, and obtaining the first target coding number corresponding to the first coding sub-region; and adjusting the pixel value of the first coding sub-region to the first predetermined pixel value corresponding to the first target coding number, and obtaining the first coding region image corresponding to the first coding sub-region.
[0008] For example, the plurality of first predetermined pixel values include a first coded predetermined pixel value and at least one second coded predetermined pixel value, and the first coded predetermined pixel value is greater than any one of the at least one second coded predetermined pixel value; wherein, based on the second coding strategy, according to the plurality of predetermined pixel values corresponding to the N2 second coded numbers, respectively, the pixel values of the N2 second coded sub-regions of the image to be coded corresponding to the target image are adjusted to obtain the N2 second coded region images, including: for each second coded sub-region of the N2 second coded sub-regions, determining the second coded number corresponding to the second coded sub-region, and obtaining the second target coded number corresponding to the second coded sub-region; according to the first predetermined association A relationship set is used to determine a first predetermined ratio corresponding to the second target coding number, wherein the first predetermined association relationship set includes N2 first predetermined association relationships, and the first predetermined association relationship represents the association relationship between the second coding number and the first predetermined ratio; and according to the first predetermined ratio, the pixel value of the coded first region in the second coding sub-region is adjusted to the first coded predetermined pixel value, and the pixel value of the coded second region in the second coding sub-region is adjusted to at least one second coded predetermined pixel value, so as to obtain a second coding region image corresponding to the second coding sub-region, wherein the ratio between the size information of the coded first region and the size information of the second coding sub-region is the first predetermined ratio.
[0009] For example, the above method also includes: determining a second predetermined association relationship corresponding to each of the N1 first coding sub-regions to obtain a second predetermined association relationship set, wherein the second predetermined association relationship set includes N1 second predetermined association relationships, the second predetermined association relationship represents the association relationship between the first predetermined area identifier and the first predetermined strategy identifier, the first predetermined area identifier is used to represent the first coding sub-region, and the first predetermined strategy identifier represents that the coding strategy corresponding to the first coding sub-region is the first coding strategy; determining a third predetermined association relationship corresponding to each of the N2 second coding sub-regions to obtain a third predetermined association relationship set, wherein the third predetermined association relationship set includes N2 third predetermined association relationships, the third predetermined association relationship represents the association relationship between the second predetermined area identifier and the second predetermined strategy identifier, the second predetermined area identifier is used to represent the second coding sub-region, and the second predetermined strategy identifier represents that the coding strategy corresponding to the second coding sub-region is the second coding strategy; and storing the second predetermined association relationship set and the third predetermined association relationship set.
[0010] For example, the first information to be encoded includes a multi-bit first number to be encoded; wherein, encoding the first information to be encoded corresponding to the display device to obtain the first encoded information includes: dividing the multi-bit first number to be encoded into a plurality of first groups to be encoded; determining a first check code corresponding to each of the plurality of first groups to be encoded to obtain a plurality of first check codes; and obtaining the first encoded information based on the multi-bit first number to be encoded and the plurality of first check codes.
[0011] For example, fusing the target image and the first encoded image to obtain a fused image includes: determining the product between the pixel value of at least one pixel included in the target image and a first predetermined coefficient to obtain first pixel information; determining the product between the pixel value of at least one pixel included in the first encoded image and a second predetermined coefficient to obtain second pixel information; obtaining third pixel information based on the first pixel information and the second pixel information; and obtaining the fused image based on the third pixel information.
[0012] For example, the shape of the first predetermined area includes at least one of the following: rectangle, square, diamond, triangle, circle.
[0013] For example, the shape of the first coding sub-region includes at least one of the following: rectangle, square, rhombus, triangle, circle; the shape of the second coding sub-region includes at least one of the following: rectangle, square, rhombus, triangle, circle.
[0014] For example, the first information to be encoded includes at least one of the following: a device identification, a time displayed on a display device, and a geographic location.
[0015] According to the second aspect, the present disclosure also provides an image processing method, comprising: processing an image to be processed to obtain a second encoded image, wherein the image to be processed includes one of the following: a fused image and a captured image corresponding to the fused image, and the fused image is obtained according to the method according to any one of claims 1 to 11; obtaining second encoded information based on pixel values of at least one second predetermined area of the second encoded image; and decoding the second encoded information to obtain second information to be encoded corresponding to the display device.
[0016] For example, obtaining the second coding information based on the pixel value of at least one second predetermined area of the second encoded image includes: determining the second coding number corresponding to at least one second predetermined area of the second encoded image based on at least one second predetermined pixel value corresponding to at least one second predetermined area of the second encoded image, so as to obtain the second coding information.
[0017] For example, the number of bits of the second coding number is N, the N-bit second coding number includes an N1-bit first decoding number and an N2-bit second decoding number, N is a positive integer, and N1 and N2 are natural numbers; wherein, according to at least one second predetermined pixel value corresponding to at least one second predetermined area of the second coded image, determining the second coding number corresponding to at least one second predetermined area of the second coded image, and obtaining the second coding information includes: determining at least one second predetermined area corresponding to the second coded image and N1 first decoding sub-areas and N2 second decoding sub-areas corresponding to at least one second predetermined area; for each second predetermined area in the at least one second predetermined area, obtaining the second coding information in one of the following ways: based on the first decoding strategy, obtaining the first decoding information according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-areas and a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-areas; when it is determined that the first decoding information includes the first target decoding number corresponding to each of the N1 first decoding sub-areas and does not include the second target decoding number corresponding to each of the N2 second decoding sub-areas, based on the second decoding strategy, The second decoding information is obtained according to a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions of the second predetermined region; and when it is determined that the second decoding information includes the second target decoding numbers corresponding to each of the N2 second decoding sub-regions, an N-bit second coding number is obtained according to the N1-bit first target decoding number and the N2-bit second target decoding number; or, based on the second decoding strategy, the third decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions and a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions; when it is determined that the third decoding information includes the second target decoding numbers corresponding to each of the N2 second decoding sub-regions and does not include the first target decoding numbers corresponding to each of the N1 first decoding sub-regions, the fourth decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions of the second predetermined region based on the first decoding strategy; and when it is determined that the fourth decoding information includes the first target decoding numbers corresponding to each of the N1 first decoding sub-regions, an N-bit second coding number is obtained according to the N1-bit first target decoding number and the N2-bit second target decoding number.
[0018] For example, the number of bits of the second coding number is N, the N-bit second coding number includes an N1-bit first decoding number and an N2-bit second decoding number, N is a positive integer, and N1 and N2 are natural numbers; wherein, according to at least one second predetermined pixel value corresponding to at least one second predetermined area of the second coded image, the second coding number corresponding to at least one second predetermined area of the second coded image is determined, and the second coding information obtained includes: determining at least one second predetermined area corresponding to the second coded image and N1 first decoding sub-areas and N2 second decoding sub-areas corresponding to the at least one second predetermined area; for each second predetermined area in the at least one second predetermined area, determining the decoding sub-areas corresponding to the N1 first decoding sub-areas of the second predetermined area; strategy and the decoding strategy corresponding to the N second decoding sub-regions of the second predetermined area, obtain the first decoding strategy corresponding to the N1 first decoding sub-regions and the second decoding strategy corresponding to the N2 second decoding sub-regions; based on the first decoding strategy, according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions of the second predetermined area, obtain the first target decoding number corresponding to each of the N1 first decoding sub-regions; based on the second decoding strategy, according to multiple second predetermined pixel values corresponding to each of the N2 second decoding sub-regions of the second predetermined area, obtain the second target decoding number corresponding to each of the N2 second decoding sub-regions; and obtain the N-bit second coding number according to the N1-bit first target decoding number and the N2-bit second target decoding number.
[0019] For example, the multiple second predetermined pixel values include a first decoding predetermined pixel value and at least one second decoding predetermined pixel value, and the first decoding predetermined pixel value is greater than any one of the at least one second decoding predetermined pixel value; wherein, based on the second decoding strategy, according to the multiple second predetermined pixel values corresponding to the N2 second decoding sub-regions of the second predetermined region, the second target decoding number corresponding to each of the N2 second decoding sub-regions is obtained, including: for each second decoding sub-region of the N2 second decoding sub-regions, according to the first decoding predetermined pixel value corresponding to the second decoding sub-region, determining the decoding first region in the second decoding sub-region; determining the ratio between the size information of the decoding first region and the size information of the second decoding sub-region, and obtaining the second predetermined ratio corresponding to the second decoding sub-region; and determining the second decoding number corresponding to the second predetermined ratio according to the first predetermined association relationship set, and obtaining the second target decoding number corresponding to the second predetermined sub-region, wherein the first predetermined association relationship set includes N2 first predetermined association relationships, and the first predetermined association relationship represents the association relationship between the second decoding number and the second predetermined ratio.
[0020] For example, determining the decoding strategy corresponding to N1 first decoding sub-regions of a second predetermined region and the decoding strategy corresponding to N2 second decoding sub-regions of the second predetermined region, to obtain the first decoding strategy corresponding to the N1 first decoding sub-regions and the second decoding strategy corresponding to the N2 second decoding sub-regions includes: when, according to a second predetermined association relationship set, it is determined that the encoding strategy corresponding to each of the N1 first decoding sub-regions is a first encoding strategy, determining the decoding strategy corresponding to the N1 first decoding sub-regions as the first decoding strategy, where the second predetermined association relationship set includes N1 second predetermined association relationships, and the second predetermined association relationship represents the association relationship between a first predetermined region identifier and a first predetermined strategy identifier, the first predetermined region identifier is used to represent a first decoding sub-region, and the first predetermined strategy identifier represents that the encoding strategy corresponding to the first decoding sub-region is the first encoding strategy; and when, according to a third predetermined association relationship set, it is determined that the encoding strategy corresponding to each of the N2 second decoding sub-regions is a second encoding strategy, determining the decoding strategy corresponding to the N2 second decoding sub-regions as the second decoding strategy, where the third predetermined association relationship set includes N2 third predetermined association relationships, and the third predetermined association relationship represents the association relationship between a second predetermined region identifier and a second predetermined strategy identifier, the second predetermined region identifier is used to represent a second decoding sub-region, and the second predetermined strategy identifier represents that the encoding strategy corresponding to the second decoding sub-region is the second encoding strategy.
[0021] For example, decoding the second encoded information to obtain the second information to be encoded corresponding to the display device includes: obtaining a plurality of second check codes according to the second encoded information; determining the second groups to be encoded corresponding to the plurality of second check codes respectively to obtain a plurality of second groups to be encoded; and obtaining the second information to be encoded according to the plurality of second groups to be encoded.
[0022] For example, processing the image to be processed to obtain a second encoded image includes: obtaining feature maps of at least one scale according to the image to be processed; and obtaining the second encoded image according to the feature maps of at least one scale.
[0023] For example, the at least one scale includes J scales, where J is a positive integer; and obtaining the second encoded image according to the feature maps of at least one scale includes: when 1 ≤ j < J, obtaining the fused feature map of the j-th scale according to the feature map of the j-th scale and the upsampled feature map, where the upsampled feature map of the j-th scale is obtained according to the feature map of the (j + 1)-th scale and the upsampled feature map, the feature map of the j-th scale is obtained according to the feature map of the (j - 1)-th scale, and j is an integer greater than or equal to 1 and less than or equal to J; and obtaining the second encoded image according to the fused feature map of the first scale.
[0024] According to a third aspect, the present disclosure also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned image processing method.
[0025] According to a third aspect, the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned image processing method.
[0026] According to a third aspect, the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned image processing method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other features of the embodiments of the present disclosure will become more apparent through the following detailed description in conjunction with the accompanying drawings, in which:
[0028] Figure 1 is a flowchart of an image processing method according to an embodiment of the present disclosure;
[0029] Figure 2A is a schematic diagram of a first coding sub-region under a first coding strategy according to an embodiment of the present disclosure;
[0030] Figure 2B is a schematic diagram of a second coding sub-region under a second coding strategy according to an embodiment of the present disclosure;
[0031] Figure 2C is a schematic diagram showing that a first coding sub-region and a second coding sub-region exist simultaneously according to an embodiment of the present disclosure;
[0032] Figure 2D is a schematic diagram showing that a first coding sub-region and a second coding sub-region exist simultaneously according to another embodiment of the present disclosure;
[0033] Figure 2E is a schematic diagram of a plurality of first predetermined areas on an image to be encoded according to an embodiment of the present disclosure;
[0034] Figure 3 is a schematic diagram of a first encoded image according to an embodiment of the present disclosure;
[0035] Figure 4 is a schematic diagram of a fused image according to an embodiment of the present disclosure;
[0036] Figure 5 is a flowchart of an image processing method according to another embodiment of the present disclosure;
[0037] Figure 6is a flow chart of obtaining a second encoded image from a fused image according to an embodiment of the present disclosure;
[0038] Figure 7 is a framework diagram of an image processing method according to yet another embodiment of the present disclosure; and
[0039] Figure 8 is a block diagram of an electronic device suitable for implementing an image processing method according to an embodiment of the present disclosure.
[0040] In the drawings, the same or similar structures are marked with the same or similar reference numerals. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. It should be noted that throughout the drawings, the same elements are represented by the same or similar reference numerals. In the following description, some specific embodiments are only used for descriptive purposes and should not be understood as any limitation to the present disclosure, but are only examples of the embodiments of the present disclosure. Conventional structures or configurations will be omitted when they may cause confusion in the understanding of the present disclosure. It should be noted that the shapes and sizes of the components in the figures do not reflect the actual size and proportion, but only illustrate the contents of the embodiments of the present disclosure.
[0042] It should be noted that in the drawings, the size and relative size of the elements may be exaggerated for the purpose of clarity and / or description. Thus, the size and relative size of each element are not necessarily limited to the size and relative size shown in the drawings. In the specification and drawings, the same or similar reference numerals indicate the same or similar parts.
[0043] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be the common meanings understood by those of ordinary skill in the art. The "first", "second" and similar words used in the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprising" and similar words mean that the element or object appearing before the word covers the element or object listed after the word and its equivalent, without excluding other elements or objects.
[0044] In this document, unless otherwise specified, directional terms such as "upper", "lower", "left", "right", "inner", "outer", etc. are used to indicate the orientation or positional relationship based on the drawings, and are only for the convenience of describing the present disclosure, and do not indicate or imply that the device, element or component referred to must have a specific orientation, be constructed or operate in a specific orientation. It should be understood that when the absolute position of the described object changes, the relative positional relationship they represent may also change accordingly. Therefore, these directional terms should not be understood as limiting the present disclosure.
[0045] In addition, in the description of the embodiments of the present disclosure, the term "connected" or "connected to" may refer to two components being directly connected, or may refer to two components being connected via one or more other components. In addition, the two components may be connected or coupled via a wired or wireless manner.
[0046] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of the data involved (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0047] Screen watermark technology has a long history, and screen watermarks are generally divided into visible watermarks and dark watermarks. Although adding a visible watermark or dark watermark to the screen information can reduce the risk of screen display information being leaked, since the visible watermark is a watermark visible to the naked eye, it will cause the user to have a poor viewing experience and affect the display effect of the screen information. Moreover, displaying device information in the form of a visible watermark will also cause secondary information leakage. Although the dark watermark can be displayed imperceptibly, it can only encrypt digital data and cannot provide a basis for tracing the source of the screenshots, candid photos, etc.
[0048] In view of this, the present disclosure provides an image processing method for preventing information leakage, improving information security, and improving user perception, while also being able to provide a basis for accurate tracing of behaviors such as screenshots and candid photography. Specifically, the method includes encoding first information to be encoded corresponding to a display device to obtain first encoded information; adjusting the pixel value of at least one first predetermined area of an image to be encoded corresponding to a target image according to the first encoded information to obtain a first encoded image; and fusing the target image and the first encoded image to obtain a fused image.
[0049] Figure 1 is a flowchart of an image processing method according to an embodiment of the present disclosure.
[0050] like Figure 1 As shown, the image processing method may include operations S110 to S130.
[0051] In operation S110, first information to be encoded corresponding to the display device is encoded to obtain first encoded information.
[0052] In operation S120, pixel values of at least one first predetermined area of an image to be encoded corresponding to the target image are adjusted according to the first encoding information to obtain a first encoded image.
[0053] In operation S130, the target image and the first encoded image are fused to obtain a fused image.
[0054] According to an embodiment of the present disclosure, the display device may be a device with a display screen, such as a mobile phone, a tablet computer, a television, a monitor, a laptop computer, a digital photo frame, a navigator, or any other product or component with a display function.
[0055] According to an embodiment of the present disclosure, the first information to be encoded corresponding to the display device may refer to at least one of the device identification of the display device, the time displayed on the display device, and the geographical location. The device identification may be the SN (Serial Number) code of the device, or the IP (Internet Protocol Address) address or MAC (Media Access Control Address) address of the device, or the internal number of the device. The time displayed on the display device may be a time including year, month, day, hour, and minute levels. The geographical location may be the current geographical location of the device.
[0056] According to an embodiment of the present disclosure, the first coded information may be information obtained by performing multi-base conversion on the information to be coded. Base conversion may be understood as binary conversion, quaternary conversion, octal conversion, decimal conversion, hexadecimal conversion, etc. For example, the first coded information may be information obtained by performing binary conversion on at least one of a device identifier, a time displayed by a display device, and a geographical location.
[0057] According to an embodiment of the present disclosure, by adding information such as the encoded device identification, the displayed time and the geographical location to the target image, a basis is provided for tracing the source analysis of the target image if the target image is subsequently leaked.
[0058] According to an embodiment of the present disclosure, the target image may be an image to be displayed on a display screen, and may refer to a picture with a visual effect.
[0059] According to an embodiment of the present disclosure, the image to be encoded may be an image matrix for generating an encoded image. Specifically, the size of the image to be encoded is the same as the size of the target image, that is, the width and height of the image to be encoded are the same as those of the target image. Before the encoded image is formed, the pixel values on the image to be encoded may all be 0.
[0060] According to an embodiment of the present disclosure, the first predetermined area may be an encoding area on the image to be encoded, and by changing the pixel value of the encoding area according to the first encoding information, a first encoded image corresponding to the adjusted pixel value of the encoding area may be obtained. The pixel value on the first encoded image may be associated with the encoded device identification, the time of display, and the geographical location information.
[0061] According to an embodiment of the present disclosure, a first coded image carrying a device identification, a display time, and a geographic location is superimposed and fused with a target image to be displayed on a display screen, and the transparency of the first coded image is adjusted to a preset transparency value so that the first coded image is displayed seamlessly on the display screen.
[0062] According to the embodiment of the present disclosure, the first information to be encoded corresponding to the display device is encoded onto the image to be encoded, the first encoded image is obtained, and the target image and the first encoded image are merged to realize the seamless display of the first encoded image. Compared with the clear watermark of the prior art, the embodiment of the present disclosure can realize the seamless display of the first encoded image, improving the user's perception. In addition, the clear watermark of the prior art generally directly displays the first information to be encoded of the embodiment of the present disclosure, while the present application encodes the first information to be encoded, obtains the encoded information, and then displays the first encoded image obtained according to the encoded information on the display screen without a trace. The embodiment of the present disclosure avoids the secondary leakage problem of the first information to be encoded and improves the security of the information. Compared with the dark watermark of the prior art, the objects targeted by the embodiment of the present disclosure can include images, not limited to digital data, which improves the universality of the screen watermark technology, and the first encoded image of the embodiment of the present disclosure is also convenient for extraction in the subsequent decoding process, and the first information to be encoded is obtained, which provides convenience and basis for accurate tracing of information.
[0063] According to an embodiment of the present disclosure, operation S110 may include the following operations: dividing a multi-bit first number to be encoded into a plurality of first groups to be encoded; determining a first check code corresponding to each of the plurality of first groups to be encoded to obtain a plurality of first check codes; and obtaining first coding information based on the multi-bit first number to be encoded and the plurality of first check codes.
[0064] According to an embodiment of the present disclosure, the first information to be encoded may include a multi-bit first number to be encoded, such as a number to be encoded composed of the sn code of the device and the time displayed by the display device.
[0065] According to an embodiment of the present disclosure, determining the first check code corresponding to each of the plurality of first to-be-coded groups, and obtaining the plurality of first check codes may include the following operations: determining a polynomial and a basic field related to the first to-be-coded number; dividing the first to-be-coded number into a group according to predetermined bits, and obtaining the plurality of first to-be-coded groups; treating the first to-be-coded groups obtained after the division as coefficients of the polynomial, constructing a new polynomial, and calculating the remainder of the new polynomial divided by the original polynomial, and using the remainder as the first check code. The remainder is added to the end of the first to-be-coded number, and the plurality of final first coded numbers can be obtained.
[0066] According to the embodiments of the present disclosure, the above encoding operation can be understood as BCH encoding, that is, the first number to be encoded is divided into first groups to be encoded according to a fixed k (k is a positive integer) bit group, and then each first group to be encoded is independently transformed into a binary digital group with a length of n (n>k). This process can be called a codeword. If the number of first groups to be encoded is M (obviously M>=2), the entirety of the M codewords obtained is called the first group to be encoded with a code length of n and a number of information of M, denoted as n, M. The process of transforming the first group to be encoded into a codeword is called encoding, and its inverse process is called decoding.
[0067] According to the embodiments of the present disclosure, by adopting the BCH encoding method, since the BCH encoding already includes a check bit, it can be used to detect and repair data errors, which can play a good check role in data transmission and verification scenarios. By adopting the BCH encoding method, the accuracy of information restoration when restoring the encoded information can also be improved.
[0068] According to an embodiment of the present disclosure, the first coding information may include at least one first coding number. Operation S120 may also include the following operation: according to at least one first predetermined pixel value corresponding to each of the at least one first coding numbers, adjusting the pixel value of at least one first predetermined area of the image to be coded corresponding to the target image, to obtain a first coded image, wherein the pixel value of at least one first predetermined area of the first coded image includes at least one first predetermined pixel value corresponding to each of the at least one first coding numbers.
[0069] According to an embodiment of the present disclosure, the number of digits of the first coding number may be N, where N is a positive integer. Taking the first information to be coded as including a device identifier and a displayed time as an example, the first coding information may include a 24-bit binary coding number about the device identifier and a 23-bit binary coding number about the time. Therefore, the first coding information may include a 47-bit coding number, and N is 47. It should be noted that the above-mentioned specific number of digits is only for example, and the number of digits may be adaptively adjusted according to actual needs.
[0070] According to an embodiment of the present disclosure, since the first coding information needs to be presented in the form of an image, it is necessary to establish a corresponding relationship between the first coding information and the pixel value. Specifically, it is necessary to establish a corresponding relationship between the coding number in the first coding information and the pixel value. For example, one or more pixel values may be pre-configured to be associated with the coding number, and the first predetermined pixel value may be the pre-configured pixel value. Exemplarily, the coding number is 0, and the corresponding first predetermined pixel value may be 0 or 255, 0, 0, 0. When adjusting the pixel value of the first predetermined area on the image to be encoded according to the first coding information, the original pixel value of the first predetermined area may be adjusted to the above-mentioned first predetermined pixel value.
[0071] According to an embodiment of the present disclosure, adjusting the pixel value of at least one first predetermined region of an image to be encoded corresponding to a target image according to at least one first predetermined pixel value respectively corresponding to at least one first coding number, and obtaining a first encoded image may include the following operations: for each first predetermined region in the at least one first predetermined region, dividing the first predetermined region into N first predetermined sub-regions, wherein the N first predetermined sub-regions include N1 first encoding sub-regions and N2 second encoding sub-regions, the N-bit first encoding number includes an N1-bit first encoding number and an N2-bit second encoding number, and N1 and N2 are natural numbers; based on a first encoding strategy, adjusting the pixel values of the N1 first encoding sub-regions of the image to be encoded corresponding to the target image according to a first predetermined pixel value respectively corresponding to the N1-bit first encoding number, and obtaining N1 first encoding region images; based on a second encoding strategy, adjusting the pixel values of the N2 second encoding sub-regions of the image to be encoded corresponding to the target image according to multiple predetermined pixel values respectively corresponding to the N2-bit second encoding number, and obtaining N2 second encoding region images; and obtaining the first encoded image according to the N1 first encoding region images and the N2 second encoding region images.
[0072] According to an embodiment of the present disclosure, the first coding sub-region may be a region for implementing a first coding strategy; the second coding sub-region may be a region for implementing a second coding strategy. In the first predetermined region, the first coding sub-region and the second coding sub-region may appear at the same time, or only the first coding sub-region or the second coding sub-region may exist, and the adaptive adjustment may be made according to actual needs. The positions of the first coding sub-region and the second coding sub-region may be adaptively adjusted according to actual needs.
[0073] According to an embodiment of the present disclosure, the first coding number may refer to a coding number using a first coding strategy; the second coding number may refer to a coding number using a second coding strategy. Each first coding number in the first coding strategy corresponds to a first predetermined pixel value; each second coding number in the second coding strategy may correspond to multiple first predetermined pixel values.
[0074] Exemplarily, assuming that the number of digits of the first coding number is 47, the first predetermined area can be divided into 47 first predetermined sub-areas. In the 47-bit first coding number, the 24-bit coding number representing the device can be the first coding number, which is processed using the first coding strategy, and the first coding sub-areas at this time can be 24; the 23-bit coding number representing the moment can be the second coding number, which is processed using the second coding strategy, and the second coding sub-areas at this time can be 23. Optionally, the 47-bit first coding number can also be processed using only the first coding strategy or only the second coding strategy. In the case of using only the first coding strategy, the number N1 of the first coding sub-areas is 47, and the number N2 of the second coding sub-areas is 0. In the case of using only the second coding strategy, the number N1 of the first coding sub-areas is 0, and the number N2 of the second coding sub-areas is 47. In another embodiment, the 24-bit coding number representing the device identification can also be processed in a combination of the first coding strategy and the second coding strategy, and the 23-bit coding number representing the moment can also be processed in a combination of the first coding strategy and the second coding strategy. The specific strategy adopted can be adaptively adjusted according to actual needs.
[0075] According to an embodiment of the present disclosure, the first coding region image may be obtained by adjusting the pixel values of the first coding sub-region; and the second coding region image may be obtained by adjusting the pixel values of the second coding sub-region.
[0076] According to an embodiment of the present disclosure, based on the first coding strategy, according to a first predetermined pixel value corresponding to each of the N1-bit first coding numbers, the pixel values of N1 first coding sub-regions of the image to be encoded corresponding to the target image are adjusted to obtain N1 first coding region images, which may include the following operations: for each first coding sub-region in the N1 first coding sub-regions, determining the first coding number corresponding to the first coding sub-region, and obtaining the first target coding number corresponding to the first coding sub-region; and adjusting the pixel value of the first coding sub-region to the first predetermined pixel value corresponding to the first target coding number, and obtaining the first coding region image corresponding to the first coding sub-region.
[0077] Figure 2A It is a schematic diagram of a first coding sub-region under a first coding strategy according to an embodiment of the present disclosure.
[0078] exist Figure 2AIn the case shown, N1 can be 4. Specifically, in the image to be encoded 201, a codable area can be selected as the first predetermined area 202, and four first coding sub-areas 203 can be divided in the first predetermined area 202. Each first coding sub-area 203 can represent a first coding number. Taking the quaternary system as an example, the first coding number represented by each first coding sub-area 203 has four options of 0, 1, 2, and 3, and the first target coding number corresponding to the first coding sub-area 203 can be one of 0, 1, 2, and 3. The embodiment of the present disclosure uses the pixel value size to represent the first coding number. In the case of an 8-bit display color depth screen display, the minimum value of the pixel displayed on the screen is 0 and the maximum value is 255. In the case of using the quaternary system, the pixel values of a first coding sub-area can be all 0 to represent the first coding number of 0, the pixel values are all 85 to represent the first coding number of 1, the pixel values are all 170 to represent the first coding number of 2, and the pixel values are all 255 to represent the first coding number of 3.
[0079] For example, in Figure 2A In the example, if the pixel values of the first coding sub-region from left to right in the first row are 0 and 85 respectively; the pixel values of the first coding sub-region from left to right in the second row are 170 and 255 respectively, then the coding numbers represented by the first predetermined region are 0, 1, 2, and 3 respectively. It can be understood that in the actual process of adjusting the pixel values, the pixel values can be adjusted in the order of from left to right and then from top to bottom, or from top to bottom and then from left to right, or from right to left and then from bottom to top, or from bottom to top and then from right to left, or clockwise, or counterclockwise, etc. The specific adjustment order can be adaptively adjusted according to actual needs.
[0080] According to an embodiment of the present disclosure, the first predetermined area is divided into first coding sub-areas in the following manner: Figure 2A The horizontal and vertical divisions shown may also be divided diagonally, and the division method may be adaptively adjusted according to actual needs.
[0081] According to an embodiment of the present disclosure, the shape of the first predetermined area can be as follows: Figure 2A The square shown in the figure, in addition, the shape of the first predetermined area can also be at least one of a rectangle, an irregular trapezoid, a trapezoid, a parallelogram, a rhombus, a triangle, and a circle.
[0082] According to an embodiment of the present disclosure, the shape of the first coding sub-region can be as follows: Figure 2A The square shown in the figure, in addition, the shape of the first predetermined area can also be at least one of a rectangle, an irregular trapezoid, a trapezoid, a parallelogram, a rhombus, a triangle, and a circle.
[0083] According to an embodiment of the present disclosure, based on the second coding strategy, according to multiple predetermined pixel values corresponding to each of the N2-bit second coding numbers, adjusting the pixel values of N2 second coding sub-regions of the image to be encoded corresponding to the target image, and obtaining N2 second coding region images may include the following operations: for each second coding sub-region in the N2 second coding sub-regions, determining the second coding number corresponding to the second coding sub-region, and obtaining the second target coding number corresponding to the second coding sub-region; according to a first predetermined association relationship set, determining a first predetermined ratio corresponding to the second target coding number, wherein the first predetermined association relationship set includes N2 first predetermined association relationships, and the first predetermined association relationship represents the association relationship between the second coding number and the first predetermined ratio; and according to the first predetermined ratio, adjusting the pixel value of the coded first region in the second coding sub-region to the first coding predetermined pixel value, and adjusting the pixel value of the coded second region in the second coding sub-region to at least one second coding predetermined pixel value, to obtain the second coding region image corresponding to the second coding sub-region, wherein the ratio between the size information of the coded first region and the size information of the second coding sub-region is the first predetermined ratio.
[0084] According to an embodiment of the present disclosure, the plurality of first predetermined pixel values may include a first coded predetermined pixel value and at least one second coded predetermined pixel value, and the first coded predetermined pixel value is greater than any one of the at least one second coded predetermined pixel value. For example, the coding number is 0, which may correspond to 4 pixel values of 255, 0, 0, and 0, wherein the first coded predetermined pixel value may be 255, and the second coded predetermined pixel value may be the remaining pixel values of the 4 pixel values except 255.
[0085] Figure 2B is a schematic diagram of a second coding sub-region under a second coding strategy according to an embodiment of the present disclosure.
[0086] exist Figure 2B In the case shown, N2 can be 4. Specifically, four second coding sub-areas 204 can be divided in the first predetermined area 202. Each second coding sub-area 204 can represent a second code number. Taking quaternary as an example, the second code number represented by each second coding sub-area 204 has four options of 0, 1, 2, and 3. The second target code number corresponding to the second coding sub-area 204 can be one of 0, 1, 2, and 3.
[0087] exist Figure 2B In the illustrated case, the first predetermined association relationship set may include four first predetermined association relationships, that is, four association relationships between the second coding numbers and the first predetermined ratios.
[0088] Continue to refer to Figure 2BEach second coding sub-region 204 can be further evenly divided into a coding first region 205 and a coding second region 206. The pixel value of the coding first region is a first coding predetermined pixel value, and the pixel value of the coding second region is a second coding predetermined pixel value, and the first coding predetermined pixel value is greater than the second coding predetermined pixel value.
[0089] According to an embodiment of the present disclosure, the first predetermined ratio may be a ratio between size information of the encoded first region and size information of the second encoded sub-region, wherein the size information may refer to the number of regions or the area of the regions.
[0090] Continuing to refer to Figure 2, for example, taking the example of dividing the second coding sub-region 204 into four equal parts, if the second coding number is 0, the corresponding first predetermined ratio is 1 / 4, that is, the area of the coded first region 205 accounts for 1 / 4 of the total area of the second coding sub-region. At this time, there can be only 1 coded first region 205 and 3 coded second regions 206 in the second coding sub-region 204. The first predetermined pixel value of the coded first region 205 can be 255, and the pixel values of the remaining 3 coded second regions 206 can be 0, 0, and 0, respectively.
[0091] If the second coding number is 1, the corresponding first predetermined ratio is 2 / 4, that is, the area of the first coded region 205 accounts for 2 / 4 of the total area of the second coded sub-region. At this time, there can be 2 first coded regions 205 and 2 second coded regions 206 in the second coded sub-region 204, and the first predetermined pixel values of the two first coded regions 205 can be 255 respectively, and the pixel values of the remaining 2 second coded regions 206 can be 0 and 0 respectively.
[0092] If the second coding number is 2, the corresponding first predetermined ratio is 3 / 4, that is, the area of the first coded region 205 accounts for 3 / 4 of the total area of the second coded sub-region. At this time, there can be 3 coded first regions 205 and 1 coded second region 206 in the second coded sub-region 204, and the first predetermined pixel values of the 3 coded first regions 205 can be 255 respectively, and the pixel values of the remaining 1 coded second region 206 can be 0 and 0 respectively.
[0093] If the second coding number is 3, the corresponding first predetermined ratio is 4 / 4, that is, the area of the coded first region 205 accounts for 4 / 4 of the total area of the second coding sub-region. At this time, there can be 4 coded first regions 205 and 0 coded second regions 206 in the second coding sub-region 204, and the first predetermined pixel values of the 4 coded first regions 205 can all be 255.
[0094] It can be understood that in the actual process of adjusting pixel values, the pixel values can be adjusted in an order from left to right and then from top to bottom, or from top to bottom and then from left to right, or from right to left and then from bottom to top, or from bottom to top and then from right to left, or clockwise, or counterclockwise. The specific adjustment order can be adaptively adjusted according to actual needs.
[0095] According to an embodiment of the present disclosure, the first predetermined area is divided into second coding sub-areas in the following manner: Figure 2B The horizontal and vertical divisions shown may also be divided diagonally, and the division method may be adaptively adjusted according to actual needs.
[0096] According to an embodiment of the present disclosure, the second coding sub-region is divided into the coding first region and the coding second region. Figure 2B The horizontal and vertical divisions shown may also be divided diagonally, and the division method may be adaptively adjusted according to actual needs.
[0097] According to an embodiment of the present disclosure, the shape of the second coding sub-region can be as follows: Figure 2B The square shown in the figure; in addition, the shape of the second coding sub-region may also be at least one of a rectangle, an irregular trapezoid, a trapezoid, a parallelogram, a rhombus, a triangle, and a circle.
[0098] According to an embodiment of the present disclosure, the shape of the first coding region and the shape of the second coding region can be as follows: Figure 2B The square shown in FIG. 4 ; in addition, the shape of the first coding area and the shape of the second coding area can also be at least one of a rectangle, an irregular trapezoid, a trapezoid, a parallelogram, a rhombus, a triangle, and a circle.
[0099] Figure 2C This is a schematic diagram of the coexistence of a first coding sub-region and a second coding sub-region according to an embodiment of the present disclosure.
[0100] like Figure 2C As shown, one second coding sub-region and three first coding sub-regions may be included in the first predetermined region 202. In one second coding sub-region, there may be one first coding region and three second coding regions.
[0101] Figure 2D This is a schematic diagram showing the coexistence of a first coding sub-region and a second coding sub-region according to another embodiment of the present disclosure.
[0102] like Figure 2DAs shown, two second coding sub-regions and two first coding sub-regions may also be included in the first predetermined region 202. In one of the second coding sub-regions, there may be one first coding region and three second coding regions; in another second coding sub-region, there may be two first coding regions and two second coding regions.
[0103] Continue to refer to Figure 2C to Figure 2D The arrangement and combination of the first coding sub-region 203 and the second coding sub-region 204 can be adaptively adjusted according to actual needs, and the arrangement and combination of the first coding region 205 and the second coding region 206 in the second coding sub-region 204 can also be adaptively adjusted according to actual needs.
[0104] Figure 2E It is a schematic diagram of a plurality of first predetermined areas on an image to be encoded according to an embodiment of the present disclosure.
[0105] like Figure 2E As shown, multiple first predetermined areas 202 can be selected for encoding on the image to be encoded 201, each first predetermined area 202 can adopt the same or different encoding strategies, and each first predetermined area 202 can adopt the same or different shapes for encoding.
[0106] In another embodiment, multiple first predetermined areas 202 may be selected near the edges and the center of the image to be encoded 201 to prevent the problem of incomplete encoded images due to edge cropping during subsequent decoding.
[0107] According to an embodiment of the present disclosure, in order to ensure the accuracy of the restoration process of the encoded image, the encoding should not be too complex. Too complex encoding will have a high bit error rate during restoration. In order to further improve the accuracy of restoration, the embodiment of the present disclosure adopts the above-mentioned redundant encoding method to encode information so as to accurately extract complete information during the restoration process. By encoding the multiple first predetermined areas 202 in the image to be encoded 201 as described above, the replication of the encoded image can be achieved, so that the final fused image will have multiple encoded images. When restoring the fused image, the encoded images of different first predetermined areas can be effectively complemented, so as to completely restore accurate information. The complementary method can select overlapping coding areas, the majority of coding values, etc.
[0108] According to the embodiments of the present disclosure, by presenting the device identification, the time displayed by the display device, and the geographical location in the form of pixel values on the final fused image, not only can the encryption processing of the information be achieved, but also a basis for accurate tracing of the information can be provided. For example, if the fused image is photographed and disseminated without permission, after the disseminated fused image is discovered, by performing information restoration processing on the first coded image on the fused image, it is possible to know at what time the fused image was taken, from which device the fused image came, and the geographical location of the fused image at the time of being taken. Based on this, by presenting the device identification, the time displayed by the display device, and the geographical location in the form of pixel values on the final fused image, a basis for accurate tracing of the information can be provided.
[0109] According to an embodiment of the present disclosure, the above-mentioned image processing method may further include the following operations: determining a second predetermined association relationship corresponding to each of the N1 first coding sub-regions to obtain a second predetermined association relationship set, wherein the second predetermined association relationship set includes N1 second predetermined association relationships, the second predetermined association relationship represents the association relationship between the first predetermined region identifier and the first predetermined strategy identifier, the first predetermined region identifier is used to represent the first coding sub-region, and the first predetermined strategy identifier represents that the coding strategy corresponding to the first coding sub-region is the first coding strategy; determining a third predetermined association relationship corresponding to each of the N2 second coding sub-regions to obtain a third predetermined association relationship set, wherein the third predetermined association relationship set includes N2 third predetermined association relationships, the third predetermined association relationship represents the association relationship between the second predetermined region identifier and the second predetermined strategy identifier, the second predetermined region identifier is used to represent the second coding sub-region, and the second predetermined strategy identifier represents that the coding strategy corresponding to the second coding sub-region is the second coding strategy; and storing the second predetermined association relationship set and the third predetermined association relationship set.
[0110] According to an embodiment of the present disclosure, by constructing a relationship between a first predetermined area mark and a first predetermined strategy mark, and constructing a relationship between a second predetermined area mark and a second predetermined strategy mark, it is convenient to restore the information of the corresponding predetermined sub-area directly according to the mark, the corresponding decoding strategy, and the corresponding decoding strategy when restoring the coded information. Exemplarily, after the first coding sub-area is encoded using the first coding strategy, the first predetermined strategy mark used to characterize the first coding strategy, and the first predetermined area mark characterizing the first coding sub-area are stored in a specified list to obtain a second predetermined association relationship set. In the subsequent process of restoring information to the area, the first predetermined strategy mark and the first predetermined area mark that need to be restored can be found from the second predetermined association relationship set, and the first coding strategy can be obtained based on the first predetermined strategy mark, and then the information of the first coding sub-area can be restored using the decoding strategy related to the first coding strategy.
[0111] According to an embodiment of the present disclosure, in addition to using the coding strategy and the first predetermined sub-region used by the identification mark, the shape of the coding region can also be used to distinguish the coding strategy and the first predetermined sub-region. For example, the shape of the first coding sub-region using the first coding strategy can be set to a quadrilateral, and the shape of the second coding sub-region using the second coding strategy can be set to a triangle. In this way, when restoring the information on the first coded image, the coding strategy adopted by the first predetermined sub-region can be determined according to the shape of the first predetermined sub-region, and then the decoding strategy corresponding to the coding strategy can be used to restore the information of the first predetermined sub-region.
[0112] According to the embodiments of the present disclosure, by constructing a second association relationship set and a third association relationship set, or using the shape of the first predetermined sub-region to distinguish between the first coding strategy and the second coding strategy, it is possible to quickly distinguish the coding strategy adopted on the first coded image and the first predetermined sub-region adopting the coding strategy during the process of restoring the information on the first coded image, thereby finding the corresponding decoding strategy to restore the information, thereby improving the efficiency of restoring the information on the first coded image.
[0113] According to an embodiment of the present disclosure, operation S130 may also include the following operations: determining the product between the pixel value of at least one pixel included in the target image and the first predetermined coefficient to obtain first pixel information; determining the product between the pixel value of at least one pixel included in the first encoded image and the second predetermined coefficient to obtain second pixel information; obtaining third pixel information based on the first pixel information and the second pixel information; and obtaining a fused image based on the third pixel information.
[0114] In order to make the first coded image seamlessly displayed on the target image, the first predetermined coefficient and the second predetermined coefficient can be set when the first coded image and the target image are fused, and the third pixel information of the fused image is determined by multiplying the respective pixels by the respective predetermined coefficients. By adjusting the first predetermined coefficient and the second predetermined coefficient, the first coded image can be seamlessly displayed on the target image, and it is also convenient to extract it in the subsequent decoding process. Specifically, the process of determining the third pixel can be shown as formula (1).
[0115] p=a×b+c×d (1)
[0116] Among them, p can represent the third pixel information, for example, the third pixel value (the pixel value of at least one pixel of the fused image), a can represent the pixel value of at least one pixel included in the target image, b can represent the first predetermined coefficient; c can represent the pixel value of at least one pixel included in the first encoded image, and d can represent the second predetermined coefficient.
[0117] According to the embodiment of the present disclosure, when fusing the target image and the first coded image, the transparency of the first coded image can also be set, for example, the transparency of the first coded image is set to 97% and then superimposed on the target image. The superposition does not affect the display effect and is not noticeable when used.
[0118] According to an embodiment of the present disclosure, in order to enable the first coded image to be displayed on the target image without a trace, the RGB pixel channels on the first coded image can also be adjusted, for example, the color displayed by the first coded image is adjusted to a yellow-green color that is difficult to distinguish by the naked eye, and then the first coded image after the color adjustment is fused with the target image according to the process shown in formula (1) to obtain a fused image. By adjusting the first coded image to a color that is difficult to distinguish by the naked eye, the first coded image can be displayed on the target image without a trace, and can also be easily extracted.
[0119] Figure 3 is a schematic diagram of a first encoded image according to an embodiment of the present disclosure; Figure 4 is a schematic diagram of a fused image according to an embodiment of the present disclosure.
[0120] Reference Figure 3-4 , Figure 3 The first coded image may include the device identification and the time when the display device displays, which is a two-dimensional image. The first coded image is superimposed on the target image with a curve with a certain transparency, and the following can be obtained: Figure 4 The fused image shown.
[0121] Figure 5 is a flowchart of an image processing method according to another embodiment of the present disclosure.
[0122] like Figure 5 As shown, the image processing method of another embodiment may include operations S510 to S530.
[0123] In operation S510, the image to be processed is processed to obtain a second encoded image, wherein the image to be processed includes one of the following: a fused image and a captured image corresponding to the fused image, and the fused image is obtained according to the image processing method described in operations S110 to S130.
[0124] In operation S520, second encoding information is obtained according to pixel values of at least one second predetermined area of the second encoded image.
[0125] In operation S530, the second encoded information is decoded to obtain second information to be encoded corresponding to the display device.
[0126] According to an embodiment of the present disclosure, processing the image to be processed may be understood as performing a decoding operation on the image to be processed.
[0127] According to the embodiments of the present disclosure, in a few scenarios, the fused image may be photographed and disseminated without permission, or exported and disseminated as a file, which causes information leakage. The photographed image corresponding to the fused image may refer to an image including the fused image that is photographed without permission.
[0128] According to an embodiment of the present disclosure, the second coded image may refer to a decoded image obtained by decoding the image to be processed. The second coded image may be the same as the first coded image, and "first" and "second" are only used to distinguish between the image obtained by the encoding process and the image obtained by the decoding process. The second coded image may also be associated with the encoded device identification, the time displayed by the display device, the geographical location information, etc.
[0129] According to an embodiment of the present disclosure, the second predetermined area may refer to an encoding area on the second encoded image.
[0130] According to an embodiment of the present disclosure, the second coded information may refer to a device identification after multi-base conversion, a time displayed by a display device, a geographical location, etc. Multi-base conversion may include binary conversion, quaternary conversion, octal conversion, decimal conversion, hexadecimal conversion, etc. The second information to be coded may be the same as the first information to be coded, and the "first" and "second" are only used to distinguish the coded information obtained by encoding from the coded information obtained by the decoding process.
[0131] According to an embodiment of the present disclosure, the second information to be encoded may be the same as the first information to be encoded, including information about the device identification, the time displayed by the display device, and the geographical location. The "first" and "second" are only used to distinguish between the information to be encoded required for the encoding process and the information to be encoded obtained in the decoding process.
[0132] According to the embodiments of the present disclosure, by decrypting the fused image or the captured image corresponding to the fused image, it is possible to obtain the moment at which the fused image was captured or exported, the device from which the fused image came, and the geographical location of the fused image at the moment it was captured or exported. Based on this, a basis can be provided for accurate tracing of information.
[0133] According to an embodiment of the present disclosure, operation S510 may include the following operations: obtaining a feature map of at least one scale according to the image to be processed; and obtaining a second encoded image according to the feature map of at least one scale.
[0134] According to an embodiment of the present disclosure, at least one scale includes J scales, where J is a positive integer; obtaining a second encoded image based on the feature maps of at least one scale includes: when 1 ≤ j < J, obtaining a fused feature map of the j-th scale based on the feature map of the j-th scale and an upsampled feature map, where the upsampled feature map of the j-th scale is obtained based on the feature map of the (j + 1)-th scale and an upsampled feature map, and the feature map of the j-th scale is obtained based on the feature map of the (j - 1)-th scale, and j is an integer greater than or equal to 1 and less than or equal to J; and obtaining a second encoded image based on the fused feature map of the first scale.
[0135] Figure 6 FIG. 4 is a flowchart of obtaining a second encoded image from a fused image according to an embodiment of the present disclosure.
[0136] As Figure 6 shown, the process of obtaining the second encoded image 603 from the fused image 601 can be implemented by using an end-to-end deep learning image segmentation network. For example, in combination with a U-Net model structure or a D-LinkNet model structure, etc., a fused feature map 602 can be obtained by combining a U-Net model structure or a D-LinkNet model structure.
[0137] According to an embodiment of the present disclosure, if it is a captured image corresponding to the fused image, before inputting it into the U-Net model or the D-LinkNet model, some preprocessing can be performed, such as cropping, affine transformation, etc., to convert it into an image with the same resolution as the fused image.
[0138] According to an embodiment of the present disclosure, by decoding the second target image output by the U-Net model or the D-LinkNet model using a decoding strategy corresponding to the encoding strategy, the device identifier and the time displayed on the display device can be decoded.
[0139] According to an embodiment of the present disclosure, when training the U-Net model structure or the D-LinkNet model, a self-supervised learning method can be adopted. During training, a random code map is generated in real time and superimposed on the training image, and the code map is used as the label of the network for training.
[0140] According to the embodiments of the present disclosure, in the decoding stage, the output second coded image may have information that is decoded incorrectly, but because certain redundant coding is used in the encoding stage, for example, multiple first predetermined areas on the image to be encoded are encoded, multiple second coded images will appear on the image to be processed, which can achieve effective information complementarity between the second coded images; for example, when the BCH error correction code is introduced when encoding the information to be encoded, the check bit is added to the code number, which can improve the decoding accuracy during the decoding process. Therefore, by adopting the above encoding method, the second coded image will have a certain degree of fault tolerance when being decoded, and the decoding accuracy is improved.
[0141] According to an embodiment of the present disclosure, operation S520 may include the following operations: determining a second coding number corresponding to at least one second predetermined area of the second encoded image based on at least one second predetermined pixel value corresponding to at least one second predetermined area of the second encoded image, and obtaining second coding information.
[0142] According to an embodiment of the present disclosure, the second predetermined pixel value may be one or more pixel values pre-configured to be associated with the second code number. For example, if the second predetermined pixel value is 0, the corresponding second code number may be 0; if the second predetermined pixel value is 85, the corresponding second code number may be 1. For another example, if the second predetermined pixel value is 255, 0, 0, 0, the corresponding second code number may be 0; if the second predetermined pixel value is 255, 255, 0, 0, the corresponding second code number may be 1.
[0143] According to an embodiment of the present disclosure, the number of bits of the second coding number is N, and the N-bit second coding number includes an N1-bit first decoding number and an N2-bit second decoding number, N is a positive integer, and N1 and N2 are natural numbers. According to at least one second predetermined pixel value corresponding to at least one second predetermined area of the second coded image, the second coding number corresponding to at least one second predetermined area of the second coded image is determined, and obtaining the second coding information may include the following operations: determining at least one second predetermined area corresponding to the second coded image and N1 first decoding sub-areas and N2 second decoding sub-areas corresponding to at least one second predetermined area; for each second predetermined area in the at least one second predetermined area, obtaining the second coding information by one of the following methods:
[0144] Based on the first decoding strategy, first decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions and a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions; when it is determined that the first decoding information includes the first target decoding numbers corresponding to each of the N1 first decoding sub-regions and does not include the second target decoding numbers corresponding to each of the N2 second decoding sub-regions, based on the second decoding strategy, second decoding information is obtained according to a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions of the second predetermined region; and when it is determined that the second decoding information includes the second target decoding numbers corresponding to each of the N2 second decoding sub-regions, an N-bit second coding number is obtained according to the N1-bit first target decoding number and the N2-bit second target decoding number.
[0145] Alternatively, based on the second decoding strategy, third decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions and a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions; when it is determined that the third decoding information includes the second target decoding numbers corresponding to each of the N2 second decoding sub-regions and does not include the first target decoding numbers corresponding to each of the N1 first decoding sub-regions, based on the first decoding strategy, fourth decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions of the second predetermined region; and when it is determined that the fourth decoding information includes the first target decoding numbers corresponding to each of the N1 first decoding sub-regions, an N-bit second coding number is obtained according to the N1-bit first target decoding number and the N2-bit second target decoding number.
[0146] According to an embodiment of the present disclosure, the first decoding sub-region may be a region for implementing the first decoding strategy; the second decoding sub-region may be a region for implementing the second decoding strategy. In the second predetermined region, the first decoding sub-region and the second decoding sub-region may appear at the same time, or only the first decoding sub-region or the second decoding sub-region may exist, and the adaptive adjustment may be made according to actual needs. The positions of the first decoding sub-region and the second decoding sub-region may be adaptively adjusted according to actual needs.
[0147] According to an embodiment of the present disclosure, the first decoding number may refer to the encoding number using the first encoding strategy; the second decoding number may refer to the encoding number using the second encoding strategy. Each first decoding number in the first decoding strategy corresponds to a second predetermined pixel value; each second decoding number in the second decoding strategy may correspond to multiple second predetermined pixel values. The first decoding strategy may correspond to the first encoding strategy, and the second decoding strategy may correspond to the second encoding strategy.
[0148] According to an embodiment of the present disclosure, in the process of obtaining the second coded number according to the second predetermined pixel value, the first decoding strategy may be first attempted for decoding. If the first decoding strategy can obtain a complete second coded number, the second decoding strategy may not be needed. If the complete second coded number cannot be obtained, the second decoding strategy may be used for decoding. If the second coded number cannot be obtained, the second decoding strategy may be used for decoding.
[0149] For example, it is assumed that the second coded image is obtained by combining the first coding strategy and the second coding strategy, and the number of bits of the second coding number is 47. In the 47-bit first coding number, the 24-bit coding number representing the device can be the first decoding number, and N1 is 24; the 23-bit coding number representing the moment can be the second decoding number, and N2 is 23; there will be 24 first decoding sub-areas and 23 second decoding sub-areas on the second coded image. At this time, the first decoding strategy can be used for decoding first, but the result obtained is that only a 24-bit coding number can be obtained based on the pixel values of the 24 first decoding sub-areas, and this 24-bit coding number can be used as the first target decoding number in the first decoding information. Since 24 bits are less than 47 bits, it means that the current second coded image has not been fully decoded. At this time, the second decoding strategy can be used to decode the remaining area to obtain a 23-bit coding number, and this 23-bit coding number can be used as the second target decoding number in the second decoding information. In another embodiment, the second decoding strategy can also be used to try decoding first. If the second decoding strategy can obtain a complete second coding number, the first decoding strategy does not need to be used again. If the complete second code number cannot be obtained, the first decoding strategy can be used for decoding. If the second code number cannot be obtained, the first decoding strategy can be used for decoding. The example process of first using the second decoding strategy can be similar to the example process of first using the first decoding strategy mentioned above. The third decoding information and the fourth decoding information can refer to the first decoding information and the second decoding information respectively, which will not be repeated here.
[0150] According to an embodiment of the present disclosure, the number of bits of the second coding number is N, the N-bit second coding number includes an N1-bit first decoding number and an N2-bit second decoding number, N is a positive integer, and N1 and N2 are natural numbers; wherein, according to at least one second predetermined pixel value corresponding to at least one second predetermined area of the second coded image, determining the second coding number corresponding to at least one second predetermined area of the second coded image, obtaining the second coding information may include the following operations: determining at least one second predetermined area corresponding to the second coded image and N1 first decoding sub-areas and N2 second decoding sub-areas corresponding to each of the at least one second predetermined area; for each second predetermined area in the at least one second predetermined area, determining the N1 first decoding sub-areas corresponding to the second predetermined area; Based on the decoding strategy corresponding to the N1 first decoding sub-regions and the decoding strategy corresponding to the N second decoding sub-regions of the second predetermined region, a first decoding strategy corresponding to the N1 first decoding sub-regions and a second decoding strategy corresponding to the N2 second decoding sub-regions are obtained; based on the first decoding strategy, according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions of the second predetermined region, a first target decoding number corresponding to each of the N1 first decoding sub-regions is obtained; based on the second decoding strategy, according to multiple second predetermined pixel values corresponding to each of the N2 second decoding sub-regions of the second predetermined region, a second target decoding number corresponding to each of the N2 second decoding sub-regions is obtained; and based on the N1-bit first target decoding number and the N2-bit second target decoding number, an N-bit second coding number is obtained.
[0151] Exemplarily, assuming that N is 4, N1 is 2, and N2 is 2, that is, there are 2 first decoding sub-areas and 2 second decoding sub-areas in the second predetermined area, and the pixel values in the 2 first decoding sub-areas are 0 and 85 respectively, then the first target decoding numbers obtained by decoding the 2 first decoding sub-areas using the first decoding strategy are 0 and 1 respectively. The pixel values in the 2 second decoding sub-areas are (255, 0, 0, 0) and (255, 255, 255, 0), then the second target decoding numbers obtained by decoding the 2 second decoding sub-areas using the second decoding strategy are 0 and 2 respectively. According to the 2-bit first target decoding numbers 0 and 1 and the 2-bit second target decoding numbers 0 and 2, the 4-bit second encoding number 0102 can be obtained. The second encoding number can also be other permutations and combinations of the 4-digit numbers 0, 1, 0, and 2 except 0102. The arrangement order of the obtained second encoding number can be related to the decoding order of the decoding strategy, the decoding order of the decoding strategy can be related to the encoding order of the encoding strategy, and the encoding order can be adaptively adjusted according to actual needs.
[0152] According to an embodiment of the present disclosure, the multiple second predetermined pixel values include a first decoding predetermined pixel value and at least one second decoding predetermined pixel value, and the first decoding predetermined pixel value is greater than any one of the at least one second decoding predetermined pixel value; wherein, based on the second decoding strategy, according to the multiple second predetermined pixel values corresponding to each of the N2 second decoding sub-regions of the second predetermined region, obtaining the second target decoding number corresponding to each of the N2 second decoding sub-regions includes: for each of the N2 second decoding sub-regions, according to the first decoding predetermined pixel value corresponding to the second decoding sub-region, determining the decoding first region in the second decoding sub-region; determining the ratio between the size information of the decoding first region and the size information of the second decoding sub-region, and obtaining the second predetermined ratio corresponding to the second decoding sub-region; and determining the second decoding number corresponding to the second predetermined ratio according to the first predetermined association relationship set, and obtaining the second target decoding number corresponding to the second predetermined sub-region, wherein the first predetermined association relationship set includes N2 first predetermined association relationships, and the first predetermined association relationship represents the association relationship between the second decoding number and the second predetermined ratio.
[0153] The first decoding area may refer to an area with large pixel values. Exemplarily, assuming that N is 4, N1 is 0, and N2 is 4, that is, there are 4 second decoding sub-areas in the second predetermined area, and the pixel values in the 4 second decoding sub-areas are (255, 0, 0, 0), (255, 255, 0, 0), (255, 255, 255, 0), (255, 255, 255, 255), respectively. According to these pixel values, it can be known that in each second predetermined sub-area, the second predetermined proportion of the first decoding area with large pixel values in the second decoding sub-area is 1 / 4, 2 / 4, 3 / 4, and 4 / 4, respectively. From the first predetermined association relationship set, based on the preset first predetermined association relationship, the code numbers corresponding to these second predetermined proportions are found to be 0, 1, 2, and 3, respectively.
[0154] According to an embodiment of the present disclosure, determining a decoding strategy corresponding to N1 first decoding sub-regions of a second predetermined region and a decoding strategy corresponding to N second decoding sub-regions of the second predetermined region, and obtaining a first decoding strategy corresponding to the N1 first decoding sub-regions and a second decoding strategy corresponding to the N2 second decoding sub-regions may include the following operations: determining that the decoding strategy corresponding to each of the N1 first decoding sub-regions is the first decoding strategy according to a second predetermined association relationship set, wherein the second predetermined association relationship set includes N1 second predetermined association relationships, and the second predetermined association relationship represents the relationship between the first predetermined region identifier and the first predetermined strategy identifier. The first predetermined area identifier is used to represent the first decoding sub-area, and the first predetermined strategy identifier represents that the coding strategy corresponding to the first decoding sub-area is the first coding strategy; and when it is determined that the coding strategy corresponding to each of the N2 second decoding sub-areas is the second coding strategy according to the third predetermined association relationship set, the decoding strategy corresponding to the N2 second decoding sub-areas is determined to be the second decoding strategy, wherein the third predetermined association relationship set includes N2 third predetermined association relationships, the third predetermined association relationship represents the association relationship between the second predetermined area identifier and the second predetermined strategy identifier, the second predetermined area identifier is used to represent the second decoding sub-area, and the second predetermined strategy identifier represents that the coding strategy corresponding to the second decoding sub-area is the second coding strategy.
[0155] According to the embodiments of the present disclosure, by constructing the relationship between the first predetermined area mark and the first predetermined strategy identifier, and constructing the relationship between the second predetermined area mark and the second predetermined strategy identifier, it is convenient to restore the information of the corresponding predetermined sub-area directly according to the identifier, the corresponding decoding strategy, and the corresponding decoding strategy when restoring the coded information. Exemplarily, when it is necessary to decode the second coded image, the second predetermined association relationship set and the third predetermined association relationship set can be found from the specified list, and the corresponding coding strategy identifier and the predetermined area identifier can be obtained from the association relationship set, and the specific coding strategy adopted can be obtained according to the coding strategy identifier, and then the decoding strategy corresponding to the coding strategy is used to complete the decoding of the second coded image.
[0156] According to an embodiment of the present disclosure, by constructing a second association relationship set and a third association relationship set, the coding strategy adopted on the second coded image and the second predetermined sub-area adopting the coding strategy can be quickly distinguished during the process of restoring the information on the second coded image, so that the corresponding decoding strategy can be found for decoding processing, thereby improving the efficiency of decoding processing on the second coded image.
[0157] According to an embodiment of the present disclosure, operation S530 may include the following operations: obtaining multiple second verification codes based on the second coding information; determining the second groups to be encoded corresponding to each of the multiple second verification codes to obtain multiple second groups to be encoded; and obtaining second information to be encoded based on the multiple second groups to be encoded.
[0158] According to the embodiments of the present disclosure, the above operation can be understood as the reverse operation of BCH coding. For example, the second check code at the end is deleted from the second coded information to obtain the second group to be coded, and the code numbers in the second group to be coded are combined according to the predetermined bits to obtain the second information to be coded.
[0159] According to the embodiments of the present disclosure, by adopting the BCH encoding method, since the BCH encoding already includes a check bit, it can be used to detect and repair data errors, which can play a good check role in data transmission and verification scenarios. By adopting the BCH encoding method, the decoding accuracy when decoding the encoded information can also be improved.
[0160] Figure 7 is a framework diagram of an image processing method according to yet another embodiment of the present disclosure.
[0161] like Figure 7 As shown, the information to be encoded 701 corresponding to the display device can be encoded to obtain the encoded information 702, and the pixel value of the image to be encoded 703 can be adjusted according to the encoded information 702 to obtain the encoded image 704, and the encoded image 704 and the target image 705 are fused to obtain the fused image 706. The fused image 706 is photographed or exported by an electronic device 707 such as a mobile phone or a USB flash drive to obtain a photographed image 708 or an exported fused image. When the photographed image 708 or the exported fused image is spread on the network, and the photographed image or the exported fused image is found on the network, the photographed image or the exported fused image can be decoded to obtain the information to be encoded 701 corresponding to the display device. Thus, it can be known when the photographed image was leaked, from which device it was leaked, and the geographical location of the leak.
[0162] According to an embodiment of the present disclosure, Figure 7 The processing process shown in can refer to the relevant contents in operations S110 to S130 and operations S510 to S530, which will not be repeated here.
[0163] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0164] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
[0165] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method as described above.
[0166] According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the method as described above.
[0167] Figure 8 1 is a block diagram of an electronic device suitable for implementing an image processing method according to an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0168] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0169] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0170] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, for example, image processing methods. For example, in some embodiments, the image processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the image processing method in any other appropriate manner (e.g., by means of firmware).
[0171] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0172] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data mining device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0173] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0175] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0176] A computer system may include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises through computer programs running on respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server combined with a blockchain.
[0177] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0178] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An image processing method, comprising: Encoding the first information to be encoded corresponding to the display device to obtain first encoded information; According to the first encoding information, adjusting pixel values of at least one first predetermined area of the image to be encoded corresponding to the target image to obtain a first encoded image; as well as The target image and the first encoded image are fused to obtain a fused image.
2. The method according to claim 1, wherein: The first coding information includes at least one first coding number; The step of adjusting pixel values of at least one first predetermined area of the image to be encoded corresponding to the target image according to the first encoding information to obtain the first encoded image includes: According to at least one first predetermined pixel value corresponding to each of the at least one first coding number, the pixel values of at least one first predetermined area of the image to be encoded corresponding to the target image are adjusted to obtain the first encoded image, wherein the pixel values of at least one first predetermined area of the first encoded image include at least one first predetermined pixel value corresponding to each of the at least one first coding number.
3. The method according to claim 2, wherein: The number of digits of the first coding number is N, where N is a positive integer; The step of adjusting the pixel value of at least one first predetermined area of the image to be encoded corresponding to the target image according to at least one first predetermined pixel value corresponding to each of the at least one first coded numbers to obtain the first encoded image comprises: For each first predetermined area in the at least one first predetermined area, Divide the first predetermined area into N first predetermined sub-areas, wherein the N first predetermined sub-areas include N1 first coding sub-areas and N2 second coding sub-areas, the N-bit first coding numbers include N1-bit first coding numbers and N2-bit second coding numbers, and N1 and N2 are natural numbers; Based on the first coding strategy, according to a first predetermined pixel value corresponding to each of the N1-bit first coding numbers, pixel values of N1 first coding sub-regions of the image to be coded corresponding to the target image are adjusted to obtain N1 first coding region images; Based on the second coding strategy, adjusting the pixel values of N2 second coding sub-regions of the image to be coded corresponding to the target image according to a plurality of predetermined pixel values corresponding to each of the N2 second coding numbers, to obtain N2 second coding region images; and The first encoded image is obtained according to the N1 first encoded region images and the N2 second encoded region images.
4. The method according to claim 3, wherein: The method of adjusting the pixel values of N1 first coding sub-regions of the image to be coded corresponding to the target image based on the first coding strategy according to a first predetermined pixel value corresponding to each of the N1-bit first coding numbers to obtain N1 first coding region images includes: For each first coding sub-region in the N1 first coding sub-regions, determining a first code number corresponding to the first coding sub-region, and obtaining a first target code number corresponding to the first coding sub-region; and The pixel value of the first coding sub-region is adjusted to a first predetermined pixel value corresponding to the first target coding number, so as to obtain a first coding region image corresponding to the first coding sub-region.
5. The method according to claim 3 or 4, wherein: The plurality of first predetermined pixel values include a first coded predetermined pixel value and at least one second coded predetermined pixel value, the first coded predetermined pixel value being greater than any one of the at least one second coded predetermined pixel value; Wherein, based on the second coding strategy, according to a plurality of predetermined pixel values corresponding to the N2 second coding numbers, respectively, adjusting the pixel values of N2 second coding sub-regions of the image to be coded corresponding to the target image, and obtaining N2 second coding region images includes: For each second coding sub-region in the N2 second coding sub-regions, Determine a second code number corresponding to the second coding sub-region, and obtain a second target code number corresponding to the second coding sub-region; Determine a first predetermined ratio corresponding to the second target code number according to a first predetermined association relationship set, wherein the first predetermined association relationship set includes N2 first predetermined association relationships, and the first predetermined association relationship represents an association relationship between the second code number and the first predetermined ratio; and According to the first predetermined ratio, the pixel values of the encoded first region in the second encoded sub-region are adjusted to the first predetermined encoded pixel values, and the pixel values of the encoded second region in the second encoded sub-region are adjusted to the at least one second predetermined encoded pixel value, so as to obtain a second encoded region image corresponding to the second encoded sub-region, wherein the ratio between the size information of the encoded first region and the size information of the second encoded sub-region is the first predetermined ratio.
6. The method according to claim 3 or 4, further comprising: Determine a second predetermined association relationship corresponding to each of the N1 first coding sub-regions to obtain a second predetermined association relationship set, wherein the second predetermined association relationship set includes N1 second predetermined association relationships, the second predetermined association relationship represents an association relationship between a first predetermined region identifier and a first predetermined strategy identifier, the first predetermined region identifier is used to represent the first coding sub-region, and the first predetermined strategy identifier represents that the coding strategy corresponding to the first coding sub-region is the first coding strategy; determining a third predetermined association relationship corresponding to each of the N2 second coding sub-regions to obtain a third predetermined association relationship set, wherein the third predetermined association relationship set includes N2 third predetermined association relationships, the third predetermined association relationship represents an association relationship between a second predetermined region identifier and a second predetermined strategy identifier, the second predetermined region identifier is used to represent the second coding sub-region, and the second predetermined strategy identifier represents that the coding strategy corresponding to the second coding sub-region is the second coding strategy; and The second predetermined association relationship set and the third predetermined association relationship set are stored.
7. The method according to any one of claims 1 to 3, wherein: The first information to be encoded includes a plurality of first numbers to be encoded; The step of encoding the first information to be encoded corresponding to the display device to obtain the first encoded information includes: dividing the first information to be encoded with multiple digits into multiple first groups to be encoded; Determine a first check code corresponding to each of the plurality of first to-be-encoded groups to obtain a plurality of first check codes; and The first coding information is obtained according to the multiple first numbers to be encoded and the multiple first check codes.
8. The method according to any one of claims 1 to 3, wherein: The fusing the target image and the first coded image to obtain a fused image comprises: Determine the product between each pixel value of at least one pixel included in the target image and a first predetermined coefficient to obtain first pixel information; Determine the product between each pixel value of at least one pixel included in the first encoded image and a second predetermined coefficient to obtain second pixel information; Obtaining third pixel information according to the first pixel information and the second pixel information; and The fused image is obtained according to the third pixel information.
9. The method according to any one of claims 1 to 3, wherein: The shape of the first predetermined area includes at least one of the following: rectangle, square, diamond, triangle, and circle.
10. The method according to claim 3 or 4, wherein: The shape of the first coding sub-region includes at least one of the following: rectangle, square, diamond, triangle, circle; The shape of the second coding sub-region includes at least one of the following: rectangle, square, diamond, triangle, and circle.
11. The method according to any one of claims 1 to 3, wherein: The first information to be encoded includes at least one of the following: a device identification, a time displayed on the display device, and a geographical location.
12. An image processing method, comprising: Processing the image to be processed to obtain a second coded image, wherein the image to be processed includes one of the following: a fused image and a captured image corresponding to the fused image, and the fused image is obtained according to any one of claims 1 to 11; Obtaining second encoding information according to pixel values of at least one second predetermined area of the second encoded image; and The second coded information is decoded to obtain second information to be coded corresponding to the display device.
13. The method according to claim 12, wherein: The obtaining second encoding information according to the pixel values of at least one second predetermined area of the second encoded image comprises: According to at least one second predetermined pixel value corresponding to at least one second predetermined area of the second encoded image, a second code number corresponding to at least one second predetermined area of the second encoded image is determined to obtain the second encoding information.
14. The method according to claim 13, wherein: The number of bits of the second coded number is N, the N-bit second coded number includes N1-bit first decoded number and N2-bit second decoded number, N is a positive integer, and N1 and N2 are natural numbers; The step of determining, based on at least one second predetermined pixel value corresponding to at least one second predetermined area of the second coded image, a second code number corresponding to each of the at least one second predetermined areas of the second coded image, and obtaining the second coded information comprises: Determine at least one second predetermined area corresponding to the second encoded image and N1 first decoding sub-areas and N2 second decoding sub-areas respectively corresponding to the at least one second predetermined area; For each second predetermined area in the at least one second predetermined area, the second coding information is obtained by one of the following methods: Based on the first decoding strategy, first decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions and a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions; In a case where it is determined that the first decoding information includes the first target decoding numbers corresponding to the N1 first decoding sub-regions respectively and does not include the second target decoding numbers corresponding to the N2 second decoding sub-regions respectively, based on the second decoding strategy, obtaining second decoding information according to a plurality of second predetermined pixel values corresponding to the N2 second decoding sub-regions respectively of the second predetermined region; and When it is determined that the second decoding information includes the second target decoding numbers corresponding to the N2 second decoding sub-regions respectively, obtaining the N-bit second coding number according to the N1-bit first target decoding number and the N2-bit second target decoding number; or Based on the second decoding strategy, third decoding information is obtained according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions and a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions; When it is determined that the third decoding information includes the second target decoding numbers corresponding to the N2 second decoding sub-regions respectively and does not include the first target decoding numbers corresponding to the N1 first decoding sub-regions respectively, based on the first decoding strategy, obtain fourth decoding information according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-regions of the second predetermined region; and When it is determined that the fourth decoding information includes the first target decoding numbers corresponding to the N1 first decoding sub-regions respectively, the N-bit second coding number is obtained according to the N1-bit first target decoding number and the N2-bit second target decoding number.
15. The method according to claim 13, wherein: The number of bits of the second coded number is N, the N-bit second coded number includes N1-bit first decoded number and N2-bit second decoded number, N is a positive integer, and N1 and N2 are natural numbers; The step of determining, based on at least one second predetermined pixel value corresponding to at least one second predetermined area of the second coded image, a second code number corresponding to each of the at least one second predetermined areas of the second coded image, and obtaining the second coded information comprises: Determine at least one second predetermined area corresponding to the second encoded image and N1 first decoding sub-areas and N2 second decoding sub-areas respectively corresponding to the at least one second predetermined area; For each second predetermined area in the at least one second predetermined area, Determine a decoding strategy corresponding to N1 first decoding sub-areas of the second predetermined area and a decoding strategy corresponding to N second decoding sub-areas of the second predetermined area, and obtain a first decoding strategy corresponding to the N1 first decoding sub-areas and a second decoding strategy corresponding to the N2 second decoding sub-areas; Based on the first decoding strategy, according to a second predetermined pixel value corresponding to each of the N1 first decoding sub-areas of the second predetermined area, obtaining a first target decoding number corresponding to each of the N1 first decoding sub-areas; Based on the second decoding strategy, according to a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-regions of the second predetermined region, obtain a second target decoding number corresponding to each of the N2 second decoding sub-regions; and The N-bit second encoding number is obtained according to the N1-bit first target decoding number and the N2-bit second target decoding number.
16. The method according to claim 15, wherein: The plurality of second predetermined pixel values include a first decoded predetermined pixel value and at least one second decoded predetermined pixel value, the first decoded predetermined pixel value being greater than any one of the at least one second decoded predetermined pixel value; Wherein, based on the second decoding strategy, according to a plurality of second predetermined pixel values corresponding to each of the N2 second decoding sub-areas of the second predetermined area, obtaining the second target decoding number corresponding to each of the N2 second decoding sub-areas includes: For each second decoding sub-region in the N2 second decoding sub-regions, determining a decoded first region in the second decoding subregion according to a first decoded predetermined pixel value corresponding to the second decoding subregion; determining a ratio between the size information of the first decoded region and the size information of the second decoded sub-region to obtain a second predetermined ratio corresponding to the second decoded sub-region; and According to a first predetermined association relationship set, a second decoding number corresponding to the second predetermined ratio is determined to obtain a second target decoding number corresponding to the second predetermined sub-area, wherein the first predetermined association relationship set includes N2 first predetermined association relationships, and the first predetermined association relationship represents the association relationship between the second decoding number and the second predetermined ratio.
17. The method according to claim 15 or 16, wherein: The determining of the decoding strategies corresponding to the N1 first decoding sub-regions of the second predetermined region and the decoding strategies corresponding to the N second decoding sub-regions of the second predetermined region, and obtaining the first decoding strategies corresponding to the N1 first decoding sub-regions and the second decoding strategies corresponding to the N2 second decoding sub-regions comprises: In the case where it is determined that the coding strategy corresponding to each of the N1 first decoding sub-regions is the first coding strategy according to the second predetermined association relationship set, determining that the decoding strategy corresponding to the N1 first decoding sub-regions is the first decoding strategy, wherein the second predetermined association relationship set includes N1 second predetermined association relationships, the second predetermined association relationship represents an association relationship between a first predetermined region identifier and a first predetermined strategy identifier, the first predetermined region identifier is used to represent the first decoding sub-region, and the first predetermined strategy identifier represents that the coding strategy corresponding to the first decoding sub-region is the first coding strategy; and In the case where it is determined that the coding strategy corresponding to each of the N2 second decoding sub-areas is the second coding strategy according to the third predetermined association relationship set, the decoding strategy corresponding to the N2 second decoding sub-areas is determined to be the second decoding strategy, wherein the third predetermined association relationship set includes N2 third predetermined association relationships, the third predetermined association relationship represents the association relationship between the second predetermined area identifier and the second predetermined strategy identifier, the second predetermined area identifier is used to represent the second decoding sub-area, and the second predetermined strategy identifier represents that the coding strategy corresponding to the second decoding sub-area is the second coding strategy.
18. The method according to any one of claims 12 to 16, wherein: Decoding the second encoded information to obtain second information to be encoded corresponding to the display device includes: Obtaining a plurality of second check codes according to the second encoded information; Determining second groups to be encoded corresponding to the plurality of second check codes respectively to obtain a plurality of second groups to be encoded; and Obtaining the second information to be encoded according to the plurality of second groups to be encoded.
19. The method according to any one of claims 12 to 16, wherein: Processing the image to be processed to obtain a second encoded image includes: Obtaining feature maps of at least one scale according to the image to be processed; and Obtaining the second encoded image according to the feature maps of the at least one scale.
20. The method according to claim 19, wherein: The at least one scale includes J scales, and J is a positive integer; Among them, obtaining the second encoded image according to the feature maps of the at least one scale includes: When 1≤j<J, Obtaining a fused feature map of the j-th scale according to the feature map of the j-th scale and the upsampled feature map, where the upsampled feature map of the j-th scale is obtained according to the feature map of the (j + 1)-th scale and the upsampled feature map, and the feature map of the j-th scale is obtained according to the feature map of the (j - 1)-th scale, and j is an integer greater than or equal to 1 and less than or equal to J; and Obtaining the second encoded image according to the fused feature map of the first scale.
21. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, Among them, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 20.
22. A computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 20.
23. A computer program product, comprising a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 20 is implemented.
