Image conversion method, image conversion device, storage medium and electronic device

By recording the relative position information of the image in the target image file and converting the marked image into the original image, the problem of insufficient image restoration in the prior art is solved, and a high-precision image restoration effect is achieved.

CN112132730BActive Publication Date: 2025-05-13BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910556041.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2025-05-13
Estimated Expiration
2040-11-11

AI Technical Summary

Technical Problem

In the prior art, when removing marks of complex areas in images, it is difficult to achieve high-precision image restoration, which often leads to image distortion in the marked areas.

Method used

The target image file records the relative position information of the first area image and the target area within the target area when the mark is not added, and the mark image is converted into the original image using this information.

Benefits of technology

The applicability of image conversion to images of different fineness is improved, the fineness of the restored image is enhanced, and image distortion is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112132730B_ABST
    Figure CN112132730B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image conversion method, an image conversion device, a storage medium and an electronic device. The method comprises: displaying a marked image through a target image file, the marked image being an image obtained by adding a target mark in a target area of ​​an original image, the target image file containing a first area image in the target area when the target mark is not added and area image information of the relative position of the target area in the target image; converting the marked image currently displayed into the original image without the target mark through the area image and the relative position in the marked area recorded in the image file. The marked image can be converted into the image before the marking is added, thereby improving the applicability of the image conversion to images of different fineness, thereby improving the fineness of the restored image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an image conversion method, an image conversion device, a storage medium and an electronic device. Background Art

[0002] When people use pictures or videos, they sometimes add watermarks, stickers, or photo frames to images such as pictures or videos to beautify the images or identify the source of the images to prevent infringement. After adding marks to the images and sealing the marked images as corresponding image files, users may need to remove these marks and restore the marked images to the original images before adding the marks. In the related art, the method for restoring the marked images is usually: obtaining the pixel values ​​of the images within a certain range outside the marked area on the picture, and predicting the pixel values ​​of the original images in the marked area through the relevant prediction model based on the characteristics of these pixel values, and then restoring the marked images to the corresponding original images according to the predicted pixel values. However, this method can only restore the image when the image content of the original image in the marked area is relatively simple (for example, a pure color image or an image with relatively simple lines), and the scope of application of image restoration is relatively small. If the image content of the original image in the marked area is relatively complex, the accuracy of the predicted pixel values ​​will be greatly reduced, which will cause the restored image to be distorted in the original marked area, and cannot meet the user's demand for image fineness. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image conversion method, an image conversion device, a storage medium and an electronic device.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image conversion method, the method comprising:

[0005] Displaying a marked image through a target image file, wherein the marked image is an image obtained by adding a target mark in a target area of ​​an original image, and the target image file includes region image information for recording a first region image in the target area when the target mark is not added and a relative position of the target area in the target image;

[0006] The currently displayed mark image is converted into the original image without the target mark by using the area image information.

[0007] Optionally, before displaying the marked image through the target image file, the method further includes:

[0008] In response to an operation instruction for adding the target mark to the target area, acquiring the area image information;

[0009] After the target mark is added to the target area, the target image file including the area image information is generated.

[0010] Optionally, the regional image information includes: relative position information for recording the relative position, and image data of the first regional image, and the generating of the target image file containing the regional image information includes:

[0011] Adding the relative position information to a header file of an original image file of the original image to obtain a target header file;

[0012] The target image file including the target header file, the image data of the mark image, and the image data of the first area image is generated.

[0013] Optionally, converting the currently displayed marked image into the original image without the target mark by using the regional image information includes:

[0014] determining the target area in the marked image according to the relative position;

[0015] The second region image in the target region after the target mark is added is restored to the first region image according to the image data of the first region image, so as to convert the marked image into the original image without the target mark.

[0016] According to a second aspect of an embodiment of the present disclosure, there is provided an image conversion device, the device comprising:

[0017] an image display module, configured to display a marked image through a target image file, wherein the marked image is an image obtained by adding a target mark in a target area of ​​an original image, wherein the target image file includes region image information for recording a first region image in the target area when the target mark is not added and a relative position of the target area in the target image;

[0018] The image conversion module is configured to convert the currently displayed marked image into the original image without the target mark according to the regional image information.

[0019] Optionally, the device further comprises:

[0020] an information acquisition module, configured to acquire the area image information in response to an operation instruction for adding the target mark to the target area;

[0021] The file generation module is configured to generate the target image file containing the area image information after adding the target mark to the target area.

