A special optical image acquisition method and device for micro-texture acquisition of an article

By determining the preset acquisition area and material-compatible macro imaging and lighting parameters before acquisition, the problems of difficult area positioning and material inconsistency in microtexture acquisition are solved, achieving high-quality image acquisition and metadata output, which is suitable for production line, consumer end and field acquisition.

CN123055993APending Publication Date: 2026-11-06TIANJIN XINJINJIA TECH DEV CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611400007.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing methods for acquiring micro-textures suffer from several drawbacks: difficulty in repeatedly locating the acquisition area, inconsistent imaging conditions for different materials, lack of gating at the acquisition end for image quality, and lack of binding output between the acquired image and acquisition parameters. These issues lead to unstable registered features or failure in verification and comparison.

Method used

Before acquisition, a preset acquisition area is determined, and macro imaging and illumination parameters are configured according to the surface material. Macro optical imaging with a magnification of no less than 10 times is performed. The image quality is evaluated for sharpness, brightness uniformity, overexposure, and texture richness. After adjusting the parameters, the acquisition is repeated until the quality conditions are met, and the acquisition metadata is generated and output.

Benefits of technology

It improves the regional consistency and visibility of micro-texture images, reduces the impact of low-quality images on subsequent processing, ensures the quality and traceability of image input, and is suitable for production line, consumer end and field acquisition scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123055993A_ABST
    Figure CN123055993A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of optical image acquisition, and discloses a special optical image acquisition method and device for micro-texture acquisition of an article. The method determines a preset acquisition region of the surface of the article, configures macro imaging parameters and controllable illumination parameters according to the position and surface material of the acquisition region, performs micro-optical imaging on the preset acquisition region with a magnification of no less than 10 times when the motion state meets the acquisition condition, and performs quality evaluation on the acquisition image in terms of definition, brightness uniformity, overexposure degree and texture abundance; when the image quality does not meet the preset condition, the illumination, exposure or focusing parameters are adjusted and re-acquisition is performed; when the image quality meets the preset condition, metadata containing the acquisition region identifier, imaging parameters, illumination parameters and quality score are generated, and the micro-texture image and the metadata are output to an external processing device, so that the consistency and usability of micro-texture image acquisition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of optical image acquisition technology, and specifically to a dedicated optical image acquisition method and apparatus for acquiring microscopic textures on the surface of objects. Background Technology

[0002] Anti-counterfeiting and authentication methods based on the microscopic physical characteristics of an item's surface typically require capturing microscopic texture images of a fixed area on the item's surface at the production or registration end, and then capturing images of the corresponding area at the verification end for feature extraction and comparison. Since areas such as paper fibers, printing ink boundaries, leather surfaces, metal processing surfaces, fabric fibers, and packaging seals may all possess randomly formed microstructures, the quality of capturing these microscopic texture images directly affects the subsequent registration, comparison, and authentication results.

[0003] Among existing acquisition methods, fixed tabletop microscopes can obtain local images at a certain magnification, but their equipment form and working distance are relatively fixed, making it difficult to adapt to scenarios such as continuous acquisition on production lines, fixed verification at the consumer end, and mobile verification on-site. Although ordinary industrial cameras with general-purpose macro lenses have certain imaging capabilities, they usually lack dedicated lighting control for revealing microscopic textures, making it difficult to adjust the lighting angle, lighting intensity, and exposure conditions according to different surface materials.

[0004] Furthermore, existing acquisition devices typically only acquire images, lacking pre-processing quality assessments of sharpness, brightness uniformity, overexposure, texture information, and motion state. They also lack location guidance and resampling control for the target acquisition area. If blurry, overexposed, misaligned, or insufficiently textured images directly enter the subsequent feature extraction stage, it can easily lead to unstable registered features or verification / comparison failures. Therefore, a dedicated optical image acquisition method and device that integrates region localization, macro imaging, controllable illumination, quality gating, resampling control, and metadata output is needed. Summary of the Invention

[0005] To address the problems of difficulty in repeatedly locating the acquisition area, inconsistent imaging conditions for different surface materials, lack of image quality control at the acquisition end, and lack of binding output between the acquired image and acquisition parameters in existing micro-texture acquisition methods, this invention provides a dedicated optical image acquisition method and device for acquiring micro-textures of objects. Before acquisition, the method determines a preset acquisition area based on the positioning reference of the object's surface, and configures macro imaging parameters and illumination parameters according to the surface material of the preset acquisition area. After ensuring that alignment deviation and motion conditions meet the acquisition requirements, micro-optical imaging at a magnification of at least 10x is performed on the preset acquisition area. Subsequently, the micro-texture image undergoes quality assessment for sharpness, brightness uniformity, overexposure, and texture richness. If the quality is unsatisfactory, the parameters are adjusted and re-acquisition is performed. If the quality is satisfactory, acquisition metadata is generated, and the micro-texture image and acquisition metadata are output to an external processing device. Thus, the acquisition end can form a continuous processing flow of area positioning, parameter configuration, macro imaging, quality assessment, re-acquisition control, and data output.

[0006] This invention provides a dedicated optical image acquisition method for collecting microscopic textures of objects, comprising the following steps: S1, acquiring acquisition task information of the object to be acquired, determining a preset acquisition area based on the positioning reference of the object surface, and generating alignment deviation information of the optical imaging center relative to the preset acquisition area. The acquisition task information may include object identification, acquisition area identification, acquisition area location description, material category, acquisition scene, and output target. The positioning reference is a macroscopic structure that can be repeatedly identified on the object surface, including object outline, packaging boundary, label boundary, barcode boundary, QR code positioning pattern, printed pattern boundary, or seal edge. The acquisition device establishes an object coordinate system by identifying the macroscopic structure, and then determines the microscopic imaging range according to a preset offset, a preset acquisition window size, and a preset acquisition direction. The alignment deviation information is used to represent the translational deviation, angular deviation, or scale deviation between the current optical imaging center and the target microscopic imaging range.

[0007] S2, based on the surface material and alignment deviation information of the preset acquisition area, configure macro imaging parameters and illumination parameters. The surface material can be given by the acquisition task information, determined by the registration information corresponding to the item code, or judged based on the reflection intensity, local texture direction, color distribution, and brightness distribution in the preview image. The macro imaging parameters include magnification, working distance, exposure time, gain, and focus position. The illumination parameters include illumination angle, illumination intensity, brightness ratio of inner and outer ring light sources, and exposure synchronization sequence. For printed inked areas, the acquisition device can increase the oblique illumination component to enhance the visibility of ink penetration boundaries, pores, and microscopic bright spots; for reflective surfaces, the acquisition device can reduce the direct light intensity and adjust the light guide or light shielding structure; for fibrous surfaces, the acquisition device can adjust the brightness ratio of ring illumination and oblique illumination to ensure stable contrast of the fiber cross-texture in the image.

[0008] S3, when the alignment deviation meets the acquisition conditions and the motion state of the acquisition device meets the stability conditions, microscopic optical imaging with a magnification of no less than 10 times is performed on the preset acquisition area to obtain a microscopic texture image. The motion state can be determined by acceleration signals, angular velocity signals, or displacement changes between consecutive preview images. When the motion stability index exceeds the stability threshold, the acquisition device pauses exposure and outputs a delayed acquisition control signal; when the motion stability index does not exceed the stability threshold, the acquisition device synchronizes the illumination exposure sequence with the image sensor exposure sequence and completes macro imaging within a specified working distance. The microscopic texture image is used to characterize the microscopic physical features formed on the surface of an object by paper fibers, printing ink, leather surfaces, metal processing surfaces, fabric fibers, glass surfaces, ceramic surfaces, or plastic surfaces.

[0009] S4, perform a quality assessment on the micro-texture image. This assessment includes a comprehensive evaluation of sharpness, brightness uniformity, overexposure, and texture richness. Sharpness can be determined based on the Laplacian response variance of the micro-texture image; brightness uniformity can be determined based on the mean and standard deviation of the brightness of the micro-texture image blocks; overexposure can be determined based on the proportion of pixels reaching the saturation threshold; and texture richness can be determined based on the information entropy of the grayscale distribution or local texture response distribution. During the quality assessment, the acquisition device normalizes the sharpness, brightness uniformity, overexposure, and texture richness respectively, and calculates a comprehensive quality score according to preset weights. The comprehensive quality score can be expressed as... ,in This represents the normalized sharpness index. Indicator of brightness uniformity Indicates the overexposure ratio. This represents the normalized texture abundance index. , , and Represents the corresponding weight and satisfies .

[0010] S5, when the quality assessment result does not meet the preset quality conditions, adjust the macro imaging parameters or illumination parameters and re-execute macroscopic optical imaging. When the overexposure of the microscopic texture image does not meet the preset quality conditions, the acquisition device reduces the illumination intensity, shortens the exposure time, or reduces the gain; when the sharpness does not meet the preset quality conditions, the acquisition device adjusts the focus position, working distance, or exposure time; when the brightness uniformity does not meet the preset quality conditions, the acquisition device adjusts the brightness ratio of different light sources or switches the illumination angle; when the texture richness does not meet the preset quality conditions, the acquisition device changes the oblique illumination direction or increases the illumination component used to enhance surface undulations. If the preset quality conditions are still not met after a preset number of re-acquisitions, the acquisition device outputs an acquisition failure status or a status requiring manual review.

[0011] S6, when the quality assessment result meets the preset quality conditions, acquire metadata corresponding to the micro-texture image is generated, and the micro-texture image and the acquire metadata are output to an external processing device. The acquire metadata includes item identifier, acquisition area identifier, acquisition time, acquisition device identifier, actual magnification, working distance, exposure time, gain, illumination angle, illumination intensity, quality assessment result, alignment deviation information, resampling times, and motion stability index. During output, the acquisition device establishes a binding relationship between the acquire metadata and the corresponding image, and transmits it according to a data format that the external processing device can parse.

[0012] Furthermore, when multiple preset acquisition areas are set for the same item to be acquired, the acquisition device sequentially determines the alignment deviation information of each preset acquisition area according to the preset acquisition order, and performs macro imaging, quality assessment, and resampling control respectively. After the microscopic texture image of any preset acquisition area meets the preset quality conditions, the acquisition device writes the microscopic texture image, area identifier, and corresponding acquisition metadata into the acquisition result set, and then switches to the next preset acquisition area. When all preset acquisition areas have been successfully acquired, the acquisition device outputs the acquisition result set to an external processing device.

[0013] On the other hand, the present invention also provides a dedicated optical image acquisition device for collecting microscopic textures of objects. This device includes an acquisition area positioning unit, a parameter configuration unit, a macro optical imaging unit, a controllable illumination unit, a motion stability detection unit, an image quality control unit, a resampling control unit, and an image output interface. The acquisition area positioning unit is used to acquire acquisition task information of the object to be acquired, determine a preset acquisition area based on the positioning reference of the object's surface, and generate alignment deviation information of the optical imaging center relative to the preset acquisition area. The parameter configuration unit is used to configure macro imaging parameters and illumination parameters according to the surface material and alignment deviation information of the preset acquisition area. The macro optical imaging unit is used to perform microscopic optical imaging of the preset acquisition area at a magnification of not less than 10 times. The controllable illumination unit is used to provide controllable angle and controllable intensity illumination to the preset acquisition area according to the illumination parameters. The motion stability detection unit is used to detect the motion state of the acquisition device relative to the object to be acquired before imaging. The image quality control unit is used to evaluate the sharpness, brightness uniformity, overexposure, and texture richness quality of the microscopic texture image. The resampling control unit is used to control parameter adjustment and re-acquisition when the quality evaluation result does not meet the preset quality conditions. The image output interface is used to output the micro-texture image and acquired metadata to an external processing device when the quality assessment results meet the preset quality conditions.

