Automatic color matching configuration method and device suitable for marble

Through image recognition and automatic color matching technology, the problem of poor color matching after marble repair is solved, precise and efficient repair of marble is achieved, manual intervention is reduced, and repair efficiency is improved.

CN118429226BActive Publication Date: 2024-09-27CHINA CONSTR ENG DESIGN GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410604786.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-09-27
Estimated Expiration
2044-05-15

AI Technical Summary

Technical Problem

The existing marble color matching technology is difficult to accurately match the original color of the restored marble, resulting in poor color matching results and requiring a lot of manual intervention, which is a waste of manpower.

Method used

By acquiring an image of the marble to be repaired, the contour to be repaired is identified, a reference outline and a reference area are generated, automatic color matching is performed based on color proportion and pattern distribution, an initial base coating is formed, and precise repair is achieved through base pixel value and regional color matching technology.

Benefits of technology

It improves the accuracy and efficiency of marble repair, reduces manual intervention, and significantly saves human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429226B
    Figure CN118429226B
Patent Text Reader

Abstract

The present invention provides an automatic color matching configuration method and device suitable for marble. The method includes: obtaining an image to be repaired of the marble to be repaired for identification, and determining the contour to be repaired in the image to be repaired; extending a preset distance outward along the contour to be repaired to generate a reference contour, and the area between the reference contour and the contour to be repaired is the reference area; filling the base coating into the area to be repaired in the contour to be repaired to form an initial base coating; determining the base pixel value based on the color proportion of the reference area, and performing base color matching based on the base pixel value on the initial base coating to obtain the current base coating; performing regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area, and determining the marble to be repaired as the repaired marble; obtaining a repaired image of the repaired marble, and generating a history bar based on the repaired image and the image to be repaired. The present invention at least improves the repair effect of marble.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to data processing technology, and in particular to an automatic color matching configuration method and device suitable for marble. Background Art

[0002] Marble has high compressive strength and good physical and chemical properties, and is easy to process. With the development of the economy, its application range is constantly expanding, and its usage is increasing. It plays an important role in people's lives. Especially in the past decade or so, large-scale mining, industrial processing, and international trade have made decorative panels enter the building decoration industry in large quantities. They are not only used in luxurious public buildings, but also in home decoration. However, defects such as dents or cracks may occur due to daily use, which need to be repaired in a timely manner.

[0003] The inventor found in the research that after the marble with defects such as dents or cracks is polished and repaired, there is another very important step, which is to accurately match the color of the surface of the repaired area of ​​the marble to ensure the overall repair effect of the marble. Some of the existing color matching technologies have a large difference from the original color of the marble, or require manual color matching, which wastes a certain amount of manpower. Summary of the invention

[0004] Based on the above problems, the present invention is proposed to provide an automatic color matching configuration method and device suitable for marble that overcomes the above problems or at least partially solves the above problems.

[0005] According to one aspect of the present invention, there is provided an automatic color matching configuration method applicable to marble, comprising the following steps:

[0006] Acquire an image of the marble to be repaired, and perform image recognition based on the image to be repaired to determine a contour to be repaired located in the image to be repaired;

[0007] Extending a preset distance outward along the contour to be repaired in the image to be repaired to generate a reference contour surrounding the contour to be repaired, and determining an area between the reference contour and the contour to be repaired as a reference area;

[0008] Filling the base coating into the area to be repaired located in the outline to be repaired to form an initial base coating;

[0009] Determine a base pixel value based on the color proportion of the reference area, and perform base color matching on the initial base coating based on the base pixel value to obtain a current base coating;

[0010] Performing regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area, and determining the marble to be repaired as the repaired marble;

[0011] A restored image of the restored marble is obtained, and a history record bar is generated based on the restored image and the image to be restored.

[0012] Optionally, in the method according to the present invention, obtaining an image of the marble to be repaired, and performing image recognition based on the image to be repaired to determine a contour to be repaired located in the image to be repaired, comprises:

[0013] Obtaining the brightness of ambient light, and comparing the brightness of the ambient light with a preset brightness;

[0014] When the light brightness is less than or equal to the preset brightness, calling a preset lighting plug-in, and illuminating the marble to be repaired based on the preset lighting plug-in;

[0015] Retrieving a preset photographing plug-in, and based on the preset photographing plug-in, performing image acquisition on the marble to be restored, to obtain an image to be restored of the marble to be restored;

[0016] The image to be repaired is input into a pre-trained image recognition model to determine a contour to be repaired in the image to be repaired.

[0017] Optionally, in the method according to the present invention, in the image to be repaired, extending a preset distance outward along the contour to be repaired to generate a reference contour surrounding the contour to be repaired, and determining an area between the reference contour and the contour to be repaired as a reference area, comprises:

[0018] Determine a circumscribed circle having a circumscribed relationship with the contour to be repaired based on the contour to be repaired, and determine the radius of the circumscribed circle as a preset distance;

[0019] Extending a preset distance outward from the contour to be repaired to generate an initial contour surrounding the contour to be repaired, and determining whether contour lines of the initial contour are all located in the image frame of the image to be repaired;

