WO2021018229A1 - Image processing method and apparatus, and electronic device - Google Patents

Image processing method and apparatus, and electronic device Download PDF

Info

Publication number
WO2021018229A1
WO2021018229A1 PCT/CN2020/105684 CN2020105684W WO2021018229A1 WO 2021018229 A1 WO2021018229 A1 WO 2021018229A1 CN 2020105684 W CN2020105684 W CN 2020105684W WO 2021018229 A1 WO2021018229 A1 WO 2021018229A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
watermark
information
processing method
template
Prior art date
Application number
PCT/CN2020/105684
Other languages
French (fr)
Chinese (zh)
Inventor
赵明明
刘立真
谢文珍
Original Assignee
北京大米科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京大米科技有限公司 filed Critical 北京大米科技有限公司
Publication of WO2021018229A1 publication Critical patent/WO2021018229A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B7/00Electrically-operated teaching apparatus or devices working with questions and answers
    • G09B7/06Electrically-operated teaching apparatus or devices working with questions and answers of the multiple-choice answer-type, i.e. where a given question is provided with a series of answers and a choice has to be made from the answers
    • G09B7/07Electrically-operated teaching apparatus or devices working with questions and answers of the multiple-choice answer-type, i.e. where a given question is provided with a series of answers and a choice has to be made from the answers providing for individual presentation of questions to a plurality of student stations
    • G09B7/073Electrically-operated teaching apparatus or devices working with questions and answers of the multiple-choice answer-type, i.e. where a given question is provided with a series of answers and a choice has to be made from the answers providing for individual presentation of questions to a plurality of student stations all student stations being capable of presenting the same questions simultaneously
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0052Embedding of the watermark in the frequency domain

