Line draft graph coloring processing method and device, computer equipment and storage medium
In the coloring process of the online draft drawing, the first color is filled with the target area and the pre-configured second color is filled with the adjacent neighbor area, which solves the problem of low coloring processing efficiency in the prior art and realizes a more efficient coloring operation.
Patent Information
- Application Number
- CN202510245844.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, the coloring process of line drawings is complicated, resulting in low coloring processing efficiency.
By obtaining the line drawing, in response to the coloring operation for the target area in the line drawing, the target area is filled with a specified first color, and the edge color line of the target area is displayed, at least one neighbor area adjacent to the target area through the edge color line is determined from the line drawing. A preconfigured color group is obtained, including a second color corresponding to the first color preconfigured for the edge color line, and a second color is filled in at least one neighbor area.
The coloring processing operation is simplified, and the area targeted by a single coloring operation is added, thereby improving the processing efficiency of line drawing coloring.
Smart Images

Figure CN120219563A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and particularly to a method and apparatus for coloring line drawings, a computer device, a storage medium, and a computer program product. Background Art
[0002] In the fields of digital art creation, animation production, or game design, the coloring process of line drawings such as hand-drawn sketches and comic line drawings is a key link in the creation of works. By converting the line drawings in the line drawings into color images with rich visual information, the visual effects of the works can be significantly improved. However, in the current methods for coloring each area in a line drawing, the coloring process is cumbersome, resulting in low efficiency in coloring the line drawing. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a method and apparatus for coloring line drawings, a computer device, a computer-readable storage medium, and a computer program product that can improve the coloring efficiency.
[0004] In a first aspect, this application provides a method for coloring a line drawing. The method includes:
[0005] Obtain a line drawing, and in response to a coloring operation on a target area in the line drawing, fill the target area with a first color specified by the coloring operation;
[0006] Display the edge color line of the target area, and determine at least one neighboring area adjacent to the target area through the edge color line from the line drawing;
[0007] Obtain a color group pre-configured for the line drawing, where the color group includes a second color corresponding to the first color pre-configured for the edge color line;
[0008] Fill the second color in at least one neighboring area.
[0009] In a second aspect, this application also provides an apparatus for coloring a line drawing. The apparatus includes:
[0010] A target area coloring module, configured to obtain a line drawing, and in response to a coloring operation on a target area in the line drawing, fill the target area with a first color specified by the coloring operation;
[0011] A neighboring area determination module, configured to display the edge color line of the target area, and determine at least one neighboring area adjacent to the target area through the edge color line from the line drawing;
[0012] A color group obtaining module, configured to obtain a color group pre-configured for the line drawing, where the color group includes a second color corresponding to the first color pre-configured for the edge color line;
[0013] A neighboring area coloring module for filling a second color in at least one neighboring area.
[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above line drawing coloring processing method are implemented.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the above line drawing coloring processing method are implemented.
[0016] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the above line drawing coloring processing method are implemented.
[0017] The above line drawing coloring processing method, device, computer device, storage medium, and computer program product respond to a coloring operation for a target area in a line drawing, fill the target area with the first color specified by the coloring operation, determine at least one neighboring area adjacent to the target area through an edge color line from the line drawing, and fill a second color corresponding to the first color pre-configured for the edge color line in the at least one neighboring area. During the coloring process of the line drawing, at least one neighboring area adjacent to the target area is determined from the line drawing. Based on the coloring operation for the target area, in addition to filling the first color for the target area, the second color can also be filled for at least one neighboring area at the same time, increasing the area colored by a single coloring operation, simplifying the coloring process for the line drawing, and thus improving the processing efficiency of line drawing coloring. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is an application environment diagram of the line drawing coloring processing method in an embodiment;
[0020] Figure 2 It is a flowchart of the line drawing coloring processing method in an embodiment;
[0021] Figure 3Schematic diagram of the interface of the edge color line in the line drawing in one embodiment;
[0022] Figure 4 Schematic diagram of the interface of the color group in another embodiment;
[0023] Figure 5 Schematic diagram of the process of configuring colors in one embodiment;
[0024] Figure 6 Schematic diagram of the interface for importing a line drawing for coloring processing in one embodiment;
[0025] Figure 7 Schematic diagram of the interface of the corresponding relationship between the color group and the area in the line drawing in one embodiment;
[0026] Figure 8 Schematic diagram of the interface for coloring the line drawing in one embodiment;
[0027] Figure 9 Schematic diagram of the interface without using the color group for coloring in one embodiment;
[0028] Figure 10 Schematic diagram of the process of the line drawing coloring processing method in yet another embodiment;
[0029] Figure 11 Schematic diagram of the process of the line drawing coloring processing method in yet another embodiment;
[0030] Figure 12 Block diagram of the structure of the line drawing coloring processing device in one embodiment;
[0031] Figure 13 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners
[0032] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0033] The line drawing coloring processing method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, placed in the cloud or on other servers.
[0034] The terminal 102 can obtain a line drawing that needs to be colored from the server 104. The line drawing can be uploaded to the server 104 by a drawing staff through the held terminal, and then forwarded by the server 104 to the terminal 102. The user can trigger a coloring operation on the line drawing at the terminal 102. The terminal 102 can, in response to the user's coloring operation on the target area in the line drawing, fill the target area with the first color specified by the coloring operation. The terminal 102 can determine at least one neighboring area adjacent to the target area through an edge color line from the line drawing, and fill the at least one neighboring area with a second color corresponding to the first color pre-configured for the edge color line. Specifically, as shown in the interface schematic diagram of the terminal 102, the user can trigger a coloring operation on area A in the line drawing, that is, area A is used as the target area, and the terminal 102 can fill area A with color ① specified by the coloring operation; the terminal 102 can identify the edge color line of area A, and determine at least one neighboring area adjacent to area A through the edge color line from the line drawing, including area B, area C, and area D. The terminal can fill area B, area C, and area D with color ② corresponding to color ① pre-configured for the edge color line in the color group, that is, area B, area C, and area D are respectively filled with color ②, so that through a single coloring operation on area A, the coloring process for a total of four areas, namely area A, area B, area C, and area D, is realized. In addition, although area E is adjacent to area A, the line segment where area E is adjacent to area A does not belong to the edge color line, so area E is not filled with color.
[0035] Among them, the terminal 102 can be but is not limited to various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0036] In some exemplary embodiments, as Figure 2 shown, a method for coloring a line drawing is provided. This method is executed by a computer device, and can be specifically executed by a computer device such as a terminal or a server alone, or jointly executed by a terminal and a server. In the embodiments of the present application, taking this method applied to Figure 1 the terminal as an example for description, it includes the following steps 202 to step 208. Among them:
[0037] Step 202, obtain a line drawing, and in response to a coloring operation on a target area in the line drawing, fill the target area with the first color specified by the coloring operation.
[0038] Among them, a line drawing is a sketch drawn by using lines to represent the shape, structure, and texture of an object. A line drawing is also called a line sketch, a sketch, or a hand-drawn draft. A line drawing can outline the contour and internal structure of a thing with concise and clear lines, showing the basic form of the drawing object. Each line in the line drawing can enclose to form various different regions, and each different region belongs to a blank region, and colors need to be filled in to achieve the coloring process for the line drawing, and a colored drawing with added colors can be obtained. Because the shapes, structures, or textures of the objects represented by the lines in the line drawing are different, the various regions enclosed by each line may need to be filled with different colors. The target region is the region targeted for the current coloring process in the line drawing, and the coloring operation is an interactive operation triggered by the user for the target region to fill the required color. In some embodiments, the coloring operation may include, but is not limited to, at least one of various interactive operations such as clicking, double-clicking, long-pressing, swiping, or dragging. The first color is the color filled for the target region, and the color type to which the first color belongs can be specified by the coloring operation, that is, the user can specify the color type to be filled for the target region through the coloring operation.
[0039] Exemplarily, the terminal can obtain a line drawing. For example, the user can directly draw a line drawing based on the terminal with lines. Another example is that the terminal can obtain a line drawing from the server, and the line drawing in the server can be uploaded by the drawing user through the terminal held by the user after completing the line drawing. In some embodiments, the terminal can display the obtained line drawing for the user to perform the coloring process on the displayed line drawing. For example, the user can trigger a coloring operation for the region in the displayed line drawing. Exemplarily, the user can determine the target region for the current coloring process from the line drawing and trigger a coloring operation for the target region. For example, the user can perform a click or double-click operation on the target region.
[0040] In some embodiments, the terminal can perform the coloring process on the line drawing through a coloring tool. The user can use the coloring tool. For example, the user can perform a click or double-click operation on the target region in the line drawing through the color filling tool in the coloring application to fill the target region with the first color. In some embodiments, the terminal can perform the coloring process on the line drawing through a coloring application. Specifically, the user can perform coloring on the line drawing through various coloring tools in the coloring application. For example, the user can select the color filling tool from the coloring application and configure the color type to be filled currently. The user can trigger a coloring operation for the target region through the color filling tool. For example, the user can click on the target region through the color filling tool, and the terminal can fill the target region with the corresponding type of the first color through the color filling tool in the coloring application.
[0041] Step 204: Display the edge color lines of the target area, and determine at least one neighbor area adjacent to the target area from the line drawing through the edge color lines.
[0042] Among them, the edge color line is the color line located at the edge position of the target area, that is, the edge color line is the line belonging to the color line among the lines that enclose the target area. The color line is the line with color familiarity used in the line drawing. These lines can be used to represent the light and shadow effects, layering and details of the picture in addition to defining the outline of the object in the line drawing. The color lines in the line drawing can be used as a reference for coloring the line drawing. During the painting process, the original painter can use lines of various colors such as red, blue, and yellow to mark different coloring areas, so that it is clearer to know what color should be used for each part when coloring the line drawing.
[0043] As Figure 3 shown, in the line drawing Figure X , the four lines that enclose area A can respectively include line 1, line 2, line 3, and line 4. If these four lines are all color lines, the colors to be filled in the adjacent areas B, C, D, and E of area A can be identified through these four lines respectively. For example, the line 1 between area A and area B can be blue, indicating that the color to be filled in area B is color 1; the line 2 between area A and area C and the line 3 between area A and area D can be red, indicating that the colors to be filled in areas C and D are color 2; the line 4 between area A and area E can be purple, indicating that the color to be filled in area E is color 3. In some embodiments, the distribution and quantity of color lines in the line drawing can be configured according to actual drawing needs, such as the original painter can configure the distribution and quantity of color lines when drawing the line drawing.
[0044] The neighbor area is the area adjacent to the target area in the line drawing, and the neighbor area is adjacent to the target area through the edge color line of the target area. The edge color line of the target area can include at least one. For each color line, the target area can be adjacent to one or more neighbor areas through each color line. As Figure 3 shown, area A can be the target area, and the lines that enclose area A respectively include line 1, line 2, line 3, and line 4. If the edge color lines of area A include line 1 and line 2, that is, line 1 and line 2 among line 1, line 2, line 3, and line 4 are the edge color lines, it can be determined that in the line drawing Figure X , the neighbor areas of area A include area B adjacent through line 1 and area C adjacent through line 2.
[0045] Optionally, the terminal can display the edge color lines of the target area. For example, the terminal can identify the edge lines of the target area and determine whether the edge lines are edge color lines. For example, the terminal can determine the color of the edge lines of the target area. When the color of the edge lines belongs to the color of the color lines, the corresponding edge lines can be determined as edge color lines. Among them, the color belonging to the color lines can be pre-configured according to actual needs. For example, yellow, red, and blue can be configured as the colors belonging to the color lines. That is, when the color of a certain line is yellow, red, or blue, it can be determined that the line belongs to the color lines. In some embodiments, the terminal can detect the edge lines of the target area through various detection methods such as four-connectivity and eight-connectivity, and identify the colors of the edge lines, so as to determine the edge color lines from the edge lines. The terminal can determine the distribution positions of the edge color lines of the target area in the line drawing, and determine the neighbor areas adjacent to the target area through the edge color lines from the line drawing according to the distribution positions of the edge color lines. The neighbor areas can include at least one.
[0046] In some embodiments, the terminal can determine each area adjacent to the target area from the line drawing, that is, there is at least one common edge line between each area and the target area. The terminal can determine, from each area, the neighbor area whose common edge line with the target area belongs to the edge color line. For example Figure 3 As shown, when the target area is area A, the terminal can determine that the areas having at least one common edge line with area A include area B, area C, area D, and area E. Among them, the common edge line between area B and area A is line 1, the common edge line between area C and area A is line 2, the common edge line between area D and area A is line 3, and the common edge line between area E and area A is line 4. After identifying the edge color lines of the target area, such as the edge color lines being line 2 and line 4, the terminal can determine, from area B, area C, area D, and area E, that area C and area E are the neighbor areas adjacent to the target area through the edge color lines. Specifically, area C and area A share line 2, and line 2 is the edge color line, so area C and area A are adjacent through line 2.
[0047] In some embodiments, the terminal can pre-identify the common relationship of the edge lines between each area in the line drawing and establish a common relationship table of the edge lines between each area. The common relationship table of the edge lines can record the edge lines shared between different areas in the line drawing. After identifying the edge color lines of the target area, the terminal can query based on the edge color lines in the common relationship table of the edge lines to determine the areas sharing the edge color lines with the target area, and determine the areas sharing the edge color lines with the target area as neighbor areas.
[0048] Step 206: Obtain the color group pre-configured for the line drawing. The color group includes a second color corresponding to the first color pre-configured for the edge color line.
[0049] Among them, the color group is pre-configured for the line drawing, and can be specifically obtained according to the color specification information of the line drawing. The color specification information is the information obtained based on the color specification settings. Color specification, also known as color setting, is used to determine, select, and specify the colors used in the finished work. The color specification process includes specifying colors for each element to ensure the consistency and accuracy of colors throughout the finished work, especially for the color design of characters. The work content of color specification not only includes specifying the basic colors, but also involves specifying shadows, hierarchical colors, and the paint numbers used. The color specification information of the line drawing can be set by the original artist of the line drawing according to the drawing needs. The color group includes a second color corresponding to the first color pre-configured for the edge color line. The color group includes different types of colors pre-configured for the edge color line. The first color is used to fill the target area, and the second color is used to fill the neighbor area corresponding to the target area. For the same target area, different color groups can be configured for different edge color lines, so that different types of second colors can be configured for different neighbor areas.
[0050] Exemplarily, the terminal can obtain the color group pre-configured for the line drawing. The color group includes a second color corresponding to the first color pre-configured for the edge color line. In some embodiments, the color group can be pre-configured by the user for the line drawing. For example, the user can configure the corresponding color group for the line drawing according to the color specification information of the line drawing. Optionally, the color group can include one or more. Each color group can configure the corresponding first color and second color for the edge color lines of one or more target areas. In some embodiments, in each color group, a second color corresponding to the first color can be configured for one or more edge color lines.
[0051] In some embodiments, as Figure 4 shown, multiple color groups can be displayed on the color configuration page for the line drawing. Each color group can set the first color 401 for filling the target area and the second color 402 for filling the neighbor area. In each color group, different second colors can be configured for different color lines respectively. For example, in color group 2, different second colors can be configured for color line 1, color line 2, and color line 3 respectively, so that different neighbor areas adjacent to different edge color lines can be filled with different types of second colors respectively, realizing the coloring process for different neighbor areas adjacent to different edge color lines in a single coloring operation.
[0052] Step 208: Fill the second color in at least one neighbor area.
[0053] Optionally, for a determined neighbor region, the terminal can fill the second color corresponding to the first color pre-configured for the green line in the color group. In some embodiments, the terminal can perform color filling on the neighbor region through a color filling tool, specifically, the terminal can fill the second color in the neighbor region through the color filling tool. In some embodiments, as Figure 3 shown, in the line drawing Figure X , when the target region is region C, after the user triggers a coloring operation for region C, the terminal fills the first color specified by the coloring operation for region C, such as filling color 1. When it is determined that the edge color line of region C is line 2, it can be determined that the neighbor region of region C includes region A. Then the terminal can fill the second color corresponding to the first color pre-configured for line 2 in region A. For example, the second color can be color 2. Then the terminal can fill color 2 in region A, so that through a single coloring operation for region C, synchronous coloring of two regions, namely region C and region A, is achieved.
[0054] In some embodiments, as Figure 3 shown, in the line drawing Figure X , when the target region is region A, after the user triggers a coloring operation for region A, the terminal fills the first color specified by the coloring operation for region A, such as filling color 3. When it is determined that the edge color lines of region A are line 2 and line 4, it can be determined that the neighbor regions of region A include region C and region E. The terminal can obtain the color group pre-configured for the line drawing Figure X . The color group includes the second colors corresponding to color 3 pre-configured for line 2 and line 4. For example, if the color types of line 2 and line 4 are the same, the second colors corresponding to color 3 pre-configured for line 2 and line 4 are also the same. For example, the second color can be color 4. Then the terminal can fill color 4 in region C and region E. Another example is that if the color types of line 2 and line 4 are different, the second colors corresponding to color 3 pre-configured for line 2 and line 4 are also different. For example, the second color corresponding to color 3 pre-configured for line 2 can be color 5, and the second color corresponding to color 3 pre-configured for line 3 can be color 6. Then the terminal can fill color 5 in region C and fill color 6 in region E.
[0055] In the above method for coloring a line drawing, in response to a coloring operation on a target area in the line drawing, the first color specified by the coloring operation is filled in the target area, at least one neighbor area adjacent to the target area through an edge color line is determined from the line drawing, and the second color corresponding to the first color pre-configured for the edge color line is filled in at least one neighbor area. During the coloring process of the line drawing, at least one neighbor area adjacent to the target area through an edge color line is determined from the line drawing. Based on the coloring operation on the target area, in addition to filling the first color in the target area, the second color can also be filled in at least one neighbor area at the same time, increasing the area to be colored in a single coloring operation and simplifying the coloring process of the line drawing, thereby improving the processing efficiency of coloring the line drawing.
[0056] In some exemplary embodiments, filling the second color in at least one neighbor area includes: obtaining the status information of the color group; and filling the second color in at least one neighbor area when the status information indicates that the color group is in an effective state and the second color pre-configured for the edge color line in the color group is in an enabled state.
[0057] Among them, the status information is used to describe the status of the color group. For example, it can describe whether the color group is valid, and can also describe whether the second color pre-configured for the edge color line in the color group is valid. The status of the color group can be configured by the user for the color group. For example, the terminal can display the color group for the line drawing, and the user can configure the displayed color group to update the status of the color group. The status information can be extracted from the attribute information of the color group. For example, the terminal can obtain the attribute information corresponding to the color group according to the identification information of the color group. The attribute information can include at least one of various information such as the identification information of the color group, the status information, the time limit information, and the permission information. Among them, the identification information is used to distinguish different color groups, the status information is used to describe whether the color group is valid or whether the colors and color correspondence relationships included in the color group are valid, the time limit information is used to describe the effective time range of the color group, and the permission information can be used to describe the permission control information for the color group, such as it can include various permission control information such as the update right item information, the deletion permission information, and the use right item information for the color group.
[0058] Exemplarily, the terminal can obtain the status information of the color group. For example, the terminal can determine the identification information of the color group, such as the name of the color group. The terminal can query the corresponding attribute information based on the color group identifier, and the terminal can extract the status information from the attribute information of the color group. Among them, the attribute information of the color group can be configured by an account with configuration permissions for the color group. In some embodiments, the terminal can display the color group for the line drawing, and the terminal can also directly obtain the status information of the color group based on the displayed color group. For example, the color group displayed by the terminal can include a status marker, and the terminal can determine the status information of the color group by recognizing the status marker. For example, if the status marker in the color group displayed by the terminal is marked as valid, the terminal can determine that the status information of the color group indicates that the color group is in an effective state.
[0059] The terminal can parse the status information of the color group to determine whether the color group is in an effective state and whether the second color pre-configured for the edge color line in the color group is in an enabled state. When the status information indicates that the color group is in an effective state and the second color pre-configured for the edge color line in the color group is in an enabled state, it indicates that the color group as a whole is in an effective state and the second color pre-configured for the edge color line in the color group has been turned on. The terminal can fill at least one neighboring area with the second color, such as the terminal can fill the second color in at least one neighboring area through a color filling tool.
[0060] In some embodiments, the status information can also be only used to indicate whether the color group is in an effective state, or only used to indicate whether the second color pre-configured for the edge color line in the color group is in an enabled state. Then, when the terminal determines that the status information indicates that the color group is in an effective state or when the terminal determines that the status information indicates that the second color pre-configured for the edge color line in the color group is in an enabled state, the terminal can fill the second color into at least one neighboring area.
[0061] In an exemplary embodiment, when the status information of the color group indicates that the color group is in an effective state and the second color pre-configured for the edge color line in the color group is in an enabled state, the terminal can trigger filling the second color in the neighboring area, thereby supporting flexible control of the filling of the second color according to the effective state of the color group and the enabled state of the second color, which is beneficial to improving the coloring processing efficiency of the line drawing.
[0062] In some exemplary embodiments, the method for coloring the line drawing further includes: when the status information indicates that the color group is not in an effective state, updating the color of the edge color line to the first color.
[0063] Among them, the status information indicates that the color group is not in an effective state, that is, the color group is not effective. Then, the terminal may not fill the neighbor area according to the color group. Exemplarily, when it is determined that the status information indicates that the color group is not in an effective state, it indicates that the user sets the color group to be ineffective, that is, there is no need to color the neighbor area according to the color group. Then, after the terminal fills the first color specified for the target area filling operation, the color of the edge color line can be synchronously updated to the first color, so that the first color filling the target area can engulf the edge color line. In some embodiments, during the process of the user coloring the line drawing, the user can flexibly update and configure the color group of the line drawing, such as flexibly configuring the effective state of the color group. Thus, when the color group is in an effective state, the terminal is triggered to fill the second color corresponding to the first color pre-configured for the edge color line in the color group into the neighbor area. When the color group is not in an effective state, the terminal only fills the first color for the target area and engulfs the edge color line with the first color.
[0064] In some embodiments, the terminal can obtain a line drawing. In response to the user's coloring operation on the target area in the line drawing, the terminal can obtain the status information of the color group pre-configured for the line drawing. When the status information indicates that the color group is not in an effective state, the terminal can fill the first color for the target area and update the edge color line recognized for the target area to the first color. The terminal does not need to determine the neighbor area anymore and does not color the neighbor area anymore.
[0065] In an exemplary embodiment, when the status information indicates that the color group is not in an effective state, the terminal directly updates the color of the edge color line to the first color, supports updating the color only for the edge color line when the color group is ineffective, can flexibly control the color filling for the neighbor area, and is beneficial to improving the coloring processing efficiency of the line drawing.
[0066] In some exemplary embodiments, the line drawing coloring processing method further includes: when the status information indicates that the second color pre-configured for the edge color line in the color group is not in an enabled state, updating the color of the edge color line to the first color.
[0067] Among them, the status information indicates that the second color pre-configured for the edge color line in the color group is not in the enabled state. The color group may take effect, but the second color pre-configured for the edge color line in the color group does not take effect. Then the terminal may not fill the neighbor area according to the color group. Exemplarily, when it is determined that the status information indicates that the second color pre-configured for the edge color line in the color group is not in the enabled state, it indicates that the edge color line or the second color in the user-set color group does not take effect, that is, there is no need to color the neighbor area according to the second color pre-configured for the edge color line. Then the terminal may, after filling the first color specified for the target area filling operation, synchronously update the color of the edge color line to the first color, so that the first color filling the target area can engulf the edge color line.
[0068] In some embodiments, the terminal may obtain a line drawing. In response to a user's coloring operation on a target area in the line drawing, the terminal may obtain the status information of a color group pre-configured for the line drawing. When the status information indicates that the second color pre-configured for the edge color line in the color group is not in the enabled state, the terminal may fill the target area with the first color and update the edge color line recognized for the target area to the first color. The terminal does not need to determine the neighbor area anymore, nor does it perform coloring processing on the neighbor area.
[0069] In an exemplary embodiment, when the status information indicates that the second color pre-configured for the edge color line in the color group is not in the enabled state, the terminal directly updates the color of the edge color line to the first color, supports color updating only for the edge color line when the second color pre-configured for the edge color line is not turned on, can flexibly control the color filling of the neighbor area, and is beneficial to improving the coloring processing efficiency of the line drawing.
[0070] In some exemplary embodiments, the method for coloring a line drawing further includes: determining the color specified by the coloring operation; when the color specified by the coloring operation includes a third color, filling the target area with the third color; and updating the color of the edge color line to the third color.
[0071] Among them, the third color can be a color belonging to a different color category from the first color. That is, if the coloring operation triggered by the user does not belong to the first color in the color group, the terminal can fill the target area with the third color and update the color of the edge color line to the third color. Optionally, the terminal can determine the color specified by the coloring operation. For example, the terminal can parse the operation parameters of the coloring operation to determine the color specified by the coloring operation. Another example is that when the user triggers a coloring operation on the target area through a color filling tool, the terminal can determine the color specified by the user through the color filling tool. When the color specified by the coloring operation includes the third color, that is, the color specified by the coloring operation is not the first color, the terminal can not trigger the process of filling the neighbor area with the color through the color group. The terminal can directly fill the target area with the third color and also update the edge color line recognized for the target area to the third color.
[0072] In some embodiments, the terminal can obtain a line drawing. In response to a user's coloring operation on a target area in the line drawing, the terminal can determine the color specified by the coloring operation. The terminal can obtain a pre-configured color group for the line drawing and compare the color specified by the coloring operation with the first color in the color group. When the color specified by the coloring operation belongs to the third color, the terminal can fill the target area with the third color specified by the coloring operation. After the terminal also recognizes the edge color line of the target area, it can update the color of the edge color line to the third color. In some embodiments, after recognizing the edge color line of the target area, determine the edge color lines belonging to the color group from the recognized edge color lines and update the edge color lines belonging to the color group to the third color. For the recognized edge color lines that do not belong to the color group, the terminal can not process them, that is, the terminal can skip the process.
[0073] In some embodiments, when the color specified by the coloring operation includes the second color, the terminal can fill the target area with the first color in the color group and fill the second color in at least one neighbor area. Exemplarily, the pre-configured color group for the line drawing includes a second color corresponding to the first color pre-configured for the edge color line, where the first color is configured for the target area and the second color is set for the neighbor area of the target area. When the color specified by the user's coloring operation on the target area is the second color, it indicates that the user may have made a misoperation when specifying the first color and mis-specified the originally specified first color as the second color. That is, the user may need to fill the target area with the first color through the coloring operation. Then the terminal can automatically correct this misoperation, that is, the terminal can directly fill the target area with the first color in the color group and fill the second color for at least one neighbor area. In some embodiments, the terminal can also update the color of the edge color line of the target area to the second color.
[0074] In some embodiments, when the color specified in the coloring operation includes a second color, the terminal may send a coloring confirmation message for the user to confirm whether the coloring operation mis-specifies the first color as the second color and whether correction is needed for the coloring operation. The user can confirm the coloring confirmation message. When the user confirms to color the target area according to the second color, the terminal may fill the second color for the target area and update the color of the edge color line of the target area to the second color, and the terminal may no longer fill the color for the neighboring area. In some embodiments, after the user confirms the coloring confirmation message, if the user confirms to perform automatic correction, it indicates that the coloring operation is a misoperation by the user, and the terminal may fill the first color for the target area and fill the second color for the neighboring area of the target area.
[0075] In an exemplary embodiment, when the color specified in the coloring operation includes a third color, the terminal fills the third color for the target area and updates the color of the edge color line to the third color, thereby supporting the user to color the target area not according to the color configuration of the color group, ensuring the coloring flexibility of the line drawing.
[0076] In some exemplary embodiments, the method for coloring a line drawing further includes: when the color group does not include a second color corresponding to the first color pre-configured for the edge color line, updating the color of the edge color line to the first color.
[0077] Wherein, when the color group does not include a second color corresponding to the first color pre-configured for the edge color line, the terminal does not fill the color for the neighboring area according to the second color. Exemplarily, the terminal may confirm the colors configured in the color group. When it is determined that the color group does not include a second color corresponding to the first color pre-configured for the edge color line, it indicates that the color group may not be defined or the color configuration relationship in the color group is changed, and the terminal may directly update the color of the edge color line to the first color. In some embodiments, the terminal may obtain a line drawing. In response to the user's coloring operation on the target area in the line drawing, the terminal may fill the first color specified by the coloring operation for the target area. The terminal may identify the edge color line of the target area and obtain the color group pre-configured for the line drawing. When the color group does not include a second color corresponding to the first color pre-configured for the edge color line, the terminal may update the edge color line to the first color, and the terminal may not trigger the determination of the neighboring area and does not fill the color for the neighboring area.
[0078] In an exemplary embodiment, when the second color corresponding to the first color pre-configured for the edge color line is not included in the color group, the terminal can directly update the color of the edge color line to the first color, supporting color update only for the edge color line when the second color corresponding to the first color pre-configured for the edge color line is not included in the color group, and being able to flexibly control the color filling for the neighbor region based on the update of the color configuration relationship in the color group, which is beneficial to improving the coloring processing efficiency for the line drawing.
[0079] In some exemplary embodiments, filling the second color in at least one neighbor region includes: filling the second color into at least one neighbor region and updating the color of the edge color line to the second color.
[0080] Optionally, when filling the second color in the neighbor region, in addition to filling the neighbor region, the terminal can also update the color of the edge color line. For example, the color of the edge color line can be updated to the second color so that the neighbor region can annex the edge color line. For example, the terminal can fill the second color in the neighbor region through a color filling tool and update the color of the edge color line to the second color.
[0081] In an exemplary embodiment, when the terminal fills the second color into the neighbor region and updates the color of the edge color line to the second color, it can annex the color of the edge color line according to the coloring processing situation, avoiding the influence of the color of the edge color line on the target region and the neighbor region, and ensuring the coloring effect of the line drawing.
[0082] In some exemplary embodiments, the method for coloring a line drawing further includes: in response to a configuration trigger operation for the line drawing, displaying coloring configuration items, where the coloring configuration items include a color group configuration item, a color line configuration item, and a color configuration item; and in response to configuration operations for the color group configuration item, the color line configuration item, and the color configuration item, obtaining a color group based on the configuration operations.
[0083] Among them, the configuration trigger operation is used to trigger the coloring configuration for the line drawing, such as triggering the configuration of the color group for the line drawing. The configuration trigger operation can be generated by the user's interaction with the line drawing. For example, the user can perform interaction operations such as clicking, double-clicking, or long-pressing on the configuration entry of the line drawing to generate the configuration trigger operation. The coloring configuration items are used to configure the coloring process of the line drawing. The coloring configuration items can at least include configuration items such as color group configuration items, color line configuration items, and color configuration items. Each configuration item can perform different configuration operations for the coloring process of the line drawing. Among them, the color group configuration item is used to configure the overall color group of the line drawing, such as configuring at least one of various attribute information such as the number, identifier, effective status, time limit information, and permission information of the color group; the color line configuration item is used to configure the edge color lines included in the color group, such as configuring information such as the number, identifier, and enabled status of the edge color lines in the color group; the color configuration item is used to configure the colors in the color group, such as configuring the first color corresponding to the target area and the second color corresponding to the neighboring area in the color group. Specifically, the color types of the first color and the second color can be configured respectively.
[0084] Exemplarily, the user can interact with the line drawing through the terminal. For example, a configuration trigger operation can be generated through the interaction. The terminal can respond to the configuration trigger operation and display the coloring configuration items for the line drawing. The coloring configuration items include color group configuration items, color line configuration items, and color configuration items. In some embodiments, the terminal can display the line drawing, and the user can interact with the line drawing displayed by the terminal. For example, the user can interact with the configuration entry of the line drawing to generate a configuration trigger operation. The terminal can respond to the configuration trigger operation and display the coloring configuration items, which can include various configuration items for the line drawing. The user can trigger configuration operations for the color group configuration item, color line configuration item, and color configuration item in the coloring configuration items to respectively configure the overall color group of the line drawing, the edge color lines in the color group, and the color types in the color group, so as to obtain the color group for the line drawing.
[0085] In an exemplary embodiment, the terminal responds to the user's configuration trigger operation for the line drawing and displays the coloring configuration items. The terminal responds to the configuration operations of the user for the color group configuration item, color line configuration item, and color configuration item in the coloring configuration items, and obtains the color group based on the configuration operations, thereby supporting the user to configure the corresponding color group for the line drawing according to actual needs, so as to use the color group to color the neighboring area of the target area in the line drawing, which is beneficial to improving the coloring processing efficiency of the line drawing.
[0086] In some exemplary embodiments, such as Figure 5As shown, the processing of configuring the color group is performed, that is, in response to configuration operations for the color group configuration item, color line configuration item, and color configuration item, the color group is obtained based on the configuration operations, including:
[0087] Step 502, in response to the first configuration operation for the color group configuration item, determine the color group configuration information for the line drawing according to the first configuration operation.
[0088] Among them, the first configuration operation is a configuration operation triggered by the user for the color group configuration item, so as to configure the color group of the line drawing as a whole. The color group configuration information includes configuration information for configuring the color group of the line drawing as a whole, such as, but not limited to, various information including the effective status, time limit information, permission information, quantity, sorting, etc. of the color group of the line drawing.
[0089] Exemplarily, the user can trigger the first configuration operation for the color group configuration item. For example, if the color group configuration item includes a text box, the first configuration operation may include an editing operation for the text box; if the color group configuration item includes a selection box, the first configuration operation may include a selection operation for the selection box; if the color group configuration item includes a color box, the first configuration operation may include a color setting operation triggered for the color box. The terminal can determine the color group configuration information for the line drawing according to the first configuration operation triggered by the user. In some embodiments, after the user triggers the first configuration operation for the color group configuration item, the terminal can obtain the color group configuration information for the line drawing from the color group configuration item.
[0090] Step 504, in response to the second configuration operation for the color line configuration item, determine the color line configuration information for the edge color line according to the second configuration operation.
[0091] Among them, the second configuration operation is a configuration operation triggered by the user for the color line configuration item, so as to configure the edge color line in the color group of the line drawing. The color line configuration information includes configuration information for configuring the edge color line in the color group of the line drawing, such as, but not limited to, at least one of various information including the enabled status, time limit information, permission information, quantity, identification information, sorting, etc. of the edge color line in the color group of the line drawing.
[0092] Optionally, the user can trigger the second configuration operation for the color line configuration item, and the interaction operation type of the second configuration operation corresponds to the form of the color line configuration item. For example, if the color line configuration item includes a text box, the second configuration operation may include an editing operation for the text box. The terminal can determine the color line configuration information for the edge color line according to the second configuration operation triggered by the user. In some embodiments, after the user triggers the second configuration operation for the color line configuration item, the terminal can obtain the color line configuration information for the edge color line from the color line configuration item.
[0093] Step 506, in response to a third configuration operation for the color configuration item, determine color configuration information for the first color and the second color according to the third configuration operation.
[0094] Wherein, the third configuration operation is a configuration operation triggered by the user for the color configuration item, so as to configure the color types in the color group of the line drawing, that is, to configure the color types filled in the target area and the neighbor area. The color configuration information includes configuration information for configuring the first color and the second color in the color group of the line drawing, and may include, for example, but not limited to, at least one of various information such as the color types, sorting, enabling status, aging information, permission information, quantity, identification information, etc. of the first color and the second color in the color group of the line drawing.
[0095] Optionally, the user may trigger a third configuration operation for the color configuration item, and the interaction operation type of the third configuration operation corresponds to the form of the color configuration item. For example, if the color configuration item includes a selection box, the third configuration operation may include a selection operation for the selection box. The terminal may determine color configuration information for the first color and the second color according to the third configuration operation triggered by the user. In some embodiments, after the user triggers a third configuration operation for the color configuration item, the terminal may obtain color configuration information for the first color and the second color from the color configuration item for the third configuration operation.
[0096] Step 508, obtain a color group according to the color group configuration information, the color line configuration information, and the color configuration information.
[0097] Exemplarily, the terminal may comprehensively obtain a color group based on the color group configuration information, the color line configuration information, and the color configuration information. For example, the terminal may convert the color group configuration information, the color line configuration information, and the color configuration information into a color group in the form of matrix data, so that each element in the matrix can represent the color group.
[0098] In an exemplary embodiment, the user may trigger different configuration operations for the color group configuration item, the color line configuration item, and the color configuration item respectively, and obtain a color group according to the color group configuration information, the color line configuration information, and the color configuration information obtained by the respective configurations, which supports the user to perform multi-dimensional configuration of the color group according to actual needs, can ensure the flexibility of the color group, and is beneficial to improving the processing efficiency of coloring the line drawing based on the color group.
[0099] In some exemplary embodiments, obtaining a color group according to color group configuration information, color line configuration information, and color configuration information includes: determining a color group identifier and color group activation information according to the color group configuration information; determining color line identifiers and color line colors of at least one edge color line based on the color line configuration information; determining a first color and a second color configured for at least one edge color line according to the color configuration information; and obtaining the color group based on the color group identifier, color group activation information, color line identifiers, color line colors, first color, and second color.
[0100] Among them, the color group identifier is used to identify the color group, and different color groups can be distinguished by different color group identifiers. The color group activation information is used to represent the overall activation state of the color group. The color line identifier is used to identify the edge color line, and different edge color lines can correspond to different color line identifiers. The color line color is the color of the edge color line. In the same color group, different edge color lines can correspond to different color line colors. The first color is the color used to fill the target area, and the second color is the color used to fill the neighboring area of the target area.
[0101] Exemplarily, the terminal can determine the color group identifier and color group activation information of the entire color group according to the color group configuration information. For example, the terminal can parse the color group configuration information to obtain the color group identifier and color group activation information. The terminal can determine the color line identifier and color line color based on the color line configuration information. At least one edge color line can be included in the same color group, that is, the corresponding first color and second color can be configured for one or more edge color lines in the same color group. The terminal can determine the first color and second color configured for the edge color line according to the color configuration information, and each edge color line can be correspondingly configured with the corresponding first color and second color. The terminal can obtain the color group based on the color group identifier, color group activation information, color line identifier, color line color, first color, and second color. For example, the terminal can obtain the color group based on the color group identifier, color group activation information, color line identifier, color line color, first color, and second color, and construct a color group matrix, so as to represent the color group constructed for the line drawing in the form of matrix data.
[0102] In an exemplary embodiment, the terminal can respectively obtain the color group identifier, color group activation information, color line identifier, color line color, first color, and second color based on the color group configuration information, color line configuration information, and color configuration information, and obtain the color group for the line drawing, supporting the user to perform multi-dimensional configuration of the color group according to actual needs, which can ensure the flexibility of the color group and is beneficial to improving the processing efficiency of coloring the line drawing based on the color group.
[0103] In some exemplary embodiments, displaying the edge color lines of a target area includes: detecting the edge lines of the target area and determining the colors of the edge lines; identifying the edge color lines of the target area from the edge lines based on the colors of the edge lines, and displaying the edge color lines.
[0104] Among them, the edge lines are the lines that enclose the target area, and it is possible to determine whether an edge line belongs to the edge color line based on the color of the edge line. Exemplarily, the terminal can detect the edge lines of the target area. For example, various connectivity detection methods such as four-connected and eight-connected can be used to perform edge detection on the target area to detect the edge lines of the target area. The terminal can determine the colors of the edge lines. For example, the terminal can detect the colors of the pixel points in the edge lines. The terminal can identify the edge color lines for the edge lines based on the colors of the edge lines, so as to identify the edge color lines of the target area from the edge lines. In some embodiments, the terminal determines the color types to which the edge color lines of the target area belong. The color types to which the edge color lines belong can be configured by the original artist of the line drawing. That is, the edge lines whose line colors belong to the range of this color type belong to the edge color lines. The terminal can match the colors of the edge lines with the color types to which the edge color lines of the target area belong to determine whether the colors of the edge lines belong to the color types to which the edge color lines of the target area belong. If so, it can be determined that the edge line belongs to the edge color line of the target area; otherwise, it can be determined that the edge line does not belong to the edge color line of the target area. The terminal can display the detected edge color lines to prompt the user of the existence of the edge color lines, facilitating corresponding coloring processing for the line drawing.
[0105] In an exemplary embodiment, the terminal can identify the edge color lines of the target area from the edge lines according to the colors of the edge lines of the target area, which can ensure the accuracy of edge color line identification.
[0106] In some exemplary embodiments, in response to a coloring operation on a target area in a line drawing, filling the target area with a first color specified by the coloring operation includes: displaying the line drawing and a pre-configured color group for the line drawing; in response to a filling configuration operation on the color filling tool based on the color group, configuring the filling color of the color filling tool to the first color; in response to a coloring operation triggered on the target area in the line drawing by the color filling tool, filling the target area with the first color through the color filling tool.
[0107] Among them, the color filling tool can be a control tool for color filling in a coloring application. The user can use the color filling tool to perform color filling processing on the line drawing in the coloring application installed on the terminal. The filling configuration operation is used to configure the filling color of the color filling tool.
[0108] Optionally, the terminal can display the obtained line drawing and show the pre-configured color group for the line drawing. The color group includes the second color corresponding to the first color pre-configured for the edge color line. The user can configure the filling color for the color filling tool based on the color group. For example, the user can select the color filling tool and trigger a filling configuration operation for the color filling tool. For example, the user can drag the color filling tool to the marked area of the first color and click on the marked area, thereby triggering a filling configuration operation for the color filling tool. The terminal can, in response to this filling configuration operation, configure the filling color of the color filling tool to the first color. The user can trigger a coloring operation for the target area in the line drawing through the color filling tool. For example, after configuring the filling color of the color filling tool to the first color, the user can drag the color filling tool to the target area in the line drawing and click through the color filling tool on the target area to trigger a coloring operation for the target area. The terminal can, in response to the coloring operation triggered by the user, fill the target area with the first color through the color filling tool.
[0109] In an exemplary embodiment, the terminal can display the line drawing and the pre-configured color group. The terminal, in response to the filling configuration operation of the user for the color filling tool, configures the filling color of the color filling tool to the first color, and in response to the coloring operation triggered by the color filling tool for the target area in the line drawing, fills the target area with the first color through the color filling tool, thereby supporting the user to perform coloring processing on the target area through the color filling tool and ensuring the reliability of coloring for the target area.
[0110] This application also provides an application scenario that applies the above line drawing coloring processing method. Specifically, the application of the line drawing coloring processing method in this application scenario is as follows:
[0111] This application scenario belongs to the field of game design. For the characters in a computer game, after constructing the line drawing corresponding to the character, it is necessary to perform coloring to obtain a color drawing with better visual effects. The user can construct the line drawing of the character through the terminal and specify each edge color line according to needs in the line drawing. The user can perform further coloring on the line drawing. The terminal can, in response to the coloring operation of the user on the target area of the character, fill the target area with the specified color. For example, the first color can be filled for the prop held by the character. The terminal can identify the edge color line of the target area in the line drawing and determine at least one neighboring area adjacent to the target area through the edge color line. The terminal can obtain the pre-configured color group for the line drawing and fill at least one neighboring area according to the second color in the color group.
[0112] The present application also provides an application scenario, which applies the above-mentioned line drawing coloring method. Specifically, the application of the line drawing coloring method in this application scenario is as follows:
[0113] In this application scenario, some key concepts are centrally explained as follows:
[0114] Color draft drawing: It is the process of adding colors to a line drawing, that is, the so-called coloring stage. A color draft drawing is usually an important step in the painting or design process, which can make the line drawing more vivid and three-dimensional;
[0115] Color specification: Also known as color setting, it is a key step in animation production, mainly responsible for determining, selecting, and specifying the colors used in the animation. This process includes specifying colors for each element to ensure the consistency and accuracy of colors throughout the animation, especially for the color design of characters. The work content of color specification not only includes specifying basic colors but also involves specifying shadows, gradient colors, and the paint numbers used;
[0116] Solid color: It refers to the basic color presented by an object under a standard white light source. It is the color attribute inherent in the object itself and is not affected by light and environmental factors;
[0117] Coloring: Coloring is the process of making a black-and-white line drawing vivid and three-dimensional by adding colors. This process is crucial in anime production because it not only gives visual attraction to characters and scenes but also conveys emotions and atmosphere through colors;
[0118] Four-connected: Four-connected (4-connected) is a concept in image processing used to describe the connection relationship between pixels. Specifically, four-connected means that a pixel is connected to its adjacent pixels in the four directions of up, down, left, and right;
[0119] OpenCV: OpenCV (Open Source Computer Vision Library) is an open-source computer vision and machine learning software library that contains hundreds of computer vision algorithms, including but not limited to image processing, video analysis, object detection, face recognition, robot vision, etc.
[0120] With the rapid development of the animation industry, higher production requirements and shorter production cycles are faced. In this environment, it has become crucial to improve the efficiency of animation coloring. Coloring is not just about filling in colors for line drawings; it is a key step in giving life to characters, creating visual impact, and shaping the story atmosphere. Therefore, faster coloring methods need to be found to meet the growing demand. Currently, generally, after importing the line drawing into the coloring software, the filling tool is used to fill the color of a single blank area in the line drawing according to the color specification information to complete the coloring. However, users can only fill the color of each individual blank area in the line drawing separately through color specification, resulting in low coloring efficiency for the line drawing.
[0121] In the line drawing coloring processing method provided in this embodiment, fast coloring can be achieved based on the filling tool in the coloring software. Specifically, color groups are set according to different color lines in different blank areas, and the colors to be filled in the blank areas adjacent to the color lines are stored in the color groups. When the user clicks on a blank area to color, the adjacent blank areas will be filled with colors simultaneously according to the colors set in the color groups. This can greatly improve the coloring speed, increase work efficiency, and meet higher production requirements. The line drawing coloring processing method provided in this embodiment can fill the adjacent blank areas with the corresponding colors in the color groups according to all the color lines of the individual blank areas to be filled, through the color group information set by the user, so as to improve the efficiency, and there will be an exponential increase in efficiency when coloring complex line drawings.
[0122] In the line drawing coloring processing method provided in this embodiment, as Figure 6 shown, the user opens the coloring tool to create a new project and imports the line drawing. On this page, the user can use the filling tool to fill the color of any blank area in the line drawing. Among them, the line drawing can be displayed in the main page area, and the line drawing can include a task. A track directory is displayed below the page, and the track directory can include each line drawing that needs to be colored. The user can perform coloring processing on the line drawing through the filling tool provided by the coloring tool. In some embodiments, the user can also import a color draft corresponding to the line drawing, and the color draft can include an image with colors already filled.
[0123] The user can set the color to be filled in the blank area as the solid color, and at the same time set the colors to be filled in the blank areas adjacent to different color lines within the blank area. As Figure 7As shown, in the page of the coloring tool, a line drawing that needs to be colored can be imported. In the panel of the filling tool options, configuration items for color groups can be included, and the types of colors in the color groups can be selected from the color palette. In the configuration items of the color groups, multiple color groups can be included. Each color group can include a base color, which serves as the first color for coloring the target area, and each color group can also include a second color corresponding to different edge color lines. As Figure 7 shown, the base color is set for the area pointed by arrow 1. Arrow 3 points to edge color line 1 within the base color area, and arrow 2 sets the color to be filled in the area adjacent to edge color line 1.
[0124] Furthermore, when the user colors the line drawing, the base color set in the filling tool can be selected as the filling color. When coloring the corresponding blank area, the coloring application can, through the color group set by the user, fill the adjacent blank areas with the corresponding colors in the color group. As Figure 8 shown, arrow 1 points to the area where the user clicks to color. The terminal can fill the area where the user clicks to color with the base color in color group 2, and fill the area pointed by arrow 2 with the corresponding color in color group 2. As Figure 9 shown, when no color group is configured for the edge color line, for the area where the user clicks to color, the terminal can fill the area where the user clicks to color, but the adjacent blank areas cannot be filled with colors.
[0125] As Figure 10 shown, in the line drawing coloring processing method provided in this embodiment, it includes:
[0126] Step 1001, start coloring after the color group is set; specifically, the user can configure the color group for the line drawing and perform coloring processing on the line drawing after the configuration is completed. When the user completes the color group configuration, the terminal can save the set color group.
[0127] Step 1002, the terminal responds to the click operation on the blank area; the user can trigger coloring for the blank area in the line drawing, and the terminal can detect the click operation triggered by the user on the blank area to execute step 1003.
[0128] Step 1003, the terminal detects the edge lines of the blank area; when the user clicks on the blank area, the terminal uses a four-connected method to detect all the edge lines within the clicked area through OpenCV, and at the same time identifies the colors of the edge lines.
[0129] Step 1004, the terminal identifies the edge color lines; the terminal makes a determination for the detected edge lines to determine the edge color lines from the edge lines.
[0130] Step 1005 , the terminal checks whether the color to be filled is an inherent color in the color group and is in a valid state; the terminal checks whether the color to be filled is an inherent color in the color group and whether the color group is valid.
[0131] Step 1006, the terminal determines whether the edge color line is in the color group; if the corresponding inherent color is found, it is also necessary to determine whether the edge color line is set in the color group and is in an open state.
[0132] Step 1007, the terminal fills the blank area with the selected fill color; if the fill color is an inherent color in the color group and is in effect, and the edge color line is set in the color group and is in an on state, the terminal fills the blank area with the selected fill color.
[0133] Step 1008, the terminal detects the edge points of the color line and the edge of the blank area; the terminal finds the edge points of the color line through the edge of the color line using a four-connected method to determine the edge of the blank area.
[0134] Step 1009, the terminal fills the color group with the fill color set in the adjacent area of the corresponding color line, and swallows the edge color line; the terminal fills the corresponding fill color in the color group into the found area and swallows the color line.
[0135] Step 1010, the terminal fills the blank area with the selected fill color and incorporates the edge color line; if the color group is not effective or the fill color is not found in the color group, the blank area is filled normally and the color line is incorporated.
[0136] Step 1011, the terminal fills the blank area with the selected fill color and incorporates the edge color line; if it is not turned on or the corresponding color line color is not found, the coloring is performed normally, the blank area is filled and the color line is incorporated.
[0137] In some embodiments, Figure 11 As shown, for the line drawing, the user can click on area A, and the terminal fills the area A. Specifically, area A is filled by flood filling and edge color line search is performed on area A to find the set of midpoints of all edge color lines. The terminal obtains area B adjacent to the edge color line to obtain B1, B2, B3, and B4. The terminal matches the edge color line with the color group. When the match is successful, it indicates that the edge color line has a corresponding color, then the terminal fills all B with this color, and the color line is also filled with this color.
[0138] The line drawing coloring processing method provided in this embodiment can quickly realize coloring adjacent blank areas simultaneously by clicking on a blank area once through setting color groups. Only by defining color specifications can many adjacent areas be filled with a single click, and pictures of similar projects can be reused, greatly improving the coloring speed. At the same time, if there are the same color specifications in the line drawings of different projects, the color groups can also be reused in different projects, and the coloring speed of complex line drawings can be greatly improved. The line drawing coloring processing method provided in this embodiment can greatly improve the efficiency of anime coloring, enabling users to complete their work in a shorter time as much as possible, improving work efficiency, and meeting production requirements. At the same time, it can also reduce the labor cost for relevant anime companies and save company expenses. In the era of rapid update of anime works, the overall production cycle of anime can be shortened through the line drawing coloring processing method provided in this embodiment, and good anime works can be launched into the market in a shorter time.
[0139] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.
[0140] Based on the same inventive concept, the embodiment of the present application also provides a line drawing coloring processing device for implementing the above-mentioned line drawing coloring processing method. The solution provided by this device to solve problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the line drawing coloring processing device provided below can refer to the limitations on the line drawing coloring processing method in the above text, and will not be repeated here.
[0141] In an exemplary embodiment, as Figure 12 shown, a line drawing coloring processing device 1200 is provided, including: a target area coloring module 1202, a neighbor area determination module 1204, a color group acquisition module 1206, and a neighbor area coloring module 1208, where:
[0142] The target area coloring module 1202 is configured to obtain a line drawing and fill the target area with the first color specified by the coloring operation in response to a coloring operation on the target area in the line drawing;
[0143] A neighbor region determination module 1204, configured to display edge color lines of a target region, and determine at least one neighbor region adjacent to the target region through the edge color lines from a line drawing.
[0144] A color group acquisition module 1206, configured to acquire a color group pre-configured for the line drawing, where the color group includes a second color pre-configured for the edge color line and corresponding to a first color.
[0145] A neighbor region coloring module 1208, configured to fill the second color in at least one neighbor region.
[0146] In an exemplary embodiment, the neighbor region coloring module 1208 is further configured to acquire status information of the color group; and in a case where the status information indicates that the color group is in an effective state and the second color pre-configured for the edge color line in the color group is in an enabled state, fill the second color into at least one neighbor region.
[0147] In an exemplary embodiment, it further includes an edge color line update module, configured to update the color of the edge color line to the first color in a case where the status information indicates that the color group is not in an effective state.
[0148] In an exemplary embodiment, it further includes an edge color line update module, configured to update the color of the edge color line to the first color in a case where the status information indicates that the second color pre-configured for the edge color line in the color group is not in an enabled state.
[0149] In an exemplary embodiment, the target region coloring module 1202 is further configured to determine the color specified by a coloring operation; in a case where the color specified by the coloring operation includes a third color, fill the third color into the target region; and update the color of the edge color line to the third color.
[0150] In an exemplary embodiment, it further includes an edge color line update module, configured to update the color of the edge color line to the first color in a case where the color group does not include a second color pre-configured for the edge color line and corresponding to the first color.
[0151] In an exemplary embodiment, the neighbor region coloring module 1208 is further configured to fill the second color into at least one neighbor region and update the color of the edge color line to the second color.
[0152] In an exemplary embodiment, it further includes a coloring configuration module, configured to display coloring configuration items in response to a configuration trigger operation for the line drawing, where the coloring configuration items include a color group configuration item, a color line configuration item, and a color configuration item; and obtain a color group based on configuration operations in response to configuration operations for the color group configuration item, the color line configuration item, and the color configuration item.
[0153] In an exemplary embodiment, the coloring configuration module is further configured to, in response to a first configuration operation for a color group configuration item, determine color group configuration information for the line drawing according to the first configuration operation; in response to a second configuration operation for a color line configuration item, determine color line configuration information for the edge color line according to the second configuration operation; in response to a third configuration operation for a color configuration item, determine color configuration information for a first color and a second color according to the third configuration operation; and obtain a color group according to the color group configuration information, the color line configuration information, and the color configuration information.
[0154] In an exemplary embodiment, the coloring configuration module is further configured to determine a color group identifier and color group activation information according to the color group configuration information; determine a color line identifier and a color line color of at least one edge color line based on the color line configuration information; determine a first color and a second color configured for at least one edge color line according to the color configuration information; and obtain a color group based on the color group identifier, the color group activation information, the color line identifier, the color line color, the first color, and the second color.
[0155] In an exemplary embodiment, the neighbor region determination module 1204 is further configured to detect edge lines of a target region, determine the color of the edge lines; identify the edge color lines of the target region from the edge lines based on the color of the edge lines, and display the edge color lines.
[0156] In an exemplary embodiment, the target region coloring module is further configured to display the line drawing and a pre-configured color group for the line drawing; in response to a filling configuration operation for the color filling tool based on the color group, configure the filling color of the color filling tool as the first color; and in response to a coloring operation triggered by the color filling tool for the target region in the line drawing, fill the target region with the first color through the color filling tool.
[0157] Each module in the above line drawing coloring processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.
[0158] In an embodiment, a computer device is provided. The computer device can be a terminal or a server. In this embodiment, taking the computer device as a terminal as an example for illustration, its internal structure diagram can be as Figure 13As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for coloring line drawings. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0159] Those skilled in the art can understand that Figure 13 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0160] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0161] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0162] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0164] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0165] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0166] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for coloring a line drawing, characterized in that: The method comprises: Acquire a line drawing, and in response to a coloring operation on a target area in the line drawing, fill the target area with a first color specified by the coloring operation; Displaying an edge color line of the target area, and determining from the line drawing at least one neighboring area adjacent to the target area through the edge color line; Acquire a color group preconfigured for the line drawing, the color group comprising a second color preconfigured for the edge color line and corresponding to the first color; The at least one neighboring area is filled with the second color.
2. The method according to claim 1, characterized in that Filling the at least one neighboring area with the second color comprises: Obtaining status information of the color group; When the state information indicates that the color group is in a valid state and the second color preconfigured for the edge color line in the color group is in an enabled state, the second color is filled into the at least one neighbor region.
3. The method according to claim 2, characterized in that The method further comprises at least one of the following: When the state information indicates that the color group is not in the effective state, updating the color of the edge color line to the first color; When the state information indicates that the second color preconfigured for the edge color line in the color group is not in the enabled state, the color of the edge color line is updated to the first color.
4. The method according to claim 1, characterized in that: The method further comprises: Determining the color specified by the coloring operation; In a case where the color specified by the coloring operation includes a third color, filling the target area with the third color; The color of the edge color line is updated to the third color.
5. The method according to claim 1, characterized in that The method further comprises: The color group does not include a second color corresponding to the first color preconfigured for the edge color line, and the color of the edge color line is updated to the first color.
6. The method according to claim 1, characterized in that Filling the at least one neighboring area with the second color comprises: The second color is filled into the at least one neighbor region, and the color of the edge color line is updated to the second color.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to a configuration trigger operation for the line drawing, displaying coloring configuration items, wherein the coloring configuration items include a color group configuration item, a color line configuration item, and a color configuration item; In response to configuration operations on the color group configuration item, the color line configuration item, and the color configuration item, the color group is obtained based on the configuration operations.
8. The method according to claim 7, characterized in that In response to the configuration operation on the color group configuration item, the color line configuration item and the color configuration item, obtaining the color group based on the configuration operation includes: In response to a first configuration operation on the color group configuration item, determining color group configuration information for the line drawing according to the first configuration operation; In response to a second configuration operation for the color line configuration item, determining color line configuration information for the edge color line according to the second configuration operation; In response to a third configuration operation for the color configuration item, determining color configuration information for the first color and the second color according to the third configuration operation; The color group is obtained according to the color group configuration information, the color line configuration information and the color configuration information.
9. The method according to claim 8, characterized in that The step of obtaining the color group according to the color group configuration information, the color line configuration information and the color configuration information comprises: Determine the color group identifier and the color group validity information according to the color group configuration information; Determine a color line identifier of at least one edge color line and a color line color of the at least one edge color line based on the color line configuration information; Determining a first color and a second color configured for the at least one edge color line according to the color configuration information; The color group is obtained based on the color group identifier, the color group validation information, the color line identifier, the color line color, the first color, and the second color.
10. The method according to any one of claims 1 to 9, characterized in that: The displaying of the edge color line of the target area includes: Detecting edge lines of the target area and determining the color of the edge lines; An edge color line of the target area is identified from the edge lines based on the color of the edge lines, and the edge color line is displayed.
11. The method according to any one of claims 1 to 9, characterized in that: In response to the coloring operation on the target area in the line drawing, filling the target area with the first color specified by the coloring operation includes: Displaying the line drawing and a color group preconfigured for the line drawing; In response to a fill configuration operation for a color fill tool based on the color group, configuring a fill color of the color fill tool to a first color; In response to a coloring operation triggered by the color filling tool on a target area in the line drawing, the target area is filled with the first color by the color filling tool.
12. A line drawing coloring processing device, characterized in that: The device comprises: A target area coloring module, used for acquiring a line drawing, and in response to a coloring operation on a target area in the line drawing, filling the target area with a first color specified by the coloring operation; A neighbor region determination module, configured to display an edge color line of the target region, and determine from the line drawing at least one neighbor region adjacent to the target region through the edge color line; A color group acquisition module, used to acquire a color group preconfigured for the line drawing, wherein the color group includes a second color preconfigured for the edge color line and corresponding to the first color; A neighbor region coloring module is used to fill the second color in the at least one neighbor region.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.