[0020] When at least part of the contour line of the initial contour is located outside the image to be repaired, the initial contour is updated based on the image frame of the image to be repaired to obtain a reference contour located in the image frame, and an area between the reference contour and the contour to be repaired is determined as a reference area.

[0021] Optionally, in the method according to the present invention, updating the initial contour based on the image frame of the image to be repaired to obtain a reference contour located in the image frame includes:

[0022] When all contour lines of the initial contour are outside the image to be restored, determining the image frame of the image to be restored as the reference contour; or

[0023] When a partial contour line of the initial contour is outside the image to be restored, determining each independent line segment in the partial contour line;

[0024] Acquire a first intersection point and a second intersection point between each independent line segment and the image frame, and divide the image frame based on the first intersection point and the second intersection point to obtain an updated line segment corresponding to the independent line segment;

[0025] The initial contour is updated based on the updated line segment corresponding to each independent line segment to obtain a reference contour located in the image frame.

[0026] Optionally, in the method according to the present invention, determining the base pixel value based on the color proportion of the reference area, and performing base color matching based on the base pixel value on the initial base coating to obtain the current base coating includes:

[0027] Acquire each reference pixel point located in the reference area, and respectively determine each reference pixel value corresponding to each reference pixel point;

[0028] Retrieving a plurality of preset pixel value intervals, and grouping the reference pixel points corresponding to the reference pixel values ​​in the same preset pixel value interval into the same group to obtain reference pixel groups;

[0029] Counting the number of pixels of each reference pixel point respectively included in each reference pixel group to obtain respective statistical numbers corresponding to each reference pixel group;

[0030] Determine the one with the largest statistical quantity in each reference pixel group, and determine the preset pixel value interval corresponding to the one as the base interval;

[0031] Obtaining a maximum endpoint value and a minimum endpoint value in the base interval, and performing mean calculation based on the maximum endpoint value and the minimum endpoint value to obtain the base pixel value;

[0032] The initial base coating layer is subjected to base color matching based on base pixel values ​​to obtain a current base coating layer.

[0033] Optionally, in the method according to the present invention, performing regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area includes:

[0034] Acquire various pattern types located in the reference area, wherein different pattern types correspond to different pattern elements;

[0035] When at least two pattern elements belonging to the same pattern type are respectively extended to connect with different positions of the contour to be repaired, at least two of the pattern elements are respectively extended in a direction toward the area to be repaired to form a transition area connected to each other;

[0036] Each of the transition areas is subjected to regional color matching based on the pattern type to obtain a repaired area.

[0037] Optionally, in the method according to the present invention, the method further comprises:

[0038] Determine each pattern type far away from the contour to be repaired, and determine the number of each reference element of each pattern element corresponding to each pattern type in the reference area;

[0039] Obtaining an area ratio between the reference area and the area to be repaired, and determining the number of each repair element corresponding to the number of each reference element based on the area ratio;

[0040] The pattern elements corresponding to the number of repair elements are generated in the to-be-repaired area in a random manner, and the pattern elements are color matched based on the area of ​​each pattern type.

[0041] Optionally, in the method according to the present invention, obtaining a restored image of the restored marble, and generating a history record bar based on the restored image and the image to be restored, comprises:

[0042] Retrieving a historical restoration form, wherein the historical restoration form includes blank record strips arranged in sequence, and each blank record strip includes a time slot and an image slot;

[0043] Select one of the blank record strips in order, and determine the blank record strip as the record strip to be filled;

[0044] Retrieving a preset photographing plug-in, and performing image acquisition on the restored marble based on the preset photographing plug-in to obtain a restored image of the restored marble and an acquisition time;

[0045] The acquisition time is filled into the time slot, and the restored image and the image to be restored are filled into the image slot to obtain a history record bar.

[0046] Optionally, in the method according to the present invention, filling the restored image and the image to be restored into the image slot comprises:

[0047] The image slot includes a preset blank layer, wherein the preset blank layer includes a first image area and a second image area;

[0048] Filling the first image area with the restored image, and generating a first marking frame in the first image area for selecting a restored area in the restored image;

[0049] Filling the second image area with the image to be repaired, and generating a second marking frame in the second image area for selecting the area to be repaired in the image to be repaired;

[0050] An indication frame connection line is generated, wherein a first end of the indication frame connection line is connected to a frame outline of the first marking frame, and a second end of the indication frame connection line is connected to a frame outline of the second marking frame.

[0051] According to another aspect of the present invention, there is provided an automatic color matching and configuration device applicable to marble, comprising:

[0052] A recognition module is configured to obtain an image of the marble to be restored, and perform image recognition based on the image to be restored to determine a contour to be restored located in the image to be restored;

[0053] A contour generation module is configured to generate a reference contour around the contour to be repaired by extending a preset distance outward along the contour to be repaired in the image to be repaired, and determine an area between the reference contour and the contour to be repaired as a reference area;

[0054] A filling module is configured to fill the base coating into the area to be repaired in the outline to be repaired to form an initial base coating;

[0055] A base color matching module is configured to determine a base pixel value based on the color proportion of the reference area, and perform base color matching on the initial base coating based on the base pixel value to obtain a current base coating;