[0022] Optionally, the regional image information includes: relative position information for recording the relative position, and image data of the first regional image, and the file generation module is configured to:

[0023] Adding the relative position information to a header file of an original image file of the original image to obtain a target header file;

[0024] The target image file including the target header file, the image data of the mark image, and the image data of the first area image is generated.

[0025] Optionally, the image conversion module is configured as follows:

[0026] determining the target area in the marked image according to the relative position;

[0027] The second region image in the target region after the target mark is added is restored to the first region image according to the image data of the first region image, so as to convert the marked image into the original image without the target mark.

[0028] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image conversion method provided in the first aspect of the present disclosure are implemented.

[0029] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: the image conversion device provided in the second aspect of the present disclosure.

[0030] The technical solution provided by the embodiments of the present disclosure can display a marked image through a target image file, wherein the marked image is an image obtained by adding a target mark to a target area of ​​an original image, and the target image file contains a first area image in the target area when the target mark is not added and area image information of the relative position of the target area in the target image; the marked image currently displayed is converted into the original image without the target mark through the area image and relative position in the marked area recorded in the image file, so as to improve the applicability of image conversion to images of different fineness, thereby improving the fineness of the restored image.

[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, are configured to explain the principles of the present disclosure.

[0033] Figure 1 is a flow chart of an image conversion method according to an exemplary embodiment;

[0034] Figure 2 is based on Figure 1 A flowchart of another image conversion method is shown;

[0035] Figure 3 is based on Figure 2 A flowchart of a file generation method is shown;

[0036] Figure 4 is based on Figure 1 A flowchart of a labeled image conversion method is shown;

[0037] Figure 5 is a block diagram of an image conversion device according to an exemplary embodiment;

[0038] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0040] Before introducing the image conversion method provided by the present disclosure, the target application scenario involved in each embodiment of the present disclosure is first introduced, and the target application scenario includes a terminal, and the terminal includes a display device, and the terminal can display the image file through the display device. The terminal can be, for example, a personal computer, a workstation, a laptop, a smart phone, a tablet computer, a PDA (English: Personal Digital Assistant, Chinese: Personal Digital Assistant) and other terminals.

[0041] Figure 1is a flow chart of an image conversion method according to an exemplary embodiment. Figure 1 As shown, the method is applied to the terminal described in the above application scenario, and includes the following steps:

[0042] In step 101, a marked image is displayed through a target image file.

[0043] The marked image is an image obtained by adding a target mark to the target area of ​​the original image, and the target image file contains the first area image in the target area when the target mark is not added and the area image information of the relative position of the target area in the target image. The target image file can be a picture or a video file. The target mark can be a watermark, a sticker, text, a frame, a label or a user-defined picture, etc.

[0044] For example, when a user clicks on an image file through a mouse or a touch screen, the terminal system decodes the clicked image file, obtains the image data contained in the image file, and then displays the image corresponding to the image data in the display device. In the above step 101, the target image file is an image file generated after adding a mark to the original image. It can be understood that after adding a mark to the original image, the original image will be transformed into a marked image with a mark. Correspondingly, the image data of the original image will also change into image data for displaying the marked image. The target image file not only contains the image data of the marked image, so as to display the marked image in response to the user operation. At the same time, the target image file also contains the regional image information for the above-mentioned first regional image and the relative position, and the regional image information is used to restore the displayed marked image to the above-mentioned original image when the user needs it. It should be noted that the regional image information is added to the target image file when the target image file is generated, and the addition of the regional image information does not affect the display of the marked image by the target image file.

[0045] In step 102, the currently displayed marked image is converted into the original image without the target mark by using the regional image information.

[0046] For example, when the user triggers the image restoration process through a specific operation (for example, right-clicking an image file to open the corresponding option box, and selecting the image conversion option or image restoration option in the option box, or loading the target image file into a preset image processing software, and clicking the image conversion button or image restoration button in the image processing software), the relative position of the mark in the marked image can be determined by the relative position of the target area in the regional image information recorded in the above target image file, and then the target mark in the displayed marked image is removed according to the first regional image in the regional image information, and then the marked image is restored to the target image. It should be noted that the "restoration" here refers to the restoration of visual effects, that is, after the above restoration process, the displayed image is completely consistent with the original image.

