Picture processing method and apparatus
By receiving watermark addition instructions and obtaining regional information or custom dialect text information, the watermark can be automatically or manually overlaid on the image, solving the problem of cumbersome operation in traditional image processing methods and realizing convenient watermark addition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2014-02-12
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional image processing methods are cumbersome when adding watermarks, especially on mobile devices where it is difficult to easily add information related to the image content.
By receiving instructions to add a watermark, the system obtains regional information and automatically overlays the default dialect text information corresponding to that region as a watermark, or allows users to edit custom dialect text information and overlay it on the original image to generate a watermarked image.
It allows you to automatically or manually add location-related information to original images without the need for specialized image processing tools, simplifying the process and improving convenience.
Smart Images

Figure CN116109734B_ABST
Abstract
Description
[0001] This application is a divisional application filed with the Chinese Patent Office on February 12, 2014, with application number 2014100493422, entitled "Image Processing Method and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This invention relates to the field of image processing technology, and in particular to an image processing method and apparatus. Background Technology
[0003] Watermarking is an image overlay technique that adds information to an image without destroying its basic information. When sharing images on the internet, users often want to add richer information to the original image for effective emotional expression, and watermarking technology can add this information to the original image through overlay or fusion.
[0004] Traditional image processing methods typically add fixed signatures or current timestamps to images automatically as watermarks before uploading, which is a rather simplistic approach. When users want to add information related to the image content, they have to manually open a separate image processing tool, which is especially cumbersome when using mobile devices. Summary of the Invention
[0005] Therefore, it is necessary to provide an image processing method and apparatus that can simplify operation in response to the above-mentioned technical problems.
[0006] An image processing method, the method comprising:
[0007] Receive instructions to add a watermark;
[0008] Obtain regional information;
[0009] Obtain the default dialect text information corresponding to the aforementioned regional information;
[0010] The default dialect text information is overlaid on the original image as a watermark.
[0011] Receive the save command and generate the overlaid watermark image.
[0012] An image processing apparatus, the apparatus comprising:
[0013] The instruction receiving module is used to receive instructions on adding watermarks;
[0014] The first acquisition module is used to acquire geographic information;
[0015] The second acquisition module is used to acquire the default dialect text information corresponding to the regional information;
[0016] The overlay module is used to overlay the default dialect text information onto the original image as a watermark.
[0017] The image generation module is used to receive save commands and generate overlaid watermark images.
[0018] The aforementioned image processing method and apparatus, upon receiving a watermarking instruction, acquires regional information and corresponding default dialect text information, then overlays the default dialect text information as a watermark onto the original image, ultimately generating a watermarked image. This method and apparatus can automatically overlay default dialect text corresponding to the user's regional information onto the original image, eliminating the need for specialized image processing tools, greatly simplifying the operation and improving ease of use. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating an image processing method in one embodiment;
[0020] Figure 2 This is a flowchart illustrating the image processing method in another embodiment;
[0021] Figure 3 This is a schematic diagram illustrating the editing of a custom dialect in one embodiment;
[0022] Figure 4 This is a structural block diagram of an image processing device in one embodiment;
[0023] Figure 5 This is a structural block diagram of an image processing apparatus in another embodiment;
[0024] Figure 6 A block diagram of a computer system for implementing embodiments of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0026] Unless otherwise specifically and clearly described in the context, the elements and components in the present invention can exist in a single form or in a multiple form, and the present invention does not limit this. Although the steps in the present invention are arranged with reference numerals, they are not used to limit the order of the steps. Unless the order of the steps is clearly stated or the execution of a certain step requires other steps as a basis, the relative order of the steps can be adjusted. It can be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0027] As Figure 1 shown, in one embodiment, a picture processing method is provided. This method is illustrated by being applied to various terminals, including but not limited to various desktop computers, laptop computers, personal digital assistants, tablet computers, smart phones, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) or MP4 (Moving Picture Experts Group Audio Layer IV) players, etc. The method includes:
[0028] Step 102, receiving an instruction to add a watermark.
[0029] Step 104, obtaining geographical information.
[0030] The geographical information can be geographical information selected and input by the user, or the geographical location of the terminal obtained after positioning the terminal.
[0031] Step 106, obtaining default dialect text information corresponding to the geographical information.
[0032] In this embodiment, the geographical information and the corresponding default dialect text information are pre-stored, and the geographical information and the default dialect text information can be in a one-to-one or one-to-many relationship. For example, when the geographical information is "Shanghai", the corresponding default dialect is "Nong Hao", etc. According to the corresponding relationship between the pre-stored geographical information and the default dialect text information, the default dialect text information corresponding to the geographical information obtained in Step 104 is obtained. When there are multiple pieces of obtained default dialect text information, they can be displayed for the user to select.
[0033] Step 108, superimposing the default dialect text information on the original picture in the form of a watermark.
[0034] Step 110, receiving a save instruction and generating a watermarked picture after superimposition.
[0035] "Watermark" refers to overlaying a picture or text on an original picture so that the original picture has information similar to a label. Specifically, a new layer can be added to the original picture, and the default dialect text information can be added to this new layer. After receiving a save instruction, the new layer with the default dialect text information is merged with the original layer to generate a watermarked picture. It is also possible to, after receiving a save instruction, embed the default dialect text information as pixels into the original picture and then perform merging to generate a watermarked picture.
[0036] Preferably, multiple watermark templates can also be pre-stored. These watermark templates can contain preset pictures and define the format for placing text. After obtaining the default dialect text information corresponding to the regional information, the default dialect text information can be added to the preset position of the watermark template, and then the watermark template with the added default dialect text information is overlaid on the original picture. When receiving a save instruction, a superimposed watermarked picture is generated.
[0037] In this embodiment, it is possible to automatically overlay the default dialect text information corresponding to the user's regional information on the original picture without the user using a dedicated image processing tool, greatly simplifying the operation.
[0038] In one embodiment, step 104 includes: obtaining the regional information input by the user; or positioning the terminal to obtain the geographical location of the terminal, and determining the regional information where the user is located based on the geographical location of the terminal.
[0039] Further, in one embodiment, step 106 includes: reading the corresponding relationship between the pre-stored regional information and the default dialect text information; and obtaining the default dialect text information corresponding to the regional information input by the user or the regional information where the user is located according to this corresponding relationship.
[0040] In this embodiment, the regional information and the corresponding dialect text information are stored as a basic unit in advance. For example, if the region is "Shanghai", the corresponding dialect text is "Nong Hao", and this dialect text is the default dialect text corresponding to this regional information. When receiving an instruction to add a watermark, an interface can be displayed, and this interface includes a list of regions. The user can select a region through this interface. After obtaining the region selected by the user, the default dialect text information corresponding to the region selected by the user can be further obtained. If there are multiple default dialect text information, the user's selection is further received, and the default dialect text information selected by the user is overlaid on the original picture in the form of a watermark.
[0041] Specifically, the obtained geographical location of the terminal can be its latitude and longitude, the latitude and longitude of the base station it is located at, or its IP address. Furthermore, the user's geographical location can be determined based on the terminal's location. For example, the user's city can be determined based on the terminal's latitude and longitude or IP address. Since the geographical information and corresponding default dialect text information are pre-stored, after obtaining the user's geographical information, the corresponding default dialect text information can be found. When there are multiple default dialect text information corresponding to the user's geographical information, they can all be displayed for the user to select the default dialect text information to be overlaid on the original image.
[0042] Since it can display all default dialect text information corresponding to the region, allowing users to select the default dialect text information they want to overlay on the original image, and can also directly obtain the user's region and overlay the default dialect text information corresponding to the user's region onto the original image, the operation is further simplified.
[0043] like Figure 2 As shown, in another embodiment, an image processing method includes:
[0044] Step 202: Receive the instruction to add a watermark.
[0045] Step 204: Obtain regional information;
[0046] Step 206: Obtain the default dialect text information corresponding to the regional information.
[0047] Step 208: Overlay the default dialect text information onto the original image as a watermark.
[0048] Step 210: Receive instructions to edit the default dialect text information.
[0049] Step 212: Obtain the input custom dialect text information.
[0050] Step 214: Overlay the input custom dialect text information onto the original image as a watermark.
[0051] Step 216: Receive the save command and generate the superimposed watermark image.
[0052] In this embodiment, after receiving an instruction to edit the default dialect text information, an editing input box containing the default dialect text information can be generated on the original image. The default dialect text information that was originally in the editing input box can be deleted through the editing input box, and the user's custom dialect text information can be received through the editing input box.
[0053] Please refer to Figure 3 As shown, the original image is displayed on the terminal, with default dialect text information superimposed on it as a watermark. The user can tap the default dialect text information 302 on the original image, generating an edit input box 304. The default dialect text information 302 can be selected within the edit input box 304, allowing the user to easily delete it. Furthermore, the user can input custom dialect text information through the edit input box 304. When the user taps a location outside the edit input box 304, the input custom dialect text information is superimposed on the original image as a watermark. The user taps the save button to generate a watermarked image.
[0054] Since custom dialect text information can be directly edited on the original image, any dialect text can be overlaid on the original image as a watermark, further simplifying the operation.
[0055] In one embodiment, before receiving the save instruction and generating the overlaid watermark image, the method may further include: overlaying geographic information and / or the current time onto the original image as a watermark.
[0056] In this embodiment, when geographic information is obtained, it can be overlaid onto the original image, so that the generated watermark image includes the user-selected region or the user's current region. Furthermore, the generated watermark image can also include the current time, allowing the image generation time to be viewed from the watermark image.
[0057] Furthermore, after generating the watermarked image, it can be saved locally on the device or uploaded directly to a social network.
[0058] like Figure 4 As shown, an image processing apparatus is also provided, the apparatus comprising:
[0059] The instruction receiving module 402 is used to receive instructions to add a watermark.
[0060] The first acquisition module 404 is used to acquire regional information.
[0061] The second acquisition module 406 is used to acquire the default dialect text information corresponding to the regional information.
[0062] The overlay module 408 is used to overlay default dialect text information onto the original image as a watermark.
[0063] Image generation module 410 is used to receive save instructions and generate an overlaid watermark image.
[0064] The regional information can be the regional information selected and input by the user, or the geographical location of the terminal obtained after positioning the terminal. In this embodiment, the regional information and the corresponding default dialect text information are pre-stored, and the regional information and the default dialect text information can be in a one-to-one or one-to-many relationship.
[0065] Specifically, the picture generation module 410 can be used to add a new layer to the original picture, add the default dialect text information to the new layer, and after receiving the save instruction, fuse the new layer with the original layer added with the default dialect text information to generate a watermark picture. The picture generation module 410 can also be used to, after receiving the save instruction, embed the default dialect text information as pixels into the original picture, and then fuse to generate a watermark picture. In addition, multiple watermark templates can be pre-stored, and these watermark templates can include preset pictures and define the format for placing text. After the second acquisition module 406 acquires the default dialect text information corresponding to the regional information, the superimposition module 408 can superimpose the default dialect text information at the preset position of the watermark template, and then superimpose the watermark template with the default dialect text information superimposed on the original picture.
[0066] In one embodiment, the first acquisition module 404 is used to acquire the regional information input by the user; or is used to position the terminal to acquire the geographical location of the terminal, and determine the regional information where the user is located according to the geographical location of the terminal.
[0067] Further, in one embodiment, the second acquisition module 406 is used to read the corresponding relationship between the pre-stored regional information and the default dialect text information; and acquire the default dialect text information corresponding to the regional information input by the user or the regional information where the user is located according to the corresponding relationship.
[0068] In this embodiment, the regional information and the corresponding dialect text information are pre-stored as a basic unit. For example, if the region is "Shanghai", the corresponding dialect text is "Nong Hao", and this dialect text is the default dialect text corresponding to the regional information.
[0069] Specifically, the geographical location of the terminal acquired by the first acquisition module 404 can be the latitude and longitude of the terminal, the latitude and longitude of the base station where the terminal is located, or the IP address of the terminal, etc. Furthermore, the first acquisition module 404 can be used to determine the user's geographical location based on the terminal's geographical location. For example, the user's city can be determined based on the terminal's latitude and longitude or IP address. Since the geographical information and corresponding default dialect text information are pre-stored, after obtaining the user's geographical information, the second acquisition module 406 can find the default dialect text information corresponding to the user's geographical information. When there are multiple default dialect text information corresponding to the user's geographical information, they can be displayed together for the user to select the default dialect text information to be overlaid on the original image.
[0070] In one embodiment, such as Figure 5 As shown, the image processing apparatus may further include:
[0071] The editing module 412 is used to receive instructions to edit the default dialect text information and to obtain the input custom dialect text information.
[0072] In this embodiment, the overlay module 408 is also used to overlay the input custom dialect text information onto the original image.
[0073] The editing module 412 can be used to generate an editing input box containing the default dialect on the original image after receiving an instruction to edit the default dialect. The default dialect that was originally in the editing input box can be deleted through the editing input box, and the user's custom dialect can be received through the editing input box.
[0074] In one embodiment, the overlay module 408 is also used to overlay geographical information and / or the current time onto the original image as a watermark.
[0075] Furthermore, after generating the watermarked image, the image generation module 410 can be used to save the watermarked image locally on the terminal, or directly upload the watermarked image to a social network.
[0076] Figure 6 This is a block diagram illustrating a computer system 1000 that can implement an embodiment of the present invention. This computer system 1000 is merely an example of a computer environment suitable for the present invention and should not be construed as setting any limitation on the scope of the invention. The computer system 1000 should also not be interpreted as requiring or having a combination of one or more components of the illustrated exemplary computer system 1000.
[0077] Figure 6The computer system 1000 shown is an example of a computer system suitable for use in this invention. Other architectures with different subsystem configurations can also be used. For example, well-known devices such as desktop computers, laptops, personal digital assistants, smartphones, tablets, portable media players, and set-top boxes can be used in some embodiments of this invention. However, it is not limited to the devices listed above.
[0078] like Figure 6 As shown, the computer system 1000 includes a processor 1010, a memory 1020, and a system bus 1022. Various system components, including the memory 1020 and the processor 1010, are connected to the system bus 1022. The processor 1010 is hardware used to execute computer program instructions through basic arithmetic and logical operations in the computer system. The memory 1020 is a physical device used for temporary or permanent storage of computational programs or data (e.g., program state information). The system bus 1022 can be any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a local bus. The processor 1010 and the memory 1020 can communicate via the system bus 1022. The memory 1020 includes read-only memory (ROM) or flash memory (neither shown in the figure), and random access memory (RAM), which typically refers to the main memory loaded with the operating system and applications.
[0079] The computer system 1000 also includes a display interface 1030 (e.g., a graphics processing unit), a display device 1040 (e.g., a liquid crystal display), an audio interface 1050 (e.g., a sound card), and an audio device 1060 (e.g., a speaker). The display device 1040 and the audio device 1060 are media devices used for experiencing multimedia content.
[0080] Computer system 1000 generally includes a storage device 1070. Storage device 1070 can be selected from a variety of computer-readable media, which refers to any usable medium accessible by computer system 1000, including both removable and fixed media. For example, computer-readable media includes, but is not limited to, flash memory (micro SD card), CD-ROM, digital versatile optical disc (DVD) or other optical disc storage, magnetic tape cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible by computer system 1000.
[0081] Computer system 1000 also includes input device 1080 and input interface 1090 (e.g., I / O controller). Users can input commands and information into computer system 1000 via input device 1080, such as a keyboard, mouse, or touch panel device on display device 1040. Input device 1080 is typically connected to system bus 1022 via input interface 1090, but can also be connected via other interfaces or bus structures, such as Universal Serial Bus (USB).
[0082] Computer system 1000 can be logically connected to one or more network devices in a network environment. Network devices can be personal computers, servers, routers, smartphones, tablets, or other public network nodes. Computer system 1000 connects to network devices via a local area network (LAN) interface 1100 or a mobile communication unit 1110. A LAN is a network of interconnected computers within a limited area, such as a home, school, computer lab, or office building using network media. WiFi and twisted-pair Ethernet are two of the most common technologies for building LANs. WiFi is a technology that enables computer systems 1000 to exchange data or connect to wireless networks via radio waves. Mobile communication unit 1110 can make and receive phone calls via radio communication lines while moving within a wide geographical area. In addition to calls, mobile communication unit 1110 also supports internet access in 2G, 3G, or 4G cellular communication systems that provide mobile data services.
[0083] It should be noted that other computer systems, including more or fewer subsystems than computer system 1000, are also applicable to the invention. For example, computer system 1000 may include a Bluetooth unit capable of exchanging data over short distances, an image sensor for taking pictures, and an accelerometer for measuring acceleration.
[0084] As described in detail above, the computer system 1000 applicable to the present invention can perform specified operations of the image processing method. The computer system 1000 performs these operations in the form of software instructions executed by the processor 1010 on a computer-readable medium. These software instructions can be read from storage device 1070 or from another device via local area network interface 1100 into memory 1020. The software instructions stored in memory 1020 cause the processor 1010 to perform the image processing method described above. Furthermore, the present invention can also be implemented using hardware circuitry or hardware circuitry combined with software instructions. Therefore, the implementation of the present invention is not limited to any particular combination of hardware circuitry and software.
[0085] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. An image processing method, the method comprising: Receive instructions to add a watermark; The user's geographic information can be obtained through the interface, or the user's geographic information can be obtained based on the terminal's location. Obtain default dialect text information corresponding to the geographical information. The dialect used in the default dialect text information is the local language corresponding to the geographical information. The default dialect text information includes dialect text information used for emotional expression. The geographical information and the default dialect text information have a one-to-one or one-to-many relationship, and the relationship is pre-stored. Add default dialect text information to the preset position of the watermark template, and overlay the watermark template with the added default dialect text information onto the original image. The watermark template defines the format for placing the text. The system receives an instruction to edit the default dialect text information, generates an editing input box containing the default dialect text information on the original image, obtains the input custom dialect text information through the editing input box, and overlays the custom dialect text information on the original image as a watermark. The geographic information and / or the current time are overlaid on the original image as a watermark. Receive the save command and generate the overlaid watermark image.
2. The method according to claim 1, characterized in that, The method further includes: The watermarked image was uploaded to a social network.
3. The method according to claim 2, characterized in that, The step of obtaining the default dialect text information corresponding to the regional information includes: Read the correspondence between pre-stored regional information and default dialect text information; Based on the correspondence, the default dialect text information corresponding to the user's geographical location is obtained.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The watermarked image is saved locally on the terminal.
5. The method according to claim 1, characterized in that, The watermark template includes a preset image.
6. The method according to claim 1, characterized in that, When there are multiple default dialect characters corresponding to the regional information, the default dialect character information superimposed on the original image is the dialect character information selected by the user.
7. An image processing apparatus, characterized in that, The device includes: The instruction receiving module is used to receive instructions on adding watermarks; The first acquisition module is used to acquire the user's geographic information through the interface, or to acquire the geographic information of the user based on the terminal's location. The second acquisition module is used to acquire default dialect text information corresponding to the regional information. The default dialect text information includes greetings expressed in the local language corresponding to the regional information. The regional information and the default dialect text information have a one-to-one or one-to-many relationship, and the relationship is pre-stored. The overlay module is used to add default dialect text information to a preset position of a watermark template, overlaying the watermark template with the added default dialect text information onto the original image. The watermark template defines the format for placing the text. It receives instructions to edit the default dialect text information, generates an editing input box containing the default dialect text information on the original image, obtains input custom dialect text information through the editing input box, and overlays the custom dialect text information as a watermark onto the original image. It also overlays the regional information and / or the current time as a watermark onto the original image. The image generation module is used to receive save commands and generate overlaid watermark images.
8. The apparatus according to claim 7, characterized in that, The device is also used to upload the watermarked image to a social network.
9. The apparatus according to claim 8, characterized in that, The second acquisition module is also used to read the correspondence between pre-stored regional information and default dialect text information, and obtain the default dialect text information corresponding to the user's regional information according to the correspondence.
10. The apparatus according to any one of claims 7 to 9, characterized in that, The device is also used for: The watermarked image is saved locally on the terminal.
11. A computer system, characterized in that, The method includes a storage medium and a processor, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the image processing method according to any one of claims 1 to 6.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the steps of the image processing method according to any one of claims 1 to 6.