[0056] A regional color matching module is configured to perform regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area, and determine the marble to be repaired as the repaired marble;

[0057] The form establishment module is configured to obtain the restored image of the restored marble and establish a historical restoration form based on the restored image and the image to be restored.

[0058] According to the solution of the present invention, the server can first obtain the image to be repaired of the marble to be repaired, and perform image recognition based on the image to be repaired, so as to determine the contour to be repaired in the image to be repaired; then, the server will extend a preset distance outward along the contour to be repaired in the image to be repaired to generate a reference contour around the contour to be repaired, and determine the area between the reference contour and the contour to be repaired as the reference area; then, fill the base coating into the area to be repaired, so as to form an initial base coating; and determine the base pixel value based on the color proportion of the reference area to perform base color matching on the initial base coating based on the base pixel value, so as to obtain the current base coating; then perform regional color matching on the current base coating based on the pattern distribution of the reference area, so as to obtain the repaired area, and determine the marble to be repaired as the repaired marble; then obtain the repaired image of the repaired marble, and generate a history record based on the repaired image and the image to be repaired; the present invention can objectively match the color of the base coating based on the color proportion of the reference area, which greatly improves the repair effect and efficiency of the marble. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flow chart of an automatic color matching configuration method applicable to marble according to an embodiment of the present invention is shown;

[0060] Figure 2 A schematic diagram showing the structure of the machine end in this embodiment is shown;

[0061] Figure 3 A structural block diagram of an automatic color matching and configuration device applicable to marble according to another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0062] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0063] Marble has high compressive strength and good physical and chemical properties, and is easy to process. With the development of the economy, its application range is constantly expanding, and its usage is increasing. It plays an important role in people's lives. Especially in the past decade or so, large-scale mining, industrial processing, and international trade have made decorative panels enter the building decoration industry in large quantities. They are not only used in luxurious public buildings, but also in home decoration. However, defects such as dents or cracks may occur due to daily use, which need to be repaired in a timely manner.

[0064] The inventor found in the research that after the marble with defects such as dents or cracks is polished and repaired, there is another very important step, which is to accurately match the color of the surface of the repaired area of ​​the marble to ensure the overall repair effect of the marble. Some of the existing color matching technologies have a large difference from the original color of the marble, or require manual color matching, which wastes a certain amount of manpower.

[0065] In order to solve the above problems in the prior art, the inventor proposes the solution of the present invention. An embodiment of the present invention provides an automatic color matching configuration method applicable to marble, which can be executed in a computing device.

[0066] Figure 1 A flow chart of a method 100 according to an embodiment of the present invention is shown, the method being suitable for execution in a computing device.

[0067] like Figure 1 As shown, the purpose of method 100 is to implement an automatic color matching configuration method suitable for marble, starting from step 102, in step 1102, including the following steps:

[0068] An image of the marble to be repaired is obtained, and image recognition is performed based on the image to be repaired to determine a contour to be repaired in the image to be repaired.

[0069] For example, in this embodiment, the machine end can be understood as a robot with infrared scanning function, image acquisition function and movement function. The server will control the machine end to acquire images of the marble to be repaired, thereby obtaining the image of the marble to be repaired, that is, the image to be repaired, and performing image recognition on the image to be repaired. After recognition, the outline of the area to be repaired in the image to be repaired, that is, the outline to be repaired, can be determined.

[0070] For example, Figure 2 A schematic diagram showing the structure of the machine end in this embodiment is shown as follows: Figure 2 As shown, the machine end includes a machine body 201 and a moving pulley 202, wherein the moving pulley 202 can drive the machine body 201 to move to complete the corresponding color matching work.

[0071] Furthermore, the above-mentioned “obtaining the image to be repaired of the marble to be repaired, and performing image recognition based on the image to be repaired to determine the contour to be repaired located in the image to be repaired” further includes the following steps:

[0072] Obtaining the brightness of ambient light, and comparing the brightness of the ambient light with a preset brightness;

[0073] When the light brightness is less than or equal to the preset brightness, calling a preset lighting plug-in, and illuminating the marble to be repaired based on the preset lighting plug-in;

[0074] Retrieving a preset photographing plug-in, and based on the preset photographing plug-in, performing image acquisition on the marble to be restored, to obtain an image to be restored of the marble to be restored;

[0075] The image to be repaired is input into a pre-trained image recognition model to determine a contour to be repaired in the image to be repaired.

[0076] For example, in this embodiment, when the server controls the machine end to obtain the image of the marble to be repaired, first, the server controls the machine end to obtain the brightness of the current ambient light, and compares the brightness with the preset brightness, wherein the preset brightness can be the minimum brightness that the ambient light needs to reach during image capture.

[0077] Furthermore, when the light brightness is greater than the preset brightness, it indicates that the light brightness of the current ambient light meets the image acquisition conditions, that is, when the machine end performs image acquisition at the current light brightness, it can clearly acquire the image of the marble to be restored; and when the light brightness is less than or equal to the preset brightness, the server will control the machine end to retrieve the preset lighting plug-in to illuminate the marble to be restored through the preset lighting plug-in, so as to achieve the standard brightness during image acquisition; then, the server will further control the machine end to retrieve the preset photo plug-in to perform image acquisition of the marble to be restored, and obtain the image to be restored of the marble to be restored after image acquisition. The preset lighting plug-in and the preset photo plug-in can be preset on the machine end in advance, and the server will retrieve the preset lighting plug-in or the preset photo plug-in under the corresponding usage conditions to achieve the lighting purpose or the photo purpose.