[0047] In summary, the technical solution provided by the embodiments of the present disclosure can display a marked image through a target image file, wherein the marked image is an image obtained by adding a target mark in a target area of ​​an original image, and the target image file contains a first area image in the target area when the target mark is not added and area image information of the relative position of the target area in the target image; the marked image currently displayed is converted into the original image without the target mark through the area image and relative position in the marked area recorded in the image file, so as to improve the applicability of the image conversion to images of different fineness, and thus improve the fineness of the restored image.

[0048] Figure 2 is based on Figure 1 A flowchart of another image conversion method is shown, such as Figure 2 As shown, the method also includes:

[0049] In step 103, in response to an operation instruction for adding the target mark to the target area, image information of the area is acquired.

[0050] In step 104, after the target mark is added to the target area, the target image file containing the image information of the area is generated.

[0051] For example, steps 103 and 104 actually include the general process of adding marks to an image through image processing software such as a beauty software or a watermark generation software. The difference is that before adding the mark, it is first necessary to record the first regional image and relative position of the target area corresponding to the added target mark through step 103. Taking the process of adding watermarks to images through watermark generation software as an example, when the user adds the watermark (i.e., the target mark) to the specified area of ​​the target image by clicking or dragging in the watermark generation software, the regional image information of the user-specified area (i.e., the target area) will be obtained first, and then the image to which the watermark has been added (i.e., the marked image) will be displayed, and the image data corresponding to the marked image will also be obtained at the same time. In the process of obtaining image data, the grayscale value of each pixel in the image can be converted into a corresponding numerical value, and then a string of numbers is obtained as the image data of the image.

[0052] For example, after adding the mark, the image data of the region image information and the marked image can be packaged to obtain the target image file. Specifically, the image data of the marked image and the region image information can be compressed and stored in a certain file format to form an image file in the file format, i.e., the target image file.

[0053] Figure 3 according to Figure 2 A flowchart of a file generation method is shown in FIG. Figure 3 As shown, the regional image information includes: relative position information for recording the relative position, and regional image data corresponding to the first regional image, and the step 104 includes:

[0054] In step 1041, the relative position information is added to the header file of the original image file of the original image to obtain a target header file.

[0055] For example, the image file also includes a header file, which is usually the beginning part of the image file and is used to characterize the display properties of the image file. Taking a picture file in JPEG (Joint Photographic Experts Group) format as an example, the header file of the JPEG image file stores information such as the size of the image, the shooting time and the shooting location. In fact, when adding a mark through the above-mentioned image processing software, the user first needs to load the original image file of the original image into the image processing software, and the image processing software usually strips the header file in the original image file (the image displayed in the image processing software does not depend on the header file) and saves it. In the process of generating the target image file, the header file of the original image file saved in the image processing software can be first obtained, and then the relative position information for recording the relative position of the target area in the original image is added to the header file of the original image file to obtain the target header file.

[0056] For example, the target mark can be any shape, and the shape of the target area can be any shape that completely covers the target mark. For example, the shape of the target area can be set to a rectangle. In this case, the relative position information can include: the side length of each border of the target area, and the distance between each border of the target area and the border of the corresponding direction in the original image. For example, the length of the left border of the target area and the distance between the left border and the left border of the original image can be expressed in the form of "left+value A+value B", wherein value A is the length of the border and value B is the distance between the left border and the left border of the original image. Similarly, the length of the upper border of the target area and the distance between the upper border and the upper border of the original image can be expressed in the form of "top+value A+value B".

[0057] In step 1042, the target image file is generated, which includes the target header file, the image data of the marked image, and the image data of the first region image.

[0058] For example, after obtaining the target header file, in the above step 1042, the target header file and the image data of the marked image can be first compressed in a specified file format to generate the image file. It should be noted here that the image file generated after compression usually includes different tags at the beginning and end. For example, for a JPEG image file, it can be known by decoding the image file that the JPEG image file is actually divided into two parts: a tag code and image data, wherein the 0xFFD8 tag code indicates the beginning of the image, and the 0xFFD9 tag code indicates the end of the image, and the image data is contained in the middle of the two tag codes. When displaying an image through a JPEG image file, if a tag code indicating the end of the image is read in the JPEG image file, it means that the image stream of the JPEG image file has ended, and then the reading of the information in the JPEG image file is terminated, and the image is displayed according to the read image data and header file.

[0059] For example, in step 1042, the image data of the first region image may be added to the end of the image file generated by the target header file and the image data of the tagged image. Taking the image file as an image file in JPEG format as an example, the image data of the first region image (also a string of numbers) is actually added after the above-mentioned 0xFFD9 tag code. It is understandable that when the user does not trigger the image conversion or restoration operation, the image data of the first region image after the above-mentioned 0xFFD9 tag code will not affect the process of displaying the tagged image through the target image file.

