Data sharing method, device and storage medium based on image processing
By calculating the available storage space of the image and writing data into the RGB channel of the image, the problem of image and QR code fusion destroying image quality is solved, and the secure and hidden transmission of data is achieved.
Patent Information
- Application Number
- CN202410654665.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-05-24
AI Technical Summary
In data sharing scenarios, using the method of fusion of pictures and QR codes will destroy the picture itself and affect the image quality.
By acquiring the image to be processed and the content to be written, the available storage space of the image is calculated and the data is written into the RGB channel of the image, ensuring that the data embedding does not destroy the image quality.
It realizes hiding data in the image without damaging the image quality, ensuring the security and concealment of the data.
Smart Images

Figure CN118396018B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a data sharing method, device and storage medium based on image processing. Background Art
[0002] With the development of the Internet, information sharing has become extremely simple. From traditional data transmission to subsequent barcodes and QR codes, the basic functions can basically meet the needs, but it is difficult to achieve the level of complete integration with art in terms of vision.
[0003] Currently, in the field of AI painting, artistic QR codes can be produced, but in essence it is still a QR code. No matter how it is "disguised", the naked eye can still see that it is a code. In addition, AI painting has a certain degree of randomness. The method of combining pictures and QR codes will destroy the picture itself and affect the image quality. A new technical solution is needed to solve the above technical problems. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problem that in data sharing scenarios, the method of integrating pictures and QR codes will destroy the pictures themselves and affect the image quality.
[0005] A first aspect of the present invention provides a data sharing method based on image processing, the data sharing method based on image processing comprising:
[0006] Get the image to be processed and the content to be written;
[0007] Calculating a brightness channel value according to the RGB channel values corresponding to the image to be processed, and performing a calculation operation of available data storage space on the image to be processed according to the RGB channel values and the brightness channel value to obtain an available storage space corresponding to the image to be processed;
[0008] Calculate the input content to be written to obtain the data and data volume of binary data;
[0009] Performing a numerical comparison between the data volume and the available storage space;
[0010] If the data amount is less than or equal to the available data storage space, the binary data is written into the image to be processed, and the image to be shared is obtained and output.
[0011] Optionally, in a first implementation of the first aspect of the present invention, if the data amount is less than or equal to the available data storage space, the step of writing the binary data into the image to be processed to obtain the image to be shared includes:
[0012] If the data volume is less than or equal to the available data storage space, a target pixel point set is selected from the available pixel point set corresponding to the available storage space;
[0013] According to the binary data, the RGB channel values of the target pixel point set are modified to embed the content to be written into the image to be processed, so as to obtain the image to be shared.
[0014] Optionally, in a second implementation manner of the first aspect of the present invention, after the step of writing the binary data into the image to be processed to obtain the image to be shared if the data amount is less than or equal to the available data storage space, the method further includes:
[0015] When a decoding request is detected, a preset algorithm corresponding to the image to be shared is called to perform a pixel scanning operation to obtain a set of pixels to be restored;
[0016] Extracting the RGB channel values to be restored of the set of pixels to be restored;
[0017] According to the RGB channel values to be restored, a data restoration operation is performed to obtain binary data to be restored;
[0018] According to the binary data to be restored, a data restoration operation is performed to obtain target content;
[0019] The target content is output in response to the decoding request.
[0020] Optionally, in a third implementation manner of the first aspect of the present invention, when a decoding request is detected, after the step of calling a preset algorithm corresponding to the image to be shared, performing a pixel scanning operation, and obtaining a set of pixels to be restored, the method further includes:
[0021] When a decoding request is detected, extracting the image to be decoded carried in the decoding request;
[0022] Calling a preset algorithm corresponding to the image to be shared, performing a pixel scanning operation on the image to be decoded, and obtaining a set of pixels to be restored;
[0023] Determining whether the pixel point set to be restored is a valid pixel point set;
[0024] If the to-be-restored pixel point set is a valid pixel point set, the step of extracting the to-be-restored RGB channel values of the to-be-restored pixel point set is performed.
[0025] Optionally, in a fourth implementation manner of the first aspect of the present invention, the step of determining whether the to-be-restored pixel point set is a valid pixel point set includes:
[0026] According to the pixel point set to be restored, a matching operation is performed in a preset pixel point set database to obtain a matching result;
[0027] If the matching result indicates that the set of pixel points to be restored has a matching target, determining that the set of pixel points to be restored is a valid set of pixel points;
[0028] If the matching result indicates that there is no matching target in the to-be-restored pixel point set, it is determined that the to-be-restored pixel point set is not a valid pixel point set.
[0029] Optionally, in a fifth implementation manner of the first aspect of the present invention, if the matching result indicates that there is no matching target in the set of pixel points to be restored, after the step of determining that the set of pixel points to be restored is not a valid set of pixel points, the method further includes:
[0030] If the matching result indicates that there is no matching target in the set of pixel points to be restored, it is determined that the set of pixel points to be restored is not a valid set of pixel points;
[0031] Return to the step of calling the preset algorithm corresponding to the image to be shared, performing a pixel scanning operation on the image to be decoded, and outputting prompt information.
[0032] Optionally, in a sixth implementation manner of the first aspect of the present invention, the step of calling a preset algorithm corresponding to the image to be shared, performing a pixel scanning operation on the image to be decoded, and obtaining a set of pixels to be restored includes:
[0033] Based on the image to be decoded, performing a matching operation in a preset image database to obtain a matching result;
[0034] If the matching result indicates that there is a matching image for the image to be decoded, a preset algorithm corresponding to the image to be shared is called to perform a pixel scanning operation on the image to be decoded to obtain a set of pixels to be restored.
[0035] Optionally, in a seventh implementation manner of the first aspect of the present invention, the step of calculating the brightness channel value according to the RGB channel values corresponding to the image to be processed includes:
[0036] Traversing each pixel of the image to be processed to obtain the RGB channel value corresponding to the image to be processed;
[0037] The brightness channel value is calculated according to the RGB channel values.
[0038] A second aspect of the present invention provides a data sharing device based on image processing, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via lines; the at least one processor calls the instructions in the memory so that the data sharing device based on image processing executes the above-mentioned data sharing method based on image processing.
[0039] A third aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned image processing-based data sharing method.
[0040] In an embodiment of the present invention, since the data is embedded in the RGB channels of the image instead of simply overlaying it on top of the image, the visual effect of the original image is maintained. The problem of directly adding a QR code to the image is avoided, effectively preventing the problem of damaged image aesthetics. By calculating the available storage space of the image to be processed and comparing it with the amount of data to be written, an assessment can be made before the data is written to ensure that the data can be successfully embedded without causing loss of image quality. At the same time, flexibility is provided for data writing, allowing users to adjust the content to be written according to the characteristics of the image. Since the randomness of AI painting may damage the image quality, data embedding is ensured by calculating the available storage space and comparing the data. The impact of the randomness of AI painting on data embedding is reduced, and the overall quality of the image and data confidentiality are maintained. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of an embodiment of a data sharing method based on image processing in an embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of a specific embodiment of step 101 of the data sharing method based on image processing in an embodiment of the present invention;
[0043] Figure 3 is a schematic diagram of a specific embodiment of step 105 of the data sharing method based on image processing in an embodiment of the present invention;
[0044] Figure 4 is another specific embodiment schematic diagram of step 105 of the data sharing method based on image processing in an embodiment of the present invention;
[0045] Figure 5 Schematic diagram of an embodiment of a data sharing device based on image processing in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The embodiments of the present invention provide a data sharing method, device and storage medium based on image processing.
[0047] The embodiments disclosed in the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments disclosed in the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments disclosed in the present invention are only for exemplary purposes and are not intended to limit the scope of protection disclosed in the present invention.
[0048] In the description of the embodiments disclosed in the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0049] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the data sharing method based on image processing in an embodiment of the present invention includes:
[0050] 101. Obtain an image to be processed and content to be written;
[0051] Specifically, the parameters in the write request are parsed, including the image path, file identifier, content identifier, etc. Parameters related to the image to be processed and the content to be written are extracted. According to the parsed image path, the image to be processed is loaded from the storage medium. If the image does not exist, an error message is returned and the algorithm is terminated.
[0052] The loaded image to be processed and the prepared content to be written are taken as the output of the algorithm.
[0053] Specifically, Figure 2 1 is a schematic diagram of a specific embodiment of step 101 of the data sharing method based on image processing in an embodiment of the present invention. Step 101 includes the following specific implementation methods:
[0054] 1011. Traverse each pixel of the image to be processed to obtain RGB channel values corresponding to the image to be processed;
[0055] 1012. Calculate a brightness channel value according to the RGB channel values.
[0056] In steps 1011-1012, by considering the transparency of the image, pixels with high transparency and little impact on image quality can be selected for data embedding, thereby ensuring that the appearance of the image does not change significantly after data embedding, reducing the risk of being detected or recognized.
[0057] 102. Calculate a brightness channel value according to the RGB channel values corresponding to the image to be processed, and perform a calculation operation of available data storage space on the image to be processed according to the RGB channel values and the brightness channel value to obtain an available storage space corresponding to the image to be processed;
[0058] Specifically, load the image file to be processed, read the RGB channel values of the image, and use the RGB values to calculate the brightness channel value for each pixel of the image.
[0059] For example:
[0060] L=0.299*R+0.587*G+0.114*B (the value is a weighted average value based on the sensitivity of the human eye to different colors).
[0061] Substitute the RGB value of each pixel into the above formula to obtain the lightness channel value L of each pixel.
[0062] Considering that images with more uniform brightness distribution may be visually easier to hide data, because the embedding of data has less impact on local areas.
[0063] Specifically, for each pixel, a calculation operation is performed according to the RGB channel value and the brightness channel value to determine the available data storage space.
[0064] Optionally, set a threshold to filter pixels based on the value of the lightness channel. For example, only pixels with lightness channel values within a certain range are selected for embedding to ensure the quality of the embedded image.
[0065] Specifically, transcoding the content to be written into binary data helps optimize the storage and transmission efficiency of data. Binary data has a higher compression rate and smaller storage space, which can reduce data transmission time and storage space requirements. At the same time, binary data is also easier to embed and extract in images.
[0066] By calculating the available storage space and adjusting the way and location of data embedding accordingly, the impact of data embedding on image quality can be minimized. Based on transparency information, data can be integrated into the image more smoothly, maintaining the visual quality of the image.
[0067] This embodiment does not rely on a specific image format or data format and has strong adaptability. Whether it is a color image or a grayscale image, whether it is text, image or audio data, data storage and transmission can be achieved through appropriate transcoding and embedding methods. This makes the process widely applicable to various fields and scenarios.
[0068] 103. Calculate the input content to be written to obtain the data and data volume of binary data;
[0069] Specifically, the content to be written is transcoded into binary data.
[0070] After getting the binary data, select the measurement unit, such as byte, kilobyte, megabyte, gigabyte, etc. Use the len() function to calculate the length of the byte string to get the amount of binary data.
[0071] 104. Perform a numerical comparison between the data amount and the available storage space;
[0072] Specifically, the two values are compared using comparison operators in the programming language (such as less than <, less than or equal to <=, greater than >, etc.). According to the comparison result, the corresponding operation is performed. If the amount of data is less than or equal to the available storage space, the next operation can be continued (such as writing the binary data into the image to be processed). If the amount of data is greater than the available storage space, the binary data is compressed or truncated, etc. The comparison result is recorded or output.
[0073] 105. If the data amount is less than or equal to the available data storage space, write the binary data into the image to be processed, obtain the image to be shared, and output it.
[0074] Specifically, use the image processing library to read the pixel data of the image to be processed. Make sure the length of the binary data is suitable for embedding into the image. Start from the upper left corner of the image and traverse each pixel. For each pixel, extract its least significant bit (LSB). If there is more binary data to be embedded, write the next bit of data into the LSB of the pixel and continue processing the next bit of data and the next pixel. If there is no more data to be embedded, stop processing. Use the image processing library to save the modified pixel data as a new image file. Optionally extract the embedded data from the modified image and compare it with the original data to verify the correctness of the embedding process. Output the modified image for sharing.
[0075] Specifically, Figure 3 105 is a schematic diagram of a specific embodiment of the method for sharing data based on image processing in an embodiment of the present invention. Step 105 includes the following specific implementation methods:
[0076] 1051. If the data amount is less than or equal to the available data storage space, select a target pixel point set from the available pixel point set corresponding to the available storage space;
[0077] 1052. Modify the RGB channel values of the target pixel set according to the binary data to embed the content to be written into the image to be processed, so as to obtain the image to be shared.
[0078] In steps 1051-1052, data is embedded by modifying the RGB channel values of the pixels, making the embedding process invisible to the human eye. This means that even if someone views the shared image, they cannot directly perceive that there is hidden data contained therein. This provides a guarantee for the safe sharing of data. By carefully selecting a set of target pixels and modifying their RGB channel values, it can be ensured that the embedded data remains intact during the transmission and sharing process. As long as the pixel values of the image are not excessively modified or damaged, the embedded data can be accurately extracted.
[0079] Specifically, step 105 further includes the following specific implementation methods:
[0080] 106. When a decoding request is detected, a preset algorithm corresponding to the image to be shared is called to perform a pixel scanning operation to obtain a set of pixels to be restored;
[0081] 107. Extracting the RGB channel values to be restored of the set of pixels to be restored;
[0082] 108. Perform a data restoration operation according to the RGB channel values to be restored to obtain binary data to be restored;
[0083] 109. Perform a data restoration operation according to the binary data to be restored to obtain target content;
[0084] 110. Output the target content in response to the decoding request.
[0085] In steps 106-110, by embedding data into the image, the covert transmission of data is achieved. Even if the data is intercepted, the data embedding method is not easy to be detected, so the security of the data is greatly improved. At the same time, through the preset decoding algorithm, only people who know the algorithm can correctly extract and restore the data, which further enhances the security of the data. In the case of a small amount of data, embedding the data into the image for transmission can make full use of the storage space of the image and avoid additional data transmission overhead. At the same time, since the transmission of images is usually more stable and reliable than pure data, the transmission efficiency of data is also improved.
[0086] Specifically, Figure 41 is another specific embodiment diagram of step 105 of the data sharing method based on image processing in an embodiment of the present invention. Step 105 also includes the following specific implementation methods:
[0087] 1051. When a decoding request is detected, extract the image to be decoded carried in the decoding request;
[0088] 1052. Call a preset algorithm corresponding to the image to be shared, perform a pixel scanning operation on the image to be decoded, and obtain a set of pixels to be restored;
[0089] Optionally, based on the image to be decoded, a matching operation is performed in a preset image database to obtain a matching result; if the matching result indicates that the image to be decoded has a matching image, a preset algorithm corresponding to the image to be shared is called to perform a pixel scanning operation on the image to be decoded. By performing a matching operation in a preset image database, it can be verified whether the image to be decoded is a known image containing valid data. This ensures that only authorized images can be further processed, thereby improving data security.
[0090] 1053. Determine whether the pixel point set to be restored is a valid pixel point set;
[0091] Among them, the RGB channels of each pixel are mutually checked to ensure the correctness of the data, which can ensure that even if the image is damaged to a certain extent or the performance of the scanning equipment makes it difficult to restore the color after scanning, accurate data can be automatically corrected.
[0092] 1054. If the to-be-restored pixel point set is a valid pixel point set, execute a step of extracting to-be-restored RGB channel values of the to-be-restored pixel point set.
[0093] In steps 1051-1054, by determining whether the pixel set to be restored is a valid pixel set, it can be ensured that the image data is not damaged or tampered with before extracting and restoring the data. The accuracy and reliability of data restoration are increased, and the extraction and output of invalid data are avoided. In the decoding process, by verifying the validity of the pixel set to be restored, unauthorized malicious decoding attempts can be prevented. Only images containing a valid pixel set can be successfully decoded, which enhances the security of the data.
[0094] Specifically, step 1053 also includes the following specific implementation methods:
[0095] 10531. Perform a matching operation in a preset pixel point set database according to the pixel point set to be restored to obtain a matching result;
[0096] 10532. If the matching result indicates that there is a matching target in the to-be-restored pixel point set, determine that the to-be-restored pixel point set is a valid pixel point set;
[0097] 10533. If the matching result indicates that there is no matching target in the set of pixel points to be restored, determine that the set of pixel points to be restored is not a valid pixel point set.
[0098] In steps 10531-10533, the source and integrity of the data can be ensured by verifying whether the set of pixels to be restored is consistent with the matching target in the preset database. The security of the data is increased because only images that match the valid set of pixels stored in the database can be successfully decoded, thereby preventing unauthorized access and tampering. The matching operation provides a mechanism to verify whether the image to be decoded contains the correct embedded data. If the set of pixels to be restored matches the matching target in the database, then the embedded data in the image can be considered valid and can be safely extracted and restored. The reliability of the decoding process is increased, and errors caused by misdecoding or invalid decoding are reduced.
[0099] Specifically, step 1052 also includes the following specific implementations:
[0100] 10521. Based on the image to be decoded, perform a matching operation in a preset image database to obtain a matching result;
[0101] 10522. If the matching result indicates that there is a matching image for the image to be decoded, call a preset algorithm corresponding to the image to be shared, perform a pixel scanning operation on the image to be decoded, and obtain a set of pixels to be restored.
[0102] In steps 10521-10522, by performing a matching operation in the image database, it is possible to verify whether the image to be decoded is a valid image containing embedded data. If the image to be decoded matches an image in the database, it indicates that the image contains restorable data, so that the preset algorithm can be safely called to perform pixel scanning operations. This verification process ensures that only valid images are further processed, improving the accuracy and reliability of data decoding.
[0103] In an embodiment of the present invention, by writing data directly into the RGB channel of the image to be processed, the form of data sharing can be made more concealed and beautiful. Unlike the method of directly fusing pictures and QR codes, this method does not destroy the structure and pixel information of the picture itself, ensuring that the quality of the image will not be affected. Users can hide data in images without losing image quality. Before writing data, the available storage space is calculated according to the brightness channel value of the image to be processed, and compared with the data amount of the content to be written, ensuring that the data writing is safe and reliable, and avoiding data overflow or image distortion caused by excessive data volume. Since the randomness of AI painting may damage the image quality, data embedding is ensured by calculating the available storage space and comparing the data. The impact of the randomness of AI painting on data embedding is reduced, and the overall image quality and data confidentiality are maintained.
[0104] Figure 5 1 is a schematic diagram of the structure of a data sharing device based on image processing provided by an embodiment of the present invention. The data sharing device 500 based on image processing may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data sharing device 500 based on image processing. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the data sharing device 500 based on image processing.
[0105] The image processing-based data sharing device 500 may further include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, Free BSD, etc. It will be appreciated by those skilled in the art that Figure 5 The structure of the image processing-based data sharing device shown does not constitute a limitation on the image processing-based data sharing device, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0106] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the image processing-based data sharing method.
[0107] 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.
[0108] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.
[0109] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A data sharing method based on image processing, characterized in that: The data sharing method based on image processing includes: Get the image to be processed and the content to be written; Calculating a brightness channel value according to the RGB channel values corresponding to the image to be processed, and performing a calculation operation of available data storage space on the image to be processed according to the RGB channel values and the brightness channel value to obtain an available storage space corresponding to the image to be processed; Calculate the input content to be written to obtain the data and data volume of binary data; Performing a numerical comparison between the data volume and the available storage space; If the data volume is less than or equal to the available data storage space, writing the binary data into the image to be processed, obtaining the image to be shared and outputting it; Wherein, if the data volume is less than or equal to the available data storage space, after the step of writing the binary data into the image to be processed to obtain the image to be shared, the method further comprises: When a decoding request is detected, a preset algorithm corresponding to the image to be shared is called to perform a pixel scanning operation to obtain a set of pixels to be restored; Extracting the RGB channel values to be restored of the set of pixels to be restored; According to the RGB channel values to be restored, a data restoration operation is performed to obtain binary data to be restored; According to the binary data to be restored, a data restoration operation is performed to obtain target content; Outputting the target content in response to the decoding request; Wherein, the method further comprises: When a decoding request is detected, extracting the image to be decoded carried in the decoding request; Calling a preset algorithm corresponding to the image to be shared, performing a pixel scanning operation on the image to be decoded, and obtaining a set of pixels to be restored; Determining whether the pixel point set to be restored is a valid pixel point set; If the pixel point set to be restored is a valid pixel point set, performing a step of extracting RGB channel values to be restored of the pixel point set to be restored; The step of determining whether the pixel point set to be restored is a valid pixel point set comprises: According to the pixel point set to be restored, a matching operation is performed in a preset pixel point set database to obtain a matching result; If the matching result indicates that the set of pixel points to be restored has a matching target, determining that the set of pixel points to be restored is a valid set of pixel points; If the matching result indicates that there is no matching target in the to-be-restored pixel point set, it is determined that the to-be-restored pixel point set is not a valid pixel point set.
2. The data sharing method based on image processing according to claim 1, characterized in that: If the data volume is less than or equal to the available data storage space, the step of writing the binary data into the image to be processed to obtain the image to be shared includes: If the data volume is less than or equal to the available data storage space, a target pixel point set is selected from the available pixel point set corresponding to the available storage space; According to the binary data, the RGB channel values of the target pixel point set are modified to embed the content to be written into the image to be processed, so as to obtain the image to be shared.
3. The data sharing method based on image processing according to claim 1, characterized in that: If the matching result indicates that there is no matching target in the set of pixels to be restored, after the step of determining that the set of pixels to be restored is not a valid set of pixels, the method further includes: If the matching result indicates that there is no matching target in the to-be-restored pixel point set, it is determined that the to-be-restored pixel point set is not a valid pixel point set; Return to the step of calling the preset algorithm corresponding to the image to be shared, performing a pixel scanning operation on the image to be decoded, and outputting prompt information.
4. The data sharing method based on image processing according to claim 1, characterized in that: The step of calling a preset algorithm corresponding to the image to be shared, performing a pixel scanning operation on the image to be decoded, and obtaining a set of pixels to be restored comprises: Based on the image to be decoded, performing a matching operation in a preset image database to obtain a matching result; If the matching result indicates that there is a matching image for the image to be decoded, a preset algorithm corresponding to the image to be shared is called to perform a pixel scanning operation on the image to be decoded to obtain a set of pixels to be restored.
5. The data sharing method based on image processing according to claim 1, characterized in that: The step of calculating the brightness channel value according to the RGB channel values corresponding to the image to be processed comprises: Traversing each pixel of the image to be processed to obtain the RGB channel value corresponding to the image to be processed; The brightness channel value is calculated according to the RGB channel values.
6. A data sharing device based on image processing, characterized in that: The image processing-based data sharing device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the image processing-based data sharing device to execute the image processing-based data sharing method according to any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing-based data sharing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Data processing method, device and equipment
CN112541853A
Image watermark processing method and system for beauty camera
CN115760531A