[0078] After obtaining the image of the marble to be repaired, the server will input the image to be repaired into a pre-trained image recognition model to determine the contour to be repaired in the image.

[0079] In step S104, the following contents are included:

[0080] A reference contour surrounding the to-be-repaired contour is generated by extending a preset distance outwardly along the to-be-repaired contour in the to-be-repaired image, and an area between the reference contour and the to-be-repaired contour is determined as a reference area.

[0081] For example, in this embodiment, after obtaining the contour to be repaired, the server will extend a preset distance outward along the contour to be repaired in the image to be repaired to generate a contour surrounding the contour to be repaired, that is, a reference contour, and determine the area between the contour to be repaired and the reference contour as the reference area. There is no defective part in the reference area, that is, the reference area is an intact area, and therefore it can be used as a reference.

[0082] Furthermore, the above-mentioned “extending a preset distance outward along the contour to be repaired in the image to be repaired to generate a reference contour surrounding the contour to be repaired, and determining the area between the reference contour and the contour to be repaired as the reference area” further includes the following steps:

[0083] Determine a circumscribed circle having a circumscribed relationship with the contour to be repaired based on the contour to be repaired, and determine the radius of the circumscribed circle as a preset distance;

[0084] Extending a preset distance outward from the contour to be repaired to generate an initial contour surrounding the contour to be repaired, and determining whether contour lines of the initial contour are all located in the image frame of the image to be repaired;

[0085] When at least part of the contour line of the initial contour is located outside the image to be repaired, the initial contour is updated based on the image frame of the image to be repaired to obtain a reference contour located in the image frame, and an area between the reference contour and the contour to be repaired is determined as a reference area.

[0086] Furthermore, the above-mentioned “updating the initial contour based on the image frame of the image to be repaired to obtain a reference contour located in the image frame” further includes the following steps:

[0087] When all contour lines of the initial contour are outside the image to be restored, determining the image frame of the image to be restored as the reference contour; or

[0088] When a partial contour line of the initial contour is outside the image to be restored, determining each independent line segment in the partial contour line;

[0089] Acquire a first intersection point and a second intersection point between each independent line segment and the image frame, and divide the image frame based on the first intersection point and the second intersection point to obtain an updated line segment corresponding to the independent line segment;

[0090] The initial contour is updated based on the updated line segment corresponding to each independent line segment to obtain a reference contour located in the image frame.

[0091] For example, in this embodiment, the server will extend the preset distance outward along the contour to be repaired to generate an initial contour around the contour to be repaired. The preset distance is calculated in that the server generates a circumscribed circle that has a circumscribed relationship with the contour to be repaired, and determines the radius of the circumscribed circle as the preset distance. This method does not require the management end to set additional values, and can quickly obtain the preset distance, and can also ensure that the reference area has a more appropriate width.

[0092] After completing the determination of the initial contour, the server will further determine whether the contour lines of the generated initial contour are all located in the image frame of the image to be repaired. If some contour lines of the initial contour are outside the image to be repaired, the server will update the initial contour according to the image frame of the image to be repaired, thereby obtaining a contour that is entirely located in the image frame, namely, the baseline contour, and determine the area between the baseline contour and the contour to be repaired as the baseline area.

[0093] It should be noted that the initial contour and the image frame of the image to be repaired generally have three different positional relationships. For example, the first positional relationship may be: all contour lines of the initial contour are located in the image frame of the image to be repaired; the second positional relationship may be: part of the contour lines of the initial contour are located outside the image frame of the image to be repaired; and the third positional relationship may be: all contour lines of the initial contour are located outside the image frame of the image to be repaired.

[0094] Among these three positional relationships, the corresponding initial contours need to be updated for the second and third ones. The specific updating process includes the following:

[0095] For the second positional relationship, since part of the contour lines of the initial contour are outside the image frame of the image to be repaired, first, each independent line segment outside the image frame of the image to be repaired can be obtained. Here, the independent line segment can be understood as a contour line that is isolated from other contour lines outside the image frame of the image to be repaired, that is, each independent line segment has two intersection points with the image frame of the image to be repaired, namely, the first intersection point and the second intersection point; then, the image frame can be divided based on the first intersection point and the second intersection point to obtain updated line segments corresponding to the independent line segments; finally, the initial contour is updated based on the updated line segments to obtain the reference contour corresponding to the image frame, so as to complete the update of the initial contour;

[0096] For the third positional relationship, since all the initial contours are located outside the image frame of the image to be restored (that is, the initial contours are surrounded by the image frame of the image to be restored), and the image to be restored is obtained for the marble to be restored, the image frame of the image to be restored can be directly determined as the reference contour to complete the update of the initial contour.