[0060] Figure 4 is based on Figure 3 A flowchart of a labeled image conversion method is shown in FIG. Figure 4 As shown, step 102 includes:

[0061] In step 1021, the target area is determined in the marked image according to the relative position.

[0062] For example, when a user triggers an operation instruction for image conversion or restoration, the position of the marked portion in the marked image (i.e., the relative position) must first be obtained to determine the position in the marked image that needs to be restored. It is understandable that in common image processing software, the position of the target area in the marked area will not change without deliberately changing the size of the original image by other means. Therefore, the relative position of the target mark that needs to be restored in the marked image can be directly determined based on the relative position information.

[0063] In step 1022, the second region image in the target region after adding the target mark is restored to the first region image according to the image data of the first region image, so as to convert the marked image into the original image without the target mark.

[0064] For example, in step 1022, the image data corresponding to the first region image can be first obtained from the tail of the target image file, and then the first region image is replaced by the second region image according to the relative position information of the first region. The specific replacement method may include: replacing the image data corresponding to the image in the target region to which the target mark has been added by the image data of the first region image; or directly overwriting the image in the target region of the target mark with the above-mentioned first region image by a preset image overwriting method.

[0065] For example, in the above steps 103-104, a mark B different from the target mark (here, mark A) can be added to the target area of ​​the marked image. After that, the image data corresponding to the regional image in the target area with the mark B added is obtained, and the image data with the mark B and the image data of the first regional image are added to the above target image file. In this way, in step 1022, the marked image with the mark A can be restored to the original image (i.e., the image mark is removed), or the marked image with the mark A can be converted into the marked image with the mark B (i.e., the image mark is changed) according to the user's choice. It can be understood that no matter how many groups of image data are added to the end of the target image file, it will not affect the display of the marked image with the mark A by the target image file. Therefore, the end of the second image file can also be accompanied by any number of image data according to user needs.

[0066] In summary, the technical solution provided by the embodiments of the present disclosure can display the marked image corresponding to the target image file, and the marked image is an image obtained by adding a target mark in the target area of ​​the target image, and the target image file contains a first area image in the target area without adding the target mark and area image information of the relative position of the target area in the target image; the target mark is removed from the marked image through the area image information to restore the currently displayed marked image to the target image. The marked image can be restored to the original image before adding the mark, or converted to an image with other marks without affecting the display of the marked image, through the area image and relative position of the marked area recorded in the header file and the tail of the image file, so as to improve the applicability of image restoration and image conversion to images of different fineness, thereby improving the fineness of the converted or restored image.

[0067] Figure 5 is a block diagram of an image conversion device according to an exemplary embodiment. Figure 5 As shown, the device 500 is applied to the terminal described in the above application scenario, and includes:

[0068] The image display module 510 is configured to display a marked image through a target image file, where the marked image is an image obtained by adding a target mark to a target region of an original image, and the target image file includes region image information for recording a first region image within the target region when the target mark is not added and a relative position of the target region in the target image;

[0069] The image conversion module 520 is configured to convert the currently displayed marked image into the original image without the target mark according to the regional image information.

[0070] Optionally, the device 500 further includes:

[0071] The information acquisition module 530 is configured to acquire the image information of the region in response to the operation instruction for adding the target mark to the target region;

[0072] The file generation module 540 is configured to generate the target image file including the image information of the area after adding the target mark to the target area.

[0073] Optionally, the regional image information includes: relative position information for recording the relative position, and image data of the first regional image, and the file generating module 540 is configured to:

[0074] Adding the relative position information to a header file of an original image file of the original image to obtain a target header file;

[0075] The target image file is generated, which includes the target header file, the image data of the mark image, and the image data of the first area image.

[0076] Optionally, the image conversion module 520 is configured to:

[0077] determining the target area in the marked image according to the relative position;

[0078] The second region image in the target region after adding the target mark is restored to the first region image according to the image data of the first region image, so as to convert the marked image into the original image without the target mark.

[0079] In summary, the technical solution provided by the embodiments of the present disclosure can display the marked image corresponding to the target image file, and the marked image is an image obtained by adding a target mark in the target area of ​​the target image, and the target image file contains a first area image in the target area without adding the target mark and area image information of the relative position of the target area in the target image; the target mark is removed from the marked image through the area image information to restore the currently displayed marked image to the target image. The marked image can be restored to the original image before adding the mark, or converted to an image with other marks without affecting the display of the marked image, through the area image and relative position of the marked area recorded in the header file and the tail of the image file, so as to improve the applicability of image restoration and image conversion to images of different fineness, thereby improving the fineness of the converted or restored image.

