An adaptive illumination imaging system and method
Patent Information
- Application Number
- CN202611483278.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]本发明针对电子布在现有成像条件下经线和纬线区分度不足、难以实现自动化测量的技术问题,提供一种自适应照明成像系统及方法
[0056]控制器直接在参数空间中执行搜索,其搜索范围覆盖参数的整个取值范围,能够在所有可能的参数组合中找出使区分度最高的那一组,避免因起始点不同而得到不同结果,保证了搜索结果的一致性;
Smart Images

Figure CN122989749A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision and optical inspection technology, and in particular to an adaptive illumination imaging system and method. Background Technology
[0002] Electronic cloth, also known as electronic-grade glass fiber cloth, is made from electronic-grade glass fiber yarn of specific specifications through a plain weave process. Electronic cloth possesses advantages such as excellent electrical insulation, high strength, high heat resistance, high chemical resistance, and good dimensional stability. It is an important substrate for manufacturing copper-clad laminates (CCLs), imparting superior electrical properties and mechanical strength to the substrate. Therefore, it is widely used in smartphones, tablets, laptops, servers, automotive electronics, aerospace instruments, and other high-tech electronic products.
[0003] The warp and weft density and warp and weft yarn width of electronic fabric are the core parameters that determine its performance. The warp and weft density (the number of warp and weft yarns per unit length) is directly related to the consistency of the mechanical and electrical properties of the copper clad laminate, while the uniformity of the warp and weft yarn width affects the signal integrity in subsequent processing.
[0004] Currently, the measurement of warp and weft density and warp and weft thread width of electronic fabrics is generally done manually: under natural lighting conditions, inspectors use magnifying glasses or fabric density microscopes to observe the electronic fabric, counting the number of warp and weft yarns one by one with the naked eye, and then converting the count into a density value. Some improved solutions use ordinary cameras to take magnified images of the electronic fabric, and then manually count and measure the yarns on the images.
[0005] The surface of the electronic fabric is woven from glass fiber yarns, which possess unique optical reflective properties. Under normal lighting conditions, the grayscale distinction between warp and weft threads in images is not significant, and the yarn boundaries are blurred, making it difficult to achieve effective yarn identification and segmentation using ordinary image processing algorithms. This results in machine vision-based automated warp and weft density measurement schemes failing to obtain reliable measurement results. Summary of the Invention
[0006] This invention addresses the technical problem that electronic cloth has insufficient differentiation between warp and weft under existing imaging conditions, making it difficult to achieve automated measurement. It provides an adaptive illumination imaging system and method.
[0007] In a first aspect, the present invention provides an adaptive illumination imaging system, comprising:
[0008] A support device used to hold the object to be measured;
[0009] The lighting module includes at least one light source, wherein multiple optical parameters of the light source are adjustable, including illumination angle and illumination intensity;
[0010] The imaging module is used to acquire an image of the object under test under the illumination of the lighting module;
[0011] The controller is communicatively connected to the lighting module and the imaging module;
[0012] The illumination module is controlled to output illumination light according to the target optical parameter combination to illuminate the object under test;
[0013] Acquire object images captured by the imaging module under each combination of optical parameters;
[0014] Determine the measure of visual discriminability of texture structure in different directions in each group of object images;
[0015] Based on the metric value, a search is performed in the parameter space consisting of the plurality of optical parameters to determine a target combination of optical parameters that makes the visual discrimination meet predetermined conditions.
[0016] By adopting the above technical solution, the controller drives the lighting module to change the output parameters in multiple dimensions such as illumination angle and illumination intensity. Each time the parameter combination is changed, an image is acquired, and a value is calculated from each image to quantify how different the textures in the two directions look. Then, based on these values, the optimal parameter combination is searched in the parameter space.
[0017] The controller performs the search directly in the parameter space, and its search range covers the entire range of parameter values. It can find the set with the highest distinguishability among all possible parameter combinations, avoid different results due to different starting points, and ensure the consistency of search results.
[0018] The output target parameter combination maximizes the difference in the mean grayscale values of the textures in both directions while minimizing the grayscale fluctuations within each direction. This means that the warp and weft threads will present a clear contrast of "bright patches and dark patches" in the image, with uniform brightness and sharp edges within each thread. When such an image is input into a subsequent image segmentation algorithm, the algorithm can reliably divide the warp and weft threads into two independent regions, thereby completing automatic counting and measurement.
[0019] Optionally, the illumination module includes at least two light sources symmetrically arranged on both sides of the object under test, and the plurality of optical parameters also include the distance between the light source and the object under test and the divergence angle of the emitted beam of the light source; the controller is configured to simultaneously adjust the distance, illumination angle, divergence angle and illumination intensity in the parameter space.
[0020] By employing the above technical solution, two light sources are symmetrically arranged above the front and rear sides of the sample stage, allowing light to obliquely illuminate the surface of the electronic fabric from two opposite directions. Due to the different directions of the warp and weft yarns, their surface reflects light differently from the front and rear sides. The front and rear light sources obliquely illuminate the electronic fabric surface from two opposite directions, causing the yarns in one direction of the warp and weft to appear as bright areas under the illumination of the two light sources, while the yarns in the other direction appear as relatively dark areas. The illumination effects of the two light sources are superimposed and enhanced, causing the textures in the two directions to exhibit different grayscale values at a vertical viewing angle, forming a clear visual contrast.
[0021] Simultaneous adjustment across four dimensions—distance, illumination angle, divergence angle, and intensity—allows the system to adapt to electronic fabrics of varying materials, weave densities, and surface conditions. Distance alters the optical path, affecting the concentration of illumination; the angle determines the direction of light incidence, directly influencing reflection differences in textures from different directions; the divergence angle controls the convergence and divergence of the beam, affecting illumination coverage and shadow sharpness; and intensity controls the overall brightness level of the image. This combined optimization of four parameters enables the identification of optimal illumination conditions for each type of electronic fabric.
[0022] Optionally, the controller performing the search action includes the following steps:
[0023] Perform a first-level search, traversing the parameter space with a first step length, to determine the first region where the metric value satisfies the first preset condition;
[0024] Perform a second-level search, traversing the first region with a second step size smaller than the first step size, to determine the target optical parameter combination that maximizes the metric value.
[0025] By employing the above technical solution, a larger step size is used to traverse the four-dimensional parameter space, requiring fewer sampling points and enabling rapid global coverage to determine parameter regions with high texture discrimination. Although the accuracy of large-step search is limited, its core function is to narrow the search range, locking the optimal parameters within a smaller local area, thus providing direction for the second-level search.
[0026] Within the local area determined by the first-level search, a fine traversal is performed with a smaller step size, resulting in denser sampling points and enabling accurate location of the optimal point within the area that maximizes the distinguishability.
[0027] Optionally, after performing the second-level search, the imaging module is controlled to refocus.
[0028] By adopting the above technical solution, after finding the optimal lighting parameters in the first round of search, the focus control module is driven to perform autofocus again to ensure that the imaging module is in the best focal plane position under the optimal lighting conditions, so that the output image achieves the best in both texture distinction and sharpness.
[0029] Optionally, the visual discrimination metric is calculated based on the grayscale statistical features of a first texture region extending along a first direction and a second texture region extending along a second direction in the object image, wherein the first direction and the second direction intersect each other.
[0030] By adopting the above technical solution, for plain-weave electronic fabrics, the warp and weft threads intersect perpendicularly, forming two basic directions of the periodic texture structure. The object of image evaluation is refined from the "whole image" to the "texture region in a specific direction," and the imaging quality of the warp and weft threads is directly reflected by the metric values.
[0031] Secondly, the present invention provides an adaptive illumination imaging method, the method comprising the following steps:
[0032] The object to be tested is placed on a carrier device, and the object to be tested has a periodic texture structure;
[0033] Turn on the illumination source and start the imaging module to acquire images of the object under test;
[0034] With a first adjustment interval, multiple combinations of light source parameters are traversed in a preset first parameter order, and an image of the object under test is acquired under each combination. The light source parameters include at least the illumination angle and the illumination intensity.
[0035] Each acquired image is segmented into regions to obtain a first texture region extending along a first direction and a second texture region extending along a second direction. The mean gray value and the variance gray value of each region are calculated. The first direction and the second direction intersect each other.
[0036] Based on the mean gray level and gray level variance of each region, calculate the discrimination score corresponding to each image, determine an image whose discrimination score meets the predetermined conditions, and take the light source parameter combination corresponding to the image as the first round optimal combination;
[0037] Adjust the parameters of the light source to the optimal combination in the first round;
[0038] With a second adjustment interval, within the neighborhood of the first round optimal combination, multiple light source parameter combinations are traversed in the order of the first parameter, and an image of the object under test is acquired under each combination, wherein the second step length is less than the first step length;
[0039] Repeat the steps of region segmentation, grayscale feature calculation, and discrimination scoring to determine the second round of optimal combination, and adjust the parameters of the light source to the second round of optimal combination.
[0040] By adopting the above technical solution
[0041] The first-level search traverses the four-dimensional parameter space with a large step size and a small number of sampling points, enabling rapid global coverage and identification of parameter regions with high texture discrimination. Although the accuracy of the large-step search is limited, its core function is to narrow down the search range, locking the optimal parameters into a small local area, thus providing direction for the second-level search.
[0042] The second-level search performs a fine traversal within the local area determined by the first-level search with a smaller step size, resulting in denser sampling points and enabling accurate location of the optimal point within that area that maximizes the distinguishability.
[0043] Optionally, the optical parameters also include the distance between the light source and the object, and the divergence angle of the emitted beam from the light source; both the global search and the local search are traversed in a predetermined order of illumination intensity, divergence angle, illumination angle, and distance.
[0044] Optionally, the scoring formula is as follows:
[0045] (1)
[0046] in, , These are the average gray values of texture regions extending in two different directions in the image. , These are the grayscale variances of the two texture regions, respectively. , , These are the weighting coefficients.
[0047] By adopting the above technical solution, the greater the difference in the average gray value between the warp and weft yarns, the greater the difference in brightness between the yarns in the two directions on the image, and the easier it is to distinguish them visually.
[0048] This formula uses subtraction to penalize the gray-level variance within each region—the smaller the mean square error, the more uniform the brightness and the sharper the edges within the yarn in the same direction, which is more conducive to the subsequent image segmentation algorithm accurately identifying and separating the yarn.
[0049] Optionally, before traversing multiple light source parameter combinations with a first step length, the method further includes: acquiring an image with initial light source parameters and driving the imaging module to perform autofocus based on an image sharpness evaluation function; and performing autofocus again after adjusting the light source parameters to the first round of optimal combinations and before traversing multiple light source parameter combinations with a second step length.
[0050] By adopting the above technical solution, before starting the first round of search, the imaging module is adjusted to the optimal focal plane position under the initial light source parameters to ensure that all images sampled in the first round have a certain sharpness benchmark, so that the score can truly reflect the influence of lighting parameters on texture differentiation, rather than the low scores of all images due to defocus blur, which masks the differences between different lighting parameters.
[0051] Changes in illumination parameters can cause a shift in the optimal focal plane position. After adjusting the light source to the optimal combination in the first round, autofocus is performed again to ensure that the input image for the second round of search, as well as the final output image, simultaneously reaches the optimal focal plane position under optimal illumination conditions, so that both texture discrimination and sharpness are at their best.
[0052] Optionally, the light source parameters corresponding to the second round of optimal combination are associated with and stored with the specification information of the object under test; when imaging the object of the specified specifications again, the stored light source parameters are directly called to configure the light source.
[0053] By adopting the above technical solution, for large-scale continuous production scenarios, electronic fabrics of the same specifications need to be tested in batches. During the first measurement, the system determined the optimal parameter combination through two rounds of coarse and fine adjustments, which took a long time. However, during the second and third rounds of measurement of samples of the same specifications, the controller directly calls the stored parameter combination to configure the light source from the data storage module, without having to re-execute the search, thus significantly shortening the time of a single measurement.
[0054] The four stored parameters (distance, divergence angle, angle, and intensity) are fixed values that do not change with operator changes or measurement time. When the same specification electronic cloth is measured at different times and by different operators, it is imaged under the same lighting conditions, ensuring image consistency and lateral comparability of measurement results.
[0055] In summary, this application includes the following beneficial technical effects:
[0056] The controller performs the search directly in the parameter space, and its search range covers the entire range of parameter values. It can find the set with the highest distinguishability among all possible parameter combinations, avoid different results due to different starting points, and ensure the consistency of search results.
[0057] The output target parameter combination maximizes the difference in the mean grayscale values of the textures in both directions while minimizing the grayscale fluctuations within each direction. This means that the warp and weft threads will present a clear contrast of "bright patches and dark patches" in the image, with uniform brightness and sharp edges within each thread. When such an image is input into a subsequent image segmentation algorithm, the algorithm can reliably divide the warp and weft threads into two independent regions, thereby completing automatic counting and measurement. Attached Figure Description
[0058] Figure 1 This is a schematic diagram of the architecture of an adaptive illumination imaging system provided in an embodiment of the present invention;
[0059] Figure 2 This is a schematic flowchart of the adaptive illumination imaging method provided in an embodiment of the present invention;
[0060] Figure 3 This is a schematic diagram of the imaging effect of the electronic cloth under optimal lighting conditions in an embodiment of the present invention;
[0061] Reference numerals: 1. Supporting device; 2. Imaging module; 3. Illumination module; 4. Controller; 5. Visual analysis module; 6. Focusing control module; 7. Data storage module.
[0062] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0063] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0064] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0065] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0066] Reference Figure 1 As shown, this invention provides an adaptive illumination imaging system for adaptive illumination imaging of objects with periodic texture structures. In this embodiment, the object under test is an electronic-grade glass fiber cloth (hereinafter referred to as "electronic cloth"), which has a periodic texture structure composed of warp and weft threads.
[0067] The system includes a carrier device 1, an imaging module 2, an illumination module 3, a controller 4, a vision analysis module 5, a focus control module 6, and a data storage module 7.
[0068] The carrier device 1 is used to place the object to be tested, namely the electronic cloth sample in this embodiment. The surface of the carrier device 1 is flat, which allows the electronic cloth sample to be laid out flat, avoiding wrinkles from interfering with imaging. In other embodiments, the carrier device 1 can also hold the sample by clamping, suspending, or adsorption.
[0069] Imaging module 2 is used to acquire images of the object under illumination by the lighting module. In this embodiment, a high-resolution industrial camera with a 2x objective lens is used, mounted directly above the support device 1, with its optical axis perpendicular to the surface of the support device 1, to acquire grayscale images of the electronic cloth sample. The camera resolution is preferably above 5 megapixels to ensure that fine yarn textures can be clearly distinguished.
[0070] The lighting module 3 includes at least one light source. Multiple optical parameters of the light source are adjustable, including the illumination angle, illumination intensity, and the distance between the light source and the object under test. In this embodiment, the lighting module 3 includes two white LED light sources, which are symmetrically distributed and positioned above the front and rear sides of the center of the support device 1, respectively. The two light sources are configured to move synchronously to ensure the symmetry of the illumination conditions. The following optical parameters of each light source can be adjusted independently: The distance between the light source and the central axis of the support device 1 can be continuously moved within the range of 2cm to 6cm; Illumination angle of the light source: can be rotated within the range of 15° to 75° (0° is the horizontal direction pointing towards the central axis of the bearing device 1, and 90° is the vertical downward direction); The divergence angle of the emitted beam from the light source can vary from 60° to 120°. Luminous intensity of the light source: can be continuously adjusted within the range of 20% to 100% of the rated intensity.
[0071] It should be noted that the distance between the light source and the object under test in this invention refers to the horizontal distance of the light source relative to the central axis of the supporting device. By changing this horizontal distance, the extent to which the light source extends relative to the side of the sample can be adjusted, thereby changing the incident direction of the lateral illumination. In other embodiments, this distance can also be understood as the straight-line distance of the light source in three-dimensional space.
[0072] The above parameters are adjusted via a stepper motor and a precision transmission mechanism to ensure accuracy and repeatability. The visual analysis module 5 receives images acquired by the imaging module 2 and performs the following analysis functions: calculating image sharpness (using the Tenengrad algorithm in this embodiment) to provide a basis for autofocus; and using an image segmentation algorithm (preferably a deep learning-based instance segmentation algorithm) to segment the image into longitude and latitude regions, and calculating the mean and variance of grayscale values for each region as the basis for evaluating the lighting effect.
[0073] The focusing control module 6 drives the imaging module 2 to move up and down along its optical axis (vertical direction) based on the image sharpness calculated by the visual analysis module 5 until the image sharpness reaches its maximum value, thereby achieving automatic focusing.
[0074] The controller 4 is communicatively connected to the lighting module 3, imaging module 2, vision analysis module 5, focus control module 6, and data storage module 7, and is used to coordinate the work of each module and execute the optical parameter search algorithm.
[0075] Controller 4 controls the lighting module 3 to output illumination light according to the target optical parameters to illuminate the object under test;
[0076] The controller 4 acquires the object images captured by the imaging module 2 under each combination of optical parameters; and determines the visual discrimination measure of the texture structure in each group of object images in different directions; the visual discrimination measure is calculated based on the gray-scale statistical features of the first texture region extending along the first direction and the second texture region extending along the second direction in the object image, the first direction and the second direction intersect each other.
[0077] The controller 4 performs a search in a parameter space consisting of multiple optical parameters based on the measurement value to determine the target combination of optical parameters that makes the visual discrimination meet the predetermined conditions.
[0078] The search action performed by controller 4 includes the following steps:
[0079] Perform a first-level search, traversing the parameter space with a step length to determine the first region where the metric value satisfies the first preset condition;
[0080] Perform a second-level search, traversing the first region with a second step size smaller than the first step size, to determine the target optical parameter combination that maximizes the metric value.
[0081] Control imaging module 2 to refocus.
[0082] Data storage module 7 is used to store the optimal combination of optical parameters (distance, divergence angle, illumination angle, intensity) and the corresponding electronic cloth specifications.
[0083] By adopting the above technical solution, the controller drives the lighting module to change the output parameters in multiple dimensions such as illumination angle and illumination intensity. Each time the parameter combination is changed, an image is acquired, and a value is calculated from each image to quantify how different the textures in the two directions look. Then, based on these values, the optimal parameter combination is searched in the parameter space.
[0084] The controller performs the search directly in the parameter space, and its search range covers the entire range of parameter values. It can find the set with the highest distinguishability among all possible parameter combinations, avoid different results due to different starting points, and ensure the consistency of search results.
[0085] The output target parameter combination maximizes the difference in the mean grayscale values of the textures in both directions while minimizing the grayscale fluctuations within each direction. This means that the warp and weft threads will present a clear contrast of "bright patches and dark patches" in the image, with uniform brightness and sharp edges within each thread. When such an image is input into a subsequent image segmentation algorithm, the algorithm can reliably divide the warp and weft threads into two independent regions, thereby completing automatic counting and measurement.
[0086] Based on the same inventive concept, referring to Figure 2 and Figure 3 As shown, an embodiment of the present invention also provides an adaptive illumination imaging method applied to the above-described system. In this embodiment, the adaptive illumination imaging method includes the following steps:
[0087] S1: Place the object to be tested on the carrier device 1. The object to be tested has a periodic texture structure.
[0088] Specifically: The electronic cloth sample is laid flat on the support device 1 in a specified direction. The specified direction means that the warp direction of the electronic cloth is parallel to or at a predetermined angle to the horizontal pixel axis of the imaging module 2, so as to ensure that the warp and weft can be accurately identified during subsequent image segmentation.
[0089] S2: Turn on the illumination source and start the imaging module to acquire images of the object under test;
[0090] Specifically, two LED light sources are turned on simultaneously to illuminate the electronic sample cloth, and the imaging module 2 is activated to acquire images of the electronic sample cloth on the carrier device 1.
[0091] S3: Acquires an image of the object using the initial light source parameters, and drives the imaging module to perform automatic focusing based on the image sharpness evaluation function.
[0092] In this embodiment, the visual analysis module 5 uses the Tenengrad algorithm to calculate the sharpness of the currently acquired image. Based on the sharpness calculation result, the focus control module 6 drives the imaging module 2 to move in the direction of increasing sharpness until the sharpness reaches its maximum value, completing the initial autofocus.
[0093] S4: Controller 4 controls the lighting module 3 to traverse multiple light source parameter combinations in a preset first parameter order with a step size (intensity step size 20%, divergence angle step size 30°, angle step size 30°, distance step size 2cm), and to acquire an image of the object under each combination. The light source parameters include at least the illumination angle and illumination intensity.
[0094] Optical parameters also include the distance between the light source and the object, as well as the divergence angle of the emitted beam from the light source; both global and local searches are traversed in a predetermined order of illumination intensity, divergence angle, illumination angle, and distance.
[0095] For example, the four optical parameters are iterated through in the order of "intensity → divergence angle → angle → distance", and the electronic cloth image is acquired by the imaging module 2 under each combination.
[0096] Taking the parameter settings in this embodiment as an example, the total number of combinations of the four parameters is: 5 intensity levels (20%, 40%, 60%, 80%, 100%) × 3 divergence angle levels (60°, 90°, 120°) × 3 angle levels (15°, 45°, 75°) × 3 distance levels (2cm, 4cm, 6cm) = 135 groups. The controller 4 sequentially sets the lighting module 3 to each parameter combination, and the imaging module 2 acquires one image under each parameter combination, obtaining a total of 135 images.
[0097] S5: Perform region segmentation on each acquired image to obtain a first texture region extending along the first direction and a second texture region extending along the second direction, and calculate the gray mean and gray variance of each region. The first direction and the second direction intersect each other.
[0098] Visual analysis module 5 employs a deep learning-based instance segmentation algorithm to segment each image acquired in step S4 into meridian regions M. 经 and latitude region M 纬 Calculate the mean gray value µ for the two regions respectively. 经 µ纬 and grayscale variance σ 经 σ 纬 .
[0099] The formulas for calculating the grayscale mean and grayscale variance are as follows:
[0100] (2)
[0101] (3)
[0102] Among them, a 经 Let g(x,y) represent the number of pixels in the meridian region, (x,y) be the pixel coordinates, w and h be the width and height (in pixels) of the image, respectively, and g(x,y) be the grayscale value of the pixel at (x,y). For the latitude region, µ... 纬 and σ 纬 The calculation method is the same.
[0103] S6: Calculate the discrimination score for each image based on the mean and variance of gray levels in each region, determine the image whose discrimination score meets the predetermined conditions, and use the light source parameter combination corresponding to that image as the first round optimal combination.
[0104] The scoring formula is as follows:
[0105] (1)
[0106] in, , These are the average gray values of texture regions extending in two different directions in the image. , These are the grayscale variances of the two texture regions, respectively. , , Here, the weighting coefficient is taken as a value in this embodiment. =1、 =0.05、 =0.4.
[0107] The physical meaning of this scoring function is:
[0108] The greater the difference in the mean grayscale values between meridians and parallels (µ), the better. 经 -µ 纬 The larger the value, the higher the score.
[0109] The better the gray uniformity within the meridian region (σ 经 The smaller the value, the higher the score;
[0110] The better the gray uniformity within the latitude region (σ 纬 The smaller the value, the higher the score.
[0111] Taking all three factors into account, the image with the highest score is the one with the clearest distinction between meridians and parallels, and the most uniform distribution of each region.
[0112] S7: Adjust the light source parameters to the optimal combination in the first round and autofocus.
[0113] The controller 4 adjusts the lighting module 3 to the first round of optimal combination found in step S6, and then refocuses automatically.
[0114] Changes in illumination parameters (especially the illumination angle and divergence angle) can alter the distribution of highlight and shadow areas on the electronic cloth surface, thus affecting the autofocus algorithm's judgment of sharpness. A previously sharp focus point may become slightly out of focus under new illumination conditions. Step S7 ensures that the imaging module 2 is in the optimal focal plane position under optimal illumination conditions.
[0115] S8: With the second step length, within the neighborhood of the optimal combination in the first round, traverse multiple combinations of light source parameters in the order of the first parameter, and acquire the image of the object to be tested under each combination, wherein the second step length is less than the first step length.
[0116] Controller 4, with a second step size (intensity step size 10%, divergence angle step size 15°, angle step size 15°, distance step size 1cm), traverses all combinations and acquires images in the vicinity of the optimal combination in the first round (search range is ±1 step size, i.e., intensity ±20%, divergence angle ±30°, angle ±30°, distance ±2cm), following the order of "intensity → divergence angle → angle → distance". Because the search range has been significantly reduced, even with a finer step size, the number of sampling points remains within a controllable range.
[0117] S9: Repeat the steps of region segmentation S5, grayscale feature calculation S6, and discrimination score S7 to determine the optimal combination for the second round, and adjust the parameters of the light source to the optimal combination for the second round.
[0118] S10: Associate and store the light source parameters corresponding to the optimal combination in the second round with the specification information of the object to be tested; when imaging the object of the same specification again, directly call the stored light source parameters to configure the light source.
[0119] Specifically, the imaging module 2 acquires an image of the current sample under optimal conditions, and the data storage module 7 saves the light source distance, divergence angle, illumination angle and intensity data at this time, and stores them in association with the sample specification information.
[0120] When another batch of electronic cloth of the same specifications needs to be inspected, the operator only needs to select the corresponding specification model in the system. The controller 4 then retrieves the previously stored light source parameters (distance, divergence angle, angle, intensity) from the data storage module 7 and automatically configures the illumination module 3 with the corresponding parameters. Based on this, the system can skip the coarse adjustment stage from steps S4 to S6 and directly start from the fine adjustment stage in step S8, or directly perform the automatic focusing and image acquisition in step S3. This significantly shortens the parameter adjustment time and improves the efficiency of batch inspection.
[0121] In this embodiment, the system undergoes two rounds of coarse and fine adjustments to determine the optimal parameter combination during the initial measurement, which is time-consuming. However, starting with the second sample of the same specifications, the controller directly retrieves the stored parameter combinations from the data storage module 7 to configure the light source, eliminating the need to re-perform the search and significantly reducing the measurement time per batch. The four stored parameters are fixed values that do not change with operator changes or measurement time variations, ensuring consistency of imaging conditions and comparability of measurement results across different batches.
[0122] In the description of this specification, the references to terms such as "an embodiment," "some embodiments," "example," "specific example," "a implementation," "a preferred implementation," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0123] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. An adaptive illumination imaging system, characterized in that, include: A support device used to hold the object to be measured; The lighting module includes at least one light source, wherein multiple optical parameters of the light source are adjustable, including illumination angle and illumination intensity; The imaging module is used to acquire an image of the object under test under the illumination of the lighting module; The controller is communicatively connected to the lighting module and the imaging module; The illumination module is controlled to output illumination light according to the target optical parameter combination to illuminate the object under test; Acquire object images captured by the imaging module under each combination of optical parameters; Determine the measure of visual discriminability of texture structure in different directions in each group of object images; Based on the metric value, a search is performed in the parameter space consisting of the plurality of optical parameters to determine a target combination of optical parameters that makes the visual discrimination meet predetermined conditions.
2. The adaptive illumination imaging system according to claim 1, characterized in that, The illumination module includes at least two light sources symmetrically arranged on both sides of the object under test, and the plurality of optical parameters also include the distance between the light source and the object under test and the divergence angle of the emitted beam of the light source; the controller is configured to simultaneously adjust the distance, illumination angle, divergence angle and illumination intensity in the parameter space.
3. The adaptive illumination imaging system according to claim 1, characterized in that, The controller performs the search action by including the following steps: Perform a first-level search, traversing the parameter space with a first step length, to determine the first region where the metric value satisfies the first preset condition; Perform a second-level search, traversing the first region with a second step size smaller than the first step size, to determine the target optical parameter combination that maximizes the metric value.
4. The adaptive illumination imaging system according to claim 3, characterized in that, After performing the second-level search, the imaging module is controlled to refocus.
5. The adaptive illumination imaging system according to claim 3, characterized in that, The visual discrimination metric is calculated based on the grayscale statistical features of a first texture region extending along a first direction and a second texture region extending along a second direction in the object image, wherein the first direction and the second direction intersect each other.
6. An adaptive illumination imaging method applicable to the adaptive illumination imaging system according to any one of claims 1-5, characterized in that, Includes the following steps: The object to be tested is placed on a carrier device, and the object to be tested has a periodic texture structure; Turn on the illumination source and start the imaging module to acquire images of the object under test; Starting with the first step length, multiple combinations of light source parameters are traversed according to the preset first parameter order, and the image of the object under test is acquired under each combination. The light source parameters include at least the illumination angle and illumination intensity. Each acquired image is segmented into regions to obtain a first texture region extending along a first direction and a second texture region extending along a second direction. The mean gray value and the variance gray value of each region are calculated. The first direction and the second direction intersect each other. Based on the mean gray level and gray level variance of each region, calculate the discrimination score corresponding to each image, determine an image whose discrimination score meets the predetermined conditions, and take the light source parameter combination corresponding to the image as the first round optimal combination; Adjust the parameters of the light source to the optimal combination in the first round; With a second step length, within the neighborhood of the first round optimal combination, multiple light source parameter combinations are traversed in the order of the first parameter, and an image of the object to be tested is acquired under each combination, wherein the second step length is less than the first step length; Repeat the steps of region segmentation, grayscale feature calculation, and discrimination scoring to determine the second round of optimal combination, and adjust the parameters of the light source to the second round of optimal combination.
7. The adaptive illumination imaging method according to claim 6, characterized in that, The optical parameters also include the distance between the light source and the object, and the divergence angle of the emitted beam from the light source; both the global search and the local search are traversed in a predetermined order of illumination intensity, divergence angle, illumination angle, and distance.
8. The adaptive illumination imaging method according to claim 6, characterized in that, The scoring formula is as follows: (1) in, , These are the average gray values of texture regions extending in two different directions in the image. , These are the grayscale variances of the two texture regions, respectively. , , These are the weighting coefficients.
9. The adaptive illumination imaging method according to claim 8, characterized in that, Before traversing multiple light source parameter combinations with a first step length, the method further includes: acquiring an image with initial light source parameters and driving the imaging module to perform autofocus based on an image sharpness evaluation function; and, after adjusting the light source parameters to the first round of optimal combinations and before performing the traversal of multiple light source parameter combinations with a second step length, performing autofocus again.
10. The adaptive illumination imaging method according to claim 9, characterized in that, The light source parameters corresponding to the second round of optimal combination are associated with and stored with the specification information of the object under test; when imaging the object of the same specification again, the stored light source parameters are directly called to configure the light source.