[0097] Here, by updating the initial contour based on the positional relationship between the initial contour and the image frame of the image to be repaired and obtaining the corresponding reference contour, it is possible to ensure that the corresponding reference contour can be located in the image frame of the image to be repaired, that is, to ensure that the area located in the reference contour is the area corresponding to the marble to be repaired, thereby ensuring the corresponding reference reference and improving the corresponding accuracy.

[0098] In step S106, the following contents are included:

[0099] The base coating is filled into the area to be repaired located in the contour to be repaired to form an initial base coating.

[0100] For example, in this embodiment, because under normal circumstances, the bottom plate of marble is one color, there will be patterns and other contents on the upper layer of the bottom plate. For example, a piece of marble is white all over, and there will be some patterns of other colors on the surface of the white marble to increase the richness of the marble color; so when the server control machine end repairs the marble to be repaired, it will first fill the bottom plate part of the repair area with base paint to form an initial base coating.

[0101] In step S108, the following contents are included:

[0102] The base pixel value is determined based on the color proportion of the reference area, and the base color matching based on the base pixel value is performed on the initial base coating to obtain the current base coating.

[0103] For example, in this embodiment, since in general, the base color accounts for a larger proportion in the color distribution of a piece of marble, while the surface pattern accounts for a smaller proportion, the server will first obtain the proportion of each color in the reference area, and determine the base pixel value based on the proportion, and then match the color of the initial base coating according to the base pixel value, and obtain the current base coating after color matching.

[0104] Furthermore, the above-mentioned “determining the base pixel value based on the color proportion of the reference area, and performing base color matching on the initial base coating based on the base pixel value to obtain the current base coating” also includes the following steps:

[0105] Acquire each reference pixel point located in the reference area, and respectively determine each reference pixel value corresponding to each reference pixel point;

[0106] Retrieving a plurality of preset pixel value intervals, and grouping the reference pixel points corresponding to the reference pixel values ​​in the same preset pixel value interval into the same group to obtain reference pixel groups;

[0107] Counting the number of pixels of each reference pixel point respectively included in each reference pixel group to obtain respective statistical numbers corresponding to each reference pixel group;

[0108] Determine the one with the largest statistical quantity in each reference pixel group, and determine the preset pixel value interval corresponding to the one as the base interval;

[0109] Obtaining a maximum endpoint value and a minimum endpoint value in the base interval, and performing mean calculation based on the maximum endpoint value and the minimum endpoint value to obtain the base pixel value;

[0110] The initial base coating layer is subjected to base color matching based on base pixel values ​​to obtain a current base coating layer.

[0111] For example, in this embodiment, the server can determine the color proportion of the reference area. First, the server will obtain each reference pixel point in the reference area, and determine each reference pixel value corresponding to each reference pixel point. Then, the server will call out multiple preset pixel value intervals, and divide each reference pixel value according to the preset pixel value interval, and divide the reference pixel values ​​in a preset pixel value interval into a group, that is, the reference pixel points corresponding to each reference pixel value in the same preset pixel value interval are divided into the same group, thereby obtaining each reference pixel group. The preset pixel value interval can be pre-set by the management end according to the actual situation.

[0112] After obtaining each benchmark pixel group, the server will count the number of pixels of each benchmark pixel point contained in each benchmark pixel group, and obtain the number of pixels in each benchmark pixel group after counting, that is, the corresponding statistical number. Then determine the one with the largest statistical number in each benchmark pixel group. The largest statistical number also means that the color accounts for the largest proportion, so the corresponding preset pixel value interval is determined as the base interval. Since marble may cause slight changes in color due to reasons such as length of use (for example, the color is changed due to long-term oxidation), the server will obtain the maximum endpoint value and the minimum endpoint value in the base interval, and calculate the average of the maximum endpoint value and the minimum endpoint value to obtain the base pixel value. The base pixel value obtained in this way is relatively accurate, and then the base color matching based on the base pixel value is performed on the initial base coating to obtain the current base coating, which can improve the corresponding repair effect.

[0113] In step S110, the following contents are included:

[0114] The current base coating is subjected to regional color matching based on the pattern distribution of the reference area to obtain a repaired area, and the marble to be repaired is determined as the repaired marble.

[0115] For example, in this embodiment, after obtaining the current base coating, the server obtains the pattern distribution of the reference area, and performs regional color matching on the current base coating according to the pattern distribution, thereby obtaining the repaired area and determining the marble to be repaired as the repaired marble.

[0116] Furthermore, the above-mentioned “performing regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area” further includes the following steps:

[0117] Acquire various pattern types located in the reference area, wherein different pattern types correspond to different pattern elements;

[0118] When at least two pattern elements belonging to the same pattern type are respectively extended to connect with different positions of the contour to be repaired, at least two of the pattern elements are respectively extended in a direction toward the area to be repaired to form a transition area connected to each other;

[0119] Each of the transition areas is subjected to regional color matching based on the pattern type to obtain a repaired area.

