Image processing method and device and related equipment
By automatically replacing the text content of the non-protected area in the image, the problems of low image processing efficiency and insufficient accuracy in the prior art are solved, and efficient and accurate image processing effects are achieved.
Patent Information
- Application Number
- CN202311616079.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-27
- Filing Date
- 2023-11-29
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art is inefficient when replacing content in an image, which limits the number of new images that can be produced within a unit time period, and the accuracy of manual replacement is low, affecting the presentation effect of the final generated new image.
An image processing method is provided, by obtaining the indication information provided by the user, automatically determine the non-protected area in the image, and replace the first set of pixels therein with the second set of pixels, thereby realizing automatic replacement of text content.
It improves the efficiency of making new images, gets rid of the limitation of the number of new images within a unit time, improves the rendering effect of the final generated image, and supports users to differentiate the image content.
Smart Images

Figure CN119904551A_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on October 27, 2023, with application number 202311412579.8 and invention name “Image processing methods, devices and related equipment”, all contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of image processing technology, and in particular to an image processing method, apparatus and related equipment. Background Art
[0003] Image processing technology refers to the technology of processing images using digital processing technology, such as extracting information from images, replacing the content in images, etc., and is widely used in many scenarios. For example, in the scenario of making poster images for cross-regional promotion, image processing technology can be used to replace the image content in the poster image that is applicable to the first region with the image content that is applicable to the second region.
[0004] Currently, when replacing the content in an image, users usually manually erase the content of a part of the image area and manually add new image content in the erased image area. For example, a user erases the Chinese text in a promotional poster and adds English text with the same semantics to generate a new image.
[0005] However, this method of processing images is not only inefficient and limits the number of new images that can be produced in a unit of time, but also has low accuracy in manually replacing some areas in the image. For example, the user may erase too many image areas, which will affect the presentation of the new image finally generated. Summary of the invention
[0006] In view of this, the embodiment of the present application provides an image processing method to improve the efficiency of making new images and improve the presentation effect of the finally generated new images. The present application also provides a corresponding image processing device, a computing device cluster, a computer-readable storage medium, and a computer program product.
[0007] In the first aspect, an embodiment of the present application provides an image processing method, which can be performed by a corresponding image processing device. Specifically, the image processing device obtains a first image, which can be provided by a user, for example, and includes a text of a first language type, such as Chinese text. In addition, the image processing device also obtains first indication information provided by the user, and the first indication information is used to indicate a second language type (such as English, French, etc.) and a protected area in the first image, that is, the user can specify a protected area in the first image. Then, the image processing device determines a non-protected area in the first image according to the first indication information provided by the user, and the non-protected area includes a text of the first language type, and the non-protected area does not overlap with the protected area specified by the user. In this way, the image processing device replaces the first pixel set in the non-protected area with the second pixel set in the first image, and obtains a second image, the image content presented by the first pixel set includes a first text of the first language type, and the image content presented by the second pixel set includes a second text of the second language type, so as to replace the text of the first language type in a part of the first image with the text of the second language type, so that the data processing device outputs the second image.
[0008] Since the image processing device can automatically replace the text of the first language type in a part of the first image with the text of the second language type according to the first indication information provided by the user, this can effectively improve the efficiency of making new images compared to the method of manually replacing the text content in the first image, and get rid of the limit on the number of new images that can be made within a unit time (such as 24 hours, etc.). In actual application, the image processing device can also perform batch processing on multiple images according to the first indication information provided by the user, so as to further improve the efficiency of making multiple new images. In addition, the image processing device can support the user to protect the content of the text in the specified area of the first image, so as to achieve differentiated processing of the content in the first image, meet the needs of differentiated processing of images in actual application scenarios, and improve user experience. In addition, the manual replacement of the text in the image area may cause the content in other image areas to be illegally erased due to manual operation errors. Therefore, compared with the manual replacement of the text content in the image area, the image processing device replaces the text content in the part of the first image according to the indication information provided by the user. The accuracy is usually higher, so that the presentation effect of the new image generated in the end can be guaranteed.
[0009] In a possible implementation, the first indication information acquired by the image processing device includes an identifier of the second language type and an identifier of an area selected by the user, and the identifier of the area selected by the user is used to indicate a protected area in the first image. For example, the identifier of the area selected by the user may be, for example, the coordinates of the upper left pixel and the coordinates of the lower right pixel of the area selected by the user on the first image. In this way, the user can specify the area to be protected by selecting an area in the first image.
[0010] In a possible implementation, the first indication information obtained by the image processing device includes an identifier of the second language type and a target text. The target text matches the text of the first language type included in the protected area. For example, the target text may be a piece of text presented by the image content of the protected area on the first image. Alternatively, the semantics of the target text matches the semantics of the image content corresponding to the protected area. For example, the target text may be a keyboard, so that the area in the first image whose image content is a keyboard is the protected area. In this way, the user protects the designated area in the first image by inputting the target text.
[0011] In a possible implementation, the semantics of a first text in a first language type matches the semantics of a second text in a second language type. For example, the second text may be obtained by translating the first text in the first language type.
[0012] In a possible implementation, when the image processing device replaces the first pixel set in the non-protected area with the second pixel set, the image processing device may specifically replace the first pixel set in the non-protected area with a third pixel set, and the image content presented by the third pixel set does not include text of the first language type, thereby erasing the text content in the non-protected area; then, the image processing device translates the first text of the first language type to obtain a second text of the second language type, and replaces the third pixel set with the second pixel set based on the second text of the second language type obtained by the translation. In this way, the text content in the non-protected area can be automatically replaced from text of the first language type to text of the second language type, thereby improving the efficiency of making new images.
[0013] In a possible implementation, the semantics of the first text of the first language type do not match the semantics of the second text of the second language type. In this case, the image processing device can also obtain the second text of the second language type provided by the user. In this way, the text content in the non-protected area can be replaced by the text of the first language type with the second text specified by the user, thereby improving the flexibility of the user in making new images and providing the user with an experience in making new images.
[0014] In a possible implementation, when the image processing device determines the non-protected area in the first image based on the first indication information, it can specifically identify a first text set in the first image, where the first text set includes multiple texts of a first language type; then, the image processing device filters the text in the text set based on the first indication information to obtain a second text set, where the second text set does not include text of the first language type in the protected area; thus, the image processing device can determine the non-protected area in the first image based on the second text set, where the non-protected area includes text in the second text set. In this way, after the user specifies the protected area in the first image, the image processing device can automatically determine the non-protected area on the first image where text replacement is required, so that the text in the non-protected area can be automatically replaced later, thereby improving the efficiency of the user in making new images.
[0015] In a possible implementation, the image processing device may also obtain a third image, the third image includes text of the first language type, and the image processing device may also obtain second indication information provided by the user, the second indication information is used to indicate the protected area in the third image; thus, the image processing device may determine the non-protected area in the third image according to the second indication information, the non-protected area in the third image includes text of the first language type, and the non-protected area in the third image does not overlap with the protected area in the third image. In this way, in the third image, the image processing device may replace the fourth pixel set in the non-protected area in the third image with the fifth pixel set to obtain a fourth image, the image content presented by the fourth pixel set includes text of the first language type, and the image content presented by the fifth pixel set does not include text of the first language type; finally, the image processing device may output the fourth image. In this way, after the user specifies the protected area on the third image, the image processing device can automatically determine the non-protected area in the third image and erase the text in the non-protected area, thereby improving the efficiency of the user in making new images and improving the user experience.
[0016] In a second aspect, the present application provides an image processing device, including: an interaction module, used to obtain a first image, the first image including text of a first language type; obtain first indication information provided by a user, the first indication information being used to indicate a second language type and a protected area in the first image; a determination module, used to determine a non-protected area in the first image according to the first indication information, the non-protected area including text of the first language type, and there is no overlap between the non-protected area and the protected area; a processing module, used to replace a first pixel set in the non-protected area with a second pixel set in the first image to obtain a second image, the image content presented by the first pixel set including first text of the first language type, and the image content presented by the second pixel set including second text of the second language type; the interaction module is also used to output the second image.
[0017] In a possible implementation manner, the first indication information includes an identifier of the second language type and an identifier of an area selected by a user, and the identifier of the area selected by the user is used to indicate a protected area in the first image.
[0018] In a possible implementation, the first indication information includes an identifier of the second language type and a target text; wherein the target text matches the text of the first language type included in the protected area, or the semantics of the target text matches the semantics of the image content corresponding to the protected area.
[0019] In a possible implementation, the semantics of a first text in a first language type matches the semantics of a second text in a second language type.
[0020] In a possible implementation, the processing module is used to: replace a first pixel set in a non-protected area with a third pixel set, where the image content presented by the third pixel set does not include text of a first language type; translate a first text of the first language type to obtain a second text of a second language type; and replace the third pixel set with the second pixel set based on the second text of the second language type.
[0021] In a possible implementation, the semantics of the first text in the first language type does not match the semantics of the second text in the second language type; the interaction module is further configured to obtain the second text in the second language type provided by the user.
[0022] In one possible implementation, a determination module is used to: identify a first text set in a first image, the first text set including multiple texts of a first language type; filter the text in the text set according to first indication information to obtain a second text set, the second text set not including text of the first language type in a protected area; and determine a non-protected area in the first image according to the second text set, the non-protected area including text in the second text set.
[0023] In a possible implementation, the interaction module is further used to obtain a third image, the third image includes text of the first language type; obtain second indication information provided by a user, the second indication information is used to indicate a protected area in the third image; the determination module is further used to determine a non-protected area in the third image based on the second indication information, the non-protected area in the third image includes text of the first language type, and there is no overlap between the non-protected area in the third image and the protected area in the third image; the processing module is further used to replace, in the third image, a fourth pixel set in the non-protected area in the third image with a fifth pixel set to obtain a fourth image, the image content presented by the fourth pixel set includes text of the first language type, and the image content presented by the fifth pixel set does not include text of the first language type; the interaction module is further used to output the fourth image.
[0024] The image processing device provided in the second aspect corresponds to the image processing method provided in the first aspect. Therefore, the technical effects of the image processing device provided in the second aspect can be referred to the relevant description of the technical effects of the above-mentioned first aspect or any implementation method of the first aspect, and will not be elaborated on here.
[0025] In a third aspect, the present application provides a computing device cluster, the computing device cluster includes at least one computing device, the at least one computing device includes at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory, so that the computing device cluster performs the image processing method in the above-mentioned first aspect or any possible implementation of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via a bus. The memory may include a readable memory and a random access memory.
[0026] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on at least one computing device, the at least one computing device executes the image processing method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0027] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on at least one computing device, enables the at least one computing device to execute the image processing method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0028] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0030] Figure 1 A schematic diagram of the structure of an exemplary image processing system provided in this application;
[0031] Figure 2 A flowchart of an image processing method provided in this application;
[0032] Figure 3 A schematic diagram of an exemplary interactive interface provided by this application;
[0033] Figure 4 A schematic diagram of the structure of a computing device provided for this application;
[0034] Figure 5 A schematic diagram of the structure of a computing device cluster provided in this application. DETAILED DESCRIPTION
[0035] The scheme in the embodiments provided in this application will be described below in conjunction with the drawings in this application.
[0036] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances. This is just a way of distinguishing objects with the same attributes when describing the embodiments of this application.
[0037] See also Figure 1 , which is a schematic diagram of the structure of an exemplary image processing system 10. Figure 1 As shown, the image processing system 10 includes a client 100 and an image processing apparatus 200, and the client 100 and the image processing apparatus 200 can communicate with each other through a network. The client 100 can be an application running on a user-side device, or can be a web browser provided by the image processing system 10.
[0038] The client 100 is used to interact with the user, such as obtaining an image provided by the user and a processing instruction for the image, and sending the information provided by the user to the image processing device 200 .
[0039] The image processing device 200 is used to replace text in a partial area of an image according to a user's instruction to generate a new image.
[0040] Specifically, Figure 1 As shown, the image processing device 200 may include an interaction module 201, a determination module 202, and a processing module 203. The interaction module 201 may interact with the client 100, including obtaining a first image to be processed and indication information provided by a user through the client 100, wherein the obtained first image includes text of a first language type, such as Chinese text, etc. The obtained indication information is used to indicate a second language type and a protected area in the first image, and the protected area is an area designated by the user to protect the image content of the protected area (specifically, the text of the first language type). Then, the interaction module 201 may provide the obtained first image and indication information to the determination module 202; the determination module 202 determines, based on the indication information, a non-protected area in the first image that does not overlap with the protected area, and the non-protected area includes text of the first language type. Then, the determination module 202 notifies the processing module 203 of the non-protected area. In this way, the processing module 203 can replace the first pixel set in the non-protected area with the second pixel set in the first image, thereby obtaining the second image. The image content presented by the first pixel set includes text of the first language type, and the image content presented by the second pixel set includes text of the second language type, that is, the processing module 203 replaces the text of the first language type included in the non-protected area with text of the second language type, such as replacing Chinese text with English text, etc. Finally, the processing module 203 can provide the generated second image to the interaction module 201, so that the interaction module 201 can output the newly generated second image, such as outputting the second image to the client 100, so that the client 100 presents the second image to the user, etc.
[0041] Since the image processing device 200 can automatically replace the text of the first language type in a part of the first image with the text of the second language type according to the instruction information provided by the user, this can effectively improve the efficiency of making new images compared to the method of manually replacing the text content in the first image, and get rid of the limit on the number of new images that can be made within a unit time (such as 24 hours, etc.). In actual application, the image processing device 200 can also perform batch processing on multiple images according to the instruction information provided by the user, such as batch replacing the text of the first language type in multiple images with text of the second language type, etc., so as to further improve the efficiency of making multiple new images.
[0042] Furthermore, the image processing device 200 can support the user to perform content protection on the text in the specified area of the first image, so as to achieve differentiated processing of the content in the first image, meet the demand for differentiated processing of images in actual application scenarios, and improve user experience. For example, in the scenario of making promotional posters, the user expects not to process the text of the first language type included in the commodity area in the image, and replace the text of the first language type included in the area outside the commodity area, etc. In addition, manual replacement of text in an image area may result in illegal erasure of content in other image areas due to manual operation errors. Therefore, compared with manual replacement of text content in an image area, the image processing device 200 usually has a higher accuracy in replacing the text content of a part of the first image area according to the instruction information provided by the user, so as to ensure the presentation effect of the new image finally generated.
[0043] It is worth noting that Figure 1 The image processing system 10 shown is only used as an exemplary illustration and is not intended to limit the specific implementation of the image processing system. Figure 1 In the image processing system 10 shown, the image processing device 200 can be deployed in the cloud, such as in a public cloud, a hybrid cloud, etc., to provide users with cloud services for processing images, such as cloud services under a microservice architecture, etc. The client 100 can be deployed on the user side to facilitate the user to provide corresponding instruction information and images locally; in other possible image processing systems, the client 100 may not be included. In this case, the image processing device 200 can be deployed on the user side, so that the image processing device 200 can provide users with localized image processing services; at the same time, the image processing device 200 can present an interactive interface to the user, so that the user can perform human-computer interaction with the image processing device 200 through the interactive interface. Alternatively, in other possible image processing systems, the image processing system can provide multiple clients to the outside to provide cloud services for processing images for multiple users. Alternatively, the image processing system can include other types of devices to support the image processing system with more functions. The present application does not limit the specific architecture of the image processing system.
[0044] In addition, the above-mentioned image processing device 200 can be implemented by software or hardware. As an example, the implementation of the image processing device 200 is described below.
[0045] As an example of a software functional unit, the image processing device 200 may include code running on an instance, which may be at least one of a host, a virtual machine, a container, a thread, and a process. Further, the above instance may be one or more. For example, the image processing device 200 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Among them, usually a region may include multiple AZs.
[0046] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0047] The image processing device 200 is taken as an example of a hardware functional unit, and the image processing device 200 may include at least one computing device, such as a cloud server, etc. Alternatively, the image processing device 200 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU) or any combination thereof.
[0048] When the image processing apparatus 200 may include multiple computing devices, the multiple computing devices may be distributed in the same region or in different regions. The multiple computing devices included in the image processing apparatus 200 may be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the image processing apparatus 200 may be distributed in the same VPC or in multiple VPCs. The multiple computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0049] It should be noted that the method steps executed by each module in the above-mentioned image processing device 200 are only used as an exemplary description and are not intended to be limiting. For example, in other implementation examples, the interaction module 201 in the image processing device 200 can be used to execute the method steps executed by any module in the above-mentioned image processing device 200, the determination module 202 can be used to execute the method steps executed by any module in the above-mentioned image processing device 200, and the processing module 203 can be used to execute the method steps executed by any module in the above-mentioned image processing device 200. The steps that the interaction module 201, the determination module 202, and the processing module 203 are responsible for implementing can be specified as needed, and the full functions of the image processing device 200 are realized by respectively implementing different method steps in the above-mentioned image processing process through the interaction module 201, the determination module 202, and the processing module 203.
[0050] To facilitate understanding, various non-limiting specific implementations of the image processing process are described in detail below.
[0051] See also Figure 2 , is a flow chart of an image processing method in an embodiment of the present application. The method can be applied to the above Figure 1 The image processing system 10 shown in FIG. 1 may also be applied to other applicable image processing systems. Figure 1 Taking the image processing system 10 shown as an example, the process of the modules in the image processing device 200 processing an image and outputting a new image is introduced.
[0052] like Figure 2 As shown, the image processing method may specifically include:
[0053] S201: the interaction module 201 obtains a first image, where the first image includes text of a first language type.
[0054] Exemplarily, the first image may be a promotional poster for a product, and the content presented by the first image includes the product and text related to the product (such as a slogan or introductory text for the product). Alternatively, the first image may be a promotional poster for a conference / activity, and the content presented by the first image may include an icon for the conference / activity and text related to the conference / activity (such as the name of the conference / activity and a brief introduction, etc.). For ease of description, the text included in the content presented by the first image is hereinafter referred to as the first image including the text, and in this embodiment, the first image includes text of a first language type, and the first language type may be, for example, Chinese. It can be understood that in actual application scenarios, in addition to the text of the first language type, the first image may also include text of other language types, or include text common to multiple language types, such as Arabic numerals, international units of measurement, etc. In this embodiment, the specific implementation method of the first image is not limited.
[0055] In a possible implementation, the first image may be provided by the user. In specific implementation, the interaction module 201 may output an interaction interface to the client 100, and the client 100 may present the interaction interface to the user, such as presenting Figure 3 The interactive interface shown in the figure is used to prompt the user to input or specify the first image to be processed. The user can enter the uniform resource locator (URL) of the first image in the input box on the interactive interface, and further click the "Import" button on the interactive interface, so that the client 100 can access the first image according to the URL entered by the user, and send the first image to the interactive module 201. Alternatively, when the user expects to perform batch processing on multiple images, the user can enter the network address of the database in the input box on the interactive interface, and the database includes multiple images to be processed, and the multiple images include the above-mentioned first image, and further click the "Import" button on the interactive interface, so that the client 100 can access the multiple images in the database according to the network address entered by the user, and send the multiple images to the interactive module 201.
[0056] In actual application, the interaction module 201 may also obtain the first image in other ways, such as the interaction module 201 accesses the first image according to the URL or network address sent by the client 100, etc. This embodiment does not limit this.
[0057] S202: The interaction module 201 obtains first indication information provided by a user, where the first indication information is used to indicate a second language type and a protected area in a first image.
[0058] In this embodiment, the user can use the image processing device 200 to automatically replace the text included in a part of the first image with text in other languages. For example, when the user wants to generate a cross-regional promotional poster, the Chinese text in the first image can be automatically replaced with English text to generate a poster suitable for promotion in multiple countries where English is the native language.
[0059] In a possible implementation, the interaction module 201 may output an interaction interface to the client 100, and the client 100 presents the interaction interface to the user. Figure 3 Taking the interactive interface shown in FIG. 1 as an example, the user can specify the second language type on the interactive interface, that is, specify the language type (that is, the second language type) into which the text of the first language type included in the first image is translated. Figure 3 As shown, the interactive interface can present candidate items of multiple language types, such as Figure 3 Chinese, English, French, etc. are shown, so that the user can select the multiple candidate items to obtain the second language type specified by the user (that is, the candidate items of the language type selected by the user).
[0060] Furthermore, in addition to specifying the second language type on the interactive interface, the user can also perform content protection on a specified area in the first image on the interactive interface, that is, the user can specify not to replace the text in some areas of the first image, while the text of the first language type included in the remaining areas can be replaced by the second language type by default.
[0061] As a first implementation example, after the user selects the first image, the client 100 can present the first image on the interactive interface, so that the user can select the area for content protection on the first image presented on the interactive interface, which is referred to as the protection area below. In specific implementation, the user can perform a box selection operation on the presented first image, so that the client 100 can determine the protection area specified by the user through the box selection operation, and use the corresponding identifier of the area selected by the user to indicate the protection area. The identifier of the area selected by the user can be, for example, the coordinates of the upper left corner pixel and the coordinates of the lower right corner pixel of the area.
[0062] As a second implementation example, the user can input a label for specific content in the first image on the interactive interface, and the semantics of the label matches the semantics of the specific content in the first image, then the label can be used to indicate the specific content in the first image. For example, the label input by the user can be specifically "keyboard", so that the label can be used to indicate the image area of the first image whose image content is a keyboard, and the image area will be used as a protection area designated by the user to not perform text replacement processing. Among them, the label input by the user can be a piece of text, which is referred to as the first target text below for the sake of distinction and description, and the language type to which the first target text belongs can be the first language type, or it can be another language type.
[0063] As a third implementation example, when the user wishes to protect a specific text of the first language type in the first image, the user can enter the text on the interactive interface, or enter a portion of the text. For example, if the text that the user wishes to protect on the first image is "XXX chocolate, enjoy the silky smoothness", the user can enter the complete text on the interactive interface, or can enter a portion of the text, such as "chocolate" or "enjoy the silky smoothness", etc., so that the image area where the complete text matching the text entered by the user is located is the protection area designated by the user. For the sake of distinction and description, the text entered by the user is referred to as the second target text below.
[0064] It is worth noting that the above three implementation examples are only some exemplary explanations. In actual application, the client 100 can also obtain the first indication information in other ways, and the obtained first indication information can also be implemented in other ways. For ease of understanding, in this embodiment, the first indication information includes the identification of the second language type, the identification of the area selected by the user determined according to the user's operation, the first target text, and the second target text as an example for explanation. In other embodiments, in addition to the identification of the second language type, the first indication information may include the identification of the area selected by the user, the first target text, and part of the information in the second target text.
[0065] After acquiring the first indication information, the client 100 may send the first indication information to the interaction module 201 .
[0066] After acquiring the first image and the first indication information, the interaction module 201 may provide the first image and the first indication information to the determination module 202 .
[0067] S203: The determination module 202 determines a non-protected area in the first image according to the first indication information, where the non-protected area includes text in a first language type, and the determined non-protected area does not overlap with the protected area.
[0068] In this embodiment, the image processing device 200 first uses the determination module 202 to determine the area in the first image where text replacement is required.
[0069] As an implementation example, the determination module 202 can first identify the text on the first image, such as using optical character recognition (OCR) technology to identify the text, and obtain a first text set, which includes multiple texts in a first language type. In actual application, the first text set can also include other texts, such as continuous digital text, or independent international unit text, or text that combines numbers and international units, etc.
[0070] Then, the determination module 202 can filter the text in the first text set according to the first indication information to obtain a second text set, and the second text set does not include the text of the first language type in the first image. Specifically, the determination module 202 can determine the text 1 of the first language type in the protection area according to the identifier of the area selected by the user included in the first indication information, and remove the text 1 of the first language type from the first text set. In addition, the determination module 202 identifies the image area in the first image whose semantics of the image content matches the semantics of the first target text according to the first target text included in the first indication information, such as using an artificial intelligence (AI) model to determine the image area with semantic matching according to the first target text, and determines the text 2 of the first language type in the image area, and then the determination module 202 can continue to remove the text 2 from the first text set. In addition, the determination module 202 identifies the text 3 in the first image that matches the second target text according to the second target text included in the first indication information, and the text 3 can be accurately matched with the second target text, or the text 3 can be fuzzy matched with the second target text, so that the determination module 202 can continue to remove the text 3 from the first text set.
[0071] Furthermore, since the first image may also include continuous digital text, or independent international unit text, or text that is a combination of numbers and international units, etc., and the expressions of these texts in different language types are usually the same, the determination module 202 can further remove the continuous digital text, or independent international unit text, or text that is a combination of numbers and international units from the first text set to obtain a second text set. And, if the second text set also includes text 4 of the second language type, the image area of the text 4 on the first image may not need to be processed by text replacement, so the determination module 202 can continue to remove the text of the second language type from the first text set according to the identifier of the second language type included in the first indication information.
[0072] Next, the determination module 202 can determine the area of the first language type text in the second text set on the first image, so that the area can be determined as a non-protected area requiring text replacement, and the text included in the non-protected area is the first language type text that needs to be replaced.
[0073] In addition to the above implementation examples, in actual application, the determination module 202 may also determine the second image based on other methods. For example, when the first indication information includes an identifier of the second language type and an identifier of the area selected by the user, the determination module 202 may first remove the protection area indicated by the identifier in the first image according to the identifier of the area selected by the user to obtain an intermediate image, and then the determination module 202 recognizes the text in the intermediate image and determines the non-protection area that needs to be replaced with text based on the recognized text. This embodiment does not limit the implementation process of the determination module 202 determining the second image.
[0074] After determining the non-protected area in the first image, the determination module 202 may notify the processing module 203 of the non-protected area.
[0075] S204: In the first image, the processing module 203 replaces the first pixel set in the non-protected area with the second pixel set to obtain a second image, wherein the image content presented by the first pixel set includes a first text of a first language type, and the image content presented by the second pixel set includes a second text of a second language type.
[0076] In a first possible implementation, the processing module 203 may first erase the first text in the non-protected area, specifically, first determine the first pixel set corresponding to the first text in the non-protected area, and replace the first pixel set with a third pixel set, the image content presented by the third pixel set does not include the text of the second language type. For example, the processing module 203 may adjust the value of the first pixel set according to the value of the pixel point as the image background in the non-protected area, specifically, fill the value of the pixel point corresponding to the text in the image with the value of the pixel point around the text. Then, the processing module 203 may translate the first text of the first language type according to the identifier of the second language type, such as using natural language processing (NLP) technology to translate the first text, and obtain the second text of the second language type corresponding to the first text, and the semantics of the second text matches the semantics of the first text. Finally, the processing module 203 may replace the third pixel set with the second pixel set according to the second text, and the image content presented by the second pixel set includes the second text. In this way, the first text in the first image is replaced with the second text with the same semantics but different language type.
[0077] In a second possible implementation, the second text used to replace the first text can be provided by the user. In specific implementation, the user can provide the second text on the interactive interface provided by the client 100, and the client 100 sends the second text to the interactive module 201. The interactive module 201 can forward the second text provided by the user to the processing module 203, so that the processing module 203 can replace the first text in the non-protected area according to the second text provided by the user, and specifically, the first pixel set corresponding to the first text in the non-protected area can be determined first, and the first pixel set is replaced by a third pixel set, and the image content presented by the third pixel set does not include the text of the second language type; then, the processing module 203 can replace the third pixel set with a second pixel set according to the second text provided by the user, and the image content presented by the second pixel set includes the second text. In this way, the first text in the first image is replaced by a user-defined second text of a different language type. At this time, the semantics of the second text provided by the user can match the semantics of the first text, or the semantics of the second text can also not match the semantics of the first text, and this is not limited.
[0078] After the text in the non-protected area is replaced, a new image can be obtained, which is referred to as the second image in this embodiment. After generating the second image, the processing module 203 can return the second image to the interaction module 201 .
[0079] S205: The interaction module 201 outputs the newly generated second image.
[0080] Exemplarily, the interaction module 201 may output the newly generated second image to the client 100 so that the client 100 presents the second image to the user. Alternatively, the interaction module 201 may output the second image to a corresponding database so that the second image is stored in the database.
[0081] Furthermore, when the second text is obtained by translating the first text, the image processing device 200 can not only feed back the second image to the user through the client 100, but also feed back the second text to the user, such as feeding back the second text generated by translating the first text to the user, so that the user can determine whether the content of the second text currently translated meets the user's expectations. For example, when the second text translated by the image processing device 200 does not meet the user's expectations, the user can provide the image processing device 200 with an updated second text through the client 100, so that the image processing device 200 can use the updated second text to replace the text in the non-protected area in the first image / second image using the above implementation method.
[0082] It is worth noting that Figure 2 In the illustrated embodiment, the implementation method of replacing text of the first language type in a partial area of the first image with text of the second language type is mainly exemplified. When another partial area in the first image includes text of the third language type, and the user desires to replace the text of the third language type with text of the second language type, the image processing device 200 can refer to the above method to uniformly replace the text of different language types in multiple areas in the first image with text of the second language type. In actual application, the image processing device 200 can support the user to specify the language type of the replaced text, so that the image processing device 200 can replace the text of one or more language types specified by the user in the first image with text of the second language type.
[0083] In this embodiment, the image processing device 200 intelligently replaces the text included in a part of the area in the first image, and a second image that meets the user's expectations can be generated. Compared with the method of manually replacing the text content in the first image, this can effectively improve the efficiency of making new images and get rid of the limit on the number of new images that can be made within a unit of time. In addition, the image processing device 200 replaces the text in other areas outside the protection area specified by the user, thereby achieving differentiated processing of the content in the first image, meeting the needs for differentiated processing of images in actual application scenarios, and improving user experience. In addition, compared with manually replacing the text content in the image area, the accuracy of replacing the text included in the non-protected area by the image processing device 200 according to the first indication information provided by the user is usually higher, thereby ensuring the presentation effect of the new image finally generated.
[0084] In actual application, for each image to be processed, the user can use the image processing device 200 to quickly replace the text in a partial area of the image in the above manner. Alternatively, the user can also use the image processing device 200 to batch process multiple images. For example, for multiple images currently to be processed, the user can input unified indication information on the client 100, and the indication information includes an identification of the second language type and information (such as a label, etc.) for indicating the protection area on each image, so that the image processing device 200 can replace the text of the first language type in the partial area of the multiple images with the text of the second language type at the same time according to the indication information, thereby realizing batch processing of multiple images and further improving the efficiency of making multiple new images.
[0085] In this embodiment, the image processing device 200 can not only provide users with the service of replacing text in a partial area of the image, but also support users to erase text in a specified area of the image. The following is an example of the image processing device 200 erasing text on the third image.
[0086] In a possible implementation, the acquisition module 201 may acquire a third image and second indication information provided by a user through the client 100, wherein the third image includes text of the first language type, and the second indication information provided by the user is used to indicate a protected area in the third image, and the protected area is also an area designated for protection by the user. Then, the acquisition module 201 may provide the third image and the second indication information to the determination module 202. The determination module 202 determines a non-protected area in the third image based on the second indication information, and notifies the processing module 203 of the non-protected area, wherein the non-protected area includes text of the first language type, and the determined non-protected area does not overlap with the protected area. The processing module 203 may replace the fourth pixel set in the protected area with the fifth pixel set in the third image to obtain a fourth image, wherein the image content presented by the fourth pixel set includes text of the first language type, and the image content presented by the fifth pixel set does not include text of the first language type, thereby erasing the text in the third image. Finally, the processing module 203 may provide the generated fourth image to the interaction module 201 , so that the interaction module 201 outputs the fourth image to the client 100 , so that the client 100 presents the fourth image to the user.
[0087] The specific implementation process of the image processing device 200 erasing the text included in the protection area in the third image can be found in Figure 2 The description of the replacement of the text included in the protected area in the first image with the second text in the illustrated embodiment is not repeated here. It should be noted that, in the process of erasing the text of the first language type in the third image, the image processing device 200 can recognize continuous digital text, or independent international unit text, or text of a combination of numbers and international units in the third image, and the image processing device 200 may not need to erase this part of the text.
[0088] In addition, when the third image contains texts of multiple languages, such as texts of the third language, the image processing apparatus 200 may refer to the above method and erase the texts of the first language and the third language in the third image at the same time.
[0089] In actual application scenarios, the interactive interface presented by the client 100 to the user may also include a "write back" candidate, which is used to indicate whether to replace the erased text of the first language type in the image with new text. In this way, when the user selects the "write back" candidate on the interactive interface and specifies the second language type, the image processing device 200 can translate the text of the first language type in the area of the image that is not specified by the user for protection into text of the second language type, and replace the text of the first language type in the area with the text of the second language type. When the user does not select the "write back" candidate on the interactive interface, the image processing device 200 can simply erase the text of the first language type in the area of the image that is not specified by the user for protection, without performing the text replacement process.
[0090] As an implementation example, the image processing device 200 provides an application programming interface (API) to the outside, so that the client 100 can call the API interface according to the operation performed by the user on the interactive interface to request the image processing device 200 to replace the text of the image or erase the text. Specifically, when the user selects the "write back" candidate on the interactive interface and specifies the second language type, the parameters passed by the client 100 when calling the API may include image data, the identifier of the area designated for protection on the image, the identifier of the second language type, and the write back identifier, so that the image processing device 200 can replace the text of the first language type in the area of the image that is not designated for protection by the user with the text of the second language type according to these parameters. When the user does not select the "write back" candidate on the interactive interface, the parameters passed by the client 100 when calling the API may include image data, the identifier of the area designated for protection on the image, and the identifier of not writing back, so that the image processing device 200 can erase the text of the first language type in the area of the image that is not designated for protection by the user according to these parameters.
[0091] In actual application, when the image processing device 200 is deployed in the cloud, multiple service layers can be defined in the image processing device 200, and the functions of the multiple service layers can realize the replacement or erasure of text in the image. For example, a text recognition layer, a rule layer, an erasure translation layer, a write-back layer and a result layer can be defined in the image processing device 200. Among them, the text recognition layer can be used to provide a service for recognizing text in an image; the rule layer can be used to provide a service for filtering text in a recognized text set, such as filtering the text of the first language type in the user-specified protection area in the text set, filtering separate international unit texts, continuous digital texts, and texts in the area indicated by the label; the erasure translation layer is used to provide a service for erasing text in a part of the area in the image, and providing a service for translating text of one language type into text of another language type; the write-back layer is used to provide a service for adding new text in the erased image area; the result layer is used to provide a service for returning a newly generated image after erasure or text replacement processing.
[0092] Above Figures 1 to 3 In the illustrated embodiment, the image processing apparatus 200 may be software configured on a computing device or a computing device cluster, and by running the software on the computing device or the computing device cluster, the computing device or the computing device cluster may implement the functions of the above-mentioned image processing apparatus 200. The image processing apparatus 200 is described in detail below from the perspective of hardware device implementation.
[0093] Figure 4 The schematic diagram of the structure of a computing device is shown. The image processing apparatus 200 can be deployed on the computing device. The computing device can be a computing device in a cloud environment (such as a server) or a computing device in an edge environment. Specifically, it can be used to implement the above Figure 2 The functions of the image processing apparatus 200 in the illustrated embodiment.
[0094] like Figure 4 As shown, computing device 400 includes processor 410, memory 420, communication interface 430 and bus 440. Processor 410, memory 420 and communication interface 430 communicate through bus 440. Bus 440 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4The communication interface 430 is used for communicating with the outside, for example, acquiring a first image, outputting a second image, etc.
[0095] The processor 410 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits. The processor 410 may also be an integrated circuit chip having the ability to process signals. In the implementation process, the functions of each device in the image processing device 200 may be completed by the hardware integrated logic circuit or software instructions in the processor 410. The processor 410 may also be a general processor, a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and may implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor may be a microprocessor or the processor may also be any conventional processor, etc. The method disclosed in the embodiments of the present application may be directly embodied as a hardware decoding processor for execution, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 420 , and the processor 410 reads the information in the memory 420 and completes part or all of the functions of the image processing device 200 in combination with its hardware.
[0096] The memory 420 may include a volatile memory, such as a random access memory (RAM), or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a HDD, or a SSD.
[0097] The memory 420 stores executable codes, and the processor 410 executes the executable codes to execute the method executed by the aforementioned image processing apparatus 200 .
[0098] Specifically, in implementing Figure 2In the case of the embodiment shown, and Figure 2 In the case where the image processing device 200 described in the illustrated embodiment is implemented by software, the execution Figure 2 The software or program code required for the functions of the image processing device 200 is stored in the memory 420. The interaction between the image processing device 200 and other devices is realized through the communication interface 430. The processor is used to execute the instructions in the memory 420 to implement the method executed by the image processing device 200.
[0099] Figure 5 A schematic diagram of the structure of a computing device cluster is shown. Figure 5 The computing device cluster 50 shown includes multiple computing devices, and the image processing apparatus 200 can be deployed on multiple computing devices in the computing device cluster 50 in a distributed manner. Figure 5 As shown, the computing device cluster 50 includes multiple computing devices 500 , each computing device 500 includes a memory 520 , a processor 510 , a communication interface 530 and a bus 540 , wherein the memory 520 , the processor 510 , and the communication interface 530 are communicatively connected to each other via the bus 540 .
[0100] The processor 510 may be a CPU, a GPU, an ASIC, or one or more integrated circuits. The processor 510 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, some functions of the image processing device 200 may be completed by hardware integrated logic circuits or software instructions in the processor 510. The processor 510 may also be a DSP, an FPGA, a general processor, other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and may implement or execute some methods, steps, and logic block diagrams disclosed in the embodiments of the present application. Among them, the general processor may be a microprocessor or the processor may also be any conventional processor, etc., and the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 520. In each computing device 500, the processor 510 reads the information in the memory 520, and in combination with its hardware, some functions of the image processing device 200 may be completed.
[0101] The memory 520 may include ROM, RAM, static storage device, dynamic storage device, hard disk (e.g., SSD, HDD), etc. The memory 520 may store program codes, for example, part or all of the program codes for implementing the interaction module 201, part or all of the program codes for implementing the determination module 202, part or all of the program codes for implementing the processing module 203, etc. For each computing device 500, when the program codes stored in the memory 520 are executed by the processor 510, the processor 510 executes part of the method executed by the image processing apparatus 200 based on the communication interface 530. The memory 520 may also store data, for example: intermediate data or result data generated by the processor 510 during the execution process, for example, the first indication information, the second pixel set, the second image, etc.
[0102] The communication interface 503 in each computing device 500 is used for external communication, such as interacting with other computing devices 500 .
[0103] The bus 540 may be a peripheral component interconnect standard bus or an extended industry standard architecture bus. For ease of representation, Figure 5 The bus 540 in each computing device 500 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
[0104] The plurality of computing devices 500 establish communication paths through a communication network to implement the functions of the image processing apparatus 200. Any computing device may be a computing device (eg, a server) in a cloud environment, or a computing device in an edge environment.
[0105] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on one or more computing devices, the one or more computing devices execute the method executed by the image processing apparatus 200 of the above embodiment.
[0106] In addition, the embodiment of the present application further provides a computer program product, and when the computer program product is executed by one or more computing devices, the one or more computing devices execute any of the aforementioned image processing methods. The computer program product may be a software installation package, and when any of the aforementioned image processing methods is required, the computer program product may be downloaded and executed on a computer.
[0107] It should also be noted that the system embodiments described above are merely schematic, wherein the devices described as separate components may or may not be physically separated, and the components displayed as devices may or may not be physical devices, that is, they may be located in one place, or they may be distributed on multiple network devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiments provided by the present application, the connection relationship between the devices indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0108] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0109] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0110] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. An image processing method, characterized in that: The method comprises: Acquire a first image, wherein the first image includes text of a first language type; Acquire first indication information provided by a user, where the first indication information is used to indicate a second language type and a protection area in the first image; Determine, according to the first indication information, a non-protected area in the first image, where the non-protected area includes text in the first language type, and the non-protected area does not overlap with the protected area; In the first image, a first pixel set in the non-protected area is replaced with a second pixel set to obtain a second image, wherein the image content presented by the first pixel set includes a first text in the first language type, and the image content presented by the second pixel set includes a second text in the second language type; The second image is output.
2. The method according to claim 1, characterized in that The first indication information includes an identifier of the second language type and an identifier of an area selected by a user, and the identifier of the area selected by the user is used to indicate the protection area in the first image.
3. The method according to claim 1, characterized in that The first indication information includes an identifier of the second language type and a target text; The target text matches the text of the first language type included in the protection area, or the semantics of the target text matches the semantics of the image content corresponding to the protection area.
4. The method according to any one of claims 1 to 3, characterized in that: The semantics of the first text in the first language type matches the semantics of the second text in the second language type.
5. The method according to claim 4, characterized in that The replacing the first pixel set in the non-protected area with the second pixel set comprises: replacing the first pixel set in the unprotected area with a third pixel set, wherein the image content presented by the third pixel set does not include text of the first language type; Translating a first text in the first language type to obtain a second text in the second language type; According to the second text in the second language type, the third set of pixels is replaced with the second set of pixels.
6. The method according to any one of claims 1 to 3, characterized in that: The semantics of the first text of the first language type do not match the semantics of the second text of the second language type, and the method further includes: A second text in the second language type provided by the user is obtained.
7. The method according to any one of claims 1 to 6, characterized in that: The determining, according to the first indication information, a non-protected area in the first image includes: identifying a first text set in the first image, the first text set comprising a plurality of texts in the first language type; filtering the texts in the text set according to the first indication information to obtain a second text set, wherein the second text set does not include the texts of the first language type in the protected area; According to the second text set, a non-protected area in the first image is determined, where the non-protected area includes text in the second text set.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: acquiring a third image, the third image comprising text of a first language type; Acquire second indication information provided by a user, where the second indication information is used to indicate a protection area in the third image; determining, according to the second indication information, a non-protected area in the third image, where the non-protected area in the third image includes text of the first language type, and where the non-protected area in the third image does not overlap with the protected area in the third image; In the third image, a fourth pixel set in a non-protected area of the third image is replaced with a fifth pixel set to obtain a fourth image, wherein the image content presented by the fourth pixel set includes text of the first language type, and the image content presented by the fifth pixel set does not include text of the first language type; The fourth image is output.
9. An image processing device, characterized in that: The device comprises: An interactive module is used to obtain a first image, the first image including text of a first language type; obtain first indication information provided by a user, the first indication information is used to indicate a second language type and a protected area in the first image; a determination module, configured to determine, according to the first indication information, a non-protected area in the first image, wherein the non-protected area includes text in the first language type, and the non-protected area does not overlap with the protected area; a processing module, configured to replace, in the first image, a first pixel set in the non-protected area with a second pixel set to obtain a second image, wherein the image content presented by the first pixel set includes a first text in the first language type, and the image content presented by the second pixel set includes a second text in the second language type; The interaction module is further used to output the second image.
10. The device according to claim 9, characterized in that The first indication information includes an identifier of the second language type and an identifier of an area selected by a user, and the identifier of the area selected by the user is used to indicate the protection area in the first image.
11. The device according to claim 9, characterized in that The first indication information includes an identifier of the second language type and a target text; The target text matches the text of the first language type included in the protection area, or the semantics of the target text matches the semantics of the image content corresponding to the protection area.
12. The device according to any one of claims 9 to 11, characterized in that The semantics of the first text in the first language type matches the semantics of the second text in the second language type.
13. The device according to claim 12, characterized in that The processing module is used to: replacing the first pixel set in the unprotected area with a third pixel set, wherein the image content presented by the third pixel set does not include text of the first language type; Translating a first text in the first language type to obtain a second text in the second language type; According to the second text in the second language type, the third set of pixels is replaced with the second set of pixels.
14. The device according to any one of claims 9 to 11, characterized in that The semantics of the first text in the first language type do not match the semantics of the second text in the second language type; The interaction module is further configured to obtain a second text in the second language type provided by a user.
15. The device according to any one of claims 9 to 14, characterized in that The determining module is used to: identifying a first text set in the first image, the first text set comprising a plurality of texts in the first language type; filtering the texts in the text set according to the first indication information to obtain a second text set, wherein the second text set does not include the texts of the first language type in the protected area; According to the second text set, a non-protected area in the first image is determined, where the non-protected area includes text in the second text set.
16. The device according to any one of claims 9 to 15, characterized in that The interaction module is further used to obtain a third image, the third image including text of the first language type; obtain second indication information provided by a user, the second indication information being used to indicate a protection area in the third image; The determining module is further configured to determine, according to the second indication information, a non-protected area in the third image, wherein the non-protected area in the third image includes text of the first language type, and the non-protected area in the third image does not overlap with the protected area in the third image; The processing module is further configured to replace, in the third image, a fourth pixel set in a non-protected area of the third image with a fifth pixel set to obtain a fourth image, wherein the image content presented by the fourth pixel set includes text of the first language type, and the image content presented by the fifth pixel set does not include text of the first language type; The interaction module is further configured to output the fourth image.
17. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the computing device cluster executes the method according to any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on at least one computing device, enable the at least one computing device to perform the method according to any one of claims 1 to 8.