Disclosed is an automatic color matching configuration method and device for marble, where the method includes the following steps: obtaining a to-be-repaired image of to-be-repaired marble for image recognition to determine a to-be-repaired contour in the to-be-repaired image; extending outward a preset distance along the to-be-repaired contour to generate a reference contour, and determining an area between the reference contour and the to-be-repaired contour as a reference area; filling a base coating into a to-be-repaired area in the to-be-repaired contour to form an initial base coat; determining a base pixel value based on a color ratio of the reference area, and performing base color matching on the initial base coat based on the base pixel value to obtain a current base coat.
Legal claims defining the scope of protection, as filed with the USPTO.
1. An automatic color matching configuration method for marble, comprising the following steps: obtaining a to-be-repaired image of to-be-repaired marble, and performing image recognition based on the to-be-repaired image to determine a to-be-repaired contour in the to-be-repaired image; extending outward a preset distance along the to-be-repaired contour in the to-be-repaired image to generate a reference contour surrounding the to-be-repaired contour, and determining an area between the reference contour and the to-be-repaired contour as a reference area; filling a base coating into a to-be-repaired area in the to-be-repaired contour to form an initial base coat; determining a base pixel value based on a color ratio of the reference area, and performing base color matching on the initial base coat based on the base pixel value to obtain a current base coat; performing regional color matching on the current base coat based on pattern distribution of the reference area to obtain a repaired area, and determining the to-be-repaired marble as repaired marble; and obtaining a repaired image of the repaired marble, and generating historical record entries based on the repaired image and the to-be-repaired image.
2. The automatic color matching configuration method for marble of claim 1, wherein the step of obtaining a to-be-repaired image of to-be-repaired marble, and performing image recognition based on the to-be-repaired image to determine a to-be-repaired contour in the to-be-repaired image comprises: obtaining brightness of ambient light, and comparing the brightness with preset brightness; when the brightness is less than or equal to the preset brightness, calling a preset lighting plug-in, and illuminating the to-be-repaired marble based on the preset lighting plug-in; calling a preset camera plug-in, and collecting images of the to-be-repaired marble based on the preset camera plug-in to obtain the to-be-repaired image of the to-be-repaired marble; and inputting the to-be-repaired image to a pre-trained image recognition model to determine the to-be-repaired contour in the to-be-repaired image.
3. The automatic color matching configuration method for marble of claim 1, wherein the step of extending outward a preset distance along the to-be-repaired contour in the to-be-repaired image to generate a reference contour surrounding the to-be-repaired contour, and determining an area between the reference contour and the to-be-repaired contour as a reference area comprises: determining a circumscribed circle having a circumscribed relationship with the to-be-repaired contour, and determining a radius of the circumscribed circle as the preset distance; extending outward the preset distance along the to-be-repaired contour to generate an initial contour surrounding the to-be-repaired contour, and determining whether contour lines of the initial contour are wholly located inside a frame of the to-be-repaired image; and when the contour lines of the initial contour are at least partially located outside the to-be-repaired image, updating the initial contour based on the frame of the to-be-repaired image to obtain the reference contour located inside the frame, and determining the area between the reference contour and the to-be-repaired contour as the reference area.
4. The automatic color matching configuration method for marble of claim 3, wherein the step of updating the initial contour based on the frame of the to-be-repaired image to obtain the reference contour located inside the frame comprises: when the contour lines of the initial contour are wholly located outside the to-be-repaired image, determining the frame of the to-be-repaired image as the reference contour; or when the contour lines of the initial contour are partially located outside the to-be-repaired image, determining independent segments in the partial contour lines; obtaining a first intersection point and a second intersection point between each of the independent segments and the frame, and dividing the frame based on the first intersection point and the second intersection point to obtain updated segments corresponding to the independent segments; and updating the initial contour based on the updated segments corresponding to the independent segment to obtain the reference contour located inside the frame.
5. The automatic color matching configuration method for marble of claim 1, wherein the step of determining a base pixel value based on a color ratio of the reference area, and performing base color matching on the initial base coat based on the base pixel value to obtain a current base coat comprises: obtaining reference pixel points located inside the reference area, and determining reference pixel values corresponding to the reference pixel points; calling a plurality of preset pixel value intervals, and dividing the reference pixel points corresponding to the reference pixel values within the same preset pixel value interval into the same group to obtain reference pixel groups; calculating the number of pixels of the reference pixel points in the reference pixel groups to obtain calculated numbers corresponding to the reference pixel groups; determining the one with the largest calculated number among the reference pixel groups, and determining the preset pixel value interval corresponding thereto as a base interval; obtaining a maximum endpoint value and a minimum endpoint value in the base interval, and calculating a mean based on the maximum endpoint value and the minimum endpoint value to obtain the base pixel value; and performing the base color matching on the initial base coat based on the base pixel value to obtain the current base coat.
6. The automatic color matching configuration method for marble of claim 1, wherein the step of performing regional color matching on the current base coat based on pattern distribution of the reference area to obtain a repaired area comprises: obtaining pattern types located inside the reference area, wherein different pattern types correspond to different pattern elements; when at least two pattern elements of the same pattern type extend to connect with different positions of the to-be-repaired contour, extending the at least two pattern elements in a direction toward the to-be-repaired area respectively to form interconnected transition areas; and performing the regional color matching on the transition areas based on the pattern types to obtain the repaired area.
7. The automatic color matching configuration method for marble of claim 6, wherein the method further comprises: determining pattern types far away from the to-be-repaired contour, and determining the number of reference elements of the pattern elements corresponding to the pattern types in the reference area; obtaining an area ratio between the reference area and the to-be-repaired area, and determining the number of repaired elements corresponding to the number of reference elements based on the area ratio; and generating pattern elements corresponding to the number of repaired elements in the to-be-repaired area in a random manner, and performing the regional color matching on the pattern elements based on the pattern types.
8. The automatic color matching configuration method for marble of claim 1, wherein the step of obtaining a repaired image of the repaired marble, and generating historical record entries based on the repaired image and the to-be-repaired image comprises: calling a historical repair form, wherein the historical repair form comprises blank record entries arranged in order, and each of the blank record entries comprises a time slot and an image slot; selecting one of the blank record entries in order, and determining the one as a to-be-filled record entry; calling a preset camera plug-in, and collecting images of the repaired marble based on the preset camera plug-in to obtain the repaired image of the repaired marble and a collection time; and filling the collection time into the time slot, and filling the repaired image and the to-be-repaired image into the image slot to obtain the historical record entries.
9. The automatic color matching configuration method for marble of claim 8, wherein the step of filling the repaired image and the to-be-repaired image into the image slot comprises: comprising a preset blank image layer in the image slot, wherein the preset blank image layer comprises a first image area and a second image area; filling the first image area with the repaired image, and generating in the first image area a first marking frame for selecting the repaired area in the repaired image; filling the second image area with the to-be-repaired image, and generating in the second image area a second marking frame for selecting the to-be-repaired area in the to-be-repaired image; and generating a marking frame connection line, wherein one end of the marking frame connection line is connected to an outline of the first marking frame and the other end thereof is connected to an outline of the second marking frame.
10. An automatic color matching configuration device for marble, comprising: a recognition module, configured to obtain a to-be-repaired image of to-be-repaired marble, and perform image recognition based on the to-be-repaired image to determine a to-be-repaired contour in the to-be-repaired image; a contour generation module, configured to extend outward a preset distance along the to-be-repaired contour in the to-be-repaired image to generate a reference contour surrounding the to-be-repaired contour, and determine an area between the reference contour and the to-be-repaired contour as a reference area; a filling module, configured to fill a base coating into a to-be-repaired area in the to-be-repaired contour to form an initial base coat; a base color matching module, configured to determine a base pixel value based on a color ratio of the reference area, and perform base color matching on the initial base coat based on the base pixel value to obtain a current base coat; a regional color matching module, configured to perform regional color matching on the current base coat based on pattern distribution of the reference area to obtain a repaired area, and determine the to-be-repaired marble as repaired marble; and a form creation module, configured to obtain a repaired image of the repaired marble, and create a historical repair form based on the repaired image and the to-be-repaired image.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
January 10, 2025
June 24, 2025
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.