[0120] For example, in this embodiment, the server will obtain each pattern type in the reference area, wherein different pattern types correspond to different pattern elements, for example, the pattern element of the first pattern type is a flower, and the pattern element of the second pattern type is a sun. When two sun patterns are connected to the two sides of the contour to be repaired, the area between the two sun patterns can be connected in the area to be repaired to form a transition area; when three sun patterns are connected to the two sides of the contour to be repaired, for example, there is a sun pattern connected to the left side of the contour to be repaired, and two sun patterns are connected to the right side, then the sun pattern on the left side is connected to the two sun patterns on the right side in the area to be repaired to form two transition areas, that is, when at least two pattern elements belonging to the same pattern type are extended to different positions of the contour to be repaired, at least two pattern elements are extended in the direction toward the area to be repaired to form interconnected transition areas. Then, each transition area is color-matched based on the pattern type, and the repaired area is obtained after color matching.

[0121] Furthermore, the above method further comprises the following steps:

[0122] Determine each pattern type far away from the contour to be repaired, and determine the number of each reference element of each pattern element corresponding to each pattern type in the reference area;

[0123] Obtaining an area ratio between the reference area and the area to be repaired, and determining the number of each repair element corresponding to the number of each reference element based on the area ratio;

[0124] The pattern elements corresponding to the number of repair elements are generated in the to-be-repaired area in a random manner, and the pattern elements are color matched based on the area of ​​each pattern type.

[0125] For example, in this embodiment, the server will determine the types of patterns that have no connection with the contour to be repaired in the reference area, that is, determine the types of patterns that are far away from the contour to be repaired, and calculate the number of pattern elements of each pattern type in the reference area, that is, the number of each reference element. At this time, the server will obtain the area ratio between the reference area and the area to be repaired, and can determine the number of pattern elements of each pattern type in the area to be repaired, that is, the number of each repair element, based on the area ratio. For example, if the area ratio between the reference area and the area to be repaired is 1:1, it means that the number of each repair element in the area to be repaired is the same as the number of each reference element in the reference area.

[0126] After determining the number of each reference element in the area to be repaired, the server will randomly generate pattern elements corresponding to the number of each repair element in the area to be repaired, and then perform regional color matching on each pattern element according to the color of each pattern type. This embodiment can determine the number of each repair element in the area to be repaired based on the area ratio between the reference area and the area to be repaired, and the number of each repair element calculated in this way is more accurate.

[0127] In step S112, the following contents are included:

[0128] A restored image of the restored marble is obtained, and a history record bar is generated based on the restored image and the image to be restored.

[0129] For example, in this embodiment, after determining the restored marble, the server will obtain the restored image of the restored marble, and generate a history record bar according to the restored image and the image to be restored for subsequent viewing by the management terminal.

[0130] Furthermore, the above-mentioned “obtaining a restored image of the restored marble, and generating a history record bar based on the restored image and the image to be restored” further includes the following steps:

[0131] Retrieving a historical restoration form, wherein the historical restoration form includes blank record strips arranged in sequence, and each blank record strip includes a time slot and an image slot;

[0132] Select one of the blank record strips in order, and determine the blank record strip as the record strip to be filled;

[0133] Retrieving a preset photographing plug-in, and performing image acquisition on the restored marble based on the preset photographing plug-in to obtain a restored image of the restored marble and an acquisition time;

[0134] The acquisition time is filled into the time slot, and the restored image and the image to be restored are filled into the image slot to obtain a history record bar.

[0135] For example, in this embodiment, after the server completes the repair of the area to be repaired at the control machine end, it will first call up the historical repair form, in which there are multiple blank record strips arranged in order, and each blank record strip is provided with a time slot and an image slot. The server selects a blank record strip in order, and determines the blank record strip as the record strip to be filled, thereby calling up the preset camera plug-in, performing image acquisition on the repaired marble, and obtaining the repaired image of the repaired marble and the acquisition time when the image was acquired after the image acquisition, and filling the acquisition time into the time slot in turn, and filling the repaired image and the image to be repaired into the image slot, and obtaining the historical record strip after completing the corresponding filling, so that the management end can view the relevant information of the repaired marble in the future.

[0136] Furthermore, the above-mentioned “filling the restored image and the image to be restored into the image slot” further includes the following steps:

[0137] The image slot includes a preset blank layer, wherein the preset blank layer includes a first image area and a second image area;

[0138] Filling the first image area with the restored image, and generating a first marking frame in the first image area for selecting a restored area in the restored image;

[0139] Filling the second image area with the image to be repaired, and generating a second marking frame in the second image area for selecting the area to be repaired in the image to be repaired;

[0140] An indication frame connection line is generated, wherein a first end of the indication frame connection line is connected to a frame outline of the first marking frame, and a second end of the indication frame connection line is connected to a frame outline of the second marking frame.

[0141] For example, in this embodiment, the server will fill the image slot with relevant content. There is a blank layer set in advance in the image slot, that is, a preset blank layer, and there are two image areas in the preset blank layer, including a first image area and a second image area. The server will fill the repaired image into the first image area, and in the first image area, the repaired area in the repaired image will be framed to generate a first marking frame; then, the server will fill the image to be repaired into the second image area, and in the second image area, the area to be repaired in the image to be repaired will be framed to generate a second marking frame. After generating the first marking frame and the second marking frame, the server will connect the first marking frame and the second marking frame with a connecting line, that is, generate an indicating frame connecting line, wherein the first end of the indicating frame connecting line is connected to the frame outline of the first marking frame, and the second end of the indicating frame connecting line is connected to the frame outline of the second marking frame. In this embodiment, when the management end views the image-related information of the repaired marble in the future, it can quickly locate the repair area of ​​the marble, saving a certain amount of working time.