Definitions

  • the present invention relates to the field of images, and in particular to an image processing method, device and electronic equipment.
  • Online education is also called distance education and online learning. It is a teaching method based on the Internet. Through the Internet, students and teachers can carry out teaching activities even if they are thousands of miles apart. With the help of online courseware, students can also study anytime and anywhere, which truly breaks the limitations of time and space. Online distance education is an extremely convenient way of learning for professionals with busy work and irregular study time.
  • embodiments of the present invention provide an image processing method, device, and electronic equipment to enhance the security of image use.
  • an embodiment of the present invention provides an image processing method, including the following steps:
  • the image type of the second image is determined.
  • the second image is a screenshot of a user disseminating and/or displaying the first image on a social network
  • the social network includes: Internet social platforms and Internet social spaces.
  • the determining the image type of the second image based on the extraction result includes:
  • the image type of the second image is determined based on the comparison result of the second watermark corresponding to the watermark information and the first watermark.
  • the first watermark and the second watermark are two-dimensional code watermarks
  • the determining the image type of the second image based on the comparison result of the second watermark corresponding to the watermark information and the first watermark includes: identifying the second watermark, if the second watermark is identified If the code is consistent with the identification code of the first watermark, it is determined that the second image is a normal image; and/or if the identification code of the second watermark is inconsistent with the identification code of the first watermark, it is determined that the The second image is the problem image.
  • the first image is generated based on an image template containing the first watermark
  • the first watermark in the image template is generated based on at least one of the following: parameters of the image template, Display parameters, content information, business information, and user-oriented information in the image template.
  • the first watermark in the image template is updated as time changes.
  • the extracting watermark information from the second image includes: searching and/or identifying the watermark information from the second image based on extraction parameters, wherein the extraction parameters It includes at least one of the following: sender information, parameters of the first image, parameters of the second image, and the first watermark.
  • the first watermark is an invisible watermark.
  • an image processing device including:
  • a receiving unit configured to receive a second image, the second image being generated based on the first image, the first image containing a first watermark
  • An extraction unit for extracting watermark information from the second image An extraction unit for extracting watermark information from the second image
  • the determining unit is configured to determine the image type of the second image based on the extraction result.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the above methods are implemented.
  • an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor implements any of the above when the program is executed. Method steps.
  • the image processing method, device and electronic equipment provided by the present invention receive a second image, the second image is generated based on the first image, the first image contains a first watermark; the watermark is extracted from the second image Information; based on the extraction result, determine the image type of the second image.
  • the first image contains the first watermark, and the second image is generated based on the first image. If the second image has not been tampered with during transmission, the second image should also contain the watermark information, and the second image contains The watermark information of has a corresponding relationship with the first watermark.
  • the second image is a problem image to reduce the risk of using a tampered image and ensure The normal operation of the business system.
  • FIG. 1 is a schematic diagram of an exemplary system architecture 100 to which an image processing method or image processing apparatus of an embodiment of the present application can be applied;
  • FIG. 2 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of another image processing method provided by an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of another image processing method provided by an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a watermark adding method provided by an embodiment of the present invention.
  • FIG. 6 is another schematic flowchart of the application testing method provided by the embodiment of the present application.
  • FIG. 6A is a schematic diagram of an original image provided by an embodiment of the present invention.
  • 6B is a schematic diagram of an image template containing watermark information provided by an embodiment of the present invention.
  • FIG. 6C is a schematic diagram of an image processed by the watermark adding method shown in FIG. 5 provided by an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present invention.
  • Fig. 8 is a schematic structural diagram of an electronic device related to an embodiment of the present invention.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture 100 to which the image processing method or image processing apparatus of the embodiments of the present application can be applied.
  • the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104 and a server 105.
  • the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105.
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
  • the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. According to implementation needs, there can be any number of terminal devices, networks and servers.
  • the server 105 may be a server cluster composed of multiple servers.
  • Participants of online education can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and so on.
  • the terminal devices 101, 102, and 103 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and so on.
  • the server 105 receives the second image generated by the terminal device 101, 102, 103 based on the first image through the network 104, the first image contains the first watermark; extracts the watermark information from the second image; based on the extraction result, Determine the image type of the second image.
  • Fig. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present invention.
  • the schematic flowchart is based on the network architecture of Fig. 1.
  • the method includes:
  • S201 Receive a second image, where the second image is generated based on the first image, and the first image contains a first watermark.
  • the method provided by the implementation of the present invention can be applied to the field of online education, so that images can be safely exchanged between online education platforms and online education participants.
  • Participants of online education can be online learning students, online lecturers, netizens browsing online education platforms, and system administrators of online education platforms.
  • all people who use the online education platform are participants of online education, and can apply the image processing method provided by the embodiment of the present invention to enable the two parties to communicate and interact better.
  • the method further includes: sending the first image.
  • the system first sends the first image to the user, and the first image contains the first watermark.
  • the user generates a second image based on the first image, and sends the second image to the system.
  • the system can determine whether the second image is a problem image based on the result of extracting the watermark from the second image.
  • the second image is a screenshot of the user disseminating and/or displaying the first image on a social network
  • the social network includes: Internet social platforms and Internet social spaces.
  • Internet social platforms include but are not limited to: WeChat, QQ, Weibo, Daily Business Circle, etc.
  • Internet social space but not limited to: Moments, WeChat groups, Qzone, Baidu Tieba, etc.
  • Online education platforms often need to receive second images sent by participants. For example, when promoting an education platform, the online education platform needs to send the first picture to the participants. After the participant promotes, the second image based on the first image will be sent to the online education platform. It can be WeChat screenshots (such as Moments screenshots, WeChat group screenshots, etc.), Weibo screenshots or browser screenshots, etc.
  • the online education platform first sends the first image related to the learning task to the student. After the student completes the learning, the second image generated based on the first image is sent to the platform.
  • the second image is an image that has completed a predetermined amount of learning tasks.
  • the online education platform first sends the first image of the lesson plan preview to the teacher. After the teacher completes the lesson plan preview, the teacher sends a second image based on the first image to the platform.
  • the second image is an image that has completed a predetermined amount of preview tasks.
  • the pictures are at risk of being tampered with, such as: Participants have not completed the promotion or the task, but send the image showing the completed task to the platform. In addition, it is difficult to ensure that the images are not tampered with during the transmission of images between online education platforms and participants.
  • a watermark is added to the image to enhance the security of the use of the image by the online education platform.
  • Watermarking is to add some digital information to the image to achieve the functions of authenticity identification and copyright protection.
  • the first image is generated based on an image template containing the first watermark
  • the first watermark in the image template is generated based on at least one of the following: parameters of the image template, display parameters, and Describe the content information, business information, and user-oriented information in the image template.
  • the image processed by the blank image will not change, that is, the original image is processed through the blank image, and the processed image is still the original image.
  • the aforementioned image template can be generated by adding a first watermark image on a blank image.
  • the position without watermark information on the image template is constituted by the pixels of the blank image.
  • processing the original image can achieve the following effects: displaying a watermark on the first position of the processed image, the first position corresponding to the position where the image template has the watermark.
  • the image of the original image itself is displayed on the second position of the processed image, and the second position corresponds to the position where the image template has no watermark.
  • the first watermark is an invisible watermark, that is, the first image with the first watermark and the first image without the watermark are visually imperceptible.
  • the first image with the watermark added does not affect the user's visual experience; on the other hand, because it is not easy to find, the risk of tampering with the image is reduced.
  • the parameters of the image template may include: image size, image resolution, and so on.
  • the display parameters are the display position, font, line spacing, etc. of the first watermark in the first picture.
  • the above-mentioned service information is the service system information applied to the watermarked image.
  • the business information may include: business ID, business name, business nature, business type, business description, etc.
  • the targeted user information is the personal information of online education users, such as: user ID, user category, user age, user gender, teaching level, etc., among which user categories include: ordinary students, important students, audition students, etc.
  • the watermark information added to the picture can be "Ain Job" and so on.
  • the user can also customize the user's watermark information to better meet the personalized needs of different users.
  • the first watermark in the image template is updated as time changes.
  • the first image contains a first watermark
  • the second image contains a second watermark.
  • the second image is generated and sent based on the first image. Therefore, the second watermark has a specific relationship with the first watermark. For example, if the second image is the same as the first image, or the second image has some text information added to the first image, the second watermark is the same as the first watermark.
  • the second image is a binary image obtained after the first image is processed, and the second watermark is a binary image corresponding to the first watermark.
  • the second image is a grayscale image obtained after the first image is processed, and the second watermark is a grayscale image corresponding to the first watermark.
  • step S203 further includes: searching and/or identifying the watermark information from the second image based on extraction parameters, wherein the extraction parameters include at least one of the following: sender information, the first The parameters of the image, the parameters of the second image, the first watermark.
  • the watermark information can be extracted from the second image in many ways, including but not limited to the following ways or a combination thereof:
  • the predetermined position information represents the addition position information of the image template in the original image.
  • the watermark information is directly extracted from the image to be recognized. For example: the predetermined location information records the watermarked area.
  • Watermark information is text information, such as company name, business name and other specific words, numbers or combinations. Through image recognition technology, it is recognized whether the image to be recognized contains the text information, and then it is determined whether the recognized image contains a watermark of specific text content.
  • the watermark can also be a two-dimensional code watermark, a barcode watermark, etc.; another way, the watermark can also be a combination of text, a two-dimensional code, a barcode watermark and other information.
  • the image to be recognized (containing watermark information) will contain the first image and the second image.
  • the first image and the second image are extracted from the image to be recognized, and the first image is compared with the The image and the second image to identify the watermark.
  • the first image can be a sub-image of the original image or a set image template.
  • the position where the third image is placed or synthesized in the original image can be recorded, and the first image and the second image can be found from the image to be processed based on the position.
  • the sender information may include sender identification, sender category, sender age, sender gender, and so on.
  • the first image parameter may include the first image identification, the first image application system identification, the first image description, and so on.
  • the second image parameter may include a second image identification, a second image application system identification, a second image description, and so on.
  • the system can store the corresponding relationship between the sender ID or the second image ID and the storage location of the watermark in the second image, or the corresponding relationship between the first image ID and the second image ID, and store the first image ID and the watermark in the second image.
  • the storage location of the watermark in the second image may include the pixel coordinates of the upper left corner of the watermark image and the size information of the watermark image.
  • the relevant area information in the second image can be determined according to the image parameters, and then the second watermark information can be extracted from the aforementioned relevant area information.
  • the above-mentioned image types may include: problem images and normal images.
  • the problem image is an image that may be tampered with during transmission.
  • the first image contains a first watermark
  • the second image contains a second watermark.
  • the second image is generated and sent based on the first image. Therefore, the second watermark has a corresponding relationship with the first watermark.
  • the second image is a binary image obtained after the first image is processed, and the second watermark is a binary image corresponding to the first watermark.
  • the second image is a grayscale image obtained after the first image is processed, and the second watermark is a grayscale image corresponding to the first watermark.
  • the second watermark has a corresponding relationship with the first watermark.
  • the second watermark is extracted from the second image, and the first watermark is analyzed and compared with the second watermark to determine whether the second image is a problem image.
  • the first image contains the first watermark
  • the second image contains the second watermark
  • the second image is sent by the participant based on the first image. If the second image is not tampered with during transmission, Then the second watermark contained in the second image will have a corresponding relationship with the first watermark. If the second image does not include watermark information or there is no correspondence between the first watermark and the second watermark, it can be determined that the second image is a problem image. If the second image is a problem image, you can discard the image, and troubleshoot related transmission links and users. If the second image is a normal image, it can be used normally.
  • the present invention reduces the risk of normal teaching being affected due to the use of tampered pictures.
  • the present invention can also solve the security problem caused by the picture being tampered with during transmission.
  • FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present invention.
  • the method includes:
  • S301 Receive a second image, where the second image is generated based on the first image, and the first image contains a first watermark.
  • the first image contains the first watermark
  • the second image is sent by participants based on the first image. If the second image is not tampered with during transmission, the watermark will remain in the second image. If the watermark contained in the second image cannot be obtained, the second image is a problem image. If the second watermark extracted from the second image is obtained, it may be further determined whether the second image is a problem image according to the comparison result of the second watermark and the first watermark.
  • FIG. 4 is a schematic flowchart of another image processing method provided by an embodiment of the present invention, and the method includes:
  • S401 Receive a second image, where the second image is generated based on the first image, and the first image contains a first watermark.
  • the online education platform can normally receive the second image and perform related processing.
  • the image can be discarded, and related transmission links and users can be checked for problems to ensure the security of the online education platform.
  • the foregoing image processing method provided by the embodiment of the present invention verifies whether the second image is a problem image by comparing the identification code of the second watermark with the identification code of the first watermark. If the second image is a problem image, corresponding processing and detection can be performed to reduce the risk of system failure due to receiving a tampered image.
  • Fig. 5 is a schematic flowchart of a watermark adding method provided by an embodiment of the present invention. The method includes:
  • S501 Acquire high-frequency area information of the original image.
  • the high frequency area information is the area information in the image where the brightness or gray level of the image changes greatly.
  • the low-frequency area information is the area information in the image where the brightness or gray level of the image changes little.
  • the high frequency area usually corresponds to the edge area and the noise area in the image, and the low frequency area usually corresponds to the large patch area in the image.
  • the high and low frequency region information of the image can be obtained by PCA (principal components analysis) technology or whitening operation and other technical means, which will not be repeated here.
  • S502 Determine corresponding position information of the high-frequency area information in the image template.
  • the watermark information can be added to the high frequency area of the original image through the corresponding location information to generate a watermarked image.
  • the corresponding position information may be multiple pixel coordinates of the high-frequency region at the corresponding location of the image template, or multiple pixel coordinates of the edge pixels extracted from the high-frequency region at the corresponding location of the image template.
  • the watermark information can be added to the high frequency area of the original image. Because the high frequency area usually corresponds to the edge area and the noise area in the image, the low frequency area usually corresponds to the large patch area in the image. Therefore, adding a watermark to the high-frequency area of the original image, compared to adding a watermark to the low-frequency area of the original image, is to add the watermark to the insensitive area of the human eye, which can lessen the user's visual effect and is not easy to cause User perception.
  • FIG. 6A is a schematic diagram of an original image provided by an embodiment of the present invention, and the original image is a propaganda poster.
  • Figure 6B is a schematic diagram of an image template containing watermark information provided by an embodiment of the present invention.
  • the watermark information includes text information "VIPKID".
  • the watermark information can also be set based on copyright information, service information, and user information.
  • Fig. 6C is a schematic diagram of an image processed by the watermark adding method shown in Fig. 3 provided by an embodiment of the present invention.
  • the watermark adding method shown in FIG. 5 in the embodiment of the present invention adds the watermark information to the high frequency area of the original image.
  • the high frequency area usually corresponds to the edge area and the noise area in the image
  • the low frequency area usually corresponds to the large patch area in the image. Therefore, adding a watermark to the high-frequency area of the original image, compared to adding a watermark to the low-frequency area of the original image, is to add the watermark to the insensitive area of the human eye, which can lessen the user's visual effect and is not easy to cause User perception.
  • FIG. 6A and FIG. 6C it can be seen that it is difficult for human eyes to perceive the difference between the two.
  • FIG. 6 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention, referred to as apparatus 6.
  • the apparatus 6 may include a receiving unit 601, an extracting unit 602, and a determining unit 603.
  • the receiving unit 601 is configured to receive a second image, the second image is generated based on the first image, and the first image contains a first watermark;
  • the determining unit 603 is configured to determine the image type of the second image based on the extraction result.
  • the second image is a screenshot of a user disseminating and/or displaying the first image on a social network
  • the social network includes: Internet social platforms and Internet social spaces.
  • the determining unit 603 is specifically configured to: if the watermark information cannot be extracted from the second image, determine that the second image is a problem image; and/or
  • the image type of the second image is determined based on the comparison result of the second watermark corresponding to the watermark information and the first watermark.
  • the first watermark and the second watermark are two-dimensional code watermarks
  • the determining unit 603 is specifically configured to: identify the second watermark, and if the identification code of the second watermark is consistent with the identification code of the first watermark, determine that the second image is a normal image; and/or If the identification code of the second watermark is inconsistent with the identification code of the first watermark, it is determined that the second image is a problem image.
  • the first image is generated based on an image template containing the first watermark
  • the first watermark in the image template is generated based on at least one of the following: parameters of the image template, Display parameters, content information, business information, and user-oriented information in the image template.
  • the device further includes an update unit 604, configured to update the first watermark in the image template as time changes.
  • the extraction unit 602 is specifically configured to: search and/or identify the watermark information from the second image based on extraction parameters, where the extraction parameters include at least one of the following : Sender information, parameters of the first image, parameters of the second image, and the first watermark.
  • the first watermark is an invisible watermark.
  • the “unit” and “module” in this specification refer to software and/or hardware that can independently complete or cooperate with other components to complete specific functions.
  • the hardware may be FPGA (Field-Programmable Gate Array), for example. , IC (Integrated Circuit, integrated circuit), etc.
  • processing units and/or modules in the embodiments of the present invention may be implemented by analog circuits that implement the functions described in the embodiments of the present invention, or may be implemented by software that implements the functions described in the embodiments of the present invention.
  • the embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned image processing method are realized.
  • the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices , Magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or equipment suitable for storing instructions and/or data.
  • FIG. 8 shows a schematic structural diagram of an electronic device related to an embodiment of the present invention, and the electronic device can be used to implement the image processing method provided in the foregoing embodiment. Specifically:
  • the memory 820 may be used to store software programs and modules.
  • the processor 880 executes various functional applications and data processing by running the software programs and modules stored in the memory 820.
  • the memory 820 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.;
  • the data (such as audio data, phone book, etc.) created by the use of the terminal device, etc.
  • the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the memory 820 may further include a memory controller to provide the processor 880 and the input unit 830 to access the memory 820.
  • the input unit 830 can be used to receive inputted digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the input unit 830 may include a touch-sensitive surface 831 (for example, a touch screen, a touch pad, or a touch frame).
  • the touch-sensitive surface 831 also known as a touch screen or a touchpad, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on or on the touch-sensitive surface 831. Operation near the touch-sensitive surface 831), and drive the corresponding connection device according to the preset program.
  • the touch-sensitive surface 831 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 880, and can receive and execute the commands sent by the processor 880.
  • the touch-sensitive surface 831 can be realized by multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the display unit 840 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal device. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the display unit 840 may include a display panel 841.
  • the display panel 841 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light emitting diode), etc.
  • the touch-sensitive surface 831 can cover the display panel 841. When the touch-sensitive surface 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of the touch event, and then the processor 880 responds to the touch event.
  • the type provides corresponding visual output on the display panel 841.
  • the touch-sensitive surface 831 and the display panel 841 are used as two independent components to implement input and input functions, in some embodiments, the touch-sensitive surface 831 and the display panel 841 may be integrated to implement input. And output function.
  • the processor 880 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal device. It runs or executes software programs and/or modules stored in the memory 820, and calls data stored in the memory 820 , Perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole.
  • the processor 880 may include one or more processing cores; wherein the processor 880 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, and application programs, The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 880.
  • the display unit of the terminal device is a touch screen display
  • the terminal device also includes a memory and one or more programs.
  • One or more programs are stored in the memory and configured to be configured by one or more programs.
  • the execution of the one or more programs by the above processor includes steps for implementing the above image processing method.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, such as: multiple units or components can be combined, or It can be integrated into another system, or some features can be ignored or not implemented.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms of.
  • the functional units in the embodiments of the present invention can be all integrated into one processing unit, or each unit can be individually used as a unit, or two or more units can be integrated into one unit; the above-mentioned integrated unit It can be implemented in the form of hardware or in the form of hardware plus software functional units.