[0014] The macro optical imaging unit may include a macro lens assembly, an image sensor, and a focusing mechanism. The macro lens assembly has an optical magnification of no less than 10x, and the focusing mechanism is used to adjust the imaging focus within a specified working distance, enabling clear imaging of the microscopic textures in the preset acquisition area. The controllable illumination unit may include an inner ring light source, an outer ring light source, a light guide structure, a light-shielding structure, and an illumination control circuit. The illumination control circuit controls the brightness ratio of the inner and outer ring light sources according to the illumination parameters output by the parameter configuration unit, and controls the illumination exposure sequence to be synchronized with the image sensor exposure sequence. The acquisition area positioning unit may include a machine-readable encoding / decoding module and an alignment guidance display module. The machine-readable encoding / decoding module is used to read the surface code of the object and establish an object coordinate system, and the alignment guidance display module is used to display the target acquisition area and the current alignment deviation information. The acquisition metadata output by the image output interface is stored or synchronously transmitted corresponding to the microscopic texture image.

[0015] The technical solution of this invention integrates target area positioning, material-adaptive lighting, macro optical imaging, motion stability assessment, image quality gating, resampling control, and acquisition metadata output into a continuous processing mechanism at the acquisition end. This mechanism first determines a preset acquisition area on the object's surface that can be repeatedly positioned. Then, it configures imaging and lighting parameters based on the surface material. Under conditions of motion stability and proper alignment, macro imaging is performed, and the image's suitability for subsequent processing is evaluated through sharpness, brightness uniformity, overexposure, and texture richness. For unqualified images, the acquisition end re-acquires them by adjusting parameters; for qualified images, the acquisition end simultaneously outputs the image and acquisition metadata, ensuring a stable data foundation for subsequent feature extraction, database registration, verification comparison, or acquisition auditing.

[0016] Compared with existing technologies, the present invention has at least the following technical effects: First, by determining the preset acquisition area through positioning reference, object coordinate system, and alignment deviation information, the production end, verification end, or acquisition devices of different batches can repeatedly image around the same surface area, thereby improving the regional consistency of micro-texture images; Second, by configuring macro imaging parameters and illumination parameters according to surface material, different materials such as printed inked areas, fibrous surfaces, and reflective surfaces can be imaged under suitable lighting and exposure conditions, thereby improving the visibility of micro-textures and image usability; Third, through quality assessment and re-acquisition control at the acquisition end, blurry, overexposed, unevenly bright, or insufficient texture information images are intercepted or re-acquired before output, thereby reducing the possibility of subsequent feature extraction, registration, or verification comparison being affected by low-quality images; Fourth, by binding the acquisition metadata with the micro-texture image for output, external processing devices can select processing parameters according to actual acquisition conditions and verify the image source, acquisition status, and quality results. The combined effects of the above technologies enable the present invention to provide consistent, qualified, and traceable image input for subsequent identification and processing of the micro-texture of objects in scenarios such as fixed collection on the production line, fixed verification at the consumer end, and on-site collection. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the overall process of a dedicated optical image acquisition method for collecting microscopic textures of objects according to the present invention.

[0018] Figure 2 This is a system structure block diagram of the dedicated optical image acquisition device of the present invention.

[0019] Figure 3 This is a schematic diagram of the structure of the macro optical imaging unit and the controllable illumination unit of the present invention.

[0020] Figure 4 This is a flowchart of the image quality control and resampling control process of the present invention.

[0021] Figure 5 This is a schematic diagram illustrating the location of the data acquisition area and the sequential acquisition of multiple areas in this invention.

[0022] Figure 6 This is a schematic diagram illustrating the interaction between the metadata generation and external processing devices of this invention.

[0023] Figure 7 This is a schematic diagram illustrating the application of the present invention in a fixed data acquisition station at the production end.

[0024] Figure 8 This is a schematic diagram comparing the technical effects of the present invention. Detailed Implementation

[0025] The technical solution of the present invention will be further described below with reference to the accompanying drawings. It should be understood that the following specific embodiments are used to illustrate the implementable structure, processing flow, and parameter setting methods of the present invention, and are not intended to limit the scope of protection of the present invention. Any continuous processing flow that can achieve acquisition task acquisition, preset acquisition area positioning, macro imaging and illumination parameter configuration, motion stability judgment, macro optical imaging, image quality assessment, resampling control, and image and acquisition metadata output can be specifically configured according to the technical solution of the present invention.

[0026] In a first embodiment, a dedicated optical image acquisition method is provided for acquiring the microscopic texture of an object. This embodiment uses... Figure 1 The method described is based on the illustrated flow. This method can be executed by a dedicated optical image acquisition device or by an acquisition device that includes a macro optical imaging component, a controllable illumination component, a processor, a memory, a motion detection component, and an image output interface. This method is applicable to scenarios such as production-end registration acquisition, verification-end re-acquisition, fixed-station acquisition, and on-site mobile acquisition. The acquisition object can be the surface of the product itself, the surface of the packaging box, the surface of the label, the surface of the bottle cap seal, or the surface of the accompanying carrier.

[0027] Before data collection, the data collection device acquires the collection task information of the items to be collected. This task information can come from the production line control system, external processing equipment, a manual configuration interface, or machine-readable code parsing results. The task information records the item identifier, the area number of the area to be collected, the area location description, the surface material type, the purpose of collection, and the output target. For production-end registration scenarios, the purpose of collection can be registration and warehousing; for verification-end re-collection scenarios, the purpose can be subsequent feature comparison; for on-site sampling scenarios, the purpose can be local temporary collection or remote submission. After obtaining the collection task information, the data collection device does not directly trigger macro photography but first enters the collection area positioning stage to reduce area misalignment caused by manual placement errors or equipment posture deviations.

[0028] exist Figure 1 In the illustrated process, step S1 is the acquisition area positioning step. The acquisition device obtains the positioning reference of the surface of the item to be acquired through preview imaging, code recognition, or geometric boundary recognition, and establishes an item coordinate system based on the positioning reference. The positioning reference can be the edge of the packaging box, the edge of the label, the positioning pattern of the QR code, the boundary of the barcode, the edge of the bottle cap seal, the outline of the printed pattern, or a geometric structure on the item itself that can be repeatedly identified. Taking the QR code area as an example, the acquisition device can identify three positioning patterns of the QR code, and use the center of one of the positioning patterns as the origin of the coordinate system, and the direction of the line connecting adjacent positioning patterns as the direction of the coordinate axis, thereby establishing a two-dimensional item coordinate system. Taking the packaging boundary as an example, the acquisition device can identify the intersection of two adjacent boundary lines of the packaging box as the origin of the coordinate system, and the direction of the boundary line as the direction of the coordinate axis. After the item coordinate system is established, the acquisition device determines the preset acquisition area according to the preset offset, acquisition window size, and acquisition direction in the acquisition task information, and calculates the alignment deviation information of the current optical imaging center relative to the center of the preset acquisition area.

[0029] The alignment deviation information may include lateral deviation. Longitudinal deviation Rotational deviation and scale bias Lateral and longitudinal deviations represent the positional difference between the current optical imaging center and the center of the preset acquisition area in the object coordinate system; rotational deviation represents the angular difference between the current imaging window direction and the preset acquisition direction; and scale deviation represents the proportional difference between the current preview imaging range and the preset acquisition window size. The acquisition device can synthesize the above deviations into an alignment status value. , You can follow Calculation, where , , and These represent the allowable thresholds for the corresponding deviations. to Represents the corresponding weight and satisfies .when When the deviation is not greater than 1, and each individual deviation does not exceed the corresponding allowable threshold, the acquisition device determines that the alignment deviation meets the acquisition conditions. When the deviation is greater than 1 or any single deviation exceeds the allowable threshold, the data acquisition device outputs alignment guidance information through the display interface, indicator lights, sound prompts, or mechanical actuators, so that the operator or mechanical fixture can adjust the relative position of the item to be collected and the data acquisition device.

[0030] Step S2 is the parameter configuration step. After the alignment deviation meets the acquisition conditions, the acquisition device configures the macro imaging parameters and illumination parameters according to the surface material of the preset acquisition area. The surface material can be directly given by the acquisition task information, or by the registration information corresponding to the item identification, or by the acquisition device based on the preview image. When judging from the preview image, the acquisition device can determine the material category based on the average brightness of the area, the specular reflection ratio, the directionality of local texture, the color distribution, and the edge density. For printed inked areas, the image usually contains black or dark inked areas as well as local bright spots and pore edges formed by ink penetration; for paper fiber areas, the image usually contains long and thin fiber structures and cross textures; for leather surfaces, the image usually contains pores, embossing, and irregular fiber bundle boundaries; for metal or glass surfaces, the image may contain strong reflections, bright spots, and micro-scratches.

[0031] The parameter configuration unit calls the corresponding initial parameter set based on the surface material. Macro imaging parameters include magnification, working distance, exposure time, image sensor gain, focus position, and preview frame rate. Illumination parameters include illumination angle, illumination intensity, inner ring light source brightness, outer ring light source brightness, illumination timing, and exposure synchronization timing. In a specific setting, the printed inked area uses a higher oblique illumination component, making the ink boundaries, pores, and local bright spots form clearer grayscale differences in the image; the paper fiber area uses a combination of ring illumination and oblique illumination, making the fiber direction and fiber intersections have identifiable textures in multiple directions; reflective surfaces reduce the intensity of coaxial direct light, and the saturated highlight area is reduced through light-shielding structures; leather or fabric surfaces increase the proportion of low-angle oblique light, making the surface undulations and pore boundaries produce stable shadows. The above parameter sets are not fixed and can be adjusted in reverse based on subsequent quality evaluation results.

[0032] Step S3 is the motion stability assessment and macro imaging step. Before formal exposure, the acquisition device detects its motion state relative to the object to be acquired. For handheld or semi-handheld acquisition devices, the motion state can be provided by accelerometers and gyroscopes; for fixed-station devices, the motion state can be determined by conveyor belt trigger signals, photoelectric sensor signals, or displacement changes between consecutive preview images. The acquisition device can calculate motion stability indices. , It can be formed by weighting the changes in acceleration, angular velocity, and displacement of the preview image. When When the stable threshold is exceeded, the acquisition device pauses exposure and enters delayed acquisition mode; when When the threshold for stability is not exceeded and the preset stability time is met continuously, the acquisition device triggers synchronous exposure of the lighting and image sensor.

[0033] In macro optical imaging, the macro lens assembly images the preset acquisition area at a magnification of no less than 10x. The magnification can be set according to the texture scale and field of view of the acquisition area. For example, for the ink penetration texture in the black module of a QR code, the magnification can be set to 10x to 30x; for the cross-section of paper fibers or the pore area of ​​leather, the magnification can be set to 15x to 50x. The acquisition device adjusts the focus to the surface of the preset acquisition area through the focusing mechanism, so that the image sensor obtains an original image containing microscopic texture details. After necessary data reading and format conversion, the original image forms a microscopic texture image, which can be a grayscale image, a color image, or an image that retains the original sensor data.

[0034] Step S4 is the image quality assessment step. The acquisition device performs a quality assessment on the acquired micro-texture image, rather than directly outputting the image. The quality assessment includes sharpness, brightness uniformity, overexposure, and texture richness. Sharpness can be represented by the Laplacian response variance, i.e. ,in Represents microscopic texture images, This represents the response graph after applying the Laplacian operator to the image. The variance is represented by the mean and standard deviation of the brightness of each block. ,in This represents the mean of the average brightness of each image block. The standard deviation of the average brightness of each image block is represented. To prevent constants with a denominator of zero, the degree of overexposure can be represented by the saturation pixel ratio, i.e. ,in This indicates the number of pixels whose grayscale value reaches the saturation threshold. This represents the total number of pixels in the image. Texture abundance can be represented by the information entropy of the gray-level distribution or the local texture response distribution, i.e. ,in Indicates the first The probability of a gray level or local texture response range.

[0035] The acquisition device normalizes sharpness, brightness uniformity, overexposure, and texture richness, and calculates a comprehensive quality score. The overall quality score can be expressed as: ,in This represents the normalized sharpness index. This represents the normalized texture abundance index. , , and Represent the weights and satisfy the following conditions: .like Reaching the overall quality threshold, and , , and If each individual threshold is met, the acquisition device determines that the micro-texture image meets the preset quality conditions. If the overall quality score does not reach the overall quality threshold, or if any individual indicator does not meet its corresponding threshold, the acquisition device determines that the micro-texture image does not meet the preset quality conditions.

