Pattern image acquisition and standardization processing method for spherical non-inheritance handicraft
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-08-11
AI Technical Summary
[0002]壮锦绣球等球形非遗手工艺品通常由多个弧面瓣片缝合形成,纹样沿曲面分布,手工拍照时容易受摆放角度、拍摄距离和环境光影响,后续还需要人工裁剪、改名和存档,不同操作者得到的图像尺寸和纹样形态难以保持一致
Smart Images

Figure CN122550581A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a method for acquiring and standardizing pattern images of spherical intangible cultural heritage handicrafts. Background Technology
[0002] Spherical intangible cultural heritage handicrafts such as Zhuang brocade embroidered balls are usually formed by sewing together multiple curved petals. The patterns are distributed along the curved surface. When photographing them by hand, they are easily affected by the placement angle, shooting distance and ambient light. They also need to be manually cut, renamed and archived afterward. It is difficult for different operators to keep the image size and pattern shape consistent.
[0003] While cultural relic-grade 3D scanning equipment can obtain relatively complete morphological data, the equipment has high requirements for procurement and maintenance, making it difficult to configure in grassroots heritage sites or workshops for extended periods. When taking planar photographs of spherical objects, there are projection differences between the central and edge areas, and edge patterns may appear stretched or compressed. The pattern proportions of the same embroidered ball may also change on different acquisition surfaces. Existing general photography solutions lack processing procedures that coordinate with sphere positioning, contour normalization, and surface unfolding, and also lack recording mechanisms for acquisition parameters and image quality. This makes it difficult to provide consistent and traceable image data for pattern retrieval, pattern comparison, and digital preservation. Summary of the Invention
[0004] The purpose of this invention is to provide a method for pattern image acquisition and standardized processing for spherical intangible cultural heritage handicrafts, so as to solve the problems in the background technology.
[0005] To achieve the above objectives, this invention provides the following technical solution: a method for pattern image acquisition and standardization processing of spherical intangible cultural heritage handicrafts, applied to a pattern acquisition terminal, the method comprising:
[0006] The spherical intangible cultural heritage handicraft was placed in the collection card, and the position parameters of the sphere were determined based on the feedback information from the positioning component;
[0007] The fill light component and camera component are controlled to acquire pattern images, thus obtaining the original pattern image;
[0008] The effective acquisition area is determined from the original pattern image based on the sphere's outline, and the size of the effective acquisition area is normalized according to the outline size.
[0009] Based on the spherical geometry, the effective acquisition area is expanded by surface distortion to obtain a standard pattern image;
[0010] The standard pattern image is then associated with the collected information and archived.
[0011] Preferably, the sphere's position parameters are determined based on feedback information from the positioning component, including:
[0012] After the spherical intangible cultural heritage handicraft falls into the self-centering bracket, the adjustable limiting parts on both sides are controlled to move towards the sphere.
[0013] The outer diameter of the sphere and the lateral offset of the sphere center are determined based on the stopping positions of the adjustable limiters on both sides;
[0014] Adjust the focus position or acquisition window of the camera assembly based on the outer diameter of the sphere and the lateral offset of the sphere's center.
[0015] Preferably, controlling the movement of the adjustable limiting members located on both sides toward the sphere includes:
[0016] Record the initial effective distance between the adjustable limiters on both sides before data collection;
[0017] During the driving process, the moving distance of the adjustable limiters on both sides is determined based on the number of motor steps, displacement sensor signals, or contact trigger signals.
[0018] When the contact state meets the stopping condition, the drive stops, and the stopping position is used as the displacement reference for calculating the outer diameter of the sphere and the lateral offset of the sphere's center.
[0019] Preferably, controlling the supplementary lighting component and the camera component to acquire pattern images includes:
[0020] The fill light component is activated upon receiving a button, touch, or remote trigger signal.
[0021] Adjust the exposure time, gain, or fill light intensity based on the brightness distribution of the presampled image;
[0022] Once the brightness change meets the stability condition, the camera component is triggered to capture the original pattern image.
[0023] Preferably, the effective acquisition area is determined from the original pattern image based on the sphere's outline, including:
[0024] The original pattern image is converted to grayscale, noise is suppressed, and edges are extracted.
[0025] Filter the closed contours that correspond to the outer contour of the sphere from the edge extraction results;
[0026] The effective acquisition area is obtained by cropping the background area based on the center and diameter of the closed contour and the circumscribed acquisition frame.
[0027] Preferably, the effective acquisition area is normalized according to its contour size, including:
[0028] The scaling relationship is determined based on the pixel diameter of the closed contour and the target output side length;
[0029] The effective acquisition area is proportionally transformed according to the scaling relationship;
[0030] Fill the transformed pattern area into the preset canvas, while preserving the correspondence between the outline center and the canvas center.
[0031] Preferably, surface distortion unfolding is performed on the effective acquisition area based on spherical geometry, including:
[0032] Establish a spherical projection reference based on the center of the sphere's outline, the outline radius, and the directional reference corresponding to the acquisition position;
[0033] An effective pixel mask is generated based on the effective acquisition area, and the effective pixel mask is used to filter out pattern pixels that are inside the sphere outline and are not occluded.
[0034] The pattern pixels are converted into spherical latitude and longitude positions relative to the center of the sphere's outline, and multiple unfolded grid points are set within the effective acquisition area;
[0035] The local expansion scaling ratio is determined based on the spherical latitude and longitude span corresponding to adjacent expanded grid points, and the output position of the pattern pixels in the planar expansion coordinates is corrected according to the local expansion scaling ratio.
[0036] The unfolding starting direction is determined based on the directional reference or the difference in the overlapping boundaries of adjacent sampling surfaces, and the surface pattern is resampled according to the corrected output position to obtain a standard pattern image.
[0037] Preferably, after obtaining the standard pattern image, the method further includes:
[0038] Determine sharpness status based on image gradient response;
[0039] The exposure state is determined based on the ratio of saturated pixels and the ratio of dark pixels.
[0040] The composition state is determined based on the degree of contour closure and the proportion of the effective area;
[0041] When the sharpness, exposure, or composition status does not meet the preset acquisition conditions, a reacquisition prompt will be output or the acquisition parameters will be automatically adjusted.
[0042] Preferably, the standard pattern image is associated with the collected information and then archived, including:
[0043] Generate a filename that includes the craft item number, the sampled surface number, the sampled time, and the processing version;
[0044] Write the sphere's position parameters, supplementary lighting parameters, contour dimensions, distortion unfolding parameters, and quality verification results into the acquisition record;
[0045] Save the standard pattern images and acquisition records to the local storage area or the remote storage area.
[0046] In this method, the spherical intangible cultural heritage handicraft is first placed in the acquisition position, and the positioning component is used to make the sphere fall into the predetermined acquisition position. Then, the outer diameter of the sphere and the center offset of the sphere are determined according to the feedback information of the positioning component. Subsequently, the supplementary lighting component is controlled to stabilize the illumination and acquire the original pattern image according to the trigger signal.
[0047] After acquisition, the main control unit identifies the sphere outline from the original pattern image, crops the background area and forms an effective acquisition area, normalizes the size of the effective acquisition area based on the outline pixel diameter, and then maps the curved pattern to the latitude and longitude unfolded plane according to the geometric relationship between the sphere outline center, outline radius and pixel position to obtain a standard pattern image.
[0048] After the standard pattern image is generated, the main control unit performs quality verification based on the image gradient response, brightness distribution, contour closure degree, and effective area ratio. When the verification result meets the preset acquisition conditions, the standard pattern image is associated with the craft item number, acquisition surface number, acquisition time, sphere size, acquisition parameters, and processing version and archived. When the verification result does not meet the preset acquisition conditions, a re-acquisition prompt or adjustment of acquisition parameters is output.
[0049] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0050] This invention arranges spherical mechanical positioning, image acquisition, contour cropping, size normalization, and surface unfolding in the same processing link. The acquisition position parameters come from the displacement of the limiting component, the size normalization parameters come from the image contour, and the distortion unfolding parameters come from the geometric relationship of the spherical surface. The processing does not rely on the operator's subjective judgment of the pattern boundary, which can reduce the image differences caused by manual cropping and manual scaling, and keep the output specifications of the same type of spherical intangible cultural heritage handicrafts similar when they are collected in different batches.
[0051] This invention sets up quality verification and acquisition record association after obtaining the standard pattern image. The sharpness is obtained by the image gradient response, the exposure state is obtained by the pixel brightness distribution, and the composition state is obtained by the degree of contour closure and the proportion of the effective area. The verification items correspond to the acquired image itself, which makes it easy to detect problems such as out-of-focus, overexposure, underexposure or contour truncation at the acquisition end. The resulting image file also contains the sphere size and processing parameter records, which facilitates subsequent pattern retrieval, comparison and file management. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0053] Figure 1This is a schematic diagram of a pattern acquisition terminal system architecture provided in an embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram illustrating an application scenario for collecting patterns from spherical intangible cultural heritage handicrafts, provided by an embodiment of the present invention.
[0055] Figure 3 A flowchart of pattern image acquisition and standardization processing provided in an embodiment of the present invention;
[0056] Figure 4 This is a schematic diagram of a limiting and positioning structure provided in an embodiment of the present invention;
[0057] Figure 5 This is a schematic diagram illustrating the determination of sphere parameters for limiting displacement, provided in an embodiment of the present invention.
[0058] Figure 6 This is a schematic diagram of the timing of supplementary lighting stabilization and image acquisition provided in an embodiment of the present invention;
[0059] Figure 7 This is a schematic diagram of contour recognition and size normalization provided in an embodiment of the present invention;
[0060] Figure 8 This is a schematic diagram of spherical pattern distortion unfolding provided in an embodiment of the present invention. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] The technical solution of the present invention will be described below with reference to the accompanying drawings. The embodiments described are used to explain the implementation process of the present invention and are not intended to limit the scope of protection to specific device models or single collection scenarios. The spherical intangible cultural heritage handicraft can be Zhuang brocade embroidery ball, or it can be a handicraft with a spherical or near-spherical outer contour and patterns arranged on the curved surface.
[0063] Example 1
[0064] like Figures 1-5As shown, the pattern acquisition terminal may include a housing, an acquisition slot, a camera component, a supplementary lighting component, a limit drive component, a main control unit, a storage and communication unit, and a human-machine trigger unit. The camera component is fixed above the acquisition slot, with the lens optical axis facing the support center of the acquisition slot. The supplementary lighting component is set around the lens or acquisition window so that the light enters the acquisition area from directly above or diagonally above the spherical intangible cultural heritage handicraft.
[0065] The collection slot can be a angular bracket or an arc bracket. The two support surfaces of the angular bracket intersect to form a low support line. After the spherical intangible cultural heritage handicraft is placed in, it will approach the low support line under its own weight. Two adjustable limiting parts are located on both sides of the bracket. The limiting parts can be driven by a lead screw, rack and pinion or slider. A soft contact pad is set at the front end of the limiting part to reduce the pressure on the embroidery thread or surface when in contact with the sphere.
[0066] In actual assembly, the camera component can be a fixed-focus or adjustable-focus industrial camera, the fill light component can be a ring fill light or a multi-point soft light, the main control unit can be an embedded main control board or an industrial control host, the limit drive component can be a stepper motor or a linear driver with position feedback, the storage and communication unit can be a local memory, a local area network module or a cellular communication module, and buttons or touch controls are set on the terminal shell as trigger inputs.
[0067] To ensure that the displacement of the limiting components reflects the size of the sphere, a no-load calibration can be performed after the terminal is installed. The effective distance Wc between the left and right limiting components when they are in their initial positions is recorded. The distance the left limiting component moves during data collection is recorded as sL, and the distance the right limiting component moves is recorded as sR. The estimated outer diameter D of the spherical intangible cultural heritage handicraft can be determined by the following formula: D = Wc - sL - sR, where D is the estimated outer diameter of the spherical intangible cultural heritage handicraft, Wc is the initial effective distance between the two limiting components, sL is the distance the left limiting component moves from its initial position to its contact position, and sR is the distance the right limiting component moves from its initial position to its contact position. Wc, sL, and sR can be obtained from the terminal calibration data and the number of motor steps, and the unit can be uniformly set to mm.
[0068] When the movement distances of the two limiting parts differ significantly, the main control unit can calculate the lateral offset of the sphere center relative to the optical axis. The offset is used to adjust the acquisition window or prompt the operator to reposition it. If the initial effective spacing is 160mm, the left limiting part moves 24mm, and the right limiting part moves 25mm, then the estimated outer diameter D is 111mm, and the difference in movement distance between the left and right is 1mm. The main control unit can use this difference as the basis for lateral centering verification.
[0069] Example 2
[0070] like Figure 3 and Figure 6As shown, after the operator places the Zhuang brocade ball to be collected into the collection slot, the terminal first performs limit positioning, and then receives the button trigger signal. The main control unit turns on the supplementary light component and collects the pre-sampled image. The pre-sampled image is used to determine the current brightness distribution and focus state. When the median brightness value is close to the target brightness range and the brightness change of two consecutive frames is less than the preset change amount, the main control unit triggers the formal collection.
[0071] Supplemental lighting and exposure adjustment can be accomplished using grayscale statistics. The main control unit converts the presampled image into a grayscale image, obtains the median brightness value Ym of the effective acquisition area, and determines the exposure correction amount ΔE based on the target brightness Yt and the adjustment coefficient ke. The formula can be written as follows.
[0072] ΔE=clip[ke×(Yt-Ym),-Emax, Emax]
[0073] Where ΔE is the exposure correction amount, clip is the clipping process, ke is the exposure adjustment coefficient, Yt is the median value of the target brightness, Ym is the median value of the brightness of the presampled image, Emax is the maximum exposure amount allowed for a single adjustment, Yt and Ym can use a grayscale range of 0-255, and ke and Emax can be pre-calibrated according to the exposure adjustment step size of the camera component.
[0074] For example, if the target brightness Yt is set to 128, the median brightness value Ym of the presampled image is 112, the exposure adjustment coefficient ke is 0.25, and the maximum allowable exposure amount Emax in a single adjustment is 8, then ΔE is 4. The main control unit can increase the exposure time or the supplementary light intensity by 4 adjustment units. If the calculated result exceeds Emax, then the limiting is performed according to Emax to avoid excessive changes in supplementary light that could lead to image overexposure.
[0075] like Figure 7 As shown, after the original pattern image is formally acquired, the main control unit can first perform grayscale conversion and noise suppression, and then perform edge extraction. Edge extraction can be completed using gradient operators, threshold segmentation, or contour tracking. The main control unit selects closed contours from the candidate contours that meet preset conditions in terms of roundness, area, and center position as the outer contour of the sphere.
[0076] The roundness C of a closed contour can be calculated using the contour area A and the contour perimeter P, using the formula: C=4πA / P², where C is the contour roundness, A is the pixel area enclosed by the closed contour, and P is the pixel perimeter of the closed contour. A and P are obtained directly from the contour detection results. The closer C is to 1, the closer the contour is to a circle. In actual use, it is not required that C equals 1; it is only necessary to set the allowable range in combination with the occlusion of the acquisition card position.
[0077] After determining the outer contour of the sphere, the main control unit uses the center of the contour as the center of the effective acquisition area and the contour diameter or the circumscribed square of the contour as the cutting reference to cut off the tabletop, shell and background areas. If the contour part is blocked by the limiting component, the main control unit can fit the circular contour based on the unblocked arc segment and use the fitting result to complete the cutting.
[0078] Size normalization can be performed by determining the scaling ratio λ based on the pixel diameter Dp obtained from contour detection and the target output side length Lt. The formula is: λ=Lt / Dp, where λ is the image scaling ratio, Lt is the target output side length, Dp is the pixel diameter of the outer contour of the sphere, and both Lt and Dp are in pixels. Dp is obtained from the maximum circumscribed distance of the closed contour or the diameter of the fitted circle.
[0079] For any pixel in the effective acquisition area, the original coordinates can be converted to normalized canvas coordinates using the following formulas: xn=λ×(x-xc)+Lt / 2, yn=λ×(y-yc)+Lt / 2, where xn and yn are the pixel coordinates in the normalized canvas, x and y are the original pixel coordinates in the effective acquisition area, xc and yc are the coordinates of the center of the sphere outline, λ is the scaling ratio, and Lt is the target output side length. During the calculation, the horizontal and vertical scaling ratios should be kept consistent to avoid destroying the width and height relationship of the pattern.
[0080] For example, if the pixel diameter Dp of the closed contour is 1640 pixels and the target output side length Lt is 1200 pixels, then λ is approximately 0.7317. If the horizontal offset of a certain pattern point relative to the center of the contour is 200 pixels and the vertical offset is -160 pixels, then its position in the normalized canvas is approximately 746 pixels and 483 pixels, respectively. The main control unit then performs proportional resampling accordingly.
[0081] Example 3
[0082] like Figure 8 As shown, since the patterns of the spherical intangible cultural heritage handicrafts are located on the curved surface, the edge area and the center area in the original image have different projection scales. Before the surface distortion is unfolded, the main control unit first reads the center of the sphere outline, the outline radius, the acquisition card position direction mark, and the acquisition surface number in the acquisition record to establish a spherical projection reference corresponding to the current acquisition surface.
[0083] The main control unit can generate an effective pixel mask within the effective acquisition area after size normalization. The effective pixel mask is used to represent pixels that are inside the sphere outline, do not fall into the occlusion area of the limiting component, and whose brightness continuity meets the pattern acquisition conditions. Background pixels, bracket pixels, and obviously occluded pixels outside the mask do not participate in the spherical latitude and longitude conversion.
[0084] In one calculation method, let R be the radius of the sphere's outline, and let the coordinates of the pixel relative to the center of the outline be u and v. Then, the depth z, longitude θ, and latitude φ of the pixel on the visible hemisphere can be determined by the following formula: z = √(R 2 -u 2 -v 2 ), θ=atan(u / z), φ=asin(v / R), where R is the radius of the sphere contour, u is the lateral offset of the pixel relative to the contour center, v is the longitudinal offset of the pixel relative to the contour center, z is the depth of the pixel in the spherical projection model, θ is the longitude angle, φ is the latitude angle, atan is the arctangent function, asin is the arcsine function, R, u, v and z use the same pixel scale, only pixels within the effective pixel mask and satisfying u 2 +v 2 Not greater than R 2 The conversion is performed on the pixels.
[0085] To reduce the stretching error caused by changes in projection scale in the edge area of the sphere, the main control unit can set multiple unfolded grid points at preset intervals within the effective acquisition area. The preset interval can be 2% to 8% of the outline pixel diameter, or a fixed interval of 20 to 80 pixels can be used. Adjacent unfolded grid points form a local unfolded unit.
[0086] For each local unfolded unit, the master control unit determines the local unfolding scaling ratio based on the spherical latitude and longitude span of the corner point of the local unfolded unit and the pixel span in the normalized canvas. The local unfolding scaling ratio is used to represent the horizontal and vertical scale changes of the local unfolded unit when it is mapped from the spherical projection area to the planar unfolded area. The local unfolding scaling ratio of the central area is usually close to 1, and the local unfolding scaling ratio near the edge of the outline increases with the latitude and longitude span.
[0087] The main control unit performs edge suppression or re-sampling marking on local unfolded units whose local unfolding scaling ratio exceeds the preset upper limit. Edge suppression can reduce the output weight of the local unfolded unit in the standard pattern image, and re-sampling marking can be written into the acquisition record and prompt the operator to rotate the spherical intangible cultural heritage handicraft and then acquire the adjacent surface again.
[0088] The planar unfolding coordinates can be determined by latitude and longitude unfolding. The initial unfolding coordinates are xe=R×θ, ye=R×φ, where xe is the horizontal coordinate in the unfolding plane, ye is the vertical coordinate in the unfolding plane, R is the radius of the sphere outline, θ is the longitude angle, and φ is the latitude angle. The main control unit then performs local correction on xe and ye according to the local unfolding scaling ratio of the local unfolding unit where the pixel is located, to obtain the corrected output position.
[0089] For a Zhuangjinxiuqiu (a type of embroidered ball) formed by 12 sutured petals, the main control unit can determine the starting direction of unfolding before unfolding based on the suture lines, color block boundaries, or positioning marks on the acquisition card. If there is an archived standard pattern image of an adjacent acquisition surface on the current acquisition surface, the main control unit can extract the overlapping boundary strips of the current acquisition surface and the adjacent acquisition surface, and perform trial unfolding according to at least two candidate unfolding starting directions. The candidate unfolding starting direction with the smallest difference between the overlapping boundary strips is determined as the target unfolding starting direction.
[0090] The difference between overlapping boundary strips can be determined by one or more of the following: color difference, gradient direction difference, or suture position difference. For example, the main control unit can select a boundary strip with a width of 10 to 40 pixels, and use the average value of the pixel color difference within the strip and the offset of the suture center line as the boundary difference. The smaller the boundary difference, the more consistent the unfolding direction of the two acquisition surfaces.
[0091] The main control unit resamples the surface pattern according to the target unfolding starting direction and the corrected output position. The resampling process can use bilinear interpolation, local mean interpolation or nearest neighbor interpolation. Missing pixels can be filled by neighborhood interpolation. Pixels that exceed the effective pixel mask range do not participate in the output, and finally a standard pattern image is obtained.
[0092] For example, if the contour radius R is 820 pixels, and the coordinates u of a certain pixel relative to the contour center are 300 pixels and v is 200 pixels, then z is approximately 736.6 pixels, θ is approximately 0.386 radians, φ is approximately 0.246 radians, and the initial unfolded plane coordinates xe are approximately 316.5 pixels and ye is approximately 201.7 pixels. If the horizontal local unfolding scaling ratio of the local unfolding unit where the pixel is located is 1.08 and the vertical local unfolding scaling ratio is 1.03, the main control unit corrects the initial unfolding coordinates according to the local unfolding scaling ratio and then writes the corresponding pattern color into the standard pattern image.
[0093] In this way, spherical distortion unfolding no longer relies solely on a single spherical latitude and longitude formula, but combines effective pixel masks, local unfolding scaling ratios, and unfolding starting directions for processing. This can adapt to problems such as near-spherical errors caused by manual sewing, edge region projection compression, and unstable splicing directions of multiple acquisition surfaces.
[0094] This invention introduces effective pixel mask, unfolding grid points, local unfolding scaling ratio, and unfolding start direction determination steps in the surface distortion unfolding process. It can first eliminate unreliable pixels when there is sphere edge projection compression, partial occlusion by brackets or limiting parts, and inconsistent directions of adjacent acquisition surfaces. Then, it corrects the planar output position according to the local spherical latitude and longitude span and maintains the consistency of unfolding direction of each acquisition surface through directional reference or coincident boundary differences, thereby reducing edge pattern stretching, seam misalignment, and cross-surface comparison errors.
[0095] Example 4
[0096] After generating the standard pattern image, the main control unit can perform quality verification. The quality verification does not use subjective human scoring, but obtains the verification results from three aspects: sharpness, exposure status, and composition status. The verification results are used to determine whether to archive or re-acquire.
[0097] The sharpness status can be represented by the variance of the Laplacian response of the grayscale image: B=Var(∇²G), where B is the sharpness characterization quantity, G is the grayscale image corresponding to the standard pattern image, ∇²G is the Laplacian response of the grayscale image, Var is the variance calculation, and B is calculated from the image pixels. When B is lower than the preset sharpness threshold, the main control unit can determine that there is a risk of defocusing or shaking, and prompt refocusing or re-acquisition.
[0098] Exposure status can be determined by the saturation pixel ratio and the shadow pixel ratio. The saturation pixel ratio Ps can be determined by Ns / Nv, and the shadow pixel ratio Pd can be determined by Nd / Nv. Ns is the number of pixels with gray values higher than the saturation threshold, Nd is the number of pixels with gray values lower than the shadow threshold, and Nv is the number of pixels in the effective acquisition area. The saturation threshold and shadow threshold can be set according to the dynamic range of the camera component.
[0099] The composition status can be judged by the degree of contour closure and the proportion of effective area. The degree of contour closure is used to indicate whether there are long broken segments in the outer contour, and the proportion of effective area is used to indicate the area ratio occupied by the sphere contour in the canvas. If the contour is truncated by the acquisition boundary or the proportion of the sphere area deviates from the preset range, the main control unit can prompt the operator to reposition the sphere.
[0100] Example 5
[0101] After the standard pattern image is quality verified, the main control unit can generate an acquisition record. The acquisition record may include the craft item number, acquisition surface number, acquisition time, acquisition personnel or acquisition point identification, sphere outer diameter, contour pixel diameter, target output side length, supplementary lighting parameters, exposure parameters, distortion unfolding parameters, quality verification results, and processing version.
[0102] The acquisition face number can be selected by the operator on the terminal interface, or it can be automatically accumulated by the terminal according to the rotation prompts. For a 12-petal hydrangea, the terminal can prompt the operator to rotate to the next face to be acquired in sequence. Each acquisition of a face generates a corresponding face number. If there are direction lines or positioning marks on the acquisition face, the main control unit can write the position of the positioning mark in the image into the acquisition record.
[0103] File naming can be formed by combining the craft item number, the collection surface number, and the collection time. For example, when the hydrangea with the number GXQ2026-001 is collected on the 3rd collection surface, the file name can be generated in the format GXQ2026-001_03_20260604. The processing version and image format can be saved as suffixes or record fields. In actual use, the existing numbering rules of the heritage point can also be adopted.
[0104] In offline scenarios, standard pattern images and acquisition records can be stored locally and cataloged according to acquisition time or craft item number. When the network is available, they can be synchronized to remote storage. In network scenarios, the terminal can upload standard pattern images and acquisition records simultaneously, and the remote storage returns to an archived state. If the upload fails, the terminal retains a local copy and records the reason for the failure.
[0105] Example 6
[0106] If the object being collected is not a standard sphere, but an approximate sphere that is slightly elliptical or has local undulations due to the effects of hand-sewing, the main control unit can first estimate the equivalent radius using the major and minor axes, and then retain the scaling relationship corresponding to the equivalent radius during distortion unfolding. For objects with large deviations, the terminal can prompt the use of a regional acquisition method to avoid forcibly mapping obviously non-surface areas into regular spheres.
[0107] In the regional acquisition method, the main control unit can expand the effective pattern area near the center of the acquisition window, perform latitude and longitude conversion only on pixels that meet the condition of visible hemisphere, reduce the weight of areas that are close to the contour boundary and have large distortion, or prompt for re-acquisition. The re-acquisitioned image can be associated with the original image through the acquisition surface number and direction record, so that the pattern splicing relationship can be confirmed manually or by the archive system later.
[0108] The method described in this invention can be deployed in a single acquisition terminal or in a system consisting of an acquisition terminal and a server. Contour recognition, size normalization, and distortion unfolding can be completed locally on the acquisition terminal. The remote storage area is mainly used for file management and multi-terminal data aggregation. If the terminal has low computing power, the original pattern image and sphere position parameters can also be uploaded and partially processed by the server.
[0109] The preset thresholds mentioned in this invention can be obtained through prototype calibration or statistical analysis of historical data. For example, the sharpness threshold can be calculated from images acquired by the same camera component under normal focusing and slightly out-of-focus conditions. The exposure threshold can be determined by the allowable range of saturated pixel ratio and dark pixel ratio in the effective area. The contour ratio range can be determined based on the size of the acquisition card, the camera field of view, and the target output size.
[0110] The device model, size range, and threshold value in the above embodiments can be adjusted according to the actual acquisition object and equipment structure. As long as the traceable sphere position parameters are obtained by using the acquisition card, the size is normalized by using the image contour, and the curved surface pattern is unfolded by using the spherical geometric relationship, it falls into the technical concept of the present invention.
[0111] Example 7
[0112] When the terminal performs no-load calibration, it can first move the two limiters on both sides to the mechanical zero point, and then move them to the preset reference position towards the center. The main control unit records the conversion coefficient between the number of motor steps and the actual displacement. The conversion coefficient can be measured by a standard gauge block or a standard sphere. During subsequent data acquisition, the displacement of the limiters can be obtained based on the number of motor steps and the conversion coefficient, thereby avoiding relying solely on images to estimate the outer diameter of the sphere.
[0113] In a calibration example, a 1000-step movement of the left limiting component corresponds to a 20mm displacement, and a 980-step movement of the right limiting component corresponds to a 19.6mm displacement. Therefore, the conversion factor for the left side is 0.020mm / step, and the conversion factor for the right side is also 0.020mm / step. If the left motor moves 1200 steps and the right motor moves 1250 steps during actual data acquisition, then sL is 24mm and sR is 25mm. The main control unit can use this displacement data to calculate the outer diameter and lateral offset of the sphere.
[0114] The acquisition window of the camera component can be selected based on the estimated outer diameter D. If D is large, the main control unit can appropriately increase the acquisition window and reduce the digital magnification. If D is small, the main control unit can shrink the acquisition window to reduce the background area. The window adjustment does not change the target output side length of the final standard pattern image. The final output is still determined by the contour pixel diameter Dp and the target output side length Lt.
[0115] The installation position of the supplementary lighting component can avoid the direct reflection direction of the camera component lens. If the surface of the spherical intangible cultural heritage handicraft has silk thread reflection or metal decoration, the main control unit can detect the area ratio of the bright area through the pre-sampled image. When the bright area is concentrated in the main area of the pattern, the supplementary lighting intensity is reduced or the exposure time is extended to reduce the impact of local reflection on the recognition of the pattern lines.
[0116] Noise suppression before contour recognition can be achieved using median filtering or bilateral filtering. Median filtering is suitable for removing small, isolated noise, while bilateral filtering is suitable for suppressing brightness fluctuations while preserving the edges of the pattern. The main control unit can select the processing method based on the noise level of the presampled image, or a fixed median filtering method can be used in low-computing-power terminals.
[0117] If there are limiting components, bracket edges, or partial occlusions of the operator's hand in the original pattern image, the main control unit can first establish an occlusion mask based on the fixed area of the acquisition card. The occlusion mask covers the possible locations of the limiting components and brackets. During contour screening, the weight of the inner edge of the occlusion mask is reduced, thereby improving the stability of the sphere's outer contour fitting.
[0118] The closed contour of the sphere's outer outline can be filtered by area range, roundness range, and center offset range. The area range is determined by the camera's field of view and the expected size of the sphere. The roundness range is used to exclude square brackets or hand edges. The center offset range is used to exclude background objects at the edge of the screen. If no candidate contour meets all these conditions, the main control unit outputs a repositioning prompt.
[0119] When cropping the effective acquisition area, the closed contour can be expanded by a certain number of pixels to form a cropping boundary. The expanded pixels are used to retain the pattern information near the edge of the sphere. The expanded pixels can be set to 2% to 6% of Dp. If the expansion exceeds the original image boundary, the original image boundary shall be used as the limit, and the boundary truncation information shall be recorded in the composition state.
[0120] The canvas after size normalization can be a square canvas or a rectangular canvas consistent with the subsequent pattern database. A square canvas is convenient for recording the spherical acquisition surface, while a rectangular canvas is convenient for directly using the unfolded latitude and longitude images for retrieval. The main control unit can write the canvas type, target side length and scaling ratio in the acquisition record to avoid misunderstanding the source of the image size when calling it later.
[0121] When the spherical distortion is unfolded, the main control unit can first generate an effective pixel mask. The effective pixel mask is used to represent pixels that are inside the sphere outline and are not occluded. Only effective pixels participate in the latitude and longitude conversion. The area outside the mask is reserved as a blank or transparent background in the standard pattern image. The transparent background is suitable for subsequent overlay display, and the white background is suitable for ordinary file browsing.
[0122] The resampling process can use nearest neighbor interpolation, bilinear interpolation, or local mean interpolation. Nearest neighbor interpolation has a smaller computational load and is suitable for real-time processing in embedded terminals. Bilinear interpolation can reduce jagged edges in the unfolded plane, and local mean interpolation can reduce sampling noise caused by fine embroidery lines. The specific interpolation method can be determined by processing the version record.
[0123] For the suture lines between the petals of a hydrangea, the main control unit can save the suture lines as directional information instead of deleting them directly from the standard pattern image. This is because the suture lines often correspond to the boundary of the sampled surface or the direction of the pattern. When organizing the pattern archives later, this directional information can help confirm the spatial relationship between different sampled surfaces of the same hydrangea.
[0124] If a certain side of the object being acquired contains obvious protruding decorations, the protruding area may not conform to the spherical projection assumption. The main control unit can identify the protruding area by local brightness shadows or contour anomalies and mark it as a local undulation area in the acquisition record. The image of this area is still retained when the distortion is unfolded, but this area is not used as the main basis for contour fitting and radius estimation.
[0125] The sharpness threshold in quality verification can be established when the terminal is used for the first time. The operator puts in a standard embroidered ball or a standard test pattern, and the main control unit acquires multiple frames of images at the normal focus position and calculates the reference range of the sharpness characterization quantity B. Then, multiple frames of images are acquired at the slightly off-focus position as unqualified references. The threshold can be the boundary value between the two reference ranges.
[0126] The exposure threshold can be established based on the pixel statistics within the effective acquisition area. When the saturated pixel ratio Ps exceeds the preset upper limit, it indicates that the local highlight of the pattern may cover the lines. When the dark pixel ratio Pd exceeds the preset upper limit, it indicates that the dark area may make the lines and the base fabric difficult to distinguish. If both Ps and Pd are within the allowable range, the exposure state can be determined to meet the acquisition conditions.
[0127] The effective area ratio Q in the composition state can be determined by Ae / Ac, where Ae is the effective outline area of the sphere and Ac is the output canvas area. Both Ae and Ac are expressed in pixel area. When Q is lower than the preset lower limit, it means that the sphere occupies too small a proportion in the image. When Q is higher than the preset upper limit, it means that the sphere may be truncated by the boundary. The main control unit can use this to prompt adjustments to the placement position or acquisition window.
[0128] If the quality verification does not meet the preset acquisition conditions, the terminal can retain the unqualified image as a temporary file and mark the reason for the unqualification in the acquisition record. The temporary file will not be included in the formal pattern file. After the operator completes the re-acquisition, the main control unit can write the acquisition time and parameter difference between the temporary file and the qualified file into the device log, which is convenient for subsequent maintenance personnel to check the supplementary lighting or focus status.
[0129] The acquisition records can be saved using structured text or database fields. The fields maintain a correspondence with the image file name. The craft item number is used to distinguish different handicrafts, the acquisition surface number is used to distinguish different curved surface areas of the same handicraft, the processing version is used to distinguish different contour recognitions, the size normalization or distortion unrolling algorithm, and the quality verification result is used to indicate whether the image can be directly included in the archive.
[0130] At grassroots heritage sites, multiple data collection terminals can share a remote storage area. The remote storage area can be cataloged according to the heritage site number and the craft item number. If two terminals upload images with the same craft item number and the same collection surface number, the remote storage area can retain the earlier version and mark the later uploaded version as a re-collection version. The specific retention rules can be set by the archive management personnel.
[0131] To facilitate subsequent retrieval, standard pattern images can simultaneously save the original scale image and the unfolded image. The original scale image is used to view the actual shooting effect, while the unfolded image is used for pattern comparison. The two types of images share the same acquisition record and are distinguished by the image type field in the record. The subsequent retrieval system can read one type of image or both types of images as needed.
[0132] In application environments with unstable networks, the terminal can generate a check value for each file to be uploaded. After uploading, the remote storage area returns the receiving status. If the check value is inconsistent or the receiving status is not received, the terminal keeps the local cache and re-uploads it the next time it connects to the network. This process does not change the standard pattern image itself, but only changes the archive status field.
[0133] Example 8
[0134] The following example illustrates the process of collecting data from a Zhuang brocade embroidered ball with a diameter of approximately 110mm. After the operator places the ball into the angled bracket, the limiting parts on both sides contact the ball and provide feedback on the displacement. The main control unit calculates the estimated outer diameter to be approximately 111mm. Subsequently, after the supplementary light stabilizes, the original pattern image is acquired. The diameter of the ball's outline in the image is 1640 pixels, and the target output side length is set to 1200 pixels.
[0135] The main control unit calculates a scaling ratio of approximately 0.7317 based on λ=Lt / Dp, then moves the outline center to the center of the target canvas to obtain the effective acquisition area after size normalization. Subsequently, a spherical projection reference is established with R=820 pixels to generate an effective pixel mask. Within the effective acquisition area, unfolded grid points are set at 40-pixel intervals. The local unfolding scaling ratio is determined based on the spherical latitude and longitude span corresponding to adjacent unfolded grid points.
[0136] When there are overlapping boundary stripes between the current acquisition surface and the previous acquisition surface, the main control unit can perform trial unfolding on multiple candidate unfolding start directions, compare the color difference and seam position offset of the overlapping boundary stripes, and take the candidate unfolding start direction with the smallest boundary difference as the target unfolding start direction. Then, based on the target unfolding start direction and the local unfolding scaling ratio, the effective pixels in the contour are converted to latitude and longitude, corrected in coordinates and resampled to generate the unfolded standard pattern image.
[0137] The main control unit calculates the sharpness characterization quantity B, saturation pixel ratio Ps, dark pixel ratio Pd, and effective area ratio Q for the standard pattern image. If B reaches the preset sharpness threshold, Ps and Pd are within the allowable range, and Q is within the composition range, then the image is marked as a qualified image, and a file name is generated with the craft item number, the acquisition surface number, and the acquisition time.
[0138] If the saturated pixel ratio Ps exceeds the allowable range in the above example, the main control unit can reduce the supplementary light intensity or shorten the exposure time, and prompt the user to re-acquire the current acquisition surface. The re-acquired image continues to be processed in the order of contour recognition, size normalization, distortion unrolling and quality verification. Only images that meet the acquisition conditions are entered into the formal archive.
[0139] In the processing flow of this invention, the sphere position parameters, contour size parameters, unfolding parameters, and quality verification parameters are all calculated by mechanical displacement or image pixels. Manual input is mainly limited to the craft item number, confirmation of the acquisition surface, and necessary re-acquisition confirmation. Therefore, a repeatable acquisition process can be formed without changing the traditional handicraft itself.
[0140] If the terminal needs to adapt to hydrangeas of different diameter ranges, replaceable bracket pads can be set in the acquisition slot. The bracket pads change the distance between the lowest point of the sphere and the camera component. The main control unit calls the corresponding initial focus value and initial acquisition window value according to the bracket pad number. The displacement of the limit component is still used to calculate the specific outer diameter of the sphere.
[0141] The bracket pad number can be selected manually, or read by a magnetic switch, resistance code, or mechanical contact. The main control unit writes the bracket pad number into the acquisition record. If a focus shift is found in a certain batch of images, the number can be used to trace whether it was caused by the installation status of the bracket pad.
[0142] To prevent the limit component from excessively clamping the ball, the limit drive assembly can stop moving when the motor current reaches the contact threshold, the displacement change reaches the stop threshold, or the micro switch on the soft contact pad is triggered. The main control unit records the displacement at the moment of stop as sL and sR. The contact threshold can be obtained by calibration using a standard ball.
[0143] If the limiting component has reached the travel boundary before contact, the main control unit can determine that the size of the sphere exceeds the adaptation range of the current acquisition position and stop subsequent photography. If the difference between the stopping positions of the two limiting components exceeds the preset offset range, the main control unit can prompt the operator to reposition them to avoid distorted unfolding under obvious eccentricity.
[0144] After the image distortion is unfolded, the main control unit can retain the mapping relationship between the unfolded coordinates and the original image coordinates. The mapping relationship can be stored as a sampling table or parameter record. When viewing the details of a certain unfolded pattern later, the original image position can be returned according to the mapping relationship, which is convenient for checking the embroidery texture, color block boundary and acquisition artifact.
[0145] The mapping relationship can also be used to generate low-resolution preview images and high-resolution archive images. The terminal first generates a preview image with sparser sampling points for the operator to confirm the acquisition direction. After confirmation, a high-resolution archive image is generated. If the operator finds that the direction is wrong, he only needs to reconfirm the acquisition surface direction and does not need to repeat the mechanical positioning steps.
[0146] When the color difference of the pattern is small, the main control unit can generate an auxiliary display image without changing the original archived image. The auxiliary display image can be slightly stretched in contrast or background balanced. The auxiliary display image is only used for on-site confirmation, while the official archive still saves the pattern image that has not been enhanced or has only been standardized.
[0147] During terminal maintenance, the consistency between the optical axis and the center of the acquisition card can be checked by acquiring a standard circular plate or a standard sphere. If there is a fixed offset between the outline center of the standard object and the center of the canvas, the main control unit can write the offset into the calibration parameters for compensation during subsequent cropping and normalization.
[0148] Calibration parameters can include optical axis offset, pixel size conversion, lens distortion correction parameters, and fill light brightness reference. Optical axis offset is used to correct the contour center, pixel size conversion is used to estimate the correspondence between the physical outer diameter and the pixel diameter, lens distortion correction parameters are used to reduce edge distortion caused by the camera assembly itself, and fill light brightness reference is used to determine the aging of the LED or installation misalignment.
[0149] If the terminal uses a wide-angle lens, the main control unit can perform lens distortion correction before spherical distortion unfolding. The lens distortion correction parameters are obtained by standard checkerboard or standard dot plate calibration. The corrected image then enters the sphere contour recognition and latitude and longitude unfolding process to avoid mistaking lens distortion for spherical projection distortion.
[0150] The lens distortion correction and spherical distortion unfolding mentioned above are different processing stages. Lens distortion correction targets the imaging error of the camera component, while spherical distortion unfolding targets the difference in projection of curved surface patterns. The parameters of the two stages have different sources and physical meanings, and the main control unit saves them separately in the acquisition record for subsequent verification.
[0151] When the same operator completes multiple acquisition surfaces consecutively, the terminal can display a thumbnail of the previous acquisition surface and the current surface number on the interface. The thumbnail is only used to indicate the rotation direction and avoid repeated acquisition. The main control unit still uses the current original pattern image as input during formal processing to avoid the previous frame image affecting the current acquisition result.
[0152] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0153] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for pattern image acquisition and standardization processing of spherical intangible cultural heritage handicrafts, characterized in that, The method, applied to a pattern acquisition terminal, includes: The spherical intangible cultural heritage handicraft was placed in the collection card, and the position parameters of the sphere were determined based on the feedback information from the positioning component; The fill light component and camera component are controlled to acquire pattern images, thus obtaining the original pattern image; The effective acquisition area is determined from the original pattern image based on the sphere's outline, and the size of the effective acquisition area is normalized according to the outline size. Based on the spherical geometry, the effective acquisition area is expanded by surface distortion to obtain a standard pattern image; The standard pattern image is then associated with the collected information and archived.
2. The method of claim 1, wherein, The step of determining the sphere's position parameters based on feedback information from the positioning component includes: After the spherical intangible cultural heritage handicraft falls into the self-centering bracket, the adjustable limiting parts on both sides are controlled to move towards the sphere. The outer diameter of the sphere and the lateral offset of the sphere center are determined based on the stopping positions of the adjustable limiters on both sides; Adjust the focus position or acquisition window of the camera assembly according to the outer diameter of the sphere and the lateral offset of the sphere's center.
3. The method of claim 2, wherein, The control of the adjustable limiting members located on both sides moving towards the sphere includes: Record the initial effective distance between the adjustable limiters on both sides before data collection; During the driving process, the moving distance of the adjustable limiters on both sides is determined based on the number of motor steps, displacement sensor signals, or contact trigger signals. When the contact state meets the stopping condition, the drive stops, and the stopping position is used as the displacement reference for calculating the outer diameter of the sphere and the lateral offset of the sphere's center.
4. The method of claim 3, wherein, The control lighting component and camera component perform pattern image acquisition, including: The fill light component is activated upon receiving a button, touch, or remote trigger signal. Adjust the exposure time, gain, or fill light intensity based on the brightness distribution of the presampled image; Once the brightness change meets the stability condition, the camera component is triggered to capture the original pattern image.
5. The method of claim 4, wherein, The determination of the effective acquisition area from the original pattern image based on the sphere's outline includes: The original pattern image is converted to grayscale, noise is suppressed, and edges are extracted. Filter the closed contours that correspond to the outer contour of the sphere from the edge extraction results; The effective acquisition area is obtained by cropping the background area based on the center and diameter of the closed contour and the circumscribed acquisition frame.
6. The method of claim 5, wherein, The step of normalizing the size of the effective acquisition area according to the contour size includes: The scaling relationship is determined based on the pixel diameter of the closed contour and the target output side length; The effective acquisition area is proportionally transformed according to the scaling relationship described above; Fill the transformed pattern area into the preset canvas, while preserving the correspondence between the outline center and the canvas center.
7. The method according to any one of claims 1 to 6, wherein, The process of expanding the effective acquisition area based on spherical geometry includes: Establish a spherical projection reference based on the center of the sphere's outline, the outline radius, and the directional reference corresponding to the acquisition position; An effective pixel mask is generated based on the effective acquisition area, and the effective pixel mask is used to filter out pattern pixels that are inside the sphere outline and are not occluded. The pattern pixels are converted into spherical latitude and longitude positions relative to the center of the sphere's outline, and multiple unfolded grid points are set within the effective acquisition area; The local expansion scaling ratio is determined based on the spherical latitude and longitude span corresponding to adjacent expanded grid points, and the output position of the pattern pixels in the planar expansion coordinates is corrected according to the local expansion scaling ratio. The unfolding starting direction is determined based on the directional reference or the difference in the overlapping boundaries of adjacent sampling surfaces, and the surface pattern is resampled according to the corrected output position to obtain a standard pattern image.
8. The method of claim 7, wherein, After obtaining the standard pattern image, the following is also included: Determine sharpness status based on image gradient response; The exposure state is determined based on the ratio of saturated pixels and the ratio of dark pixels. The composition state is determined based on the degree of contour closure and the proportion of the effective area; When the sharpness, exposure, or composition status does not meet the preset acquisition conditions, a reacquisition prompt will be output or the acquisition parameters will be automatically adjusted.
9. The method of claim 8, wherein, The process of associating the standard pattern image with the collected information and then archiving it includes: Generate a filename that includes the craft item number, the sampled surface number, the sampled time, and the processing version; Write the sphere's position parameters, supplementary lighting parameters, contour dimensions, distortion unfolding parameters, and quality verification results into the acquisition record; Save the standard pattern images and acquisition records to the local storage area or the remote storage area.
10. A pattern collection terminal for implementing the method of claim 6, characterized by It includes a data acquisition unit, a camera assembly, a supplementary lighting assembly, a limit drive assembly, a main control unit, and a storage and communication unit; The collection slot is used to support the spherical intangible cultural heritage handicrafts; The limit drive component is used to drive the adjustable limit component to move and to feed back the positioning component feedback information to the main control unit. The camera assembly and the supplementary lighting assembly are used to acquire the original pattern image under the control of the main control unit; The main control unit is used to perform contour recognition, size normalization, distortion unwrapping, and quality verification. The storage and communication unit is used to save or send standard pattern images and acquisition records.