[0142] According to the solution of the present invention, the server can first obtain the image to be repaired of the marble to be repaired, and perform image recognition based on the image to be repaired, so as to determine the contour to be repaired in the image to be repaired; then, the server will extend a preset distance outward along the contour to be repaired in the image to be repaired to generate a reference contour around the contour to be repaired, and determine the area between the reference contour and the contour to be repaired as the reference area; then, fill the base coating into the area to be repaired, so as to form an initial base coating; and determine the base pixel value based on the color proportion of the reference area to perform base color matching on the initial base coating based on the base pixel value, so as to obtain the current base coating; then perform regional color matching on the current base coating based on the pattern distribution of the reference area, so as to obtain the repaired area, and determine the marble to be repaired as the repaired marble; then obtain the repaired image of the repaired marble, and generate a history bar based on the repaired image and the image to be repaired. The present invention can objectively match the base coating based on the color proportion of the reference area, which greatly improves the repair effect and efficiency of marble.

[0143] Another embodiment of the present invention provides an automatic color matching configuration device suitable for marble. Figure 3 The corresponding device block diagram is as follows:

[0144] A recognition module is configured to obtain an image of the marble to be restored, and perform image recognition based on the image to be restored to determine a contour to be restored located in the image to be restored;

[0145] A contour generation module is configured to generate a reference contour around the contour to be repaired by extending a preset distance outward along the contour to be repaired in the image to be repaired, and determine an area between the reference contour and the contour to be repaired as a reference area;

[0146] A filling module is configured to fill the base coating into the area to be repaired in the outline to be repaired to form an initial base coating;

[0147] A base color matching module is configured to determine a base pixel value based on the color proportion of the reference area, and perform base color matching on the initial base coating based on the base pixel value to obtain a current base coating;

[0148] A regional color matching module is configured to perform regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area, and determine the marble to be repaired as the repaired marble;

[0149] The form establishment module is configured to obtain the restored image of the restored marble and establish a historical restoration form based on the restored image and the image to be restored.

[0150] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer readable instructions, data structures, program modules or other data. Communication media generally embody computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and include any information transfer medium. Any combination of the above is also included within the scope of readable media.

[0151] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to implement the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the preferred embodiment of the present invention.

[0152] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0153] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0154] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0155] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device so disclosed may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0156] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0157] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0158] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0159] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative and not restrictive with respect to the scope of the present invention, and the scope of the present invention is defined by the appended claims.

Claims

1. An automatic color matching configuration method suitable for marble, characterized in that: The following steps are involved: Acquire an image of the marble to be repaired, and perform image recognition based on the image to be repaired to determine a contour to be repaired located in the image to be repaired; Extending a preset distance outward along the contour to be repaired in the image to be repaired to generate a reference contour surrounding the contour to be repaired, and determining an area between the reference contour and the contour to be repaired as a reference area; Filling the base coating into the area to be repaired located in the outline to be repaired to form an initial base coating; Determine a base pixel value based on the color proportion of the reference area, and perform base color matching on the initial base coating based on the base pixel value to obtain a current base coating; Performing regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area, and determining the marble to be repaired as the repaired marble; A restored image of the restored marble is obtained, and a history record bar is generated based on the restored image and the image to be restored.

2. The automatic color matching configuration method applicable to marble according to claim 1, characterized in that: Acquiring an image of the marble to be repaired, and performing image recognition based on the image to be repaired to determine a contour to be repaired located in the image to be repaired, comprising: Obtaining the brightness of ambient light, and comparing the brightness of the ambient light with a preset brightness; When the light brightness is less than or equal to the preset brightness, calling a preset lighting plug-in, and illuminating the marble to be repaired based on the preset lighting plug-in; Retrieving a preset photographing plug-in, and based on the preset photographing plug-in, performing image acquisition on the marble to be restored, to obtain an image to be restored of the marble to be restored; The image to be repaired is input into a pre-trained image recognition model to determine a contour to be repaired in the image to be repaired.

3. The automatic color matching configuration method applicable to marble according to claim 1, characterized in that: Extending a preset distance outward along the contour to be repaired in the image to be repaired to generate a reference contour surrounding the contour to be repaired, and determining an area between the reference contour and the contour to be repaired as a reference area, including: Determine a circumscribed circle having a circumscribed relationship with the contour to be repaired based on the contour to be repaired, and determine the radius of the circumscribed circle as a preset distance; Extending a preset distance outward from the contour to be repaired to generate an initial contour surrounding the contour to be repaired, and determining whether contour lines of the initial contour are all located in the image frame of the image to be repaired; When at least part of the contour line of the initial contour is located outside the image to be repaired, the initial contour is updated based on the image frame of the image to be repaired to obtain a reference contour located in the image frame, and an area between the reference contour and the contour to be repaired is determined as a reference area.