Abstract

Provided are an image processing method and apparatus, and an electronic device. The method comprises: receiving a second image, wherein the second image is generated on the basis of a first image, and the first image contains a first watermark; extracting watermark information from the second image; and determining an image type of the second image on the basis of an extraction result. If the second image does not contain the watermark information, or there is no correlation between the watermark information contained in the second image and the first watermark, it can be determined that the second image is an image with problems, thereby reducing the risk of using an image with problems, and ensuring the normal operation of a service system.

Description

图像处理方法、装置和电子设备Image processing method, device and electronic equipment 技术领域Technical field
本发明涉及图像领域,具体而言,涉及一种图像处理方法、装置和电子设备。The present invention relates to the field of images, and in particular to an image processing method, device and electronic equipment.
背景技术Background technique
本发明对于背景技术的描述属于与本发明相关的相关技术,仅仅是用于说明和便于理解本发明的发明内容,不应理解为申请人明确认为或推定申请人认为是本发明在首次提出申请的申请日的现有技术。The description of the background technology of the present invention belongs to the related technology related to the present invention. It is only used to illustrate and facilitate the understanding of the content of the present invention. It should not be understood that the applicant clearly believes or presumes that the applicant believes that the present invention was first filed. Existing technology on the filing date.
在线教育也称远程教育、在线学习,是一种是以网络为介质的教学方式。通过网络,学员与教师即使相隔万里也可以开展教学活动。借助网络课件,学员还可以随时随地进行学习,真正打破了时间和空间的限制,对于工作繁忙,学习时间不固定的职场人而言网络远程教育是极为方便的学习方式。Online education is also called distance education and online learning. It is a teaching method based on the Internet. Through the Internet, students and teachers can carry out teaching activities even if they are thousands of miles apart. With the help of online courseware, students can also study anytime and anywhere, which truly breaks the limitations of time and space. Online distance education is an extremely convenient way of learning for professionals with busy work and irregular study time.
在线教育的过程中,需要参与者与在线教育平台间互传图片,以达到推广、学习、交流等目的。但图片存在被篡改的风险,给正常业务造成影响。In the process of online education, it is necessary to share pictures between participants and the online education platform to achieve the purpose of promotion, learning, and communication. However, the pictures may be tampered with, which will affect normal business.
发明内容Summary of the invention
为了解决目前图像在传输过程中常常被篡改的问题,本发明实施例提供了一种图像处理方法、装置和电子设备,增强了图像使用的安全性。In order to solve the problem that images are often tampered with during transmission, embodiments of the present invention provide an image processing method, device, and electronic equipment to enhance the security of image use.
第一方面,本发明实施例提供了一种图像处理方法,包括以下步骤:In the first aspect, an embodiment of the present invention provides an image processing method, including the following steps:
接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印;Receiving a second image, the second image being generated based on the first image, the first image containing a first watermark;
从所述第二图像中提取水印信息;Extracting watermark information from the second image;
基于提取结果,确定所述第二图像的图像类型。Based on the extraction result, the image type of the second image is determined.
在一种可能的设计中,所述第二图像为用户将第一图像在社交网络进行传播和/或展示的截图,所述社交网络包括:互联网社交平台、互联网社交空间。In a possible design, the second image is a screenshot of a user disseminating and/or displaying the first image on a social network, and the social network includes: Internet social platforms and Internet social spaces.
在一种可能的设计中,所述基于提取结果,确定所述第二图像的图像类型,包括:In a possible design, the determining the image type of the second image based on the extraction result includes:
若从所述第二图像中提取不到所述水印信息,则确定所述第二图像为问题图像;和/或If the watermark information cannot be extracted from the second image, determine that the second image is a problem image; and/or
若从所述第二图像中提取到所述水印信息,基于所述水印信息所对应的第二水印与所述第一水印的比较结果,确定所述第二图像的图像类型。If the watermark information is extracted from the second image, the image type of the second image is determined based on the comparison result of the second watermark corresponding to the watermark information and the first watermark.
在一种可能的设计中,所述第一水印和第二水印为二维码水印;以及In a possible design, the first watermark and the second watermark are two-dimensional code watermarks; and
所述基于所述水印信息所对应的第二水印与所述第一水印的比较结果,确定所述第二图像的图像类型,包括:识别所述第二水印,若所述第二水印的识别码与所述第一水印的识别码一致,则确定所述第二图像为正常图像;和/或若所述第二水印的识别码与所述第一水印的识别码不一致,则确定所述第二图像为问题图像。The determining the image type of the second image based on the comparison result of the second watermark corresponding to the watermark information and the first watermark includes: identifying the second watermark, if the second watermark is identified If the code is consistent with the identification code of the first watermark, it is determined that the second image is a normal image; and/or if the identification code of the second watermark is inconsistent with the identification code of the first watermark, it is determined that the The second image is the problem image.
在一种可能的设计中,所述第一图像基于含有所述第一水印的图像模板生成,所述图像模板中的所述第一水印基于以下至少之一生成:所述图像模板的参数、显示参数、所述图像模版中的内容信息、业务信息、面向的用户信息。In a possible design, the first image is generated based on an image template containing the first watermark, and the first watermark in the image template is generated based on at least one of the following: parameters of the image template, Display parameters, content information, business information, and user-oriented information in the image template.
在一种可能的设计中,所述图像模板中的所述第一水印随时间变化而更新。In a possible design, the first watermark in the image template is updated as time changes.
在一种可能的设计中,所述从所述第二图像中提取水印信息,包括:基于提取参数,从所述第二图像中查找和/或识别所述水印信息,其中,所述提取参数包括如下至少之一:发送者信息、所述第一图像的参数、所述第二图像的参数、所述第一水印。In a possible design, the extracting watermark information from the second image includes: searching and/or identifying the watermark information from the second image based on extraction parameters, wherein the extraction parameters It includes at least one of the following: sender information, parameters of the first image, parameters of the second image, and the first watermark.
在一种可能的设计中,所述第一水印为隐形水印。In a possible design, the first watermark is an invisible watermark.
第二方面,本发明实施例提供了一种图像处理装置,包括:In the second aspect, an embodiment of the present invention provides an image processing device, including:
接收单元,用于接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印;A receiving unit, configured to receive a second image, the second image being generated based on the first image, the first image containing a first watermark;
提取单元,用于从所述第二图像中提取水印信息;An extraction unit for extracting watermark information from the second image;
确定单元,用于基于提取结果,确定所述第二图像的图像类型。The determining unit is configured to determine the image type of the second image based on the extraction result.
第三方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一项方法的步骤。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the above methods are implemented.
第四方面,本发明实施例提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述任一项方法的步骤。In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. The processor implements any of the above when the program is executed. Method steps.
本发明提供的图像处理方法、装置和电子设备,接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印;从所述第二图像中提取水印信息;基于提取结果,确定所述第二图像的图像类型。第一图像中包含有第一水印,第二图像是基于第一图像生成的,如果第二图像在传输过程中没有被篡改,则第二图像中也应包含的水印信息,且第二图像包含的水印信息与第一水印具有对应关系。如果第二图像中没有水印信息,或第二图像中包含的水印信息与第一水印之间不具备对应关系,可以判断出第二图像是问题图像,以减小使用被篡改图像的风险,保障业务系统的正常进行。The image processing method, device and electronic equipment provided by the present invention receive a second image, the second image is generated based on the first image, the first image contains a first watermark; the watermark is extracted from the second image Information; based on the extraction result, determine the image type of the second image. The first image contains the first watermark, and the second image is generated based on the first image. If the second image has not been tampered with during transmission, the second image should also contain the watermark information, and the second image contains The watermark information of has a corresponding relationship with the first watermark. If there is no watermark information in the second image, or the watermark information contained in the second image does not have a corresponding relationship with the first watermark, it can be determined that the second image is a problem image to reduce the risk of using a tampered image and ensure The normal operation of the business system.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为可以应用本申请实施例的图像处理方法或图像处理装置的示例性系统架构100的示意图;FIG. 1 is a schematic diagram of an exemplary system architecture 100 to which an image processing method or image processing apparatus of an embodiment of the present application can be applied;
图2是本发明实施例提供的一种图像处理方法的流程示意图;2 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
图3是本发明实施例提供的另一种图像处理方法的流程示意图;FIG. 3 is a schematic flowchart of another image processing method provided by an embodiment of the present invention;
图4是本发明实施例提供的又一种图像处理方法的流程示意图;4 is a schematic flowchart of another image processing method provided by an embodiment of the present invention;
图5是本发明实施例提供的一种水印添加方法的流程示意图Figure 5 is a schematic flowchart of a watermark adding method provided by an embodiment of the present invention
图6是本申请实施例提供的应用测试方法的另一流程示意图;FIG. 6 is another schematic flowchart of the application testing method provided by the embodiment of the present application;
图6A是本发明实施例提供的原图像的示意图;FIG. 6A is a schematic diagram of an original image provided by an embodiment of the present invention;
图6B是本发明实施例提供的包含水印信息的图像模板的示意图;6B is a schematic diagram of an image template containing watermark information provided by an embodiment of the present invention;
图6C是本发明实施例提供的利用图5所示的水印添加方法处理后的图像的示意图;6C is a schematic diagram of an image processed by the watermark adding method shown in FIG. 5 provided by an embodiment of the present invention;
图7是本发明实施例提供的一种图像处理装置的结构示意图;FIG. 7 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present invention;
图8是本发明实施例所涉及的一种电子设备的结构示意图。Fig. 8 is a schematic structural diagram of an electronic device related to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本申请进行进一步的介绍。The application will be further introduced below in conjunction with the drawings and embodiments.
在下述介绍中,术语“第一”、“第二”仅为用于描述的目的,而不能理解为指示或暗示相对重要性。下述介绍提供了本发明的多个实施例,不同实施例之间可以替换或者合并组合,因此本申请也可认为包含所记载的相同和/或不同实施例的所有可能组合。因而,如果一个实施例包含特征A、B、C,另一个实施例包含特征B、D,那么本申请也应视为包括含有A、B、C、D的一个或多个所有其他可能的组合的实施例,尽管该实施例可能并未在以下内容中有明确的文字记载。In the following introduction, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance. The following description provides multiple embodiments of the present invention, and different embodiments can be substituted or combined. Therefore, this application may also be considered to include all possible combinations of the same and/or different embodiments described. Therefore, if one embodiment includes features A, B, C, and another embodiment includes features B, D, then this application should also be considered as including all other possible combinations of one or more of A, B, C, and D Although the embodiment may not be clearly written in the following content.
下面的描述提供了示例,并且不对权利要求书中阐述的范围、适用性或示例进行限制。可以在不脱离本申请内容的范围的情况下,对描述的元素的功能和布置做出改变。各个示例可以适当省略、替代或添加各种过程或组件。例如所描述的方法可以以所描述的顺序不同的顺序来执行,并且可以添加、省略或组合各种步骤。此外,可以将关于一些示例描述的特征组合到其他示例中。The following description provides examples, and does not limit the scope, applicability, or examples set forth in the claims. Changes can be made to the function and arrangement of the described elements without departing from the scope of the content of this application. Various procedures or components may be omitted, substituted, or added in various examples as appropriate. For example, the described method may be executed in a different order from the described order, and various steps may be added, omitted, or combined. In addition, features described with respect to some examples can be combined into other examples.
图1示出了可以应用本申请实施例的图像处理方法或图像处理装置的示例性系统架构100的示意图。FIG. 1 shows a schematic diagram of an exemplary system architecture 100 to which the image processing method or image processing apparatus of the embodiments of the present application can be applied.
如图1所示,系统架构100可以包括终端设备101、102、103中的一种或多种,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器105可以是多个服务器组成的服务器集群等。As shown in FIG. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables. It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. According to implementation needs, there can be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.
在线教育的参与者可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、便携式计算机和台式计算机等等。Participants of online education can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and so on. The terminal devices 101, 102, and 103 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and so on.
服务器105通过网络104接受终端设备101、102、103基于所述第一图像生成的第二图像,所述第一图像含有第一水印;从所述第二图像中提取水印信息;基于提取结果,确定所述第二图像的图像类型。The server 105 receives the second image generated by the terminal device 101, 102, 103 based on the first image through the network 104, the first image contains the first watermark; extracts the watermark information from the second image; based on the extraction result, Determine the image type of the second image.
参见图2,图2是本发明实施例提供的一种图像处理方法的流程示意图,该流程示意图基于图1的网络架构,在本发明实施例中,所述方法包括:Referring to Fig. 2, Fig. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present invention. The schematic flowchart is based on the network architecture of Fig. 1. In the embodiment of the present invention, the method includes:
S201、接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印。S201. Receive a second image, where the second image is generated based on the first image, and the first image contains a first watermark.
本发明实施提供的方法可应用于在线教育领域,可使在线教育平台和在线教育的参与者之间安全的互传图像。在线教育的参与者可以是在线学习的学员、在线授课的老师,还可以是浏览在线教育平台的网友、在线教育平台的系统管理员等。总之,所有使用在线教育平台的人员都属于在线教育的参与者,都可应用本发明实施例所提供的图像处理方法,使双方更好地沟通及互动。The method provided by the implementation of the present invention can be applied to the field of online education, so that images can be safely exchanged between online education platforms and online education participants. Participants of online education can be online learning students, online lecturers, netizens browsing online education platforms, and system administrators of online education platforms. In short, all people who use the online education platform are participants of online education, and can apply the image processing method provided by the embodiment of the present invention to enable the two parties to communicate and interact better.
可选地,在步骤S201之前,所述方法还包括:发送所述第一图像。系统先向用户发送所述第一图像,第一图像中包含第一水印。用户根据第一图像生成第二图像,并将第二图像发送给系统。系统根据第二图像中提取水印的结果,即可确定第二图像是否为问题图像。Optionally, before step S201, the method further includes: sending the first image. The system first sends the first image to the user, and the first image contains the first watermark. The user generates a second image based on the first image, and sends the second image to the system. The system can determine whether the second image is a problem image based on the result of extracting the watermark from the second image.
可选地,所述第二图像为用户将第一图像在社交网络进行传播和/或展示的截图,所述社交网络包括:互联网社交平台、互联网社交空间。Optionally, the second image is a screenshot of the user disseminating and/or displaying the first image on a social network, and the social network includes: Internet social platforms and Internet social spaces.
互联网社交平台包括但不限于:微信、QQ、微博、每日商圈等。互联网社交空间但不限于:朋友圈、微信群、QQ空间、百度贴吧等。Internet social platforms include but are not limited to: WeChat, QQ, Weibo, Daily Business Circle, etc. Internet social space, but not limited to: Moments, WeChat groups, Qzone, Baidu Tieba, etc.
在线教育平台经常需要接收参与者发送的第二图像。举例来说,在进行教育平台推广时,在线教育平台需要先向参与者发送第一图片,参与者再进行推广后,会将基于第一图像的第二图像发送给在线教育平台,第二图像可以为微信截图(如朋友圈截图、微信群截图等)、微博截图或浏览器截图等。在线教育平台先向学员发送学习任务相关的第一图像,学员完成学习后,向平台发送基于第一图像生成的第二图像,第二图像为已完成预定学习任务量的图像。在线教育平台先向老师发送教案预习的第一图像,老师完成教案预习后,向平台发送基于第一图像的第二图像,第二图像为已完成预定预习任务量的图像。Online education platforms often need to receive second images sent by participants. For example, when promoting an education platform, the online education platform needs to send the first picture to the participants. After the participant promotes, the second image based on the first image will be sent to the online education platform. It can be WeChat screenshots (such as Moments screenshots, WeChat group screenshots, etc.), Weibo screenshots or browser screenshots, etc. The online education platform first sends the first image related to the learning task to the student. After the student completes the learning, the second image generated based on the first image is sent to the platform. The second image is an image that has completed a predetermined amount of learning tasks. The online education platform first sends the first image of the lesson plan preview to the teacher. After the teacher completes the lesson plan preview, the teacher sends a second image based on the first image to the platform. The second image is an image that has completed a predetermined amount of preview tasks.
图片存在被篡改的风险,如:参与者未完成推广或未完成任务,但将显示已完成任务的图像发送给平台。此外,图像在在线教育平台和参与者之间传输的过程中,也难以保证图像不被篡改。The pictures are at risk of being tampered with, such as: Participants have not completed the promotion or the task, but send the image showing the completed task to the platform. In addition, it is difficult to ensure that the images are not tampered with during the transmission of images between online education platforms and participants.
为此,在图像中添加水印,以增强在线教育平台对图像使用的安全性。水印是向图像中添加某些数字信息以达到文件真伪鉴别、版权保护等功能。For this reason, a watermark is added to the image to enhance the security of the use of the image by the online education platform. Watermarking is to add some digital information to the image to achieve the functions of authenticity identification and copyright protection.
可选地,所述第一图像基于含有所述第一水印的图像模板生成,所述图像模板中的所述第一水印基于以下至少之一生成:所述图像模板的参数、显示参数、所述图像模版中的内容信息、业务信息、面向的用户信息。Optionally, the first image is generated based on an image template containing the first watermark, and the first watermark in the image template is generated based on at least one of the following: parameters of the image template, display parameters, and Describe the content information, business information, and user-oriented information in the image template.
通过空白图像处理后的图像不会发生变化,即通过空白图像处理原图像,处理后的图像仍然为原图像。上述图像模板可由在空白图像上添加第一水印图像而生成。图像模板上没有水印信息的位置由空白图像的像素点构成。利用上述图像模板,处理原图像可达到如下的效果:在处理后的图像的第一位置上显示水印,上述第一位置对应于图像模板有水印的位置。在处理后的图像的第二位置上显示原图像自身的图像,上述第二位置对应于图像模板没有水印的位置。The image processed by the blank image will not change, that is, the original image is processed through the blank image, and the processed image is still the original image. The aforementioned image template can be generated by adding a first watermark image on a blank image. The position without watermark information on the image template is constituted by the pixels of the blank image. Using the image template described above, processing the original image can achieve the following effects: displaying a watermark on the first position of the processed image, the first position corresponding to the position where the image template has the watermark. The image of the original image itself is displayed on the second position of the processed image, and the second position corresponds to the position where the image template has no watermark.
可选地,第一水印为隐形水印,即添加有第一水印的第一图像与没有添加水印的第一图像,在视觉上是难以察觉的。如此,一方面,添加了水印的第一图像不影响用户在视觉上的体验;另一方面,由于不易发现,降低了篡改图片的风险。Optionally, the first watermark is an invisible watermark, that is, the first image with the first watermark and the first image without the watermark are visually imperceptible. In this way, on the one hand, the first image with the watermark added does not affect the user's visual experience; on the other hand, because it is not easy to find, the risk of tampering with the image is reduced.
图像模板的参数可包括:图像尺寸、图像分辨率等。显示参数为第一水印在第一图片中的显示位置、字体、行间距等。上述业务信息为添加水印处理后的图像所应用的业务系统信息。业务信息可包括:业务ID、业务名称、业务性质、业务类型、业务描述等。The parameters of the image template may include: image size, image resolution, and so on. The display parameters are the display position, font, line spacing, etc. of the first watermark in the first picture. The above-mentioned service information is the service system information applied to the watermarked image. The business information may include: business ID, business name, business nature, business type, business description, etc.
面向的用户信息为在线教育的用户的个人信息,如:用户标识、用户类别、用户年龄、用户性别、教学等级等等,其中,用户类别包括:普通学员、重要学员、试听学员等。The targeted user information is the personal information of online education users, such as: user ID, user category, user age, user gender, teaching level, etc., among which user categories include: ordinary students, important students, audition students, etc.
举例来说,某求职系统与一个用户名为A的用户之间,需要相互传输图片,则该图片添加的水印信息可以为“Ain Job”等。进一步地,用户也可以自定义该用户的水印信息,以更好的满足不同用户的个性化需求。For example, if a job search system and a user whose user name is A need to transfer pictures to each other, the watermark information added to the picture can be "Ain Job" and so on. Further, the user can also customize the user's watermark information to better meet the personalized needs of different users.
可选地,所述图像模板中的所述第一水印随时间变化而更新。Optionally, the first watermark in the image template is updated as time changes.
对于同一参与者,如果从始至终都采用同一水印进行图像处理,显然攻击者有较充足的时间,采用不同方法破译图像中包含的水印信息。而一旦破译了图像中的水印信息,将对系统安全造成长时间的威胁。上述方法在不同周期内生成不同的水印,显然提升了水印信息被破译的难度,进一步保障了系统安全。For the same participant, if the same watermark is used for image processing from beginning to end, it is obvious that the attacker has more time to decipher the watermark information contained in the image by using different methods. Once the watermark information in the image is deciphered, it will pose a long-term threat to system security. The above method generates different watermarks in different periods, which obviously increases the difficulty of deciphering the watermark information and further guarantees the security of the system.
S202、从所述第二图像中提取水印信息。S202: Extract watermark information from the second image.
第一图像中包含有第一水印,第二图像中包含有第二水印。而第二图像是基于第一图像生成并发送的。因此,第二水印与第一水印具备特定的关系。例如,第二图像与第一图像相同,或第二图像是在第一图像的基础上加入了某些文字信息,则第二水印和第一水印相同。或者,第二图像是第一图像进行处理后得到的二值图像,则第二水印是第一水印对应的二值图像。再者,第二图像是第一图像进行处理后得到的灰度图像,则第二水印是第一水印对应的灰度图像。The first image contains a first watermark, and the second image contains a second watermark. The second image is generated and sent based on the first image. Therefore, the second watermark has a specific relationship with the first watermark. For example, if the second image is the same as the first image, or the second image has some text information added to the first image, the second watermark is the same as the first watermark. Or, the second image is a binary image obtained after the first image is processed, and the second watermark is a binary image corresponding to the first watermark. Furthermore, the second image is a grayscale image obtained after the first image is processed, and the second watermark is a grayscale image corresponding to the first watermark.
可选地,步骤S203还包括:基于提取参数,从所述第二图像中查找和/或识别所述水印信息,其中,所述提取参数包括如下至少之一:发送者信息、所述第一图像的参数、所述第二图像的参数、所述第一水印。Optionally, step S203 further includes: searching and/or identifying the watermark information from the second image based on extraction parameters, wherein the extraction parameters include at least one of the following: sender information, the first The parameters of the image, the parameters of the second image, the first watermark.
可通过多种方式从所述第二图像中提取水印信息,包括但不限于以下方式或其组合:The watermark information can be extracted from the second image in many ways, including but not limited to the following ways or a combination thereof:
(1)通过系统中保存的预定位置信息,该预定位置信息代表了图像模板在原图像中的添加位置信息。基于该预定位置信息,直接从待识别图像中提取水印信息。例如:该预定位置信息记录了添加水印的区域。(1) Through the predetermined position information saved in the system, the predetermined position information represents the addition position information of the image template in the original image. Based on the predetermined location information, the watermark information is directly extracted from the image to be recognized. For example: the predetermined location information records the watermarked area.
(2)水印信息为文字信息,如公司名、业务名等特定文字、数字或组合。通过图像识别技术,识别待识别图像中是否包含有该文字信息,进而判断该识别图像中是否包含有特定文字内容的水印。另一种方式,水印还可以是二维码水印、条形码水印等;另一种方式,水印还可以是文字、二维码、条形码水印等信息的组合。(2) Watermark information is text information, such as company name, business name and other specific words, numbers or combinations. Through image recognition technology, it is recognized whether the image to be recognized contains the text information, and then it is determined whether the recognized image contains a watermark of specific text content. In another way, the watermark can also be a two-dimensional code watermark, a barcode watermark, etc.; another way, the watermark can also be a combination of text, a two-dimensional code, a barcode watermark and other information.
(3)通过预先保存的原图像(如在系统中保存有原图像),通过比对该原图像和该待识别图像,获取待识别图像中的水印信息。(3) Obtain the watermark information in the image to be recognized by comparing the original image with the image to be recognized through the original image saved in advance (for example, the original image is saved in the system).
(4)可以使用一第一图像,在该第一图像中添加水印后得到第二图像,并将该第一图像与第二图像进行拼接,得到第三图像,使用第三图像对原图像进行处理,以将所述水印添加到所述原图像中。由此,(含有水印信息的)待识别图像就会含有第一图像和第二图像,在识别时,从待识别图像中提取所述第一图像和第二图像,通过比对所述第一图像及第二图像,以识别出水印。其中,该第一图像可以是原图像的一个子图,也可以是设定的 图像模板。另一种方式,可以记录第三图像放置或合成在原图像中的位置,基于该位置,从待处理图像中找到第一图像和第二图像。(4) You can use a first image, add a watermark to the first image to obtain a second image, and stitch the first image with the second image to obtain a third image, and use the third image to perform Processing to add the watermark to the original image. Therefore, the image to be recognized (containing watermark information) will contain the first image and the second image. During recognition, the first image and the second image are extracted from the image to be recognized, and the first image is compared with the The image and the second image to identify the watermark. Among them, the first image can be a sub-image of the original image or a set image template. In another way, the position where the third image is placed or synthesized in the original image can be recorded, and the first image and the second image can be found from the image to be processed based on the position.
发送者信息可包括发送者标识、发送者类别、发送者年龄、发送者性别等等。第一图像参数可包括第一图像标识、第一图像应用系统标识、第一图像描述等等。第二图像参数可包括第二图像标识、第二图像应用系统标识、第二图像描述等等。The sender information may include sender identification, sender category, sender age, sender gender, and so on. The first image parameter may include the first image identification, the first image application system identification, the first image description, and so on. The second image parameter may include a second image identification, a second image application system identification, a second image description, and so on.
系统中可存储发送者标识或第二图像标识与水印在第二图像中存储位置的对应关系,也可存储第一图像标识与第二图像标识的对应关系,并存第一图像标识与水印在第二图像中存储位置的对应关系。水印在第二图像中存储位置,可包括水印图像左上角的像素坐标及水印图像的尺寸信息等。The system can store the corresponding relationship between the sender ID or the second image ID and the storage location of the watermark in the second image, or the corresponding relationship between the first image ID and the second image ID, and store the first image ID and the watermark in the second image. 2. Correspondence between storage locations in the image. The storage location of the watermark in the second image may include the pixel coordinates of the upper left corner of the watermark image and the size information of the watermark image.
如果水印存储在原图像的高频区域,则可先根据图像参数,确定第二图像中的相关区域信息,再从上述相关区域信息中提取出第二水印信息。If the watermark is stored in the high-frequency area of the original image, the relevant area information in the second image can be determined according to the image parameters, and then the second watermark information can be extracted from the aforementioned relevant area information.
S203、基于提取结果,确定所述第二图像的图像类型。S203: Determine the image type of the second image based on the extraction result.
上述图像类型可包括:问题图像和正常图像。问题图像为图像在传输过程中可能被篡改的图像。The above-mentioned image types may include: problem images and normal images. The problem image is an image that may be tampered with during transmission.
第一图像中包含有第一水印,第二图像中包含有第二水印。而第二图像是基于第一图像生成并发送的。因此,第二水印与第一水印具备对应关系。例如,第二图像与第一图像相同,或第二图像是在第一图像的基础上加入了某些文字信息,则第二水印和第一水印相同。或者,第二图像是第一图像进行处理后得到的二值图像,则第二水印是第一水印对应的二值图像。再者,第二图像是第一图像进行处理后得到的灰度图像,则第二水印是第一水印对应的灰度图像。The first image contains a first watermark, and the second image contains a second watermark. The second image is generated and sent based on the first image. Therefore, the second watermark has a corresponding relationship with the first watermark. For example, if the second image is the same as the first image, or the second image has some text information added to the first image, the second watermark is the same as the first watermark. Or, the second image is a binary image obtained after the first image is processed, and the second watermark is a binary image corresponding to the first watermark. Furthermore, the second image is a grayscale image obtained after the first image is processed, and the second watermark is a grayscale image corresponding to the first watermark.
根据以上分析,第二水印与第一水印具有对应关系。从第二图像中提取出第二水印,通过第一水印与第二水印进行分析比对,即可确定第二图像是否为问题图像。According to the above analysis, the second watermark has a corresponding relationship with the first watermark. The second watermark is extracted from the second image, and the first watermark is analyzed and compared with the second watermark to determine whether the second image is a problem image.
本发明中,第一图像中包含有第一水印,第二图像中包含有第二水印,而第二图像是参与者基于第一图像发送的,如果第二图像在传输过程中没有被篡改,则第二图像中包含的第二水印将会与第一水印具有对应关系。如果第二图像中不包括水印信息或者第一水印和第二水印之间不具有对应关系,可以判断出第二图像为问题图像。如果第二图像为问题图像,则可以舍弃该图像,并对相关传输链路和用户进行问题排查。如果第二图像为正常图像,则可正常使用。In the present invention, the first image contains the first watermark, the second image contains the second watermark, and the second image is sent by the participant based on the first image. If the second image is not tampered with during transmission, Then the second watermark contained in the second image will have a corresponding relationship with the first watermark. If the second image does not include watermark information or there is no correspondence between the first watermark and the second watermark, it can be determined that the second image is a problem image. If the second image is a problem image, you can discard the image, and troubleshoot related transmission links and users. If the second image is a normal image, it can be used normally.
如果图片被篡改,篡改后的图片很可能还有威胁系统安全的病毒或木马。因此,一方面,本发明减小了由于使用了被篡改图片,而使正常的教学受到影响的风险。一方面,本发明还可以解由于图片在传输过程中被篡改,而造成的安全问题。If the picture is tampered with, the tampered picture is likely to contain viruses or Trojan horses that threaten the security of the system. Therefore, on the one hand, the present invention reduces the risk of normal teaching being affected due to the use of tampered pictures. On the one hand, the present invention can also solve the security problem caused by the picture being tampered with during transmission.
参见图3,图3是本发明实施例提供的一种图像处理方法的流程示意图,在本发明实施例中,所述方法包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of an image processing method provided by an embodiment of the present invention. In an embodiment of the present invention, the method includes:
S301、接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印。S301. Receive a second image, where the second image is generated based on the first image, and the first image contains a first watermark.
其中,S301的具体过程可参照图2中S201的描述,此处不再赘述。For the specific process of S301, refer to the description of S201 in FIG. 2, which will not be repeated here.
S302、从所述第二图像中提取水印信息。S302: Extract watermark information from the second image.
其中,S302的具体过程可参照图2中S202的描述,此处不再赘述。For the specific process of S302, refer to the description of S202 in FIG. 2, which will not be repeated here.
S303、若从所述第二图像中提取不到所述水印信息,则确定所述第二图像为问题图像。S303. If the watermark information cannot be extracted from the second image, determine that the second image is a problem image.
S304、若从所述第二图像中提取到所述水印信息,基于所述水印信息所对应的第二水印与所述第一水印的比较结果,确定所述第二图像的图像类型。S304: If the watermark information is extracted from the second image, determine the image type of the second image based on the comparison result of the second watermark corresponding to the watermark information and the first watermark.
第一图像中包含有第一水印,第二图像是参与者基于第一图像发送的,如果第二图像在传输过程中没有被篡改,则第二图像中会保留有水印。如果获取不到第二图像中包含的水印,则说明第二图像为问题图像。如果获取到从第二图像中提取的第二水印,则可进一步地,根据第二水印与第一水印的比较结果,确定第二图像是否为问题图像。The first image contains the first watermark, and the second image is sent by participants based on the first image. If the second image is not tampered with during transmission, the watermark will remain in the second image. If the watermark contained in the second image cannot be obtained, the second image is a problem image. If the second watermark extracted from the second image is obtained, it may be further determined whether the second image is a problem image according to the comparison result of the second watermark and the first watermark.
图4是本发明实施例提供的又一种图像处理方法的流程示意图,所述方法包括:FIG. 4 is a schematic flowchart of another image processing method provided by an embodiment of the present invention, and the method includes:
S401、接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印。S401. Receive a second image, where the second image is generated based on the first image, and the first image contains a first watermark.
其中,S401的具体过程可参照图2中S201的描述,此处不再赘述。For the specific process of S401, refer to the description of S201 in FIG. 2, which will not be repeated here.
S402、从所述第二图像中提取水印信息,所述第一水印和第二水印为二维码水印。S402. Extract watermark information from the second image, where the first watermark and the second watermark are two-dimensional code watermarks.
其中,S402的具体过程可参照图2中S202的描述,此处不再赘述。For the specific process of S402, refer to the description of S202 in FIG. 2, which will not be repeated here.
S403、识别所述第二水印。S403. Identify the second watermark.
S404、若所述第二水印的识别码与所述第一水印的识别码一致,则确定所述第二图像为正常图像。S404: If the identification code of the second watermark is consistent with the identification code of the first watermark, determine that the second image is a normal image.
如果第二图像为正常图像,则在线教育平台可正常接收第二图像,并进行相关处理。If the second image is a normal image, the online education platform can normally receive the second image and perform related processing.
S405、若所述第二水印的识别码与所述第一水印的识别码不一致,则确定所述第二图像为问题图像。S405. If the identification code of the second watermark is inconsistent with the identification code of the first watermark, determine that the second image is a problem image.
如果第二图像为问题图像,则可以舍弃该图像,并对相关传输链路和用户进行问题排查,以保证在线教育平台的安全性。If the second image is a problem image, the image can be discarded, and related transmission links and users can be checked for problems to ensure the security of the online education platform.
本发明实施例提供的上述图像处理方法,通过将第二水印的识别码与第一水印的识别码比对,验证第二图像是否为问题图像。如果第二图像为问题图像,则可以进行相应处理和检测,减少由于接收了被篡改的图像,而造成系统故障的风险。The foregoing image processing method provided by the embodiment of the present invention verifies whether the second image is a problem image by comparing the identification code of the second watermark with the identification code of the first watermark. If the second image is a problem image, corresponding processing and detection can be performed to reduce the risk of system failure due to receiving a tampered image.
图5是本发明实施例提供的一种水印添加方法的流程示意图,所述方法包括:Fig. 5 is a schematic flowchart of a watermark adding method provided by an embodiment of the present invention. The method includes:
S501、获取所述原图像的高频区域信息。S501: Acquire high-frequency area information of the original image.
高频区域信息为图像中图像的亮度或灰度变化较大的区域信息。低频区域信息为图像中图像的亮度或灰度变化较小的区域信息。高频区域通常对应图像中的边缘区域和噪声区域,而低频区域通常对应图像中的大片色块区域。可通过PCA(principal components analysis,主成分分析)技术或白化操作等技术手段,获取图像的高低频区域信息,在此不再赘述。The high frequency area information is the area information in the image where the brightness or gray level of the image changes greatly. The low-frequency area information is the area information in the image where the brightness or gray level of the image changes little. The high frequency area usually corresponds to the edge area and the noise area in the image, and the low frequency area usually corresponds to the large patch area in the image. The high and low frequency region information of the image can be obtained by PCA (principal components analysis) technology or whitening operation and other technical means, which will not be repeated here.
S502、确定所述高频区域信息在所述图像模板中的对应位置信息。S502: Determine corresponding position information of the high-frequency area information in the image template.
可通过对应位置信息将水印信息添加到原图像的高频区域,以生成添加水印的图像。对应位置信息可以为高频区域在图像模板对应位置的多个像素坐标,也可以为从高频区域中提取出的边缘像素在图像模板对应位置的多个像素坐标。The watermark information can be added to the high frequency area of the original image through the corresponding location information to generate a watermarked image. The corresponding position information may be multiple pixel coordinates of the high-frequency region at the corresponding location of the image template, or multiple pixel coordinates of the edge pixels extracted from the high-frequency region at the corresponding location of the image template.
S503、基于所述对应位置信息,将所述第一水印添加到所述图像模板中。S503: Add the first watermark to the image template based on the corresponding location information.
S504、利用所述图像模板对原图像进行处理,以生成所述第一图像。S504. Use the image template to process the original image to generate the first image.
通过上述步骤S503-步骤S504,可将水印信息添加到原图像的高频区域上。由于高频区域通常对应图像中的边缘区域和噪声区域,而低频区域通常对应图像中的大片色块区域。因此,将水印添加到原图像的高频区域,相对于将水印添加到原图像的低频区域,是将水印添加到人眼的不敏感区域,可较小的影响到用户的视觉效果,不易引起用户的察觉。Through the above steps S503-S504, the watermark information can be added to the high frequency area of the original image. Because the high frequency area usually corresponds to the edge area and the noise area in the image, the low frequency area usually corresponds to the large patch area in the image. Therefore, adding a watermark to the high-frequency area of the original image, compared to adding a watermark to the low-frequency area of the original image, is to add the watermark to the insensitive area of the human eye, which can lessen the user's visual effect and is not easy to cause User perception.
图6A是本发明实施例提供的原图像的示意图,该原图像为一幅宣传海报。图6B是本发明实施例提供的包含水印信息的图像模板的示意图,该水印信息包括了文字信息“VIPKID”,水印信息也可根据版权信息、业务信息及用户信息进行设定。图6C是本发明实施例提供的利用图3所示的水印添加方法处理后的图像的示意图。本发明实施例中图5所示的水印添加方法,将水印信息添加到原图像的高频区域上。由于高频区域通常对应图像中的边缘区域和噪声区域,而低频区域通常对应图像中的大片色块区域。因此,将水印添加到原图像的高频区域,相对于将水印添加到原图像的低频区域,是将水印添加到人眼的不敏感区域,可较小的影响到用户的视觉效果,不易引起用户的察觉。通过比对图6A和图6C中的原始图片和处理后的图像可以看出,人眼很难察觉两者间的差别。FIG. 6A is a schematic diagram of an original image provided by an embodiment of the present invention, and the original image is a propaganda poster. Figure 6B is a schematic diagram of an image template containing watermark information provided by an embodiment of the present invention. The watermark information includes text information "VIPKID". The watermark information can also be set based on copyright information, service information, and user information. Fig. 6C is a schematic diagram of an image processed by the watermark adding method shown in Fig. 3 provided by an embodiment of the present invention. The watermark adding method shown in FIG. 5 in the embodiment of the present invention adds the watermark information to the high frequency area of the original image. Because the high frequency area usually corresponds to the edge area and the noise area in the image, the low frequency area usually corresponds to the large patch area in the image. Therefore, adding a watermark to the high-frequency area of the original image, compared to adding a watermark to the low-frequency area of the original image, is to add the watermark to the insensitive area of the human eye, which can lessen the user's visual effect and is not easy to cause User perception. By comparing the original pictures and processed images in FIG. 6A and FIG. 6C, it can be seen that it is difficult for human eyes to perceive the difference between the two.
上述图2~图6详细阐述了本申请实施例的图像处理方法。The foregoing Figures 2 to 6 illustrate in detail the image processing method of the embodiment of the present application.
请参见图6,图6是本发明实施例提供的一种图像处理装置的结构示意图,简称装置6,该装置6可以包括接收单元601、提取单元602和确定单元603。Please refer to FIG. 6. FIG. 6 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention, referred to as apparatus 6. The apparatus 6 may include a receiving unit 601, an extracting unit 602, and a determining unit 603.
接收单元601,用于接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印;The receiving unit 601 is configured to receive a second image, the second image is generated based on the first image, and the first image contains a first watermark;
提取单元602,用于从所述第二图像中提取水印信息;An extracting unit 602, configured to extract watermark information from the second image;
确定单元603,用于基于提取结果,确定所述第二图像的图像类型。The determining unit 603 is configured to determine the image type of the second image based on the extraction result.
在一种可能的设计中,所述第二图像为用户将第一图像在社交网络进行传播和/或展示的截图,所述社交网络包括:互联网社交平台、互联网社交空间。In a possible design, the second image is a screenshot of a user disseminating and/or displaying the first image on a social network, and the social network includes: Internet social platforms and Internet social spaces.
在一种可能的设计中,所述确定单元603具体用于:若从所述第二图像中提取不到所述水印信息,则确定所述第二图像为问题图像;和/或In a possible design, the determining unit 603 is specifically configured to: if the watermark information cannot be extracted from the second image, determine that the second image is a problem image; and/or
若从所述第二图像中提取到所述水印信息,基于所述水印信息所对应的第二水印与所述第一水印的比较结果,确定所述第二图像的图像类型。If the watermark information is extracted from the second image, the image type of the second image is determined based on the comparison result of the second watermark corresponding to the watermark information and the first watermark.
在一种可能的设计中,所述第一水印和第二水印为二维码水印;以及In a possible design, the first watermark and the second watermark are two-dimensional code watermarks; and
所述确定单元603具体用于:识别所述第二水印,若所述第二水印的识别码与所述第一水印的识别码一致,则确定所述第二图像为正常图像;和/或若所述第二水印的识别码与所述第一水印的识别码不一致,则确定所述第二图像为问题图像。The determining unit 603 is specifically configured to: identify the second watermark, and if the identification code of the second watermark is consistent with the identification code of the first watermark, determine that the second image is a normal image; and/or If the identification code of the second watermark is inconsistent with the identification code of the first watermark, it is determined that the second image is a problem image.
在一种可能的设计中,所述第一图像基于含有所述第一水印的图像模板生成,所述图像模板中的所述第一水印基于以下至少之一生成:所述图像模板的参数、显示参数、所述图像模版中的内容信息、业务信息、面向的用户信息。In a possible design, the first image is generated based on an image template containing the first watermark, and the first watermark in the image template is generated based on at least one of the following: parameters of the image template, Display parameters, content information, business information, and user-oriented information in the image template.
在一种可能的设计中,所述装置还包括更新单元604,用于随时间变化而更新所述图像模板中的所述第一水印。In a possible design, the device further includes an update unit 604, configured to update the first watermark in the image template as time changes.
在一种可能的设计中,所述提取单元602,具体用于:基于提取参数,从所述第二图像中查找和/或识别所述水印信息,其中,所述提取参数包括如下至少之一:发送者信息、所述第一图像的参数、所述第二图像的参数、所述第一水印。In a possible design, the extraction unit 602 is specifically configured to: search and/or identify the watermark information from the second image based on extraction parameters, where the extraction parameters include at least one of the following : Sender information, parameters of the first image, parameters of the second image, and the first watermark.
在一种可能的设计中,所述第一水印为隐形水印。In a possible design, the first watermark is an invisible watermark.
本领域的技术人员可以清楚地了解到本发明实施例的技术方案可借助软件和/或硬件来实现。本说明书中的“单元”和“模块”是指能够独立完成或与其他部件配合完成特定功能的软件和/或硬件,其中硬件例如可以是FPGA(Field-Programmable Gate Array,现场可编程门阵列)、IC(Integrated Circuit,集成电路)等。Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present invention can be implemented by software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can independently complete or cooperate with other components to complete specific functions. The hardware may be FPGA (Field-Programmable Gate Array), for example. , IC (Integrated Circuit, integrated circuit), etc.
本发明实施例的各处理单元和/或模块,可通过实现本发明实施例所述的功能的模拟电路而实现,也可以通过执行本发明实施例所述的功能的软件而实现。The processing units and/or modules in the embodiments of the present invention may be implemented by analog circuits that implement the functions described in the embodiments of the present invention, or may be implemented by software that implements the functions described in the embodiments of the present invention.
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述图像处理方法的步骤。其中,计算机可读存储介质可以包括但不限于任何类型的盘,包括软盘、光盘、DVD、CD-ROM、微型驱动器以及磁光盘、ROM、RAM、EPROM、EEPROM、DRAM、VRAM、闪速存储器设备、磁卡或光卡、纳米系统(包括分子存储器IC),或适合于存储指令和/或数据的任何类型的媒介或设备。The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned image processing method are realized. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices , Magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or equipment suitable for storing instructions and/or data.
参见图8,其示出了本发明实施例所涉及的一种电子设备的结构示意图,该电子设备可以用于实施上述实施例中提供的图像处理方法。具体来讲:Refer to FIG. 8, which shows a schematic structural diagram of an electronic device related to an embodiment of the present invention, and the electronic device can be used to implement the image processing method provided in the foregoing embodiment. Specifically:
存储器820可用于存储软件程序以及模块,处理器880通过运行存储在存储器820的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器820可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器820可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器820还可以包括存储器控制器,以提供处理器880和输入单元830对存储器820的访问。The memory 820 may be used to store software programs and modules. The processor 880 executes various functional applications and data processing by running the software programs and modules stored in the memory 820. The memory 820 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; The data (such as audio data, phone book, etc.) created by the use of the terminal device, etc. In addition, the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 820 may further include a memory controller to provide the processor 880 and the input unit 830 to access the memory 820.
输入单元830可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元830可包括触敏表面831(例如:触摸屏、触摸板或触摸框)。触敏表面831,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面831上或在触敏表面831附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面831可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器880,并能接收处理器880发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面831。The input unit 830 can be used to receive inputted digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 830 may include a touch-sensitive surface 831 (for example, a touch screen, a touch pad, or a touch frame). The touch-sensitive surface 831, also known as a touch screen or a touchpad, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on or on the touch-sensitive surface 831. Operation near the touch-sensitive surface 831), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface 831 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 880, and can receive and execute the commands sent by the processor 880. In addition, the touch-sensitive surface 831 can be realized by multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
显示单元840可用于显示由用户输入的信息或提供给用户的信息以及终端设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。 显示单元840可包括显示面板841,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板841。进一步的,触敏表面831可覆盖显示面板841,当触敏表面831检测到在其上或附近的触摸操作后,传送给处理器880以确定触摸事件的类型,随后处理器880根据触摸事件的类型在显示面板841上提供相应的视觉输出。虽然在图8中,触敏表面831与显示面板841是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面831与显示面板841集成而实现输入和输出功能。The display unit 840 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal device. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof. The display unit 840 may include a display panel 841. Optionally, the display panel 841 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light emitting diode), etc. Further, the touch-sensitive surface 831 can cover the display panel 841. When the touch-sensitive surface 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of the touch event, and then the processor 880 responds to the touch event. The type provides corresponding visual output on the display panel 841. Although in FIG. 8, the touch-sensitive surface 831 and the display panel 841 are used as two independent components to implement input and input functions, in some embodiments, the touch-sensitive surface 831 and the display panel 841 may be integrated to implement input. And output function.
处理器880是终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器820内的软件程序和/或模块,以及调用存储在存储器820内的数据,执行终端设备的各种功能和处理数据,从而对终端设备进行整体监控。可选的,处理器880可包括一个或多个处理核心;其中,处理器880可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器880中。The processor 880 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal device. It runs or executes software programs and/or modules stored in the memory 820, and calls data stored in the memory 820 , Perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole. Optionally, the processor 880 may include one or more processing cores; wherein the processor 880 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, and application programs, The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 880.
具体在本实施例中,终端设备的显示单元是触摸屏显示器,终端设备还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序包含实现上述图像处理方法的步骤。Specifically, in this embodiment, the display unit of the terminal device is a touch screen display, and the terminal device also includes a memory and one or more programs. One or more programs are stored in the memory and configured to be configured by one or more programs. The execution of the one or more programs by the above processor includes steps for implementing the above image processing method.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, such as: multiple units or components can be combined, or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms of.
在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。The functional units in the embodiments of the present invention can be all integrated into one processing unit, or each unit can be individually used as a unit, or two or more units can be integrated into one unit; the above-mentioned integrated unit It can be implemented in the form of hardware or in the form of hardware plus software functional units.
以上介绍仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modification, equivalent replacement, improvement, etc., made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

  1. 一种图像处理方法,其特征在于,所述方法包括:An image processing method, characterized in that the method includes:
    接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印;Receiving a second image, the second image being generated based on the first image, the first image containing a first watermark;
    从所述第二图像中提取水印信息;Extracting watermark information from the second image;
    基于提取结果,确定所述第二图像的图像类型。Based on the extraction result, the image type of the second image is determined.
  2. 根据权利要求1所述的图像处理方法,其特征在于,所述第二图像为用户将第一图像在社交网络进行传播和/或展示的截图,所述社交网络包括:互联网社交平台、互联网社交空间。The image processing method according to claim 1, wherein the second image is a screenshot of a user disseminating and/or displaying the first image on a social network, and the social network includes: Internet social platforms, Internet social networks space.
  3. 根据权利要求1所述的图像处理方法,其特征在于,所述基于提取结果,确定所述第二图像的图像类型,包括:The image processing method according to claim 1, wherein the determining the image type of the second image based on the extraction result comprises:
    若从所述第二图像中提取不到所述水印信息,则确定所述第二图像为问题图像;和/或If the watermark information cannot be extracted from the second image, determine that the second image is a problem image; and/or
    若从所述第二图像中提取到所述水印信息,基于所述水印信息所对应的第二水印与所述第一水印的比较结果,确定所述第二图像的图像类型。If the watermark information is extracted from the second image, the image type of the second image is determined based on the comparison result of the second watermark corresponding to the watermark information and the first watermark.
  4. 根据权利要求3所述的图像处理方法,其特征在于,所述第一水印和第二水印为二维码水印;以及The image processing method according to claim 3, wherein the first watermark and the second watermark are two-dimensional code watermarks; and
    所述基于所述水印信息所对应的第二水印与所述第一水印的比较结果,确定所述第二图像的图像类型,包括:The determining the image type of the second image based on the comparison result of the second watermark corresponding to the watermark information and the first watermark includes:
    识别所述第二水印,若所述第二水印的识别码与所述第一水印的识别码一致,则确定所述第二图像为正常图像;和/或Identify the second watermark, and if the identification code of the second watermark is consistent with the identification code of the first watermark, determine that the second image is a normal image; and/or
    若所述第二水印的识别码与所述第一水印的识别码不一致,则确定所述第二图像为问题图像。If the identification code of the second watermark is inconsistent with the identification code of the first watermark, it is determined that the second image is a problem image.
  5. 根据权利要求1所述的图像处理方法,其特征在于,所述第一图像基于含有所述第一水印的图像模板生成,所述图像模板中的所述第一水印基于以下至少之一生成:所述图像模板的参数、显示参数、所述图像模版中的内容信息、业务信息、面向的用户信息。The image processing method according to claim 1, wherein the first image is generated based on an image template containing the first watermark, and the first watermark in the image template is generated based on at least one of the following: The parameters of the image template, display parameters, content information, business information, and user-oriented information in the image template.
  6. 根据权利要求5所述的图像处理方法,其特征在于,所述图像模板中的所述第一水印随时间变化而更新。The image processing method according to claim 5, wherein the first watermark in the image template is updated with time.
  7. 根据权利要求1所述的图像处理方法,其特征在于,所述从所述第二图像中提取水印信息,包括:基于提取参数,从所述第二图像中查找和/或识别所述水印信息,其中,所述提取参数包括如下至少之一:发送者信息、所述第一图像的参数、所述第二图像的参数、所述第一水印。The image processing method according to claim 1, wherein the extracting watermark information from the second image comprises: searching and/or identifying the watermark information from the second image based on extraction parameters , Wherein the extraction parameters include at least one of the following: sender information, parameters of the first image, parameters of the second image, and the first watermark.
  8. 根据权利要求1所述的图像处理方法,其特征在于,所述第一水印为隐形水印。The image processing method according to claim 1, wherein the first watermark is an invisible watermark.
  9. 一种图像处理装置,其特征在于,包括:An image processing device, characterized by comprising:
    接收单元,用于接收第二图像,所述第二图像基于所述第一图像生成,所述第一图像含有第一水印;A receiving unit, configured to receive a second image, the second image being generated based on the first image, the first image containing a first watermark;
    提取单元,用于从所述第二图像中提取水印信息;An extraction unit for extracting watermark information from the second image;
    确定单元,用于基于提取结果,确定所述第二图像的图像类型。The determining unit is configured to determine the image type of the second image based on the extraction result.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现所述权利要求1-8中任一项所述方法的步骤。A computer-readable storage medium with a computer program stored thereon, characterized in that the program implements the steps of the method in any one of claims 1-8 when the program is executed by a processor.
  11. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现所述权利要求1-8中任一项所述方法的步骤。An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor implements any one of claims 1-8 when the program is executed. The steps of the method described in item.
