An intelligent restoration method and system for cultural relics
Through automatic identification and numbering spraying technology, the problem of low manual operation efficiency in the restoration of fragmented cultural relics is solved, the automatic processing of fragmented cultural relics is realized, and the overall operation efficiency is improved.
Patent Information
- Application Number
- CN202310830238.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2043-07-06
AI Technical Summary
During the repair of fragmented cultural relics, manual operation efficiency is low, especially when there are too many fragments, manual photography and numbering spraying are difficult to improve the overall operation efficiency.
An intelligent restoration method of cultural relics is adopted to automatically identify fragments and spray them by obtaining detection status information and image information of detection points. The method includes outputting an in-place signal, counting and determining a number, feature identification to acquire image information, and controlling the spraying device to move to the spraying area for numbering operations.
Automatic image collection and numbering spraying of fragmented cultural relics is realized, which improves the overall operation efficiency of cultural relics restoration and reduces the time and energy of manual operation.
Smart Images

Figure CN116977293B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cultural relic restoration technology, and in particular, to a method and system for intelligent restoration of cultural relics. Background Art
[0002] Cultural relic restoration is a physical and chemical restoration measure directly carried out on cultural relics by using traditional techniques and modern technical means to preserve and understand the artistic and historical original appearance of cultural relics, slow down or terminate the diseases of cultural relics, ensure the safety of cultural relics and enable their long-term preservation, which is an important part of cultural relic protection.
[0003] In the related art, for fragmented cultural relics, general restoration means of splicing cultural relics are usually adopted for restoration. For example, for a damaged porcelain vase, during the restoration process, the staff will take pictures of each fragment and spray numbers on each fragment. According to the obtained image situation, the staff can splice the fragments on the computer. When the determined plan is correct, the staff will then actually connect the cultural relic fragments according to the connection situation of the fragments in the corresponding plan, so as to achieve the restoration of fragmented cultural relics.
[0004] Regarding the above related art, the inventor believes that during the restoration of fragmented cultural relics, it is necessary for the staff to manually take pictures of the fragments and spray numbers. Once there are too many fragments, the manual operation method has a low overall operation efficiency for the restoration of cultural relics, and there is still room for improvement. Summary of the Invention
[0005] In order to improve the overall operation efficiency of cultural relic restoration, this application provides a method and system for intelligent restoration of cultural relics.
[0006] In a first aspect, this application provides a method for intelligent restoration of cultural relics, adopting the following technical solutions:
[0007] A method for intelligent restoration of cultural relics includes:
[0008] Obtaining the detection status information of preset detection points;
[0009] Outputting an in-place signal when the status corresponding to the detection status information switches from a preset idle state to a preset in-place state, and obtaining the detection image information of the detection points;
[0010] Counting according to the in-place signal to determine the in-place fragment number;
[0011] Performing feature recognition on the detection image information to obtain fragment image information, and determining the spraying area according to the fragment image information and the in-place fragment number;
[0012] Controlling a preset spraying device to move to the spraying area to perform spraying operations with the in-place fragment number.
[0013] By adopting the above technical solution, during the restoration of fragmented cultural relics, when the staff places the fragmented cultural relics on the detection point, the image of the fragmented cultural relics can be automatically acquired, and at the same time, the corresponding number of the fragment is obtained, and the fragment is numbered and sprayed according to the fragment image situation and the position where it is located, so as to realize the automatic image acquisition and numbered spraying of the fragmented cultural relics, and the overall operation efficiency of the cultural relic restoration is relatively high.
[0014] Optionally, the steps of determining the spraying area according to the fragment image information and the in-place fragment number include:
[0015] Determine the required area corresponding to the in-place fragment number according to the preset requirement matching relationship;
[0016] Control the center point on the required area to move on the image corresponding to the fragment image information and judge whether the required area is all within the fragment image;
[0017] If the required area is not all within the fragment image, define the position where the center point of the current required area is located as an invalid point;
[0018] If the required area is all within the fragment image, define the position where the center point of the current required area is located as a valid point;
[0019] Determine the center position point according to all the valid points, and determine the required area corresponding to the center position point as the spraying area.
[0020] By adopting the above technical solution, the specific spraying area can be determined according to the size of the area required for the number to be sprayed currently, so that the corresponding fragment number can be sprayed on the fragment.
[0021] Optionally, the steps of determining the center position point according to all the valid points include:
[0022] Connect all the valid points pairwise and judge whether all the valid points are on the same straight line;
[0023] If all the valid points are on the same straight line, define the two valid points with the longest line segment length after connection as the boundary points, and calculate the midpoint according to the two boundary points to determine the center position point;
[0024] If all the valid points are not on the same straight line, define the area enclosed by the connection as the valid area;
[0025] Generate a randomly movable judgment point within the valid area, and connect the judgment point with each valid point on the contour line of the valid area to determine the distance between the points;
[0026] Determine the distance between the points with the largest value and the points with the smallest value according to the preset sorting rules, and perform difference calculation based on the distance between the points to determine the difference distance;
[0027] The minimum value difference distance is determined according to the sorting rule, and the position of the decision point corresponding to the minimum value difference distance is determined as the center position point.
[0028] By adopting the above technical solution, the number can be sprayed on the center of the fragment as much as possible to facilitate subsequent staff to check it.
[0029] Optionally, after the valid points and invalid points are determined, the cultural relic intelligent restoration method further includes:
[0030] Determine whether there is a valid point;
[0031] If there is a valid point, the center point is determined;
[0032] If there is no valid point, the required area is scaled by a preset adjustment coefficient to update the required area, and the valid point is re-determined using the updated required area until it is determined that there is a valid point;
[0033] The demand area before scaling is defined as the original area, and the current demand area is defined as the conforming area, and the demand area before scaling the conforming area is defined as the unfilled area;
[0034] Calculate the zoom factor based on the original area and the conforming area;
[0035] Determine whether the zoom factor is greater than the preset permitted factor;
[0036] If the zoom multiple is greater than the permitted multiple, a numbered abnormal signal is output, and a preset rejection device is controlled to move the fragment to a preset abnormal processing area;
[0037] If the zoom factor is not greater than the permitted factor, the adjustment factor is updated with the preset correction factor and the unfilled area is zoomed with the updated adjustment factor, and after the zoom is completed, it is determined whether there is a valid point;
[0038] If there is no valid point, the adjustment coefficient before the update is defined as the valid coefficient, and the unfilled area is scaled according to the valid coefficient to obtain the required area for determining the center point;
[0039] If there is a valid point, the current adjustment coefficient is continuously updated with the correction coefficient and the unfilled area is rescaled until the required area without a valid point is determined.
[0040] By adopting the above technical solution, when the fragments are too small to meet the requirements of numbered spraying, the size of the numbers that can be sprayed can be determined according to the scaling situation, so that the fragment numbers can be better sprayed.
[0041] Optionally, after the central position point is determined, the intelligent restoration method of cultural relics further includes:
[0042] In the image corresponding to the fragment image information, the area with the same color as the preset underlying color is defined as the underlying area;
[0043] Control the required area to rotate around the central position point, and define the rotation angle at which the required area is entirely within the fragment image as the effective angle;
[0044] In the required area at the effective angle, determine the exposed area according to the intersection of the characters of the in-place fragment numbers and the underlying area;
[0045] Determine the character area corresponding to the in-place fragment number according to the preset area matching relationship;
[0046] Calculate based on the exposed area and the character area to determine the exposure ratio;
[0047] Determine the exposure ratio with the largest value according to the sorting rule, and determine the spraying area according to the effective angle corresponding to the exposure ratio.
[0048] By adopting the above technical solution, the positions in the fragments without image characters can be determined, so as to minimize the coverage of the image characters during the spraying of fragment numbers, facilitating subsequent verification by the staff during the splicing process.
[0049] Optionally, after determining the exposure ratio with the largest value according to the sorting rule, the intelligent restoration method of cultural relics further includes:
[0050] Judge whether the exposure ratio is less than the preset required ratio;
[0051] If the exposure ratio is not less than the required ratio, determine the spraying area based on this exposure ratio;
[0052] If the exposure ratio is less than the required ratio, determine the smallest separation difference distance among the remaining separation difference distances according to the sorting rule, and update the central position point according to this separation difference distance;
[0053] After updating the central position point, judge whether there is a situation where the exposure ratio is not less than the required ratio;
[0054] If there is a situation where the exposure ratio is not less than the required ratio, determine the spraying area;
[0055] If there is no case where the exposure ratio is not less than the demand ratio, the separation difference distance is re-determined to update the central position point until the spraying area is determined or the determined separation difference distance is greater than the preset upper limit distance, and when the separation difference distance is greater than the upper limit distance, the spraying area is determined with the first determined central position point.
[0056] By adopting the above technical solution, it is possible to determine as much as possible to use the spraying area with less coverage of image characters.
[0057] Optionally, after determining the exposure ratio with the largest value according to the sorting rule, the cultural relic intelligent restoration method further includes:
[0058] Judge whether there are at least two identical exposure ratios with the largest value;
[0059] If there are no at least two identical exposure ratios with the largest value, the spraying area is determined according to this exposure ratio;
[0060] If there are at least two identical exposure ratios with the largest value, the intersecting part between the corresponding demand areas of this exposure ratio is defined as the overlapping part, and the remaining parts of each demand area in the overlapping part are defined as the independent parts;
[0061] Obtain the overlapping pixel acquisition distance of each point in the overlapping part, and obtain the independent pixel acquisition distance of each point in the independent part;
[0062] Calculate the mean value according to all the overlapping pixel acquisition distances to determine the overlapping mean distance;
[0063] Calculate the difference according to the independent pixel acquisition distance and the overlapping mean distance to determine the difference pixel distance;
[0064] Sum up all the difference pixel distances in a single demand area to determine the deviation pixel distance;
[0065] Determine the deviation pixel distance with the smallest value according to the sorting rule, and determine the spraying area according to this deviation pixel distance and the corresponding exposure ratio.
[0066] By adopting the above technical solution, it is possible to spray numbers at relatively flat positions in the fragments to make the spraying effect better.
[0067] In a second aspect, the present application provides a cultural relic intelligent restoration system, adopting the following technical solution:
[0068] A cultural relic intelligent restoration system includes:
[0069] An acquisition module, which acquires the detection status information of preset detection points;
[0070] A processing module, connected to the acquisition module and the judgment module, for storing and processing information;
[0071] A judgment module, connected to the acquisition module and the processing module, for judging information;
[0072] When the judgment module determines that the state corresponding to the detection status information switches from a preset idle state to a preset in-place state, the processing module outputs an in-place signal and causes the acquisition module to acquire the detection image information of the detection point;
[0073] The processing module counts according to the in-place signal to determine the in-place fragment number;
[0074] The processing module performs feature recognition on the detection image information to obtain fragment image information, and determines the spraying area according to the fragment image information and the in-place fragment number;
[0075] The processing module controls a preset spraying device to move to the spraying area and perform spraying operations with the in-place fragment number.
[0076] By adopting the above technical solution, during the process of repairing fragmented cultural relics, when the judgment module determines that the staff places the fragmented cultural relic on the detection point, the acquisition module can automatically acquire the image of the fragmented cultural relic, and at the same time obtain the corresponding number of the fragment, and cause the processing module to perform number spraying on the fragment according to the fragment image situation and the location, so as to realize automatic image acquisition and number spraying of fragmented cultural relics, making the overall operation efficiency of cultural relic repair relatively high.
[0077] In summary, the present application includes at least one of the following beneficial technical effects:
[0078] During the process of repairing cultural relic fragments, automatic image acquisition and automatic number spraying can be performed on the fragments according to the fragment position situation, realizing automated operations and improving the overall operation efficiency of cultural relic repair;
[0079] During the process of number spraying on cultural relic fragments, the number can be sprayed at the center position of the fragment for subsequent viewing by the staff, and during the spraying process, the original image characters on the fragment can be covered as little as possible, facilitating subsequent splicing processing by the staff;
[0080] During the number spraying process, the number can be sprayed on a flat area as much as possible, making the number spraying effect better. Description of the Drawings
[0081] Figure 1 is a flowchart of the intelligent restoration method of cultural relics.
[0082] Figure 2 is a flowchart of the method for determining the spraying area.
[0083] Figure 3 It is a flowchart of the central position point determination method.
[0084] Figure 4 It is a flowchart of the demand area scaling processing method.
[0085] Figure 5 It is a flowchart of the spraying area coverage analysis method.
[0086] Figure 6 It is a flowchart of the spraying area selection method.
[0087] Figure 7 It is a flowchart of the flat spraying control method.
[0088] Figure 8 It is a module flowchart of the cultural relic intelligent restoration method. Embodiment
[0089] In order to make the purpose, technical solution and advantages of the present application clearer, the following will further elaborate on the present application in combination with the attached Figure 1-8 figures 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.
[0090] The following will further describe the embodiments of the present application in detail with reference to the accompanying drawings of the specification.
[0091] The embodiments of the present application disclose a cultural relic intelligent restoration method. During the process of repairing fragmented cultural relics, when the fragments are moved to the detection points, the images at the detection points can be acquired to obtain the images of the fragments. At this time, according to the shapes of the fragments and the original image characters on the fragments, a more appropriate spraying area can be determined, so that the corresponding spraying equipment can automatically spray numbers on the fragments at the spraying area, thereby realizing the automatic image acquisition and automatic number spraying of cultural relic fragments, and improving the overall operation efficiency of the cultural relic repair operation.
[0092] Referring to Figure 1 , the method flow of the cultural relic intelligent restoration method includes the following steps:
[0093] Step S100: Obtain the detection status information of the preset detection points.
[0094] The detection point is the position set by the staff for placing and processing the cultural relic fragments. An instrument for detecting whether the fragments are in place, such as a pressure sensor, is set at this detection point. The state corresponding to the detection status information is the state of whether there are fragments at the detection point; the fragments can be moved to the detection point manually by the staff or conveyed by a conveyor belt, that is, the detection point is a position on the conveyor belt. When using the conveyor belt to transport the fragments, the conveyor belt should be paused when the fragments move to the detection point.
[0095] Step S101: Output a signal indicating the fragments are in place when the state corresponding to the detection status information switches from the preset idle state to the preset in-place state, and obtain the detection image information of the detection point.
[0096] The idle state is the state when there are no fragments at the detection point set by the staff, and the in-place state is the state when there are fragments at the detection point set by the staff. When switching from the idle state to the in-place state, it means that new fragments have moved to the detection point. At this time, output a signal indicating the fragments are in place to identify this situation, so as to facilitate subsequent processing of the fragments; the image corresponding to the detection image information is the image of the detection point. It can be obtained by a shooting instrument installed directly above and facing down at the detection point.
[0097] Step S102: Count according to the signal indicating the fragments are in place to determine the in-place fragment number.
[0098] The in-place fragment number is the number of the fragment, that is, the number to be sprayed on the fragment. When this fragment is the first one to move to the detection point, the number is 1. When this fragment is the second one to move to the detection point, the number is 2, and so on. It can be determined by counting the number of times the signal indicating the fragments are in place is output.
[0099] Step S103: Perform feature recognition on the detection image information to obtain the fragment image information, and determine the spraying area according to the fragment image information and the in-place fragment number.
[0100] The image corresponding to the fragment image information is the image of the cultural relic fragment in the image corresponding to the detection image information. It can be determined by a feature recognition algorithm, which can be a conventional convolutional neural network algorithm. The specific algorithm can be set by the staff according to the actual situation; the spraying area is the area on the fragment for number spraying. The specific determination method will be described below and will not be elaborated here.
[0101] Step S104: Control the preset spraying device to move to the spraying area and perform spraying operations with the in-place fragment number.
[0102] The spraying device is a device with a moving function and capable of numbering and spraying fragments. The spraying device is controlled to perform numbering spraying in the spraying area to achieve automatic spraying of fragment numbers, thereby improving the overall operation efficiency.
[0103] Referring to Figure 2 , the steps for determining the spraying area based on the fragment image information and the in-place fragment numbers include:
[0104] Step S200: Determine the required area corresponding to the in-place fragment number according to the preset demand matching relationship.
[0105] The required area is the area required for spraying the in-place fragment number. For example, when the corresponding number has only one character, the required area is small, and when the corresponding number of characters is more, the required area is larger. The demand matching relationship between the two is determined by the staff in advance based on multiple tests.
[0106] Step S201: Control the center point on the required area to move on the image corresponding to the fragment image information and determine whether the required area is entirely within the fragment image.
[0107] The purpose of the judgment is to know whether the numbering spraying operation can be completed under the condition of the position of the required area. It should be noted that since the required area can rotate around the center point, if any angle satisfies that the required area is within the fragment image, it can be determined that the position of the center point can satisfy that the required area is entirely within the fragment image.
[0108] Step S2011: If the required area is not entirely within the fragment image, define the position where the center point of the current required area is located as an invalid point.
[0109] When the required area is not entirely within the fragment image, it means that when numbering and spraying in this required area, the numbers cannot be evenly sprayed on the fragment. At this time, define this position as an invalid point to achieve position identification, so as to distinguish the center points of different required areas.
[0110] Step S2012: If the required area is entirely within the fragment image, define the position where the center point of the current required area is located as a valid point.
[0111] When the required area is entirely within the fragment image, it means that when numbering and spraying in this required area, the numbers can be evenly sprayed on the fragment. At this time, define this position as a valid point to achieve position identification, so as to distinguish the center points of different required areas.
[0112] Step S202: Determine the central position point based on all the valid points, and determine the required area corresponding to the central position point as the spraying area.
[0113] The central position point is the point among all valid points that is closer to the center. The specific determination method will be described below. The required area determined by using this central position point is used to determine the spraying area, so that while the numbered spraying can meet the requirements, the number can be as close as possible to the center of the number, facilitating the staff to view the number after spraying.
[0114] Refer to Figure 3 , the steps to determine the central position point based on all valid points include:
[0115] Step S300: Connect all valid points pairwise and determine whether all valid points are on the same straight line.
[0116] The purpose of the determination is to find out whether the valid points can enclose a region.
[0117] Step S3001: If all valid points are on the same straight line, define the two valid points with the longest line segment length after connection as boundary points, and calculate the midpoint based on the two boundary points to determine the central position point.
[0118] When all valid points are on the same straight line, it means that all valid points form a line segment. At this time, determine two boundary points, and determine the midpoint based on the line segment formed by the two boundary points.
[0119] Step S3002: If not all valid points are on the same straight line, define the region enclosed by the connection as the valid region.
[0120] When not all valid points are on the same straight line, it means that the valid points can form a region after being connected to each other. The enclosed region is the outermost contour line of all connections. Define this region as the valid region for identification to facilitate the subsequent determination of the central position point.
[0121] Step S301: Generate a randomly movable judgment point within the valid region, and connect the judgment point to each valid point on the contour line of the valid region to determine the distance between points.
[0122] The judgment point is a virtual point randomly generated in the computer that can move within the valid region. The distance between points is the distance value between the judgment point and the points on the contour line of the valid region.
[0123] Step S302: Determine the maximum and minimum distance between points according to the preset sorting rule, and calculate the difference based on this distance between points to determine the difference distance.
[0124] The sorting rule is a method set by the staff to sort numerical values, such as the bubble sort method. Through the sorting rule, the points on the contour line of the effective area closest to and farthest from the determination point can be determined. At this time, the distance between the two is used for difference calculation to determine the separation difference distance, and this distance value is an absolute value.
[0125] Step S303: Determine the separation difference distance with the smallest numerical value according to the sorting rule, and determine the position where the determination point corresponding to this separation difference distance is located as the central position point.
[0126] Through the sorting rule, the separation difference distance with the smallest numerical value can be determined, that is, at this time, the distances between the determination point and each point on the contour line of the effective area do not deviate much, which means that the position of the current determination point can be expressed as the midpoint of the effective area. At this time, this point can be determined as the central position point.
[0127] Refer to Figure 4 After the effective points and invalid points are determined, the intelligent restoration method for cultural relics further includes:
[0128] Step S400: Determine whether there are effective points.
[0129] The purpose of the determination is to know whether the size of the current fragment can meet the fragment number spraying operation.
[0130] Step S4001: If there are effective points, determine the central position point.
[0131] When there are effective points, it means that the size of the fragment can be normally numbered and sprayed. At this time, the central position point can be normally determined to determine the spraying area.
[0132] Step S4002: If there are no effective points, scale the demand area with a preset adjustment coefficient to update the demand area, and use the updated demand area to re-determine whether there are effective points until the situation where there are effective points is determined.
[0133] When there are no effective points, it means that the current fragment is too small. If it is numbered and sprayed according to the determined demand area, it cannot meet the area requirement. At this time, further processing is required; the adjustment coefficient is a fixed value coefficient set by the staff to scale the demand area. For example, 0.9 can be used to scale the size of the demand area so that the determined demand area can meet the numbering and spraying requirements.
[0134] Step S401: Define the demand area before scaling as the original area, define the current demand area as the compliant area, and define the demand area before scaling the compliant area as the unfulfilled area.
[0135] Define the original area, the compliant area, and the unfulfilled area to distinguish the required area in different states, so as to facilitate subsequent analysis of the required area.
[0136] Step S402: Calculate based on the original area and the compliant area to determine the scaling factor.
[0137] The scaling factor is the multiple by which the original area is scaled to the compliant area, and can be obtained by calculating the sizes of the two areas or the number of times the adjustment coefficient is called.
[0138] Step S403: Determine whether the scaling factor is greater than a preset permitted factor.
[0139] The permitted factor is the maximum scaling factor allowed when the recognized spraying number set by the staff can be well observed by the staff. The purpose of the judgment is to know whether the numbers sprayed after the current determined compliant area is numbered can be well viewed by the staff.
[0140] Step S4031: If the scaling factor is greater than the permitted factor, output a number anomaly signal and control a preset rejection device to move the fragment to a preset abnormal processing area.
[0141] When the scaling factor is greater than the permitted factor, it means that the current scaling factor is relatively large. Even if number spraying is carried out subsequently, the sprayed numbers are not convenient for the staff to observe. At this time, output a number anomaly signal to mark the situation, so that the rejection device can move the fragment to the abnormal processing area, so that the staff can intervene in the subsequent processing. The rejection device can be a mechanical claw, and the abnormal processing area is an area preset by the staff for receiving such fragments.
[0142] Step S4032: If the scaling factor is not greater than the permitted factor, update the adjustment coefficient with a preset correction coefficient and scale the unfulfilled area with the updated adjustment coefficient, and determine whether there are valid points after the scaling is completed.
[0143] When the scaling factor is not greater than the permitted factor, it means that the current scaling factor meets the requirements. At this time, in order for the user to view the numbers better, the scaling factor can be further analyzed and processed; the correction coefficient is a fixed coefficient set by the staff, generally 0.01. The adjustment coefficient can be updated by adding the correction coefficient to the adjustment coefficient, and the unfulfilled area is scaled with the updated adjustment coefficient to obtain a required area slightly larger than the compliant area. The purpose of the judgment at this time is to know whether the processing with this adjustment coefficient meets the requirements.
[0144] Step S40321: If there is no valid point, define the adjustment coefficient before update as the valid coefficient, and scale the unfilled area according to the valid coefficient to obtain the required area for determining the central position point.
[0145] When there is no valid point, it means that processing with this adjustment coefficient cannot obtain a required area that meets the requirements, that is, the required area obtained by the coefficient before the update and correction of the adjustment coefficient is the largest and compliant area that can be obtained. At this time, define the valid coefficient to perform scaling processing using the valid area, so as to determine a required area of appropriate size for use.
[0146] Step S40322: If there is a valid point, continue to update the current adjustment coefficient with the correction coefficient and re-scale the unfilled area until a required area with no valid point is determined.
[0147] When there is a valid point, it means that there is still a situation where the required area can be further enlarged. At this time, use the correction coefficient to continue to update the adjustment coefficient until the largest required area that meets the requirements is determined.
[0148] Refer to Figure 5 , after the central position point is determined, the intelligent restoration method for cultural relics further includes:
[0149] Step S500: In the image corresponding to the fragment image information, define the area with the same color as the preset underlying color as the underlying area.
[0150] The underlying color is the color set by the staff that does not contain image characters, such as the white color in blue and white porcelain. The image characters are generally depicted in cyan, and the white color generally does not include the corresponding image character marks; defining the underlying area is to distinguish different areas, facilitating subsequent further analysis and processing.
[0151] Step S501: Control the required area to rotate around the central position point, and define the rotation angle at which the required area is entirely within the fragment image as the valid angle.
[0152] Control the rotation of the required area and define the valid angle to determine the state of the required area that meets the number spraying.
[0153] Step S502: In the required area at the valid angle, determine the exposed area according to the intersection of the characters of the in-place fragment numbers and the underlying area.
[0154] The characters of the fragment number in place are the characters that need to be sprayed on the fragment, such as the numbers 1 and 2 in the number "12". If the number has an outer border, the characters should also include the outer border; at different effective angles, due to the different positions of the numbered characters, the situation with the underlying area is also different. At this time, the exposed area is the area of the intersection of the numbered characters and the underlying area.
[0155] Step S503: determining the character area corresponding to the location fragment number according to a preset area matching relationship.
[0156] The character area is the area required for normal spraying of the fragment number in place. The area matching relationship of the two quality inspections is determined in advance by the staff.
[0157] Step S504: Calculate the exposure ratio according to the exposure area and the character area.
[0158] The exposure ratio is the ratio of the area of the numbered character that intersects with the underlying area to the total area of the character, and is determined by dividing the exposure area by the character area.
[0159] Step S505: Determine the exposure ratio with the largest value according to the sorting rule, and determine the spraying area according to the effective angle corresponding to the exposure ratio.
[0160] The sorting rules can be used to determine the exposure ratio with the largest value. The numbered characters under this exposure ratio have the smallest coverage area on the original image characters in the fragments. At this time, the exposure ratio is used to determine the spraying area so that the numbers sprayed after subsequent numbers are sprayed will not cover the original image lines on the fragments as much as possible, so that subsequent staff can check the splicing situation during manual splicing.
[0161] Reference Figure 6 After determining the exposure ratio with the largest value according to the sorting rules, the intelligent restoration method of cultural relics also includes:
[0162] Step S600: Determine whether the exposure ratio is less than the preset demand ratio.
[0163] The required ratio is the minimum exposure ratio of the characters of the identification number set by the staff when the lines of the fragment image are not largely covered; the purpose of the judgment is to find out whether the currently determined exposure ratio can meet the requirements.
[0164] Step S6001: If the exposure ratio is not less than the required ratio, the spraying area is determined based on the exposure ratio.
[0165] When the exposed proportion is not less than the required proportion, it means that the spraying of this number meets the requirements, and the spraying area can be determined normally.
[0166] Step S6002: If the exposure ratio is less than the demand ratio, the minimum interval difference distance among the remaining interval difference distances is determined according to the sorting rule, and the center position point is updated according to the interval difference distance.
[0167] When the exposure ratio is less than the required ratio, it means that the currently determined numbered characters cover more image lines on the fragments and require further analysis. The sorting rules are used to update the center position point to move the required area so that the exposure ratio can be redetermined.
[0168] Step S601: after the central position point is updated, determine whether there is a situation where the exposure ratio is not less than the demand ratio.
[0169] The purpose of judgment is to know whether the updated demand area can meet the requirements.
[0170] Step S6011: If the exposed proportion is not less than the required proportion, the spraying area is determined.
[0171] When the exposed proportion is not less than the required proportion, the spraying area can be determined normally.
[0172] Step S6012: If there is no situation where the exposure ratio is not less than the required ratio, the difference distance is re-determined to update the center position point until the spraying area is determined or the determined difference distance is greater than the preset upper limit distance, and when the difference distance is greater than the upper limit distance, the spraying area is determined by the first determined center position point.
[0173] When there is no situation where the exposure ratio is not less than the demand ratio, it means that the demand area of the center position point determined at this time still cannot meet the demand. At this time, continue to update until a spraying area that meets the requirements is determined; the upper limit distance is the maximum distance between the recognition and judgment points set by the staff when they are still in a relatively central position. During the updating process, when the distance between the difference distances is greater than the upper limit distance, it means that the center position point determined at this time deviates from the center position of the effective area. At this time, all the demand areas of the center position cannot meet the requirements for reducing the coverage of the fragmented image lines. At this time, the fragmented image lines themselves may be dense. At this time, the spraying area can be determined based on the center position point originally determined at the beginning.
[0174] Reference Figure 7 After determining the exposure ratio with the largest value according to the sorting rules, the intelligent restoration method of cultural relics also includes:
[0175] Step S700: Determine whether there are at least two exposure ratios with the same maximum value.
[0176] The purpose of the judgment is to know whether there are multiple spray angles to be selected.
[0177] Step S7001: If there are not at least two same maximum exposure ratios, determine the spraying area according to the exposure ratio.
[0178] When there are not at least two same maximum exposure ratios, it means that only the required area at one angle meets the requirements. At this time, the spraying area can be determined normally.
[0179] Step S7002: If there are at least two same maximum exposure ratios, define the intersecting part of the required areas corresponding to the exposure ratio as the overlapping part, and define the remaining parts of each required area except the overlapping part as the independent part.
[0180] When there are at least two same maximum exposure ratios, it means that spraying can be carried out at multiple angles. At this time, further analysis is needed; define the overlapping part to identify all the determined required areas, so as to determine the independent part of each required area, which is convenient for subsequent analysis.
[0181] Step S701: Obtain the overlapping pixel acquisition distances of each point in the overlapping part, and obtain the independent pixel acquisition distances of each point in the independent part.
[0182] The overlapping pixel acquisition distance is the distance value when pixel points are collected for each point in the overlapping part on the debris during the image acquisition process. The independent pixel acquisition distance is the distance value when pixel points are collected for each point in the independent part on the debris during the image acquisition process. This distance value is the longitudinal distance value from the shooting device to the debris, not the straight-line distance value between the two. That is, the straight-line distance value between the two needs to be converted with the corresponding shooting angle to obtain. That is, when the overlapping part is a plane, the overlapping pixel acquisition distances obtained for each point on the overlapping part should be equal.
[0183] Step S702: Calculate the mean value according to all the overlapping pixel acquisition distances to determine the overlapping mean distance.
[0184] The overlapping mean distance is the average value of all the overlapping pixel acquisition distances.
[0185] Step S703: Calculate the difference according to the independent pixel acquisition distance and the overlapping mean distance to determine the difference pixel distance.
[0186] The difference pixel distance is the distance difference between each independent pixel acquisition distance and the overlapping mean distance. This difference is an absolute value. The larger the value, the greater the deviation.
[0187] Step S704: Sum up all the differential pixel distances within a single demand area to determine the deviation pixel distance.
[0188] The deviation pixel distance is the total value of all the differential pixel distances within a single demand area.
[0189] Step S705: Determine the deviation pixel distance with the smallest value according to the sorting rule, and determine the spraying area according to the corresponding exposure ratio based on this deviation pixel distance.
[0190] Through the sorting rule, the deviation pixel distance with the smallest value can be determined, that is, the plane of the independent part on this demand area is relatively similar to the plane of the overlapping part, which means the whole of this demand area is relatively flat. At this time, this demand area is determined as the spraying area to make the overall operation effect better when numbering and spraying subsequently.
[0191] Refer to Figure 8 , based on the same inventive concept, an embodiment of the present invention provides an intelligent cultural relic restoration system, including:
[0192] An acquisition module, which acquires the detection status information of preset detection points;
[0193] A processing module, connected to the acquisition module and the judgment module, and is used for storing and processing information;
[0194] A judgment module, connected to the acquisition module and the processing module, and is used for judging information;
[0195] When the judgment module judges that the state corresponding to the detection status information switches from the preset idle state to the preset in-place state, the processing module outputs an in-place signal and enables the acquisition module to acquire the detection image information of the detection point;
[0196] The processing module counts according to the in-place signal to determine the in-place fragment number;
[0197] The processing module performs feature recognition on the detection image information to obtain fragment image information, and determines the spraying area according to the fragment image information and the in-place fragment number;
[0198] The processing module controls the preset spraying device to move to the spraying area to perform spraying operations with the in-place fragment number;
[0199] A spraying area determination module, which determines a suitable spraying area according to the fragment and numbering situation;
[0200] A central position point determination module, which determines a more suitable central position point according to the effective point situation;
[0201] An area scaling control module, which is used for the processing when the fragment is too small to meet the numbering and spraying requirements;
[0202] A spraying coverage control module for controlling the spraying area to minimize the coverage of the original image characters on the debris;
[0203] A spraying area selection module for selecting the spraying area to meet the corresponding requirements;
[0204] A flat spraying control module for determining the spraying area to make the sprayed numbers as flat as possible.
[0205] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working processes of the system, device, and unit described above, reference can be made to the corresponding processes in the foregoing method embodiments, which will not be elaborated herein.
[0206] The above are all preferred embodiments of the present application. Without limiting the protection scope of the present application accordingly, any feature disclosed in this specification (including the abstract and drawings), unless specifically described, can be replaced by other equivalent or similar-purpose alternative features. That is, unless specifically described, each feature is only an example in a series of equivalent or similar features.
Claims
1. An intelligent restoration method for cultural relics, characterized in that, it includes: Obtaining the detection status information of preset detection points; Outputting a in-place signal when the status corresponding to the detection status information switches from a preset idle state to a preset in-place state, and obtaining the detection image information of the detection points; Counting according to the in-place signal to determine the in-place fragment number; Performing feature recognition in the detection image information to obtain the fragment image information, and determining the spraying area according to the fragment image information and the in-place fragment number; Controlling a preset spraying device to move to the spraying area and perform spraying operations with the in-place fragment number; The step of determining the spraying area according to the fragment image information and the in-place fragment number includes: Determining the required area corresponding to the in-place fragment number according to a preset demand matching relationship; Controlling the center point on the required area to move on the image corresponding to the fragment image information and determining whether the required area is all within the fragment image; If the required area is not all within the fragment image, defining the position where the center point of the current required area is located as an invalid point; If the required area is all within the fragment image, defining the position where the center point of the current required area is located as a valid point; Determining the central position point according to all the valid points, and determining the required area corresponding to the central position point as the spraying area; After the central position point is determined, the intelligent restoration method for cultural relics further includes: Defining the area with the same color as the preset underlying color in the image corresponding to the fragment image information as the underlying area; Controlling the required area to rotate around the central position point and defining the rotation angle when the required area is all within the fragment image as the valid angle; Determining the exposed area according to the intersection situation between the characters of the in-place fragment number and the underlying area in the required area under the valid angle; Determining the character area corresponding to the in-place fragment number according to a preset area matching relationship; Calculating according to the exposed area and the character area to determine the exposure ratio; Determining the exposure ratio with the largest value according to the sorting rule, and determining the spraying area according to the valid angle corresponding to the exposure ratio.
2. The intelligent restoration method for cultural relics according to claim 1, characterized in that, The step of determining the central position point according to all the valid points includes: Connecting all the valid points pairwise and determining whether all the valid points are on the same straight line; If all the valid points are on the same straight line, defining the two valid points with the longest line segment length after connection as the boundary points, and calculating the midpoint according to the two boundary points to determine the central position point; If all the valid points are not on the same straight line, defining the area enclosed by the connection as the valid area; Generating a judgment point that can move randomly within the valid area, and connecting the judgment point with each valid point on the contour line of the valid area to determine the point separation distance; Determining the maximum and minimum point separation distances according to a preset sorting rule, and calculating the difference according to the point separation distance to determine the separation difference distance; Determining the minimum separation difference distance according to the sorting rule, and determining the position where the judgment point corresponding to the separation difference distance is located as the central position point.
3. The intelligent restoration method of cultural relics according to claim 2, It is characterized in that After the effective points and invalid points are determined, the intelligent restoration method of cultural relics also includes: Determine whether there is a valid point; If there is a valid point, the center point is determined; If there is no valid point, the required area is scaled by a preset adjustment coefficient to update the required area, and the valid point is re-determined using the updated required area until it is determined that there is a valid point; The demand area before scaling is defined as the original area, and the current demand area is defined as the conforming area, and the demand area before scaling the conforming area is defined as the unfilled area; Calculate the zoom factor based on the original area and the conforming area; Determine whether the zoom factor is greater than the preset permitted factor; If the zoom multiple is greater than the permitted multiple, a numbered abnormal signal is output, and a preset rejection device is controlled to move the fragment to a preset abnormal processing area; If the zoom factor is not greater than the permitted factor, the adjustment factor is updated with the preset correction factor and the unfilled area is zoomed with the updated adjustment factor, and after the zoom is completed, it is determined whether there is a valid point; If there is no valid point, the adjustment coefficient before the update is defined as the valid coefficient, and the unfilled area is scaled according to the valid coefficient to obtain the required area for determining the center point; If there is a valid point, the current adjustment coefficient is continuously updated with the correction coefficient and the unfilled area is rescaled until the required area without a valid point is determined.
4. The intelligent restoration method of cultural relics according to claim 1, It is characterized in that After determining the exposure ratio with the largest value according to the sorting rules, the intelligent restoration method of cultural relics also includes: Determine whether the exposure ratio is less than the preset demand ratio; If the exposure ratio is not less than the required ratio, the spraying area will be determined based on the exposure ratio; If the exposure ratio is less than the demand ratio, the minimum distance between the remaining distances is determined according to the sorting rule, and the center point is updated according to the distance between the remaining distances; After the central position point is updated, it is determined whether there is a situation where the exposure ratio is not less than the demand ratio; If there is a situation where the exposed proportion is not less than the required proportion, the spraying area will be determined; If there is no situation where the exposed proportion is not less than the required proportion, the difference distance is re-determined to update the center position point until the spraying area is determined or the determined difference distance is greater than the preset upper limit distance, and when the difference distance is greater than the upper limit distance, the spraying area is determined by the first determined center position point.
5. The intelligent restoration method of cultural relics according to claim 1, It is characterized in that After determining the exposure ratio with the largest value according to the sorting rules, the intelligent restoration method of cultural relics also includes: Determine whether there are at least two exposure ratios with the same maximum value; If there are not at least two exposure ratios with the same maximum value, the spraying area is determined according to the exposure ratios; If there are at least two same numerically largest exposure ratios, the intersecting part among the demand regions corresponding to the exposure ratio is defined as the overlapping part, and the remaining parts of each demand region that are outside the overlapping part are defined as the independent parts; Obtain the overlapping pixel acquisition distances of each point in the overlapping part, and obtain the independent pixel acquisition distances of each point in the independent parts; Perform a mean calculation based on all the overlapping pixel acquisition distances to determine the overlapping mean distance; Perform a difference calculation based on the independent pixel acquisition distances and the overlapping mean distance to determine the difference pixel distance; Perform a summation calculation on all the difference pixel distances in a single demand region to determine the deviation pixel distance; Determine the deviation pixel distance with the smallest value according to the sorting rule, and determine the spraying area according to the corresponding exposure ratio based on the deviation pixel distance.
6. An intelligent cultural relic restoration system characterized in that it includes: an acquisition module, which acquires the detection status information of preset detection points; a processing module, connected to the acquisition module and the judgment module, for storing and processing information; a judgment module, connected to the acquisition module and the processing module, for judging information; When the judgment module judges that the state corresponding to the detection status information switches from a preset idle state to a preset in-place state, the processing module outputs an in-place signal and enables the acquisition module to acquire the detection image information of the detection point; The processing module counts according to the in-place signal to determine the in-place fragment number; The processing module performs feature recognition on the detection image information to obtain fragment image information, and determines the spraying area according to the fragment image information and the in-place fragment number; The processing module controls a preset spraying device to move to the spraying area and perform spraying operations with the in-place fragment number; The steps of determining the spraying area according to the fragment image information and the in-place fragment number include: The processing module determines the demand region corresponding to the in-place fragment number according to a preset demand matching relationship; The processing module controls the center point on the demand region to move on the image corresponding to the fragment image information and enables the judgment module to judge whether the demand regions are all within the fragment image; If the judgment module judges that the demand regions are not all within the fragment image, the processing module defines the position where the center point of the current demand region is located as an invalid point; If the judgment module judges that the demand regions are all within the fragment image, the processing module defines the position where the center point of the current demand region is located as a valid point; The processing module determines the central position point according to all the valid points, and determines the demand region corresponding to the central position point as the spraying area; After the central position point is determined, the processing module defines the region with the same color as the preset underlying color in the image corresponding to the fragment image information as the underlying region; The processing module controls the demand region to rotate around the central position point and defines the rotation angle at which the demand regions are all within the fragment image as the valid angle; The processing module determines the exposed area according to the intersection of the characters of the in-place fragment number and the underlying region in the demand region at the valid angle; The processing module determines the character area corresponding to the in-place fragment number according to a preset area matching relationship. The processing module calculates based on the exposed area and the character area to determine the exposure ratio; The processing module determines the exposure ratio with the largest value according to the sorting rule, and determines the spraying area according to the effective angle corresponding to the exposure ratio.
Citation Information
Patent Citations
Workpiece spraying method, workpiece spraying system and computer readable storage medium
CN112191467A