4. The automatic color matching configuration method applicable to marble according to claim 3, characterized in that: The initial contour is updated based on the image frame of the image to be repaired to obtain a reference contour located in the image frame, including: When all contour lines of the initial contour are outside the image to be restored, determining the image frame of the image to be restored as the reference contour; or When a partial contour line of the initial contour is outside the image to be restored, determining each independent line segment in the partial contour line; Acquire a first intersection point and a second intersection point between each independent line segment and the image frame, and divide the image frame based on the first intersection point and the second intersection point to obtain an updated line segment corresponding to the independent line segment; The initial contour is updated based on the updated line segment corresponding to each independent line segment to obtain a reference contour located in the image frame.

5. The automatic color matching configuration method applicable to marble according to claim 1, characterized in that: Determining a base pixel value based on the color proportion of the reference area, and performing base color matching on the initial base coating based on the base pixel value to obtain a current base coating, including: Acquire each reference pixel point located in the reference area, and respectively determine each reference pixel value corresponding to each reference pixel point; Retrieving a plurality of preset pixel value intervals, and grouping the reference pixel points corresponding to the reference pixel values ​​in the same preset pixel value interval into the same group to obtain reference pixel groups; Counting the number of pixels of each reference pixel point respectively included in each reference pixel group to obtain respective statistical numbers corresponding to each reference pixel group; Determine the one with the largest statistical quantity in each reference pixel group, and determine the preset pixel value interval corresponding to the one as the base interval; Obtaining a maximum endpoint value and a minimum endpoint value in the base interval, and performing mean calculation based on the maximum endpoint value and the minimum endpoint value to obtain the base pixel value; The initial base coating layer is subjected to base color matching based on base pixel values ​​to obtain a current base coating layer.

6. The automatic color matching configuration method applicable to marble according to claim 1, characterized in that: Based on the pattern distribution of the reference area, the current base coating is regionally color matched to obtain a repaired area, including: Acquire various pattern types located in the reference area, wherein different pattern types correspond to different pattern elements; When at least two pattern elements belonging to the same pattern type are respectively extended to connect with different positions of the contour to be repaired, at least two of the pattern elements are respectively extended in a direction toward the area to be repaired to form a transition area connected to each other; Each of the transition areas is subjected to regional color matching based on the pattern type to obtain a repaired area.

7. The automatic color matching configuration method applicable to marble according to claim 6, characterized in that: The method further comprises: Determine each pattern type far away from the contour to be repaired, and determine the number of each reference element of each pattern element corresponding to each pattern type in the reference area; Obtaining an area ratio between the reference area and the area to be repaired, and determining the number of each repair element corresponding to the number of each reference element based on the area ratio; The pattern elements corresponding to the number of repair elements are generated in the to-be-repaired area in a random manner, and the pattern elements are color matched based on the area of ​​each pattern type.

8. The automatic color matching configuration method applicable to marble according to claim 1, characterized in that: Obtaining a restored image of the restored marble, and generating a history bar based on the restored image and the image to be restored, including: Retrieving a historical restoration form, wherein the historical restoration form includes blank record strips arranged in sequence, and each blank record strip includes a time slot and an image slot; Select one of the blank record strips in order, and determine the blank record strip as the record strip to be filled; Retrieving a preset photographing plug-in, and performing image acquisition on the restored marble based on the preset photographing plug-in to obtain a restored image of the restored marble and an acquisition time; The acquisition time is filled into the time slot, and the restored image and the image to be restored are filled into the image slot to obtain a history record bar.

9. The automatic color matching configuration method applicable to marble according to claim 8, characterized in that: Filling the restored image and the image to be restored into the image slot includes: The image slot includes a preset blank layer, wherein the preset blank layer includes a first image area and a second image area; Filling the first image area with the restored image, and generating a first marking frame in the first image area for selecting a restored area in the restored image; Filling the second image area with the image to be repaired, and generating a second marking frame in the second image area for selecting the area to be repaired in the image to be repaired; An indication frame connection line is generated, wherein a first end of the indication frame connection line is connected to a frame outline of the first marking frame, and a second end of the indication frame connection line is connected to a frame outline of the second marking frame.

10. An automatic color matching device suitable for marble, characterized in that: include: A recognition module is configured to obtain an image of the marble to be restored, and perform image recognition based on the image to be restored to determine a contour to be restored located in the image to be restored; A contour generation module is configured to generate a reference contour around the contour to be repaired by extending a preset distance outward along the contour to be repaired in the image to be repaired, and determine an area between the reference contour and the contour to be repaired as a reference area; A filling module is configured to fill the base coating into the area to be repaired in the outline to be repaired to form an initial base coating; A base color matching module is configured to determine a base pixel value based on the color proportion of the reference area, and perform base color matching on the initial base coating based on the base pixel value to obtain a current base coating; A regional color matching module is configured to perform regional color matching on the current base coating based on the pattern distribution of the reference area to obtain a repaired area, and determine the marble to be repaired as the repaired marble; The form establishment module is configured to obtain the restored image of the restored marble and establish a historical restoration form based on the restored image and the image to be restored.