PCT/CN2020/105684 2019-08-01 2020-07-30 Image processing method and apparatus, and electronic device WO2021018229A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910707221.5 2019-08-01
CN201910707221.5A CN110569627B (en) 2019-08-01 2019-08-01 Image processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2021018229A1 true WO2021018229A1 (en) 2021-02-04

Family

ID=68774271

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105684 WO2021018229A1 (en) 2019-08-01 2020-07-30 Image processing method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN110569627B (en)
WO (1) WO2021018229A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569627B (en) * 2019-08-01 2021-08-20 北京大米科技有限公司 Image processing method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1198344A (en) * 1997-09-19 1999-04-09 Mitsubishi Electric Corp Method and device for discriminating fraudulent alteration of digital image by using electronic watermark
US20020181732A1 (en) * 2001-04-10 2002-12-05 Motorola, Inc Method of collaborative watermarking of a digital content
CN104484587A (en) * 2014-12-13 2015-04-01 天津远目科技有限公司 Mobile phone photographing authentication method
CN106127668A (en) * 2016-06-27 2016-11-16 南京师范大学 GPS and the guard method in IOS end digitized video of the BEI-DOU position system space time information
CN107346528A (en) * 2017-07-06 2017-11-14 安徽大学 A kind of distorted image detection method based on the reversible fragile watermark of digraph
CN109767376A (en) * 2018-12-13 2019-05-17 平安科技(深圳)有限公司 Image authentication method, device, computer equipment and storage medium
CN110569627A (en) * 2019-08-01 2019-12-13 北京大米科技有限公司 Image processing method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103985079B (en) * 2014-05-21 2017-03-29 南京茵默维电子科技有限公司 Digital image tampering detection method with stealthy watermark
CN107240060A (en) * 2017-05-25 2017-10-10 上海地铁第运营有限公司 Security against fire based on dynamic digital watermark checks picture method for anti-counterfeit and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1198344A (en) * 1997-09-19 1999-04-09 Mitsubishi Electric Corp Method and device for discriminating fraudulent alteration of digital image by using electronic watermark
US20020181732A1 (en) * 2001-04-10 2002-12-05 Motorola, Inc Method of collaborative watermarking of a digital content
CN104484587A (en) * 2014-12-13 2015-04-01 天津远目科技有限公司 Mobile phone photographing authentication method
CN106127668A (en) * 2016-06-27 2016-11-16 南京师范大学 GPS and the guard method in IOS end digitized video of the BEI-DOU position system space time information
CN107346528A (en) * 2017-07-06 2017-11-14 安徽大学 A kind of distorted image detection method based on the reversible fragile watermark of digraph
CN109767376A (en) * 2018-12-13 2019-05-17 平安科技(深圳)有限公司 Image authentication method, device, computer equipment and storage medium
CN110569627A (en) * 2019-08-01 2019-12-13 北京大米科技有限公司 Image processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN110569627A (en) 2019-12-13
CN110569627B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
US10572779B2 (en) Electronic information board apparatus, information processing method, and computer program product
WO2021023085A1 (en) Watermark adding method and apparatus, watermark recognition method and apparatus, and electronic device
CN108234283B (en) Detecting external social media messages
EP2410450A1 (en) Method for providing a challenge based on a content
US11704764B2 (en) Method and system for generating watermark on the basis of graphic, terminal, and medium
CN101211448A (en) Click-fraud prevention method and system
CN102844795A (en) Image processing device, image processing method and program
CN108427589B (en) Data processing method and electronic equipment
US11822879B2 (en) Separately collecting and storing form contents
US20180277006A1 (en) Information display apparatus, information display method, and computer-readable recording medium
US20180277008A1 (en) Information display apparatus, information display method, and computer-readable recording medium
US20200364019A1 (en) Communication terminal, management system, communication system, and display method
WO2021018229A1 (en) Image processing method and apparatus, and electronic device
CN111290722A (en) Screen sharing method, device and system, electronic equipment and storage medium
US10580188B2 (en) Method of creating animated image based on key input, and user terminal for performing the method
US11586835B2 (en) Integrating overlaid textual digital content into displayed data via graphics processing circuitry using a frame buffer
KR102480599B1 (en) Device for providing solution that increases online education participation rate and the related solution system including the above
CN111651102B (en) Online teaching interaction method and device, storage medium and electronic equipment
CN111625805B (en) Verification method, verification device, electronic equipment and storage medium
CN111290721A (en) Online interaction control method, system, electronic device and storage medium
JP6553217B1 (en) Data input device, data input program and data input system
CN111062377A (en) Question number detection method, system, storage medium and electronic equipment
CN111930971A (en) Online teaching interaction method and device, storage medium and electronic equipment
JP7010987B2 (en) Learning support systems, learning support methods and programs
US11380273B2 (en) Hardware-leveraged interface display effects

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20847942

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20847942

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20847942

Country of ref document: EP

Kind code of ref document: A1