[0036] Step S5 is the parameter adjustment and resampling control step. The acquisition device determines the cause of non-compliance based on the quality assessment results and performs corresponding parameter adjustments. If the overexposure degree... If the overexposure ratio exceeds the upper limit, the acquisition device reduces the illumination intensity, shortens the exposure time, or reduces the image sensor gain. If the sharpness index is below the sharpness threshold, the acquisition device adjusts the focus position, working distance, or exposure time; if motion stabilization is insufficient, it can wait for stabilization. If the brightness uniformity is below the uniformity threshold, the acquisition device adjusts the brightness ratio of the inner and outer light sources, or changes the illumination angle to reduce local shadows and highlights. If the texture richness is below the texture richness threshold, the acquisition device increases the oblique illumination component, changes the oblique illumination direction, or selects a more suitable illumination combination for displaying surface undulations. After parameter adjustment, the acquisition device returns to step S2 or S3 and re-executes macro imaging and quality assessment.

[0037] To avoid unlimited resampling, the acquisition device can be set to a maximum number of resampling attempts. Each time a sample fails to meet the acceptable standard, a new sample is collected. The number of re-sampling attempts is [number missing Add one. When Not achieved At this time, the acquisition device continues to perform parameter adjustments and resampling. achieve If a microscopic texture image meeting the preset quality conditions is still not obtained, the acquisition device outputs an acquisition failure status or a status requiring manual review. The acquisition failure status may include a failure area identifier, the reason for failure, the most recent quality assessment result, and a record of attempted parameter adjustments. This status allows external processing equipment or operators to determine whether it is necessary to clean the object's surface, reposition the object, replace the acquisition area, or inspect the acquisition device.

[0038] Step S6 involves generating metadata and outputting the image. When the micro-texture image meets preset quality conditions, the acquisition device generates acquisition metadata corresponding to the image. The acquisition metadata includes item identifier, acquisition area identifier, acquisition time, acquisition device identifier, actual magnification, working distance, exposure time, image sensor gain, illumination angle, illumination intensity, brightness ratio of inner and outer light sources, quality assessment result, alignment deviation information, number of resampling attempts, and motion stability indicators. The acquisition device establishes a binding relationship between the acquisition metadata and the micro-texture image. This binding relationship can be achieved through the same data packet, the same file index, the same record number, or image file extension fields. The image output interface then outputs the micro-texture image and acquisition metadata to an external processing device, enabling the external processing device to perform feature extraction, registration, verification and comparison, or auditing of the acquisition process.

[0039] In multi-area acquisition scenarios, the acquisition task information can specify multiple preset acquisition areas for the same item. The acquisition device executes the above steps sequentially according to the preset acquisition order. After the image quality of the current area is qualified, the acquisition device writes the micro-texture image, area identifier, and acquisition metadata of that area into the acquisition result set, and then switches to the next preset acquisition area. For each area, the acquisition device re-executes area localization, parameter configuration, motion stability judgment, macro imaging, quality assessment, and re-acquisition control. After all areas have been successfully acquired, the acquisition device outputs a complete acquisition result set. Each image in the complete acquisition result set has independent acquisition metadata, which external processing devices can process separately based on the area identifier, or use images from multiple areas as input for joint feature extraction.

[0040] In a specific example, the item to be acquired is a packaging box with a QR code label, and the preset acquisition area is located near the edge of the black module of the QR code. The acquisition device first identifies the positioning pattern of the QR code and establishes the coordinate system of the item, and then determines the microscopic imaging window in the black module area according to the preset offset. Since this area is a printed ink-receiving surface, the parameter configuration unit selects oblique illumination and inner and outer ring combined illumination, and sets a magnification of no less than 10 times. After the acquisition device detects that the motion state is stable, it triggers exposure to obtain a microscopic texture image. If local overexposure occurs in the image, the acquisition device reduces the brightness of the inner ring light source and shortens the exposure time before re-acquiring; if the sharpness, brightness uniformity, overexposure degree, and texture richness of the re-acquired image all meet the preset conditions, the image and acquisition metadata are output. This image can then be used by external processing equipment to extract microscopic features such as ink penetration bright spots, pore boundaries, and rough structures of ink-receiving edges.

[0041] The method described in this specific embodiment completes target area localization, material parameter configuration, motion stability assessment, macro imaging, quality gating, and resampling control before outputting the image. Compared to directly capturing and outputting images, this specific embodiment enables the output image to correspond to the acquisition area, acquisition parameters, and quality status, and allows for correction at the acquisition end when the image quality does not meet requirements. This processing flow provides quality-controlled image input for subsequent feature extraction, database registration, or verification comparison.

[0042] In the second specific embodiment, the specific implementation method of material-adaptive illumination and macro imaging parameter configuration is described. This specific embodiment can be a further implementation of step S2 in the aforementioned method, or it can be jointly executed by the parameter configuration unit, controllable illumination unit, and macro optical imaging unit in a dedicated optical image acquisition device. (Refer to...) Figure 2 and Figure 3 After determining the preset acquisition area, the acquisition device configures the imaging conditions according to the surface material, preview image features and historical quality feedback of the preset acquisition area, so that the micro-textures of different surfaces can be acquired under appropriate lighting and imaging conditions.

[0043] In this specific embodiment, the acquisition device stores a material parameter mapping table. The material parameter mapping table records the correspondence between different surface materials and macro imaging parameters and illumination parameters. The surface materials may include printed inked surfaces, paper fiber surfaces, leather surfaces, metal processed surfaces, fabric fiber surfaces, glass or ceramic surfaces, plastic surfaces, and composite packaging surfaces. Each type of material corresponds to an initial parameter set. The initial parameter set includes magnification, working distance, exposure time, image sensor gain, focus search range, inner ring light source brightness, outer ring light source brightness, oblique light source brightness, coaxial light source brightness, illumination incident angle range, and exposure synchronization sequence. The material parameter mapping table can be pre-written into the acquisition device or distributed by an external processing device based on the item category, acquisition area type, and historical acquisition results.

[0044] The data acquisition device can determine the surface material using three methods: task specification, coding association, or preview recognition. Task specification means the material category is directly included in the acquisition task information, such as designating a specific area as a printed ink area, a paper fiber area, or a metal processing area. Coding association means the acquisition device reads the QR code, barcode, or other machine-readable code on the object's surface and then retrieves the corresponding material information from an external processing device or a local database. Preview recognition means the acquisition device first acquires a preview image at low magnification or a wide field of view, and then estimates the material category based on the brightness distribution, color distribution, specular reflection ratio, local edge density, and texture directionality of the preview image. These methods can be used individually or in combination according to priority. For example, if the material category is specified in the acquisition task, the task specification result is used first; if the task information is missing, the coding association result is used; if it still cannot be determined, an estimation is made from the preview image.

[0045] For printed inked surfaces, especially the black stripe areas of barcodes, the black module areas of QR codes, or the edges of printed patterns, the acquisition device focuses on capturing the bright spots, pores, particle boundaries, and rough structures at the inked edges formed by the random penetration and curing of ink between the fibers of the substrate. These structures are typically sensitive to the angle of incidence. The acquisition device can be configured with a high oblique illumination component and control the oblique light to illuminate the preset acquisition area from one or more directions, causing micro-undulations, pore boundaries, and variations in ink thickness to create grayscale differences in the image. Simultaneously, the acquisition device reduces excessively strong coaxial light components to avoid saturation caused by localized reflections in dark inked areas. Macro imaging parameters can employ medium exposure time and medium gain to ensure sufficient grayscale levels in dark areas while avoiding overexposure at the edges of black modules.

[0046] For paper fiber surfaces, the acquisition device focuses on capturing fiber orientation, fiber ends, fiber intersections, pore boundaries, and local indentations. Paper fiber areas typically have fine linear textures, and excessively strong unidirectional oblique illumination can lead to overly concentrated shadows. The acquisition device can be configured with a combination of ring illumination and low-intensity oblique illumination to ensure the fiber structure is visible in multiple directions. Macro imaging parameters can employ a high depth-of-field setting or a stable fixed working distance to reduce blurring caused by unevenness on the paper surface. For areas with high brightness on the paper surface, the acquisition device can reduce exposure time or gain to avoid overexposure of the white paper surface, which could result in loss of fiber texture.

[0047] For leather surfaces, the acquisition device focuses on capturing pore boundaries, embossing contours, fiber bundle interlacing, and local uneven structures. Leather surfaces have irregular undulations, and local reflections may vary with the embossing direction. The acquisition device can employ multi-directional oblique illumination or a brightness difference configuration between inner and outer ring light sources to ensure stable shadows on pores and embossing edges in the image. Macro imaging parameters can be adjusted by increasing exposure time or gain to accommodate dark leather areas, but overexposure ratios and brightness uniformity constraints in quality assessment are necessary to prevent highlight expansion. If the acquisition device detects excessive shadow occlusion due to oblique illumination from a particular direction, the oblique illumination direction can be changed or the ring illumination component increased.

[0048] For machined metal surfaces, the acquisition device focuses on capturing the direction of the machining texture, micro-scratches, edge burrs, and localized oxidation textures. Metal surfaces are prone to specular reflection, and direct illumination can easily lead to localized saturation. The acquisition device can reduce the coaxial light intensity, use low-angle oblique illumination deviating from the specular reflection direction, and limit stray light from entering the imaging optical path through light guide and shielding structures. Macro imaging parameters can use shorter exposure times and lower gains to control high-brightness areas. If the preview image shows that the saturated pixel ratio exceeds the preset value, the acquisition device can prioritize reducing the direct light component and then adjust the exposure time. For frosted or sandblasted metal surfaces, the ring illumination component can be appropriately increased to balance the overall brightness.

[0049] For fabric fiber surfaces, the acquisition device focuses on capturing warp and weft yarn intersections, fiber bundle boundaries, localized fuzz, and weave texture. Fabric surface texture is directional; the acquisition device can configure the oblique illumination direction based on the estimated principal direction from the preview image, ensuring the illumination direction forms a predetermined angle with the main fiber direction. If the illumination direction being parallel to the fiber direction results in insufficient texture contrast, the acquisition device can rotate the oblique illumination direction or increase the illumination component perpendicular to the fiber direction. Macro imaging parameters can employ moderate exposure time and high depth of field to cover slight undulations on the fabric surface.

[0050] For surfaces such as glass, ceramics, or plastics, the acquisition device employs different illumination strategies based on the surface reflectivity. Transparent or translucent surfaces are prone to background interference from transmitted light; the acquisition device can limit the background light using a light-shielding structure and employ low-intensity oblique light to highlight micro-scratches or defects on the surface. Ceramic glazes or smooth plastic surfaces are prone to localized strong reflections; the acquisition device can reduce the coaxial illumination intensity, use shorter exposure times, and change the incident illumination direction if necessary. For frosted plastics or rough ceramic surfaces, the acquisition device can increase the annular illumination component to achieve more uniform brightness across the surface's granular structure.

[0051] After the initial parameter set is determined, the acquisition device can also perform pre-sampling and feedback adjustment. Pre-sampling refers to acquiring one or more pre-sampled images with the current parameter set before the final output image, and then performing a rapid quality assessment on the pre-sampled images. This rapid quality assessment can include average brightness, saturation pixel ratio, edge response intensity, and local texture response intensity. If the average brightness is lower than the target brightness range, the acquisition device increases the illumination intensity, extends the exposure time, or increases the gain; if the saturation pixel ratio exceeds the target range, the acquisition device decreases the illumination intensity, shortens the exposure time, or decreases the gain; if the edge response intensity is insufficient, the acquisition device adjusts the focus position or increases the oblique illumination component; if the local texture response is insufficient, the acquisition device changes the oblique illumination direction or switches to a combined illumination mode. The adjustment results from the pre-sampling stage are used as the final acquisition parameters.

[0052] To avoid unstable changes in parameters across multiple variables, the acquisition device can employ a layered adjustment sequence. The first layer is exposure adjustment, prioritizing bringing the overall image brightness and overexposure ratio within acceptable ranges. The second layer adjusts focus and working distance to achieve the required image sharpness. The third layer adjusts illumination direction and brightness ratio to achieve the required texture richness and brightness uniformity. The fourth layer adjusts the resampling strategy; if continuous adjustments still fail to meet quality requirements, the acquisition device output must be manually reviewed. Through layered adjustment, the acquisition device can gradually approach suitable acquisition conditions for the current material and area without introducing excessive uncertainty.

[0053] In one possible implementation, the acquisition device maintains the following material parameter mapping relationships: Printed inked areas correspond to 10x to 30x magnification, a working distance of 8mm to 25mm, a high proportion of oblique illumination, and a medium exposure time. Paper fiber areas correspond to 15x to 40x magnification, a working distance of 5mm to 20mm, a combination of ring and oblique illumination, and low gain. Leather surfaces correspond to 10x to 35x magnification, multi-directional oblique illumination, and a wide focus search range. Metal surfaces correspond to 10x to 30x magnification, a short exposure time, low coaxial light intensity, and a light-shielding structure. Fabric fiber surfaces correspond to 15x to 40x magnification, oblique illumination adjusted according to fiber direction, and a medium depth of field. Glass, ceramic, or plastic surfaces correspond to 10x to 30x magnification, low-intensity oblique illumination, and saturation pixel ratio constraints. The above ranges are used to illustrate feasible parameter configurations; specific values ​​can be adjusted according to the acquisition object and device structure.

[0054] Reference Figure 3In the macro optical imaging unit, the image sensor 301, macro lens group 302, and focusing mechanism 303 are positioned above a preset acquisition area 309, which is located on the surface of the object to be acquired. The image sensor 301 is located on the image side of the macro lens group 302, and the light reflected or scattered by the preset acquisition area 309 is imaged onto the image sensor 301 by the macro lens group 302. The focusing mechanism 303 is used to adjust the focal position or working distance of the macro lens group 302. In the controllable illumination unit, the inner ring light source 304 and the outer ring light source 305 are arranged around the macro lens group 302. The inner ring light source 304 is used to provide paraxial supplementary lighting, and the outer ring light source 305 is used to provide ring or oblique illumination. The light guide structure 306 is used to guide the light emitted by the inner ring light source 304 and the outer ring light source 305 to the preset acquisition area 309, and the light shielding structure 307 is used to limit external ambient light and stray light from entering the imaging optical path. The lighting control circuit 308 controls the brightness and operating timing of the inner ring light source 304 and the outer ring light source 305 according to the lighting parameters output by the parameter configuration unit, and synchronizes with the exposure timing of the image sensor 301.

[0055] During material adaptation, the acquisition device can also record the actual parameters and quality results of each formal acquisition and update the material parameter mapping table. If a material category consistently achieves a high quality score under a certain parameter group, the acquisition device can increase the priority of that parameter group for the same material. If a parameter group repeatedly causes overexposure, blurring, or insufficient texture richness on a certain type of material, the acquisition device can lower the priority of that parameter group and write the new adjustment results into the history. For the same product batch or the same acquisition area type, the external processing device can also distribute updated parameter mapping tables to multiple acquisition devices based on batch acquisition results, ensuring consistent initial parameter configurations across different acquisition stations on the production side.

[0056] This specific implementation utilizes material identification, parameter mapping, pre-sampling feedback, and layered adjustment to enable the acquisition device to establish corresponding macro imaging and lighting conditions for different object surfaces. In anti-counterfeiting and authentication scenarios, the micro-texture formation mechanisms differ across different areas of the same object's surface. Using fixed lighting and exposure methods can easily lead to localized overexposure, unclear textures, insufficient detail in dark areas, or reflective interference. This specific implementation can proactively adjust parameters at the acquisition end based on material differences, ensuring that the output micro-texture image meets subsequent processing requirements in terms of clarity, brightness uniformity, and texture richness.

[0057] In the third specific implementation, the specific implementation methods of image quality gating, resampling control, and acquisition area positioning are described. This specific implementation can be a further implementation of steps S1, S4, and S5 in the aforementioned method, or it can be derived from... Figure 2The acquisition area positioning unit, image quality control unit, and resampling control unit shown operate together. (Refer to...) Figure 4 and Figure 5 After acquiring a micro-texture image, the acquisition device uses quality gating to determine whether the image can be output as a qualified image. If the image quality does not meet the requirements, the acquisition device performs parameter adjustment and re-acquisition according to the reason for the failure. When multiple preset acquisition areas are involved, the acquisition device completes positioning, acquisition and result set generation in the order of the areas.

[0058] The location of the sampling area primarily relies on a repeatable macroscopic positioning reference. For items such as packaging boxes, labels, or seals, the macroscopic positioning reference can consist of the box boundary, label edge, seal edge, printed pattern boundary, barcode boundary, or QR code positioning pattern. For the surface of the product itself, the macroscopic positioning reference can consist of the product outline, processing boundary, embossing outline, seam intersection, or structural connection. The sampling device identifies the macroscopic positioning reference through a preview image and converts it into an item coordinate system. After the item coordinate system is established, the preset sampling area is not determined by manual visual inspection, but by the coordinate offset relative to the positioning reference, the size of the sampling window, and the orientation of the sampling window. This method allows for production-end registration and verification-end re-sampling to locate the same surface area based on the same location description.

[0059] In one possible implementation, after the data acquisition device recognizes the QR code positioning pattern, it selects the center of the upper left positioning pattern as the coordinate origin, uses the direction from the center of the upper left positioning pattern to the center of the upper right positioning pattern as the first coordinate axis, and uses the direction from the center of the upper left positioning pattern to the center of the lower left positioning pattern as the second coordinate axis. The preset acquisition area is offset by the coordinate system. Window width Window height and rotation angle Confirmed. The acquisition device converts the current imaging center in the preview image to the coordinate system of the object, obtaining the coordinates of the current imaging center. and current imaging direction and calculate , , .when , and If the deviations are all less than the corresponding allowable thresholds, the acquisition device determines that the positioning of the acquisition area is qualified. If any deviation exceeds the corresponding allowable threshold, the acquisition device outputs a prompt indicating the direction of movement, rotation, or distance through the alignment guidance display module.

[0060] For the barcode area, the acquisition device can use the upper left corner or center point of the barcode boundary rectangle as the coordinate origin, and the direction of the barcode stripes or the long side of the boundary as the coordinate axis direction, then determine the microscopic imaging window according to a preset offset. For the packaging box boundary area, the acquisition device can identify two adjacent boundaries of the packaging box and determine the intersection point as the coordinate origin, using the two boundary directions as the coordinate axis directions. For the label boundary area, the acquisition device can identify the rectangular or elliptical boundary of the label, and determine the acquisition window based on the boundary center, the major axis direction, and the minor axis direction. For the leather stitching area, the acquisition device can identify the stitch intersection point or the stitch end point as the positioning reference, and determine the acquisition area according to a preset distance. All of the above positioning methods establish a recordable and reusable positional relationship between the microscopic imaging window and the macroscopic positioning reference.

[0061] Reference Figure 5 When multiple preset collection areas are set for the same item, the collection device can save the area number, area type, area location description, allowable deviation threshold, material category, and collection order for each area. The collection device first locates the first area, completes a qualified collection, switches to the second area, and then switches to subsequent areas in sequence. For fixed workstations on the production line, multiple areas can be collected by a mechanical moving platform that moves the item to different positions. For handheld or semi-handheld devices, the collection device can prompt the operator to move to the next target area through the display screen. For fixed consumer devices, the collection device can prompt the user to rotate or move the item so that the next target area enters the imaging window. The collection results for each area include an image, quality assessment results, and collection metadata. After all areas are completed, a collection result set is formed.

[0062] Image quality gating is performed after the micro-texture image is acquired. The acquisition device first performs a basic validity check on the image to determine if it is empty, if there are sensor readout anomalies, if there are large areas of occlusion, or if the acquisition window is missing. If the basic validity check fails, the acquisition device directly outputs a resampling control signal. After the basic validity check passes, the acquisition device calculates sharpness, brightness uniformity, overexposure ratio, and texture richness indices. These indices are used to determine from different perspectives whether the image is suitable for subsequent micro-feature extraction.

[0063] Sharpness metrics are used to determine whether an image is out of focus or affected by motion blur. The acquisition device can perform Laplacian operator processing on micro-texture images and calculate the variance of the response map. If the image edges are clear and the texture variations are rich, the Laplacian response variance is high; if the image is out of focus or motion-blurred, the Laplacian response variance is low. Sharpness metrics can also be calculated by combining local gradient mean, edge point density, or high-frequency energy. To avoid misjudgments caused by local noise, the acquisition device can first perform mild noise suppression on the image, then calculate the sharpness metric, and divide the image into multiple blocks, taking the mean or low quantile value of the sharpness of each block as the final metric.

[0064] Brightness uniformity is used to determine whether an image has obvious localized over-darkness, localized shadows, or uneven lighting. The acquisition device divides the micro-texture image into multiple blocks, calculates the average brightness of each block, and further calculates the mean and standard deviation of the average brightness of each block. If the standard deviation is too large relative to the mean, it indicates that the image brightness distribution is uneven, which may affect local texture extraction. For materials with natural light and dark textures, the acquisition device can perform low-frequency brightness estimation before calculating brightness uniformity, reducing the interference of real micro-texture on the brightness uniformity judgment.

[0065] Overexposure ratio is used to determine if there are too many saturated areas in an image. The acquisition device counts the number of pixels whose grayscale values ​​reach the saturation threshold and calculates the proportion of this number to the total number of pixels. If the overexposure ratio exceeds a preset upper limit, it indicates that the illumination intensity, exposure time, or gain is too high, and local microstructures may be lost in the image. For reflective surfaces such as metal, glass, ceramics, and plastics, the overexposure ratio can also be calculated in conjunction with the area of ​​the connected regions of the saturated areas to avoid a few isolated bright spots excessively affecting the overall judgment. If a large area of ​​continuous saturated regions exists, it is preferentially judged as an unacceptable image.

[0066] Texture abundance is used to determine whether an image contains sufficient microscopic texture information for subsequent feature extraction. The acquisition device can calculate the information entropy of a grayscale histogram or a local texture response histogram. If the image is too flat, lacks sufficient texture variation, or the microstructure is not visible due to unsuitable lighting angles, the information entropy and local texture response variation will be low. The acquisition device can also calculate texture abundance by combining local binary mode response, gradient direction distribution, or the number of edge structures. Texture abundance thresholds can be set separately for different materials; for example, in printed inked areas, the focus is on bright spots and rough boundary structures; in paper fiber areas, the focus is on fiber cross-texture; and on metal processing surfaces, the focus is on micro-scratches and changes in processing texture direction.

[0067] After calculating each individual indicator, the data acquisition device calculates the overall quality score. The overall quality score can be expressed as: ,in To normalize sharpness, For brightness uniformity, For overexposure ratio, To normalize texture abundance, to The corresponding weights are set. These weights can be adjusted based on surface material and the intended use of the image. For printed inked areas, texture richness and overexposure control can be given higher weights; for paper fiber areas, sharpness and texture richness can be given higher weights; for reflective surfaces, overexposure control can be given higher weights. The acquisition device not only determines whether the overall quality score reaches the threshold, but also whether each individual indicator meets its corresponding requirements. If the overall quality score is acceptable but a single indicator is significantly unacceptable, the acquisition device can still determine that the image does not meet the preset quality conditions.

[0068] When an image fails to meet preset quality conditions, the acquisition device enters the corresponding re-imaging branch based on the reason for the failure. If both sharpness and motion stability are unsatisfactory, the acquisition device waits for motion stabilization before re-exposure. If sharpness is unsatisfactory but motion stability is acceptable, the acquisition device adjusts the focus position or working distance. Focus adjustment can be achieved using a combination of coarse and fine adjustments: first, search for a location with higher sharpness over a larger area, then fine-tune the focus around that location. If brightness uniformity is unsatisfactory, the acquisition device adjusts the brightness ratio of the inner and outer light sources or switches the illumination direction to reduce the difference between dark and bright areas. If the overexposure ratio is too high, the acquisition device reduces the illumination intensity, shortens the exposure time, or reduces the gain. If texture richness is insufficient, the acquisition device increases the oblique illumination component, changes the oblique illumination direction, or changes the magnification to make surface micro-undulations and local structures more easily visible in the image.

[0069] The resampling control unit retains adjustment records when performing parameter adjustments. These records include the number of resampling attempts, parameters before adjustment, parameters after adjustment, unacceptable indicators, and the quality results after re-acquisition. If the quality score improves after adjusting a parameter, the acquisition device can continue fine-tuning in that direction in the next adjustment. If the quality score decreases after adjusting a parameter, the acquisition device can revert the parameter and try other adjustment directions. For the same acquisition area, if a qualified image cannot be obtained after the number of resampling attempts reaches a preset limit, the acquisition device will no longer automatically resampling but will output an acquisition failure status or a status requiring manual review. This status may include the reason for failure, such as excessive positioning deviation, unstable motion, continuous overexposure, continuous out-of-focus, insufficient texture richness, or occlusion of the acquisition area.

[0070] During sequential acquisition across multiple regions, quality gating and resampling control are executed independently for each region. If a region fails to obtain a qualified image due to contamination or occlusion, the acquisition device can either stop all acquisitions based on the acquisition task strategy, or mark that region as failed and continue acquiring subsequent regions. For anti-counterfeiting and authentication registration scenarios, it is preferable to output a complete acquisition result set only after all critical regions have passed the assessment; for on-site temporary acquisition scenarios, failures in non-critical regions are permissible, but the failed regions and their reasons must be recorded in the acquisition metadata. External processing devices can determine whether to perform subsequent processing based on the region status in the acquisition result set.

[0071] Reference Figure 4 The quality control and re-imaging process constitute a closed-loop control. After acquiring a micro-texture image, the acquisition device performs a basic validity check and calculates sharpness, brightness uniformity, overexposure, texture richness, and a comprehensive quality score. If the image meets the preset quality conditions, a qualified image and acquisition metadata are output. If the image does not meet the preset quality conditions, the reason for the failure is determined based on the quality indicators, and it is determined whether the maximum number of re-imaging attempts has been reached. If the maximum number of attempts is reached, an acquisition failure status or a status requiring manual review is output. If the maximum number of attempts is not reached, the focus, working distance, illumination angle, light source brightness, exposure time, or gain parameters are adjusted according to the reason for the failure, macro imaging is performed again, and the quality assessment is returned. This closed loop continues until a qualified image is obtained or the maximum number of re-imaging attempts is reached, thereby avoiding the direct output of low-quality images and repeated acquisitions without determining the reason for the failure.

[0072] In a specific example, the acquisition device captures data on the black module area of ​​a printed QR code. After the first capture, the sharpness and brightness uniformity are acceptable, but the overexposure ratio is higher than the threshold, and the texture richness is lower than the threshold. The acquisition device determines that this may be caused by local reflections, so it reduces the brightness of the inner light source and increases the proportion of oblique light before re-capturing. After the second capture, the overexposure ratio decreases, and the texture richness improves, but the sharpness is slightly lower than the threshold. The acquisition device adjusts the focus position and performs a third capture. The overall quality score and all individual indicators of the third capture meet the preset quality conditions, and the acquisition device generates acquisition metadata and outputs the image. The acquisition metadata records that the area underwent two re-captures, the final illumination parameters, the final focus position, and the quality scores for each item.

[0073] Through the positioning, quality gating, and resampling control of this specific embodiment, the acquisition device can control the regional consistency and quality availability of micro-texture images at the acquisition end. The positioning process establishes a stable relationship between the imaging window and the macroscopic positioning reference of the object surface; the quality gating process identifies blurry, overexposed, unevenly bright, or insufficiently textured images; and the resampling control process allows the acquisition device to make targeted parameter adjustments based on the cause of the defects. This processing method ensures that the images output to external processing devices have a clearly defined acquisition area, a clearly defined quality state, and clearly defined acquisition parameters.

[0074] In a fourth embodiment, a dedicated optical image acquisition device is provided for acquiring microscopic textures of objects. (Refer to...) Figure 2 The device includes a data acquisition area positioning unit 101, a parameter configuration unit 102, a controllable illumination unit 103, a macro optical imaging unit 104, a motion stability detection unit 105, an image quality control unit 106, a resampling control unit 107, and an image output interface 108. The data acquisition area positioning unit 101 determines the area information based on a positioning reference and transmits the area identifier and alignment deviation information to the parameter configuration unit 102. The parameter configuration unit 102 outputs illumination parameters and imaging parameters to the controllable illumination unit 103 and the macro optical imaging unit 104, respectively. When the motion state meets the conditions, the motion stability detection unit 105 provides exposure permission to the macro optical imaging unit 104, and the macro optical imaging unit 104 transmits the microscopic texture image to the image quality control unit 106. The image quality control unit 106 transmits the cause of non-compliance to the resampling control unit 107 and transmits the qualified image and quality score to the image output interface 108. The resampling control unit 107 adjusts the parameters according to the cause of non-compliance using the parameter configuration unit 102. The acquisition area positioning unit 101 and the parameter configuration unit 102 also provide area information and actual parameters to the image output interface 108, respectively. The image output interface 108 outputs qualified images and acquisition metadata to an external processing device. The above units can be integrated in the same housing, or they can be formed by combining an optical acquisition module, a control processing module, and an external interface module.

[0075] The acquisition area positioning unit is used to acquire acquisition task information of the object to be acquired, determine the preset acquisition area based on the positioning reference on the object's surface, and generate alignment deviation information of the optical imaging center relative to the preset acquisition area. The role of this unit in the device is to transform the acquisition position from manual approximate alignment to repeatable positioning based on the positioning reference, ensuring a unified positional description for acquisition areas during production registration, verification, and across different devices. The output of the acquisition area positioning unit can be transmitted to the parameter configuration unit, image quality control unit, and image output interface. The alignment deviation information is used to determine whether formal exposure is permitted, and the acquisition area identifier and positional description are used to generate acquisition metadata.

[0076] The acquisition area positioning unit may include a preview imaging module, a machine-readable encoding / decoding module, a geometric feature recognition module, an object coordinate system establishment module, and an alignment guidance display module. The preview imaging module acquires a low-magnification or wide-field preview image of the surface of the object to be acquired. The machine-readable encoding / decoding module identifies barcodes, QR codes, or other machine-readable codes, using the encoded positioning pattern or code boundary as the basis for establishing the object coordinate system. The geometric feature recognition module identifies repeatable macroscopic structures such as packaging boundaries, label boundaries, seal edges, printed pattern outlines, stitch intersections, or processing boundaries. The object coordinate system establishment module determines the coordinate origin, coordinate axis direction, and scale parameters based on the identified positioning reference, and then determines the preset acquisition area according to the preset offset and acquisition window size in the acquisition task information. The alignment guidance display module can display the target acquisition window, current imaging center, deviation direction, and deviation status on a built-in or external display screen, and can also output position adjustment signals to the mechanical positioning mechanism.

[0077] The parameter configuration unit is used to configure macro imaging parameters and illumination parameters based on the surface material and alignment deviation information of the preset acquisition area. Its role in the device is to provide initial parameters for subsequent imaging based on differences in the surface material of the object, and to adjust the parameters based on quality feedback. The parameter configuration unit receives the area identifier and location description output by the acquisition area positioning unit, receives the material category contained in the acquisition task information or the material category identified from the preview image, and outputs magnification, working distance, exposure time, gain, and focus position to the macro optical imaging unit, and illumination angle, illumination intensity, light source brightness ratio, and exposure synchronization sequence to the controllable illumination unit.

[0078] The parameter configuration unit can be implemented by a processor, memory, and a parameter table management program. The memory stores a material parameter mapping table, which records the imaging and illumination parameters corresponding to areas such as printed inking areas, paper fiber areas, leather areas, metal surfaces, fabric fiber areas, glass or ceramic surfaces, and plastic surfaces. The processor reads the initial parameter set based on the area type in the acquisition task information and updates the parameters after receiving quality assessment results from the image quality control unit. The parameter configuration unit can also save historical acquisition records. When stable parameters have been established for the same item category, material category, or acquisition area in historical acquisitions, the corresponding parameters are preferentially called to reduce the number of pre-sampling and re-sampling operations.

[0079] The macro optical imaging unit is used to perform microscopic optical imaging of a preset acquisition area at a magnification of no less than 10 times, obtaining images containing the microscopic physical features of the object's surface. The unit's role in the device is to convert microscopic structures such as paper fibers, printing ink boundaries, ink penetration bright spots, leather pores, metal processing textures, fabric fiber cross structures, and micro-defects on glass or ceramic surfaces into digital image signals. The macro optical imaging unit works in conjunction with the controllable illumination unit to complete imaging under the working distance, exposure time, and illumination conditions specified by the parameter configuration unit.

[0080] The macro optical imaging unit may include a macro lens assembly, an image sensor, a focusing mechanism, an imaging control circuit, and an optical mounting structure. The macro lens assembly may consist of one or more lenses, with an optical magnification of at least 10x and a working distance that can be set from 2mm to 50mm. The image sensor may be a CMOS image sensor or a CCD image sensor, used to convert the optical image formed by the macro lens assembly into a digital image signal. The focusing mechanism may employ a fixed focal length structure, a stepper motor drive structure, a voice coil motor drive structure, or a mechanical limiting structure. The imaging control circuit controls the image sensor to complete the exposure based on the exposure time, gain, and trigger signals output by the parameter configuration unit. The optical mounting structure maintains the relative positional stability between the macro lens assembly, the image sensor, and the object to be captured.

[0081] The controllable illumination unit provides controlled-angle and controlled-intensity illumination to a preset acquisition area according to illumination parameters. Its role in the device is to ensure that the microscopic textures of different materials have appropriate brightness, contrast, and texture visibility in the imaging. The controllable illumination unit is arranged coaxially or paraxially with the macro optical imaging unit, or it can be arranged around the macro lens group to ensure that the illumination area covers the macro imaging field of view. The controllable illumination unit receives the illumination control signal output from the parameter configuration unit and operates synchronously with the image sensor when the imaging control circuit triggers exposure.

[0082] The controllable illumination unit may include an inner ring light source, an outer ring light source, an oblique light source, a coaxial supplementary light structure, a light guide structure, a light shielding structure, and an illumination control circuit. The inner ring light source provides supplementary light close to the imaging optical axis, the outer ring light source provides ring illumination or larger angle illumination, and the oblique light source enhances surface undulations, ink boundaries, fiber structures, or micro-scratches from a predetermined direction. The light guide structure can employ a light guide ring, reflector cup, lens, or fiber optic structure to ensure that the light emitted from the light source illuminates the acquisition area at a predetermined angle. The light shielding structure suppresses the influence of ambient light and stray light on the imaging optical path. The illumination control circuit can individually control the switching state, brightness, current, and flicker timing of each light source, ensuring stable illumination during image sensor exposure.

[0083] The motion stabilization detection unit detects the motion state of the acquisition device relative to the object to be acquired before macro imaging and determines whether the exposure conditions are met. This unit's role in the device is to reduce motion blur caused by hand shake, conveyor belt vibration, or incomplete object stabilization. The motion stabilization detection unit outputs motion stabilization indicators to the image quality control unit and the resampling control unit. When the motion stabilization indicator exceeds the stabilization threshold, the resampling control unit can delay exposure or prompt for restabilization; only when the motion stabilization indicator meets the conditions will the macro optical imaging unit perform the formal exposure.

[0084] The motion stability detection unit may include an accelerometer, a gyroscope, a photoelectric trigger sensor, and a preview image displacement analysis module. The accelerometer detects linear vibrations of the acquisition device or fixed workstation, the gyroscope detects changes in angular velocity, the photoelectric trigger sensor detects whether items on the production line are in position, and the preview image displacement analysis module compares the displacement between consecutive preview images. The processor can calculate motion stability indicators based on these signals. For example, in a handheld device, the motion stability indicator can be formed by a weighted average of acceleration and angular velocity changes; in a fixed workstation, the motion stability indicator can be determined by a conveyor belt stop signal, an item arrival signal, and the displacement of consecutive preview images.

[0085] The image quality control unit is used to evaluate the quality of micro-texture images, including sharpness, brightness uniformity, overexposure, and texture richness. Its role in the device is to determine whether the acquired image is suitable for output as a qualified image and to provide the re-sampling control unit with reasons for any defects. The image quality control unit receives the micro-texture image output from the macro optical imaging unit, calculates each quality index and a comprehensive quality score, and transmits the quality evaluation results to the re-sampling control unit and the image output interface.

[0086] The image quality control unit can be implemented by a processor or image processing chip. Sharpness evaluation can be based on Laplacian response variance, local gradient strength, or high-frequency energy calculations; brightness uniformity evaluation can be based on the mean and standard deviation of image block brightness calculations; overexposure evaluation can be based on the proportion of saturated pixels and the area of ​​saturated connected regions; texture abundance evaluation can be based on grayscale entropy, local texture response entropy, edge structure quantity, or texture response distribution. The image quality control unit can set different indicator weights and thresholds according to material type. For example, for reflective surfaces, the constraint weight of the overexposure indicator can be increased; for fibrous surfaces, the constraint weights of sharpness and texture abundance indicators can be increased; and for printed inked areas, the constraint weights of overexposure and texture abundance indicators can be increased.

[0087] The resampling control unit is used to adjust control parameters and re-acquire images when the quality assessment results do not meet preset quality conditions. Its role in the device is to prevent unqualified images from being directly output and to enable the acquisition device to adjust illumination, exposure, or focus parameters specifically based on the cause of the unqualified images. The resampling control unit receives the quality assessment results output by the image quality control unit, identifies the main indicators causing the unqualified images, and sends control commands to the parameter configuration unit, macro optical imaging unit, controllable illumination unit, or motion stability detection unit.

[0088] The resampling control unit can be implemented by a processor and a control strategy table. The control strategy table records the correspondence between various unqualified states and adjustment methods. When the overexposure ratio exceeds the threshold, the resampling control unit controls the parameter configuration unit to reduce the illumination intensity, shorten the exposure time, or reduce the gain; when the sharpness is below the threshold, it controls the focusing mechanism to adjust the focus position, or waits for the motion to stabilize before re-acquiring; when the brightness uniformity is below the threshold, it adjusts the brightness ratio of the inner and outer light sources or changes the illumination angle; when the texture richness is insufficient, it increases the oblique illumination component or changes the oblique illumination direction. The resampling control unit also records the number of resampling attempts and the adjustment parameters for each attempt. When the number of resampling attempts reaches the preset upper limit and a qualified image is still not obtained, it outputs an acquisition failure status or a status requiring review.

[0089] The image output interface is used to output micro-texture images and acquired metadata to external processing devices when the quality assessment results meet preset quality conditions. This unit's role in the device is to synchronously transmit image data with acquisition conditions, quality status, and region information, enabling external processing devices to perform feature extraction, data storage, verification and comparison, or auditing of the acquisition process. The image output interface receives qualified images and quality assessment results output by the image quality control unit, region information output by the acquisition region positioning unit, and actual imaging and illumination parameters output by the parameter configuration unit, and organizes this information into image and metadata output results.

[0090] Image output interfaces can be USB, Ethernet, industrial camera, serial bus, wireless communication, or software data interfaces. Acquisition metadata can be organized in JSON, XML, binary structures, or image file extended fields. Acquisition metadata may include item identification, acquisition area identification, acquisition time, acquisition device identification, actual magnification, working distance, exposure time, gain, illumination angle, illumination intensity, inner and outer light source brightness ratio, quality assessment results, alignment deviation information, resampling times, and motion stability indicators. The image output interface can encapsulate the micro-texture image and acquisition metadata into a single data packet, or it can transmit the image and metadata separately and establish a correspondence through record numbers.

[0091] Reference Figure 6External processing devices can be production-end registration servers, verification-end authentication terminals, local comparison devices, cloud servers, or embedded processing platforms. After the image output interface sends the image and acquisition metadata to the external processing device, the external processing device can select a feature extraction algorithm based on the actual magnification and illumination parameters, determine whether to proceed to subsequent processing based on the quality score, classify the image into the corresponding area record based on the acquisition area identifier, and determine whether position correction is needed based on the alignment deviation information. The external processing device can also return the processing results, registration status, verification status, or re-acquisition command to the acquisition device, enabling the acquisition device to proceed to the next acquisition task or re-execute the current acquisition task based on the returned information.

[0092] In a fixed acquisition station implementation, the device of this specific embodiment is installed above the production line conveyor belt. The acquisition area positioning unit identifies the packaging box boundary and QR code positioning pattern through the preview image; the parameter configuration unit determines the acquisition area as the printed ink surface according to the production task; the macro optical imaging unit performs imaging with at least 10x magnification on the area near the black module of the QR code; the controllable illumination unit provides combined inner and outer ring illumination and oblique illumination; the motion stability detection unit determines whether the item is stationary based on the conveyor belt arrival signal and the displacement of the preview image; the image quality control unit evaluates the quality of the imaging result; the re-acquisition control unit adjusts the illumination and exposure and re-acquisitions when the image is unqualified; and the image output interface sends the qualified image and metadata to the production end registration server.

[0093] In one implementation of an external macro optical module, the device of this specific embodiment can be connected to an external processing device via a standard interface. The external module integrates a macro lens assembly, an image sensor, a controllable illumination unit, a motion stabilization detection unit, and a basic processor. The external processing device provides a display interface, acquisition task management, feature extraction, and network communication capabilities. After receiving acquisition tasks from the external processing device, the external module completes area localization, imaging, quality assessment, and metadata output. The external processing device is responsible for saving the acquisition results or performing subsequent comparisons. This implementation is suitable for small fixed workstations, mobile verification terminals, or expansions of existing industrial camera platforms.

[0094] In a consumer-end fixed data acquisition device implementation, the device of this specific embodiment is installed within a desktop housing. The housing includes an item placement area, a fixed working distance limiting structure, and a display interface. The data acquisition area positioning unit guides the user to place packaging, labels, or seals in designated locations via the display interface. A macro optical imaging unit performs imaging at a fixed working distance. A controllable lighting unit adjusts the light source brightness ratio according to the material type. An image quality control unit and a re-imaging control unit prompt the user to reposition the item or automatically adjust parameters when the image is unqualified. The image output interface outputs qualified images and acquired metadata to a connected authentication terminal. This implementation is suitable for fixed verification scenarios in stores, warehouses, after-sales service, or consumer-end applications.

[0095] Through the device structure of this specific embodiment, acquisition area positioning, parameter configuration, macro imaging, illumination control, motion stability detection, image quality gating, resampling control, and image output can form a collaborative relationship within the same acquisition device. The acquisition area positioning unit ensures that the imaging object is within the preset target area; the parameter configuration unit and controllable illumination unit ensure that different materials have corresponding acquisition conditions; the motion stability detection unit reduces motion blur; the image quality control unit and resampling control unit ensure that the output image meets quality requirements; and the image output interface enables the corresponding transmission of image and acquisition metadata. This device can provide a controlled image acquisition end for subsequent extraction, registration, and verification of microscopic texture features of objects.

[0096] In the fifth specific embodiment, the implementation process of the present invention is described using the registration and collection at the production end of wine packaging boxes and the fixed verification and collection at the consumer end as application scenarios. (Refer to...) Figure 7 The fixed data acquisition station at the production end includes a conveyor belt 701, a QR code or label area on the packaging box 702, a position detection sensor 703, a fixed bracket 704, a dedicated optical image acquisition device 705, a registration server 706, and an image and metadata record 707. After the packaging box enters the acquisition position with the conveyor belt 701, the position detection sensor 703 sends a trigger signal to the dedicated optical image acquisition device 705. The dedicated optical image acquisition device 705 is mounted on the fixed bracket 704 and performs positioning and macro optical imaging of the QR code or label area 702 on the packaging box. When the image quality meets the requirements, the dedicated optical image acquisition device 705 sends the qualified image and acquired metadata to the registration server 706, which then generates an image and metadata record 707 corresponding to the item identification. The fixed verification data acquisition equipment at the consumer end is a desktop structure with a packaging box placement slot, a fixed working distance limiting structure, an alignment guide display screen, and a communication interface, used for re-collecting the same type of area at the verification end. Both the production and consumption ends employ regional positioning, material adaptation, macro imaging, quality gating, resampling control, and metadata output processes to ensure that the micro-texture images obtained at both ends have comparable acquisition areas and verifiable acquisition conditions.

[0097] In this specific embodiment, the items to be collected are wine packaging boxes with QR code labels and paper outer packaging. The external processing equipment at the production end assigns an item identifier to each packaging box and sends collection task information to the collection device. The collection task information includes the item identifier, packaging box model, location description of the first preset collection area, location description of the second preset collection area, material type of the first preset collection area, material type of the second preset collection area, collection order, and output format. The first preset collection area is located inside the black module area of ​​the QR code, mainly collecting ink penetration bright spots, pore boundaries, and rough structures of the inked edges; the second preset collection area is located in the label paper fiber area, mainly collecting paper fiber intersections, fiber ends, and local indentation textures. Both areas are subjected to microscopic optical imaging at a magnification of no less than 10x, and area identifiers and collection metadata are generated respectively.

[0098] The fixed acquisition station at the production end can adopt the following hardware configuration: The macro optical imaging unit includes a 20x fixed-magnification macro lens group, a 5-megapixel CMOS image sensor, and a stepper motor focusing mechanism. The lens working distance is set to 18mm, with an adjustable range of 15mm to 22mm. The controllable illumination unit includes an inner ring white LED, an outer ring white LED, and two oblique LEDs. The inner ring light source is used for paraxial illumination, the outer ring light source is used for ring illumination, and the two oblique LEDs are incident on the acquisition area from mutually perpendicular directions. The motion stability detection unit includes a position detection sensor, a conveyor belt stop signal input terminal, and a continuous preview image displacement analysis module. The processor uses an embedded image processing chip or an industrial control processor to perform preview positioning, parameter configuration, quality assessment, and resampling control. The communication interface uses an Ethernet interface to transmit images and metadata to external processing devices at the production end. The above hardware parameters are used to illustrate one feasible configuration and do not limit the invention to using only these specifications of components.

[0099] When the production end begins data acquisition, the packaging box enters the acquisition station via a conveyor belt. Once the arrival detection sensor detects that the leading edge of the packaging box has reached the preset position, it sends a trigger signal to the acquisition device. The acquisition device first acquires a partial image of the packaging box using low magnification or wide field-of-view preview mode, identifies the three positioning patterns of the QR code, and uses the center of the upper left positioning pattern of the QR code as the origin of the item coordinate system, the direction of the upper edge of the QR code as the first coordinate axis direction, and the direction of the left edge of the QR code as the second coordinate axis direction. The first preset acquisition area is determined by the offset relative to this coordinate system, the window size, and the window direction. For example, in a specific acquisition task, the offset of the center point of the first preset acquisition area relative to the coordinate origin is (2.4mm, 1.8mm), the acquisition window size is 1.2mm × 1.2mm, and the acquisition window direction is consistent with the upper edge direction of the QR code. The acquisition device calculates the lateral deviation, longitudinal deviation, and rotational deviation between the current optical imaging center and the center of the first preset acquisition area. When the lateral deviation is no greater than 0.08mm, the longitudinal deviation is no greater than 0.08mm, and the rotational deviation is no greater than 1.5°, the alignment is deemed to meet the acquisition conditions.

[0100] The first preset acquisition area is identified as the printed inked surface, and the acquisition device calls the initial parameter set corresponding to the printed inked area. In this initial parameter set, the magnification is 20x, the working distance is 18mm, the exposure time is 3.5ms, the image sensor gain is 6dB, the inner ring light source brightness is set to 30% of the rated brightness, the outer ring light source brightness is set to 45% of the rated brightness, the first oblique LED brightness is set to 70% of the rated brightness, and the second oblique LED brightness is set to 40% of the rated brightness. This parameter set is used because the black module area of ​​the QR code is a dark inked surface, and excessive paraxial illumination can easily produce local reflections. Appropriately increasing the proportion of oblique light allows the ink penetration boundaries, pores, and micro-particle boundaries to form grayscale differences in the image. Before triggering the formal exposure, the acquisition device reads the conveyor belt stop signal and compares the positional changes of the QR code positioning pattern in three consecutive preview images. When the positional changes in all three consecutive frames are less than 0.02mm, the motion state is determined to meet the stability condition.

[0101] After the acquisition device performs macro imaging on the first preset acquisition area, the image quality control unit calculates the quality indicators. The sharpness indicator uses the Laplacian response variance normalized result; the brightness uniformity indicator is calculated using the block brightness mean and standard deviation; the overexposure level is calculated using the saturation pixel ratio; and the texture richness is calculated using the information entropy normalized result of the local texture response distribution. The comprehensive quality score of the first preset acquisition area is determined according to... Calculation, where Indicates normalized sharpness. Indicates brightness uniformity. Indicates the overexposure ratio. This represents the normalized texture abundance. For the black module region of the QR code in this specific embodiment, the comprehensive quality threshold is... The threshold values ​​are set to 0.82, the sharpness threshold to 0.78, the brightness uniformity threshold to 0.75, the overexposure ratio upper limit to 0.03, and the texture richness threshold to 0.76. If the image quality meets the above conditions, the acquisition device marks the image as a qualified image; if any indicator does not meet the conditions, the image enters the re-acquisition control process according to the reason for non-compliance.

[0102] In an actual data acquisition process, the initial image acquired from the first preset acquisition area had a sharpness index of 0.84, brightness uniformity of 0.80, overexposure ratio of 0.052, texture richness of 0.73, and an overall quality score of 0.79. In this result, the overexposure ratio and texture richness did not meet the preset quality conditions. The acquisition device determined that local reflections affected the microstructure display of the black module area. Therefore, the brightness of the inner light source was reduced from 30% to 20%, the brightness of the first oblique LED was increased from 70% to 78%, and the exposure time was shortened from 3.5ms to 3.0ms, while keeping the working distance and focus position unchanged. The second acquired image had a sharpness index of 0.86, brightness uniformity of 0.79, overexposure ratio of 0.021, texture richness of 0.81, and an overall quality score of 0.85, meeting the preset quality conditions. The acquisition device writes the second acquired image and corresponding metadata into the acquisition record of the first preset acquisition area. The metadata records the number of resamplings as 1, the final exposure time as 3.0ms, the brightness of the inner ring light source as 20%, the brightness of the first oblique LED as 78%, and various quality scores.

[0103] After the first preset acquisition area is completed, the acquisition device switches to the second preset acquisition area. The second preset acquisition area is located in the label paper fiber area. The origin of the coordinate system can be the upper left corner of the label rectangle boundary, and the direction of the label's upper edge can be used as the first coordinate axis direction. The acquisition window is determined according to a preset offset. For example, the offset of the center point of the second preset acquisition area relative to the upper left corner of the label is (4.0mm, 3.0mm), and the acquisition window size is 1.5mm × 1.5mm. The second preset acquisition area is identified as the paper fiber surface, and the acquisition device calls the paper fiber area parameter set. In this parameter set, the magnification is 20x, the working distance is 18mm, the exposure time is 4.0ms, the image sensor gain is 4dB, the inner ring light source brightness is 25%, the outer ring light source brightness is 65%, and the oblique LED brightness is 45%. This configuration is used to avoid overexposure of the white paper surface while ensuring identifiable local contrast for the fiber direction, fiber ends, and fiber intersections.

[0104] The comprehensive quality score of the second preset collection area can be determined according to... Calculations were performed. Since the paper fiber region is more sensitive to sharpness and texture richness, these two parameters were given higher weights. In a specific acquisition process, the first image acquired in the second preset acquisition area had a sharpness index of 0.70, brightness uniformity of 0.82, overexposure ratio of 0.008, texture richness of 0.78, and an overall quality score of 0.77. This image sharpness did not meet the sharpness threshold of 0.78. The acquisition device adjusted the focusing mechanism by 0.05mm closer to the object surface and re-acquired the image. The second acquired image had a sharpness index improved to 0.83, brightness uniformity of 0.81, overexposure ratio of 0.010, texture richness of 0.80, and an overall quality score of 0.83, meeting the preset quality conditions. The acquisition device wrote this image and its metadata into the acquisition record of the second preset acquisition area.

[0105] After successful acquisition in both preset acquisition areas, the acquisition device generates an acquisition result set. This set includes microscopic texture images of the first and second preset acquisition areas, as well as acquisition metadata bound to each image. Each set of acquisition metadata includes item identifier, area identifier, acquisition time, acquisition device identifier, actual magnification, working distance, exposure time, gain, inner light source brightness, outer light source brightness, oblique light source brightness, alignment deviation information, quality index, comprehensive quality score, number of re-acquisitions, and final acquisition status. After receiving the acquisition result set, the external processing equipment at the production end can save it as a registration acquisition record for the item, for subsequent feature extraction, quality traceability, and verification of acquisition conditions.

[0106] The execution process of the consumer-side fixed verification and acquisition equipment is consistent with that of the production side, but it places greater emphasis on alignment guidance and consistency in re-acquisition. Consumers or verification personnel place the packaging box in the item placement slot of the desktop equipment. The equipment reads the QR code and recognizes the QR code positioning pattern, establishing an item coordinate system with the same rules as the production side. If the current optical imaging center deviates more than 0.10mm laterally or longitudinally from the first preset acquisition area, the display shows the direction of movement and the amount of deviation, prompting the operator to adjust the packaging box position. After successful alignment, the equipment uses the same magnification, working distance, and illumination strategy as the production side for acquisition. Due to potential external light interference in the consumer-side operating environment, the equipment first acquires a pre-sampled image before formal acquisition, and fine-tunes the exposure time and light source brightness based on the average brightness and saturation pixel ratio of the pre-sampled image. After acquiring a qualified image, the consumer-side equipment outputs the image and acquisition metadata to an external authentication terminal or local processing equipment.

[0107] To illustrate the technical effects of the present invention in this specific embodiment, the applicant conducted data acquisition tests based on the aforementioned fixed acquisition station at the production end and fixed verification equipment at the consumer end. The test sample consisted of 60 wine packaging boxes from the same batch. Each packaging box had two preset acquisition areas: a black QR code module area and a label paper fiber area. At the production end, a qualified image was acquired once for each of the two areas of each packaging box; at the consumer end, the same area was repeatedly acquired three times after the packaging box was repositioned. During the test, the conventional acquisition method used fixed lighting and fixed exposure parameters, without performing alignment deviation recording, quality gating, or automatic re-sampling; the acquisition method of the present invention performed the area positioning, material parameter configuration, quality assessment, and re-sampling control described in this specific embodiment. The test data is used to illustrate the technical effects of this specific embodiment; the specific values ​​are exemplary results under the above sample conditions and do not limit the scope of the invention's effects on other hardware or other items.

[0108] Test results can be combined Figure 8 Please provide an explanation. Figure 8 It contains three subgraphs. Figure 8 (a) This figure illustrates the consistency of the collection areas. The horizontal axis represents the lateral deviation of the center of the re-collection area relative to the center of the target collection area, and the vertical axis represents the longitudinal deviation. Each scatter point represents a single consumer-end re-collection result. Dashed boxes indicate that both the lateral and longitudinal deviations are within ±0.10 mm. Square scatter points represent the standard collection method, and circular scatter points represent the collection method of this invention. Under the standard collection method, the deviation of the center of the re-collection area relative to the center of the production-end registration area is relatively dispersed, with some samples having a deviation exceeding 0.20 mm. Under the collection method of this invention, the collection device establishes an item coordinate system through the QR code positioning pattern and label boundaries, and controls the deviation through alignment guidance, ensuring that the center of the re-collection area is mainly distributed within ±0.10 mm. This sub-figure is used to illustrate the impact of area positioning and alignment deviation information on the consistency of the collection areas between the production and consumer ends.

[0109] Figure 8 (b) The overall quality score of the output image is represented by a box plot with scatter points. The distribution is shown on the horizontal axis, which represents the conventional data acquisition method and the data acquisition method of this invention, respectively. The vertical axis represents the overall quality score. The scatter plot represents the rating sample; the upper and lower boundaries of the box represent the 25th and 75th percentiles; the midline of the box represents the median; the dashed line represents the range of rating dispersion; and the horizontal dashed line represents the overall quality threshold. Under conventional acquisition methods, fixed lighting and exposure parameters cannot adapt to the local reflection state of each packaging box, resulting in some images having an overall quality score below 0.82. With the acquisition method of this invention, images that initially fail to meet quality standards are re-acquired after adjustments to exposure, focus, or lighting parameters, leading to a final output image with an overall quality score concentrated above the quality threshold. In the test involving 60 packaging boxes across two regions, with one acquisition per region at the production end, the proportion of images meeting quality conditions in a single acquisition using the conventional method was 82.5%. Under the condition of allowing a maximum of two re-acquisitions, the proportion of final output qualified images using the acquisition method of this invention was 98.3%. The box plot and scatter plot in the figure are used to represent the central tendency and dispersion of the quality scores; the qualified rate is based on the quality judgment results of all acquisition areas.

[0110] Figure 8 (c) This sub-figure demonstrates the parameter adaptation effects for different material regions. The horizontal axis nodes are typical quality indicators from the QR code inked area and the label paper fiber area, while the vertical axis represents the corresponding indicator values. Gray dashed lines and square markers represent ordinary fixed parameter acquisition, while black solid lines and circular markers represent material-adapted acquisition according to this invention. For the black module area of ​​the QR code, the average overexposure ratio from ordinary fixed parameter acquisition is 0.046. The acquisition method of this invention, by reducing paraxial light and increasing the proportion of oblique light, achieves an average overexposure ratio of 0.018 in the final output image; the texture richness index in the same area increases from 0.74 to 0.81. For the label paper fiber area, the average sharpness index from ordinary fixed parameter acquisition is 0.74. The acquisition method of this invention, through focus fine-tuning and ring illumination configuration, achieves an average sharpness index of 0.83 in the final output image, and the texture richness index increases from 0.78 to 0.80. A lower overexposure ratio indicates fewer saturated areas, while higher sharpness and texture richness indicate more abundant usable texture information. Therefore, each indicator in the figure should be compared according to its meaning and numerical labeling.

[0111] The data acquisition method in this specific implementation is as follows: At a fixed acquisition station on the same production end, 60 packaging boxes are sequentially acquired, and two preset areas are acquired on each packaging box; on a fixed verification device at the consumer end, the same batch of packaging boxes is re-acquired after being rearranged, with the repetition counted three times; when calculating the area deviation, the center of the area corresponding to the qualified image at the production end is used as the reference position, and the distance deviation of the center of the re-acquired area at the consumer end in the item coordinate system is calculated; when calculating the image quality, the qualification condition is that the sharpness, brightness uniformity, overexposure ratio, and texture richness all meet the thresholds; when calculating the material adaptation effect, the overexposure ratio, sharpness index, and texture richness index of the black module area of ​​the QR code and the paper fiber area of ​​the label are calculated respectively. This testing process can provide... Figure 8The data foundation is provided for regional consistency, quality gating, and material adaptation; the verifiability of the collected metadata binding output is achieved through... Figure 6 The interactive process shown and the data collection and recording fields in this specific implementation method are explained.

[0112] In this specific embodiment, the fixed acquisition station at the production end and the fixed verification device at the consumer end can use the same coordinate system establishment rules, the same regional location description rules, and the corresponding quality threshold system. The production end focuses on obtaining qualified registration images under continuous operation conditions, while the consumer end focuses on locating the corresponding area and obtaining query images that can be used for subsequent comparison under repositioning conditions. Since both ends output acquisition metadata, the external processing device can determine whether the magnification, working distance, lighting parameters, quality score, and alignment deviation of the consumer end image are within the allowable range. If the consumer end image meets the quality conditions but the alignment deviation is close to the upper limit, the external processing device can perform position correction during subsequent processing; if the quality score of the consumer end image is lower than the threshold or the number of re-acquisitions reaches the upper limit, the external processing device can request re-acquisition or output a status requiring review.

[0113] In another application, the preset acquisition area can be expanded from the QR code black module area and the label paper fiber area to the bottle cap seal area, the packaging box side seal area, the leather product stitching area, the metal sign processing texture area, or the plastic shell embossing area. The positioning reference and parameter configuration of different areas can be set according to the aforementioned material parameter configuration and quality gating method. As long as the area can be repeatedly positioned by the macro positioning reference and its surface has microscopic textures that can be acquired by macro optical imaging, the present invention can obtain qualified images through the corresponding material parameter configuration and quality gating process. For high-value items, three or more preset acquisition areas can be set, and the images and metadata of each area can be combined to form a collection of acquisition results and output to an external processing device.

[0114] As can be seen from this specific embodiment, the present invention does not merely provide a single shooting action in specific application scenarios, but rather forms a complete acquisition process around a repeatable acquisition area, lighting and imaging parameters adapted to the material, acquisition end quality assessment, resampling control based on reasons for non-compliance, and image and acquisition metadata binding output. This process can provide consistent image acquisition rules between the production and consumption ends, and through... Figure 8 The regional deviation, quality distribution, and material compatibility indicators shown demonstrate its technical effectiveness; the collected metadata is bound to the output relationship through... Figure 6 The collected data records support subsequent verification. For external processing devices, the output of this specific implementation is not an isolated image file, but a micro-texture acquisition result containing location, parameter, quality, and status information, which can support subsequent feature extraction, registration into a database, verification and comparison, and verification of the acquisition process.

[0115] The above description is merely a specific embodiment of the present invention, used to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Those skilled in the art can make equivalent substitutions or appropriate modifications to the acquisition area type, optical imaging components, illumination structure, quality assessment algorithm, resampling control strategy, metadata format, and deployment form without departing from the technical concept of the present invention; such equivalent substitutions or modifications, as long as they fall within the scope of the technical solution of the present invention, should be included within the scope of protection of the present invention.

Claims

1. A dedicated optical image acquisition method for acquiring microscopic textures of objects, characterized in that, Includes the following steps: S1, acquire the collection task information of the item to be collected, determine the preset collection area based on the positioning reference of the item surface, and generate the alignment deviation information of the optical imaging center relative to the preset collection area. S2, Configure macro imaging parameters and illumination parameters according to the surface material and alignment deviation information of the preset acquisition area; S3, when the alignment deviation meets the acquisition conditions and the motion state of the acquisition device meets the stability conditions, perform microscopic optical imaging with a magnification of not less than 10 times on the preset acquisition area to obtain a microscopic texture image. S4, perform a quality assessment on the micro-texture image, the quality assessment including a comprehensive evaluation of sharpness, brightness uniformity, overexposure degree and texture richness; S5, when the quality assessment result does not meet the preset quality conditions, determine the reason for non-compliance based on the quality index that does not meet the preset quality conditions, adjust the macro imaging parameters or illumination parameters and re-execute the macro optical imaging. S6. When the quality assessment result meets the preset quality conditions, generate the acquisition metadata corresponding to the micro-texture image, and output the micro-texture image and the acquisition metadata to an external processing device.

2. The method according to claim 1, characterized in that, In step S1, the positioning reference is a macroscopic structure on the surface of the item that can be repeatedly identified. The macroscopic structure includes the item outline, packaging boundary, label boundary, barcode boundary, QR code positioning pattern, printed pattern boundary, or seal edge. When determining the preset acquisition area, firstly, a coordinate system is established with the predetermined reference point in the positioning reference as the origin and the edge extension direction of the positioning reference as the coordinate axis direction. Then, the microscopic imaging range is determined according to the preset offset, preset acquisition window size, and preset acquisition direction. The alignment deviation information includes the lateral deviation, longitudinal deviation, and rotational deviation between the microscopic imaging range and the current optical imaging center. When any deviation exceeds the corresponding allowable deviation threshold, alignment guidance information is output to move the acquisition device or the item to be acquired to a position that meets the acquisition conditions. When all deviations do not exceed the corresponding allowable deviation threshold, a qualified area positioning status is generated.

3. The method according to claim 1, characterized in that, In step S2, the surface material is determined based on the acquisition task information, the item information corresponding to the machine-readable code, or the reflection characteristics of the preview image. When configuring macro imaging parameters and illumination parameters, the corresponding parameter set is called according to the surface material. The macro imaging parameters include magnification, working distance, exposure time, gain, and focus position. The illumination parameters include illumination angle, illumination intensity, brightness ratio of inner and outer light sources, and exposure synchronization sequence. Before formal acquisition, a pre-sampled image is obtained according to the parameter set. The parameter set is corrected based on the brightness distribution, specular reflection ratio, and local edge density of the pre-sampled image. For printed inked areas, the oblique illumination component is increased to enhance the visibility of ink penetration boundaries and microscopic bright spots. For reflective surfaces, the direct light intensity is reduced and the light-shielding or light-guiding structure is adjusted. For fibrous surfaces, adjust the brightness ratio of ring lighting or oblique lighting to enhance the cross-texture of the fibers; The parameters that have been pre-sampled and corrected are used as the formally collected parameters, and the parameter set for the corresponding material is updated based on the subsequent quality assessment results.

4. The method according to claim 1, characterized in that, In step S3, before triggering microscopic optical imaging, the motion state of the acquisition device relative to the object to be acquired is detected, and a motion stability index is calculated based on the acceleration signal, angular velocity signal, or displacement change of the continuous preview image. When the motion stability index exceeds the stability threshold, exposure is paused and a delayed acquisition control signal is output. When the motion stability index does not exceed the stability threshold and remains stable for a preset time, an exposure permission signal is generated to synchronize the illumination exposure sequence with the image sensor exposure sequence, and macro imaging is performed on the preset acquisition area within a specified working distance to obtain a microscopic texture image containing the microscopic physical features of the object surface. When the motion stability index exceeds the stability threshold again during imaging, the current exposure is stopped and motion stability detection is re-executed.

5. The method according to claim 1, characterized in that, In step S4, the sharpness is determined based on the Laplacian response variance of the micro-texture image, the brightness uniformity is determined based on the mean and standard deviation of the brightness of the micro-texture image blocks, the overexposure is determined based on the proportion of pixels reaching the saturation threshold, and the texture richness is determined based on the information entropy of the grayscale distribution or the local texture response distribution. During quality assessment, sharpness, brightness uniformity, overexposure, and texture richness are normalized respectively, and then... Calculate the overall quality score, where, This represents the normalized sharpness index. Indicator of brightness uniformity Indicates the overexposure ratio. This represents the normalized texture abundance index. , , and Indicates the corresponding weight, and When the overall quality score reaches the overall quality threshold, and the sharpness, brightness uniformity, overexposure, and texture richness each meet their respective individual thresholds, the micro-texture image is determined to meet the preset quality conditions.

6. The method according to claim 1, characterized in that, In step S5, when the overexposure of the micro-texture image does not meet the preset quality conditions, the illumination intensity is reduced, the exposure time is shortened, or the gain is reduced; when the sharpness of the micro-texture image does not meet the preset quality conditions, the focus position, working distance, or exposure time is adjusted. When the brightness uniformity of the microtexture image does not meet the preset quality conditions, adjust the brightness ratio of different light sources or switch the illumination angle; when the texture richness of the microtexture image does not meet the preset quality conditions, change the oblique illumination direction or increase the illumination component used to enhance surface undulations. After each parameter adjustment, microscopic optics imaging is re-executed and the process returns to step S4. The number of re-sampling attempts, the parameters before adjustment, the parameters after adjustment, and the corresponding quality assessment results are recorded. If the preset quality conditions are still not met after the preset number of re-sampling attempts, an acquisition failure status or a status requiring manual review is output.

7. The method according to claim 1, characterized in that, When setting multiple preset collection areas for the same item to be collected, the area identifier, area type, area location description, allowable deviation threshold, material category, and collection order are saved for each preset collection area. The alignment deviation information of each preset collection area is determined in sequence according to the collection order, and macro imaging, quality assessment, and resampling control are performed respectively. After the microscopic texture image of any preset collection area meets the preset quality conditions, the microscopic texture image, area identifier, and corresponding collection metadata are written into the collection result set, and then the process switches to the next preset collection area. Once all preset acquisition areas have been successfully acquired, the association between each micro-texture image and its corresponding acquisition metadata is established according to the area identifier. The acquisition result set is then output to an external processing device, enabling the external processing device to perform feature extraction, registration into a database, or verification and comparison based on the micro-texture images of multiple areas.

8. The method according to claim 1, characterized in that, In step S6, the collected metadata includes item identifier, collection area identifier, collection time, collection device identifier, actual magnification, working distance, exposure time, gain, illumination angle, illumination intensity, quality assessment results, alignment deviation information, number of resampling attempts, and motion stability index. When outputting the micro-texture image and the acquired metadata, the micro-texture image and the acquired metadata are written into the same data packet, or stored separately and associated indexes are set to establish a binding relationship between the acquired metadata and the corresponding image; Before output, the item identifier, collection area identifier, and collection device identifier are verified, and the data is transmitted in a format that can be parsed by the external processing device, so that the external processing device can select feature extraction parameters, judge collection consistency, and audit the collection process based on the collection metadata.

9. A dedicated optical image acquisition device for acquiring microscopic textures of objects, characterized in that, It includes a data acquisition area positioning unit, a parameter configuration unit, a macro optical imaging unit, a controllable illumination unit, a motion stability detection unit, an image quality control unit, a resampling control unit, and an image output interface; The acquisition area positioning unit is used to obtain the acquisition task information of the object to be acquired, determine the preset acquisition area based on the positioning reference of the object surface, generate the alignment deviation information of the optical imaging center relative to the preset acquisition area, and transmit the area identifier, alignment deviation information and area positioning status to the parameter configuration unit and the image output interface. The parameter configuration unit is used to configure macro imaging parameters and illumination parameters according to the surface material and alignment deviation information of the preset acquisition area, and to update the macro imaging parameters or illumination parameters when it receives the parameter adjustment instruction from the resampling control unit. The macro optical imaging unit is used to perform micro optical imaging of the preset acquisition area at a magnification of no less than 10 times according to the macro imaging parameters, and to transmit the obtained micro texture image to the image quality control unit. The controllable illumination unit is used to provide controllable angle and controllable intensity illumination to the preset acquisition area according to the illumination parameters, and to synchronize the illumination timing with the exposure timing of the macro optical imaging unit; The motion stability detection unit is used to detect the motion state of the acquisition device relative to the object to be acquired before imaging, and to provide exposure permission to the macro optical imaging unit when the motion state meets the stability condition. The image quality control unit is used to evaluate the sharpness, brightness uniformity, overexposure degree and texture richness of the micro-texture image. When the quality evaluation result meets the preset quality conditions, it transmits the qualified image and quality evaluation result to the image output interface. When the quality evaluation result does not meet the preset quality conditions, it transmits the reason for non-compliance to the re-sampling control unit. The resampling control unit is used to send parameter adjustment instructions to the parameter configuration unit according to the reasons for failure, and to control the macro optical imaging unit to re-acquire when the number of resampling times has not reached the preset number. The image output interface is used to bind the region identifier, actual macro imaging parameters, actual lighting parameters, and quality assessment results as acquired metadata to the micro-texture image and output them to an external processing device when the quality assessment results meet the preset quality conditions.

10. The apparatus according to claim 9, characterized in that, The macro optical imaging unit includes a macro lens group, an image sensor, and a focusing mechanism. The image sensor is located on the image side of the macro lens group, and the optical magnification of the macro lens group is not less than 10x. The focusing mechanism is used to adjust the imaging focus within a specified working distance. The controllable illumination unit includes an inner ring light source and an outer ring light source arranged around the macro lens group, as well as a light guide structure, a light shielding structure, and an illumination control circuit. The light guide structure is used to guide the light emitted by the inner ring light source and the outer ring light source to a preset acquisition area. The light shielding structure is used to limit external ambient light and stray light from entering the imaging light path. The illumination control circuit is used to control the brightness ratio and exposure synchronization sequence of the inner ring light source and the outer ring light source according to the illumination parameters output by the parameter configuration unit. The acquisition area positioning unit includes a machine-readable encoding and decoding module and an alignment guidance display module. The machine-readable encoding and decoding module is used to read the surface code of the object and establish the object coordinate system. The alignment guidance display module is used to display the target acquisition area and the current alignment deviation information. The acquisition metadata output by the image output interface is stored or synchronously transmitted corresponding to the micro-texture image.