[0080] Figure 6 is a block diagram of an electronic device according to an exemplary embodiment. The electronic device 600 is configured to perform the above Figures 1 to 4 The image conversion method shown. Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0081] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned image conversion method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0082] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any target application or method configured to operate on the device 600, contact data, phone book data, messages, images, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0083] The power component 606 provides power to the various components of the device 600. The power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.

[0084] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0085] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 661. In some embodiments, the audio component 610 also includes a speaker configured to output an audio signal.

[0086] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0087] The sensor assembly 614 includes one or more sensors configured to provide various aspects of the status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, configured to be used in imaging target applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0088] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 6G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0089] In an exemplary embodiment, the apparatus 600 may be implemented by one or more target application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, and configured to perform the above-described image conversion method.

[0090] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to complete the above-mentioned image conversion method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The present disclosure can reduce the dependence on the signal strength of the WLAN device when locating the position of the WLAN device, make the positioning error precision controllable, and improve the accuracy of positioning.

[0091] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0092] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image conversion method, characterized in that: The method comprises: Displaying a marked image through a target image file, wherein the marked image is an image obtained by adding a target mark in a target area of ​​an original image, and the target image file includes a first area image in the target area when the target mark is not added and area image information for recording a relative position of the target area in the marked image; Converting the currently displayed marked image into the original image without the target mark by using the regional image information; The converting the currently displayed marked image into the original image without the target mark by using the regional image information includes: Determining the relative position of the target mark in the mark image according to the relative position of the target area in the regional image information; removing the target mark in the displayed mark image according to the first region image in the region image information to obtain the original image; The regional image information includes: relative position information for recording the relative position, and image data of the first regional image, and the target image file includes a target header file, which is obtained by adding the relative position information to the header file of the original image file of the original image.

2. The method according to claim 1, characterized in that Before displaying the marked image through the target image file, the method further includes: In response to an operation instruction for adding the target mark to the target area, acquiring the area image information; After the target mark is added to the target area, the target image file including the area image information is generated.

3. The method according to claim 2, characterized in that The generating the target image file containing the regional image information comprises: Get the target header file; The target image file including the target header file, the image data of the mark image, and the image data of the first area image is generated.

4. The method according to claim 1, characterized in that The converting the currently displayed marked image into the original image without the target mark by using the regional image information includes: determining the target area in the marked image according to the relative position; The second region image in the target region after the target mark is added is restored to the first region image according to the image data of the first region image, so as to convert the marked image into the original image without the target mark.

5. An image conversion device, characterized in that: The device comprises: an image display module, configured to display a marked image through a target image file, wherein the marked image is an image obtained by adding a target mark in a target area of ​​an original image, wherein the target image file includes a first area image in the target area when the target mark is not added and area image information for recording a relative position of the target area in the marked image; An image conversion module, configured to convert the currently displayed marked image into the original image without the target mark according to the regional image information; The image conversion module is further configured to determine the relative position of the target mark in the marked image through the relative position of the target area in the regional image information; remove the target mark in the marked image to be displayed according to the first regional image in the regional image information to obtain the original image; the regional image information includes: relative position information for recording the relative position, and image data of the first regional image, the target image file includes a target header file, and the target header file is obtained by adding it to the header file of the original image file of the original image based on the relative position information.

6. The device according to claim 5, characterized in that The device also includes: an information acquisition module, configured to acquire the area image information in response to an operation instruction for adding the target mark to the target area; The file generation module is configured to generate the target image file containing the area image information after adding the target mark to the target area.

7. The device according to claim 6, characterized in that The file generation module is configured as follows: Get the target header file; The target image file including the target header file, the image data of the mark image, and the image data of the first area image is generated.

8. The device according to claim 5, characterized in that The image conversion module is configured as follows: determining the target area in the marked image according to the relative position; The second region image in the target region after the target mark is added is restored to the first region image according to the image data of the first region image, so as to convert the marked image into the original image without the target mark.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.

10. An electronic device, characterized in that: include: The image conversion device according to any one of claims 5 to 8.

Citation Information

Patent Citations

  • Method and apparatus for creating a digital picture with a removable watermark

    CN101142808A