Light source auxiliary adjusting method and system for image acquisition

By obtaining the target feature type specified by the user and using the knowledge base to retrieve and dynamically adjust the light source parameters, the problem of lack of adaptive optimization of light source adjustment in image acquisition is solved, better image acquisition effects are achieved, and the visibility and recognition accuracy of key visual information are improved.

CN120812408AInactive Publication Date: 2025-10-17GUILIN ZHONGJIAN DATA TECH SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510811324.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, the light source adjustment during image acquisition lacks an adaptive optimization mechanism, resulting in the inability to fully display certain key details or enhanced noise interference, affecting image quality and feature recognition accuracy.

Method used

By obtaining the target feature type specified by the user, retrieving the initial light source configuration parameters using the knowledge base, extracting target features and saliency scoring after collecting the initial image, and dynamically adjusting the light source parameters to achieve adaptive enhancement.

Benefits of technology

It achieves higher-quality and more targeted image acquisition effects under different detection requirements and environmental changes, and improves the visibility and recognition accuracy of key visual information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120812408A_ABST
    Figure CN120812408A_ABST
Patent Text Reader

Abstract

The invention discloses a light source auxiliary adjustment method and system for image acquisition, and the method comprises the steps: firstly obtaining an initial auxiliary light source configuration matched with a task demand through the retrieval of a knowledge base according to the feature type of a to-be-detected target specified by a user, and completing the parameter setting of a physical light source and the image acquisition according to the initial auxiliary light source configuration; furthermore, after an initial image is obtained, targeted target feature extraction and significance scoring are carried out on the initial image, a scoring result is compared with a preset standard, auxiliary light source parameters are dynamically adjusted according to the scoring result, and key visual information self-adaptive enhancement under different scenes and requirements is achieved. In this way, better and more targeted image acquisition effects are achieved under different detection requirements and environment changes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of light source auxiliary adjustment, and more particularly, to a light source auxiliary adjustment method and system for image acquisition. BACKGROUND

[0002] In the field of modern image acquisition, reasonable adjustment of auxiliary light source plays a crucial role in improving the visibility of target features and recognition accuracy. With the increasing requirements of image quality and feature recognition accuracy in application scenarios such as industrial detection, medical imaging, and intelligent vision, a single or fixed configuration of light source often cannot adapt to diversified and complex target objects and their surface features. For example, in tasks such as surface defect detection and character recognition, different types of target features (such as edge contour, surface scratch, red region, or OCR character) have different needs for lighting conditions. Therefore, constructing a method that can flexibly adjust the parameters of auxiliary light source according to the type of target feature has become an important technical demand to improve the performance of image acquisition system.

[0003] In the prior art, for light source adjustment in the image acquisition process, manual experience setting or simple automatic exposure control are often used. These schemes usually only focus on overall brightness balance, while ignoring the changes in the saliency of different target features under different lighting conditions. Although some systems support multiple light source switching and parameter adjustment, they lack adaptive optimization mechanisms based on the saliency feedback of specific target features. This leads to problems such as some key details not being fully displayed or noise interference being enhanced in actual applications, thereby affecting subsequent analysis and processing results.

[0004] Therefore, an optimized light source auxiliary adjustment method for image acquisition is expected. SUMMARY

[0005] To solve the above technical problems, the present application is proposed. The embodiments of the present application provide a light source auxiliary adjustment method for image acquisition, which first acquires the type of target feature specified by a user, retrieves an initial auxiliary light source configuration that matches the task requirements through a knowledge base, and completes physical light source parameter setting and image acquisition accordingly. Further, after obtaining the initial image, the target feature extraction and saliency scoring are performed, the scoring results are compared with the preset standard, and the auxiliary light source parameters are dynamically adjusted accordingly to realize adaptive enhancement of key visual information for different scenarios and requirements. In this way, a more high-quality and targeted image acquisition effect is achieved under different detection requirements and environmental changes.

[0006] According to one aspect of the present application, a light source auxiliary adjustment method for image acquisition is provided, which includes: S1: acquiring a target feature type specified by a user; S2: performing knowledge base query and strategy selection on the target feature type to obtain recommended initial auxiliary light source configuration parameters; S3: configuring an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameters, and starting a camera to collect target initial image data under the irradiation of the auxiliary physical light source; S4: performing target feature extraction and saliency evaluation on the target initial image data to obtain a target feature saliency score; S5: adjusting the auxiliary light source configuration parameters based on a comparison between the target feature saliency score and a preset target score.

[0007] According to another aspect of the present application, a light source auxiliary adjustment system for image acquisition is provided, which comprises: a target feature type acquisition module configured to acquire a target feature type specified by a user; a light source configuration parameter recommendation module configured to perform knowledge base query and strategy selection on the target feature type to obtain recommended initial auxiliary light source configuration parameters; a target initial image data acquisition module configured to configure an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameters, and start a camera to collect target initial image data under the irradiation of the auxiliary physical light source; a target feature saliency evaluation module configured to perform target feature extraction and saliency evaluation on the target initial image data to obtain a target feature saliency score; a parameter adjustment module configured to adjust the auxiliary light source configuration parameters based on a comparison between the target feature saliency score and a preset target score.

[0008] Compared with the prior art, the light source auxiliary adjustment method for image acquisition provided by the present application first acquires a target feature type specified by a user, performs knowledge base query to obtain initial auxiliary light source configuration matching the task requirements, and completes physical light source parameter setting and image acquisition based on the initial auxiliary light source configuration. Further, after obtaining the initial image, the target feature extraction and saliency score are performed on the initial image, the score result is compared with a preset standard, and the auxiliary light source parameters are dynamically adjusted based on the comparison, so as to realize adaptive enhancement of key visual information under different scenes and requirements. In this way, a better and more targeted image acquisition effect is realized under different detection requirements and environmental changes. BRIEF DESCRIPTION OF DRAWINGS

[0009] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of embodiments of the present application, taken in conjunction with the accompanying drawings. The drawings provided in the specification and the embodiments of the present application are only for further illustrating the present application and are not intended to limit the scope of the present application. In the drawings, the same reference numerals generally indicate the same components or steps throughout the specification.

[0010] Figure 1 Flow chart of the light source assisted adjustment method for image acquisition according to an embodiment of the present application; Figure 2 Data flow diagram of the light source assisted adjustment method for image acquisition according to an embodiment of the present application; Figure 3 Flow chart of sub-step S4 of the light source assisted adjustment method for image acquisition according to an embodiment of the present application; Figure 4 Block diagram of the light source assisted adjustment system for image acquisition according to an embodiment of the present application. DETAILED DESCRIPTION

[0011] In the following, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely some of the embodiments of the present application, and are not all the embodiments of the present application, and it is to be understood that the present application is not limited by the example embodiments described herein.

[0012] As shown in the present application and claims, unless the context clearly indicates otherwise, "one", "a", "an", and / or "the" do not necessarily refer to the singular, but can also include the plural. Generally, the terms "comprising" and "including" merely indicate the inclusion of the elements explicitly identified, and these elements do not constitute an exclusive list of steps and elements that can be included in the method or device.

[0013] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, however, any number of different modules can be used and run on the user terminal and / or server. The modules are merely illustrative, and different aspects of the system and method can use different modules.

[0014] Flow charts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in sequence. Instead, various steps can be processed in reverse order or simultaneously, as needed. Other operations can also be added to these processes, or one or more steps can be removed from these processes.

[0015] In the following, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely some of the embodiments of the present application, and are not all the embodiments of the present application, and it is to be understood that the present application is not limited by the example embodiments described herein.

[0016] In the technical solution of the present application, a light source assisted adjustment method for image acquisition is proposed. Figure 1A flow chart of the light source assisted adjustment method for image acquisition according to an embodiment of the present application; Figure 2 A data flow diagram of the light source assisted adjustment method for image acquisition according to an embodiment of the present application. As shown in Figure 1 and Figure 2 The light source assisted adjustment method for image acquisition according to an embodiment of the present application comprises the steps of: S1, obtaining a target feature type specified by a user; S2, performing knowledge base query and strategy selection on the target feature type to obtain recommended initial auxiliary light source configuration parameters; S3, configuring an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameters, and starting a camera to collect target initial image data under the irradiation of the auxiliary physical light source; S4, performing target feature extraction and saliency evaluation on the target initial image data to obtain a target feature saliency score; and S5, adjusting the auxiliary light source configuration parameters based on a comparison between the target feature saliency score and a preset target score.

[0017] In particular, the S1, obtaining a target feature type specified by a user. Wherein, the target feature type includes edge contour, surface scratch, red region and OCR character. It should be understood that different detection tasks have clear and differentiated requirements for the feature types that need to be focused on in the image, for example, some tasks focus on identifying the edge contour of an object in order to perform size measurement or shape discrimination; some need to accurately capture surface scratches for defect detection; some scenarios focus on red regions or specific color distributions, such as abnormal mark identification in the fields of medicine sorting, food safety, etc.; and in the links of automated document processing, product traceability, etc., the clarity of OCR characters becomes a core indicator. Since the sensitivity of these target features to lighting conditions is different, if a unified or default light source configuration is used, it is often difficult to take into account the best performance of all feature types in imaging. Therefore, in the technical solution of the present application, by obtaining the target feature type specified by the user, the system can clearly determine the visual elements that need to be highlighted most for the current acquisition task, thereby providing key input for subsequent auxiliary light source parameter recommendation and optimization. In this way, not only can the system perform targeted knowledge base query and strategy selection, but also can achieve precise matching between auxiliary light source configuration and actual detection requirements.

[0018] In particular, the S2 performs a knowledge base query and strategy selection on the target feature type to obtain a recommended initial auxiliary light source configuration parameter. The recommended initial auxiliary light source configuration parameter includes a light source type, an illumination intensity, and an illumination angle. It should be understood that a large amount of optimal light source configuration data for different target features and environmental conditions is stored in the knowledge base, which can provide scientific, efficient, and targeted parameter suggestions for the current task, thereby avoiding blind trial and error and inefficient parameter adjustment. In the technical solution of the present application, the initial setting of the auxiliary light source parameter (including the light source type, intensity, and angle) can be intelligently performed by performing a knowledge base query and strategy selection on the user-specified target feature type, so that the subsequently collected image can highlight the required attention area or details to the greatest extent, thereby laying a solid foundation for further optimization and adjustment. This mechanism not only greatly improves the visibility and recognition of the target feature in the initial imaging, but also effectively shortens the debugging period, improves the overall system operation efficiency, and provides a high-quality starting point for subsequent adaptive closed-loop optimization based on the saliency score, making the entire image acquisition process more efficient, accurate, and intelligent.

[0019] In particular, the S3 configures an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameter and starts the camera to collect target initial image data under the irradiation of the auxiliary physical light source. It should be understood that, in order to ensure that the image collected for the first time has the best display effect of the required feature (such as an edge contour, a surface scratch, a red area, or an OCR character) of the current task as much as possible, and to provide a high-quality starting point for subsequent parameter optimization based on the saliency score, the technical solution of the present application configures an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameter and starts the camera to collect target initial image data under the irradiation of the auxiliary physical light source. In this way, each image acquisition is based on a scientific and reasonable light source setting with strong pertinence, thereby greatly improving the clarity and recognizability of the key details and attention areas in the imaging, laying a solid data guarantee for subsequent automated processing and intelligent analysis, and providing reliable support for realizing closed-loop adaptive optimization.

[0020] In particular, the S4 performs target feature extraction and saliency evaluation on the target initial image data to obtain a target feature saliency score. In one specific example of the present application, as shown in Figure 3 the S4 includes: S41, performing target feature ROI identification on the target initial image data to obtain a target feature focus area image; S42, extracting a visual feature of the target feature focus area image to obtain a target feature area visual feature map; S43, performing local feature perception enhancement on the target feature area visual feature map to obtain a target feature area enhanced visual feature map; and S44, performing decoding regression on the target feature area enhanced visual feature map to obtain the target feature saliency score.

[0021] Specifically, the S41, target feature ROI recognition is performed on the target initial image data to obtain a target feature focus region image. In the technical solution of the present application, the target initial image data is input into a target feature extraction network based on a YOLO model to obtain a target feature focus region image. Wherein, YOLO (You Only Look Once) is a kind of efficient and end-to-end deep learning target detection algorithm, and its core advantage lies in that it can complete the position positioning and category recognition of multiple categories of targets in a single forward inference process, and has extremely fast processing speed and high detection accuracy. In the technical solution of the present application, the YOLO model can be trained to automatically identify and frame various key feature regions in the image, whether it is a fine scratch, a complex character or an abnormal color distribution, and the network can output clear position coordinates and category labels.

[0022] In the specific implementation process, after the camera collects the initial image data, the data is input into the pre-trained YOLO model; the model first performs global perception on the whole image through the convolutional neural network, and quickly generates candidate boxes and confidence scores of each target of interest (such as edge, scratch, red spot or character); then, the system automatically crops the focus region image corresponding to each key feature according to this, and these focus regions will be important input for subsequent visual feature extraction and saliency analysis. By introducing the YOLO model for preliminary feature focusing, not only the rapid and efficient locking of different types of key visual information under diversified detection tasks is realized, but also the subjectivity and inefficiency problems caused by manual setting of ROI are effectively avoided, so that the whole auxiliary light source adjustment process is more intelligent and adaptive.

[0023] Specifically, the S42, the visual features of the target feature focus region image are extracted to obtain a target feature region visual feature map. In the technical solution of the present application, the target feature focus region image is input into a visual feature extractor based on a dilated convolutional neural network model to obtain a target feature region visual feature map. It should be understood that the target feature focus region often contains key information of different scales. Taking surface scratch detection as an example, the microtexture of the scratch needs high-resolution feature capture, and its extension direction or contrast with the background needs more context support. The traditional convolutional layer expands the receptive field by stacking down-sampling operations, but it will cause spatial information loss; the dilated convolution realizes cross-scale feature fusion without reducing the resolution by combining multiple expansion rates. In addition, the non-uniform illumination interference that may exist in the light source adjustment process requires that the feature extraction has anti-noise ability, and the wide receptive field of dilated convolution can suppress the influence of local noise. Therefore, in the technical solution of the present application, the target feature focus region image is input into a visual feature extractor based on a dilated convolutional neural network model to obtain a target feature region visual feature map.

[0024] In the specific implementation, the visual feature extractor adopts a cascaded hollow convolutional layer, for example, the first layer uses an expansion rate of 1 (i.e., a standard convolution) to capture pixel-level details, and subsequent layers gradually use expansion rates of 2, 4, and the like hierarchical structure. For an OCR character recognition scenario, low expansion rate layers are responsible for extracting sharp features of stroke edges, and high expansion rate layers are associated with the overall morphology of characters and the spatial relationship with adjacent characters. Through this layered feature fusion, the target feature region visual feature map can simultaneously encode local saliency (such as the color distribution of the red region) and structural correlation (such as the continuity of the edge contour), providing multi-dimensional discriminators for subsequent saliency scoring. In this way, the information performance of various key targets under the current lighting conditions can be better reflected, providing high-quality basis for automatically evaluating the pros and cons of light source configuration and dynamic adjustment, thereby promoting the entire intelligent acquisition system to develop in the direction of higher precision and stronger robustness.

[0025] Specifically, the S43, the target feature region visual feature map is locally enhanced to obtain a target feature region enhanced visual feature map. It can be understood that there is a contradiction between the anisotropic expression needs of the target feature under complex lighting and the insufficient local feature representation ability. For example, in an industrial detection scene, a scratch on a metal surface can present a micro-texture extending diagonally, and a deviation in the lighting angle will cause the gradient features of the scratch edge to be fragmented into discrete segments within the traditional convolution receptive field. At this time, the homogenization processing of standard convolution is difficult to capture long-range dependencies in a specific direction, and the feature enhancement network with multi-directional context awareness can explicitly model the continuous feature evolution pattern of the scratch extension direction by serializing the visual feature map along the preset direction (such as horizontal, vertical, and diagonal). Therefore, to break through the limitations of the local receptive field, a feature enhancement mechanism with direction sensitivity is constructed, and in the technical solution of the present application, the target feature region visual feature map is locally enhanced to obtain a target feature region enhanced visual feature map.

[0026] In a specific implementation, the system first extracts a feature vector of a target position (h, w) from a feature map generated by a dilated convolution as a reinforced focal point, and then samples feature sequences around the position in three independent directions; then, the feature sequences in each direction are processed by encoding based on a Transformer to dynamically identify the far-distance context (such as a stroke turning point separated by multiple pixels) most strongly associated with the central feature in the direction and suppress noise interference caused by light source scattering; then, the direction-sensitive attention module adaptively adjusts the fusion weight by analyzing the anisotropic polarization characteristics of the encoding vectors in each direction, such as the correlation between the gradient change rate of the diagonal direction and the texture density of the horizontal direction. The enhanced feature map that integrates multi-directional structured knowledge provides a discriminant with both spatial correlation and physical regularity for subsequent light source parameter optimization, and finally realizes the dynamic matching of illumination configuration and target feature saliency.

[0027] Specifically, first, a channel feature vector of an (h, w) pixel position is extracted from a target feature region visual feature map as a target feature region visual feature vector to be enhanced. It should be understood that the target feature region visual feature map has encoded multi-scale context information through a dilated convolution network, but the isotropic processing of standard convolution causes the channel feature vector of each pixel position to only reflect the abstract features (such as edge gradient, texture density, or color distribution) within its local receptive field, and cannot explicitly associate long-distance structural information extending along a particular direction. For example, in surface scratch detection, the feature vector of a point on the scratch centerline contains the microscopic texture characteristics of the position, but does not cover the continuity feature evolution pattern along the extension direction of the scratch. Therefore, to construct an initial anchor point for feature enhancement and provide an accurate reinforced focal point for subsequent directional context perception, in the technical solution of the present application, a channel feature vector of an (h, w) pixel position is extracted from a target feature region visual feature map as a target feature region visual feature vector to be enhanced.

[0028] By selecting this point as the object to be enhanced, the system can anchor the key spatial position of the target feature as a semantic base point for multi-directional context analysis, thereby overcoming the limitations of local receptive fields on long-range dependency modeling. This anchor-based processing method not only retains the multi-scale perception ability of the dilated convolution network, but also realizes targeted optimization of feature enhancement through spatial positioning constraints, so that subsequent light source parameter adjustment can accurately focus on the key semantic area of the target feature, thereby improving the matching accuracy between illumination configuration and feature saliency requirements.

[0029] In a specific example of the present application, a channel feature vector of an (h, w) pixel position is extracted from a target feature region visual feature map as a target feature region visual feature vector to be enhanced in the following formula; wherein the formula is:

[0030] wherein, is the target feature region visual feature map, is a real number set, is respectively height, width and channel number of is in channel feature vector of the channel, i.e. the target feature region visual feature vector to be enhanced, is the first pixel position.

[0031] Then, based on the target feature region visual feature vector to be enhanced, the target feature region visual feature map is subjected to multi-directional visual feature sampling to obtain a set of first directional context target feature region visual feature vectors, a set of second directional context target feature region visual feature vectors and a set of third directional context target feature region visual feature vectors. It should be understood that when the target feature region visual feature map is encoded by a dilated convolutional network, the channel feature vector at each position already contains multi-scale context information, but its representation ability is still limited by the uniform receptive field expansion mode of the traditional convolution kernel. For example, in the surface scratch detection scene, the scratch may present a microstructure extending obliquely, and the fixed neighborhood sampling of the standard convolution cannot effectively capture the continuous gradient change pattern in this direction.

[0032] Therefore, in order to construct a direction-sensitive context correlation system, in one specific example of the present application, in the target feature region visual feature map, the target feature region visual feature vector to be enhanced is taken as the center to perform visual feature sampling along a first direction to obtain a set of first directional context target feature region visual feature vectors, and the target feature region visual feature vector to be enhanced is located at the center position of the set of first directional context target feature region visual feature vectors; and the target feature region visual feature vector to be enhanced is taken as the center to perform visual feature sampling along a second direction to obtain a set of second directional context target feature region visual feature vectors, and the target feature region visual feature vector to be enhanced is located at the center position of the set of second directional context target feature region visual feature vectors; similarly, the target feature region visual feature vector to be enhanced is taken as the center to perform visual feature sampling along a third direction to obtain a set of third directional context target feature region visual feature vectors, and the target feature region visual feature vector to be enhanced is located at the center position of the set of third directional context target feature region visual feature vectors.

[0033] By serializing feature sampling along the preset direction (such as horizontal, vertical, diagonal) with the center feature vector as the base point, the system can explicitly model the spatial evolution rule of the target feature along a specific direction, breaking through the bottleneck of local receptive field for long-range dependence modeling. This directional sampling mechanism based on the center point enables the system to adaptively extract context information that conforms to the spatial distribution rule of different target feature types (such as linear extension of edge contour, chroma diffusion pattern of red region), providing structured input for subsequent long-range dependence modeling based on Transformer.

[0034] In one specific example of the present application, based on the visual feature vector of the target feature region to be enhanced, the visual feature map of the target feature region is sampled in multiple directions to obtain a set of first direction context target feature region visual feature vectors, a set of second direction context target feature region visual feature vectors and a set of third direction context target feature region visual feature vectors according to the following formula; wherein the formula is:

[0035] wherein, and are step vectors in directions For each direction , the channel feature vectors of adjacent positions are sampled in the direction (symmetric sampling, center ), if the coordinates are out of bounds, zero is used for supplement, are the set of first direction context target feature region visual feature vectors, the set of second direction context target feature region visual feature vectors and the set of third direction context target feature region visual feature vectors, respectively.

[0036] Then, the set of first-direction context target feature region visual feature vectors, the set of second-direction context target feature region visual feature vectors, and the set of third-direction context target feature region visual feature vectors are respectively input into the direction context perceiver based on the transformer structure to obtain the to-be-enhanced first-direction context perception target feature region visual implicit coding vector, the to-be-enhanced second-direction context perception target feature region visual implicit coding vector, and the to-be-enhanced third-direction context perception target feature region visual implicit coding vector. It can be understood that after the target feature region visual feature map is sampled in multiple directions, the set of context feature vectors of each direction essentially forms a one-dimensional ordered sequence, and the spatial structure information (such as the diagonal continuity of surface scratches and the trend rule of OCR character strokes) implicitly contained in the set needs to be dynamically associated and modeled beyond the local receptive field. Therefore, in order to construct the global semantic association in the direction dimension, in the technical solution of the present application, the set of first-direction context target feature region visual feature vectors, the set of second-direction context target feature region visual feature vectors, and the set of third-direction context target feature region visual feature vectors are respectively input into the direction context perceiver based on the transformer structure to obtain the to-be-enhanced first-direction context perception target feature region visual implicit coding vector, the to-be-enhanced second-direction context perception target feature region visual implicit coding vector, and the to-be-enhanced third-direction context perception target feature region visual implicit coding vector.

[0037] Here, by introducing the self-attention mechanism of the Transformer, the system can dynamically calculate the correlation weight between any two points in the sequence, thereby breaking through the limitation of position distance and accurately capturing the key node features of the directional structure. In this process, the Transformer automatically identifies and strengthens the semantic relationship between these key nodes by calculating the similarity of feature vectors of all positions in the sequence, and the generated direction context perception implicit coding vector not only contains local feature responses, but also embeds global structure rules in the direction. This processing method enables the system to restore the complete morphological features of the target through directional global context understanding even when the light source conditions change (such as lateral light causing the edges of blood vessels to blur). In this way, the discrimination between the defect area and the background noise can be significantly improved, providing high-discriminative directional sensitive features for light source parameter adjustment, and ultimately achieving the best matching of light configuration and target feature spatial distribution rules.

[0038] In a specific example of the present application, a set of visual feature vectors of the first directional context target feature area, a set of visual feature vectors of the second directional context target feature area, and a set of visual feature vectors of the third directional context target feature area are respectively input into a directional context perception device based on a converter structure to obtain a visual implicit coding vector of the first directional context perception target feature area to be enhanced, a visual implicit coding vector of the second directional context perception target feature area to be enhanced, and a visual implicit coding vector of the third directional context perception target feature area to be enhanced; wherein, the formula is:

[0039] in, is a directional context sensor based on a converter structure, are respectively a set of visual implicit coding vectors of the first direction context-aware target feature region to be enhanced, a set of visual implicit coding vectors of the second direction context-aware target feature region to be enhanced, and a set of visual implicit coding vectors of the third direction context-aware target feature region to be enhanced, For extraction The center position in context-aware latent encoding vectors), They are respectively the visual implicit coding vector of the first direction context-aware target feature region to be enhanced, the visual implicit coding vector of the second direction context-aware target feature region to be enhanced, and the visual implicit coding vector of the third direction context-aware target feature region to be enhanced.

[0040] Further, it can be understood that when the three orthogonal direction implicit encoding vectors are independently encoded by the Transformer, the representation space may, due to the adaptive reinforcement of the direction-sensitive attention mechanism, form a feature distribution deviation in the direction dimension. For example, in surface scratch detection, the encoding vector along the main direction of the scratch (such as the diagonal line) may exhibit high polarization intensity due to the strong response of the continuous gradient feature, while the encoding vector in the vertical direction may exhibit abnormal fluctuations due to background noise interference. This anisotropic polarization distribution distorts the coupling relationship between multi-directional features, resulting in semantic aliasing of the enhanced feature vector after fusion (such as the erroneous association of gradient features on the scratch edge with background texture). Therefore, in order to establish a dynamic balancing mechanism between directional features, in the preferred example of the present application, the first direction context-aware target feature region visual implicit encoding vector to be enhanced, the second direction context-aware target feature region visual implicit encoding vector to be enhanced, and the third direction context-aware target feature region visual implicit encoding vector to be enhanced are respectively subjected to anisotropic correction to obtain the first direction context-aware target feature region visual implicit encoding vector to be enhanced after correction, the second direction context-aware target feature region visual implicit encoding vector to be enhanced after correction, and the third direction context-aware target feature region visual implicit encoding vector to be enhanced after correction.

[0041] Here, by introducing high-order anisotropic polarization representation and covariant partial derivative calculation, the system can analyze the nonlinear interaction between directions, for example, in the OCR character recognition scene, the high polarization response of the horizontal stroke direction may suppress its suppression effect on the vertical direction encoding vector through denominator normalization, thereby restoring the true geometric structure of the stroke intersection. In this process, by introducing high-order anisotropic polarization representation and covariant partial derivative calculation, the system can analyze the nonlinear interaction between directions, for example, in the OCR character recognition scene, the high polarization response of the horizontal stroke direction may suppress its suppression effect on the vertical direction encoding vector through denominator normalization, thereby restoring the true geometric structure of the stroke intersection. This correction mechanism essentially constructs a dynamic balance constraint in the direction dimension in the feature space, so that the enhanced feature vector on which the light source parameter optimization depends can accurately reflect the true spatial distribution pattern of the target feature, rather than the artifacts caused by directional polarization effects.

[0042] Finally, a direction-sensitive attention module is constructed based on the first, second, and third directions. The corrected visual implicit coding vector of the first-direction context-aware target feature region to be enhanced, the corrected visual implicit coding vector of the second-direction context-aware target feature region to be enhanced, and the corrected visual implicit coding vector of the third-direction context-aware target feature region to be enhanced are input into the direction-sensitive attention module to obtain a visually enhanced feature vector of the target feature region. It should be understood that after the implicit coding vectors in the three orthogonal directions have been anisotropically corrected, although the interference caused by anisotropic polarization has been removed, they each still carry unique semantic information—for example, the continuous gradient feature in the main direction for surface scratch detection, the edge noise suppression feature in the orthogonal direction, and the micro-texture complementary feature in the diagonal direction. If simple linear superposition or mean fusion is used, it may not be possible to dynamically adjust the contribution weight of each direction according to the saliency requirements of the target feature under the current lighting conditions. Therefore, in the technical solution of the present application, a direction-sensitive attention module is constructed based on the first direction, the second direction and the third direction, and the corrected visual implicit coding vector of the first direction context-perceived target feature area to be enhanced, the corrected visual implicit coding vector of the second direction context-perceived target feature area to be enhanced and the corrected visual implicit coding vector of the third direction context-perceived target feature area to be enhanced are input into the direction-sensitive attention module to obtain the visual enhancement feature vector of the target feature area.

[0043] Here, the Direction-Sensitive Attention Module introduces a dual attention mechanism combining directional identity encoding and content awareness. This allows the system to automatically enhance horizontal and vertical stroke continuity at the intersection of OCR character strokes while simultaneously mitigating diagonal background interference. This adaptive fusion mechanism essentially constructs a response function between lighting conditions and the spatial distribution of target features. When a change in light source angle increases the salience of a particular directional feature (e.g., side lighting enhances the contrast of a scratch edge), the module automatically adjusts the attention weight for that direction, ensuring that the enhanced feature vector reflects the visual impact of the lighting configuration on the target feature in real time.

[0044] In this process, the directional context perceptron based on the Transformer structure encodes independently in each direction, thereby strengthening the feature distribution in that direction, and the attention weight further enhances the directional sensitivity, which makes the attention score based on the directional context perceptron more efficient. The context-aware target feature region visual implicit coding vector of each direction that fuses the visual features of the target feature region to be enhanced When the image is viewed from above, it will be affected by the high field polarizability under anisotropy, thereby reducing the feature coupling aliasing effect and affecting the expression accuracy of the visual enhancement feature vector of the target feature area.

[0045] Therefore, before summing, the weighted context-aware target feature region visual implicit encoding vector of each direction after weighting is , perform high-order anisotropic polarization representation:

[0046] Therefore, the high-order field polarizability analysis in the predetermined direction is performed in the form of a bilinear response to the other two directions except the predetermined direction.

[0047] Then, under the covariant partial derivative representation of heterogeneous analysis, we can respectively right Find the partial derivatives:

[0048] That is, because in the denominator position, the context-aware target feature region visual implicit encoding vectors in the other two directions It is essentially symmetrical, so its partial derivatives are the same, which means that the calculation of partial derivatives makes an anisotropic correction to the overall field polarization response.

[0049] In this way, and Perform point multiplication weighted correction to obtain Then, calculate:

[0050] in, and Directions and direction The embedding code vector of is the exponential function value with the natural constant e as the base, For direction Relative direction The attention score, is the target feature region visual enhancement feature vector, and the target feature region visual enhancement feature vector is the first Channel feature vector at pixel location.

[0051] In this way, the multi-directional field coupling effect under anisotropic high field polarizability is improved, and the aliasing fusion effect of the context-aware target feature area visual implicit coding vector of the target feature area in each direction of the visually enhanced object is improved, thereby improving the expression accuracy of the visual enhancement feature vector of the target feature area.

[0052] Specifically, the S44 decodes the target feature region enhanced visual feature map to obtain the target feature saliency score. It should be understood that under different auxiliary light source configurations, the clarity, contrast and structural integrity of the same target feature in the imaging may differ significantly, and these differences can only be numerically evaluated scientifically and reasonably to provide a basis for subsequent automatic decision-making. Therefore, in the technical solution of the present application, the complex and difficult-to-directly-interpret deep visual representation is mapped to a single or multi-dimensional saliency score through a regression network or a decoder model, thereby directly reflecting the information prominence of the key target region under the current lighting condition. For example, in the surface scratch detection scene, the score can measure the contrast between the scratch edge and the background; in the OCR character recognition task, it can reflect the character contour clarity and noise interference level.

[0053] In the specific implementation process, the target feature region enhanced visual feature map is input into the decoder-based target feature scoring module to obtain a decoding value, which is used to represent the target feature saliency score. In this process, the enhanced visual feature map is input, and through several convolutional layers, fully connected layers or adaptive pooling operations, spatial information and channel information are fused and reduced in dimension, and finally a score representing saliency is output. Through this mechanism, objective data feedback can be obtained for each adjustment of the auxiliary light source, so that the system can dynamically track and continuously improve the performance of the key target region in the imaging. Ultimately, this not only greatly improves the visibility of important details such as edge contours, surface scratches, red regions and OCR characters in diversified detection tasks, but also lays a solid foundation for subsequent automatic analysis and intelligent decision-making, making the entire image acquisition process more intelligent, efficient and accurate.

[0054] In particular, the S5 adjusts the auxiliary light source configuration parameters based on the comparison between the target feature saliency score and the preset target score. It should be understood that the actual acquisition environment and object state are often unpredictable, and even if the initial light source parameters recommended by the knowledge base are used, it cannot be guaranteed that each imaging can meet the high standard requirements of the task for the visibility of specific features. To achieve adaptive adjustment under specific detection requirements and changes in the field environment, in the technical solution of the present application, the dynamic comparison of the saliency score and the target score is introduced to judge in real time whether the current imaging quality meets the standard. Subsequently, the system will automatically analyze the possible factors affecting the saliency, such as insufficient light intensity, unreasonable angle or improper type selection, and accordingly adjust the corresponding parameters.

[0055] In one specific example of the present application, the comparison result between the target feature saliency score and the preset target score can be as follows: if the target feature saliency score is significantly lower than the preset target score, it indicates that the current lighting condition is insufficient to effectively highlight the key visual elements, and the auxiliary light source parameters need to be further enhanced or optimized; if the target feature saliency score is equal to the preset target score, it indicates that the existing light source configuration has met the detection requirements and does not need to be further adjusted; if the saliency score exceeds the preset target score, there can be problems such as excessive enhancement, loss of details, or waste of energy, and the relevant parameters should be appropriately reduced to avoid redundancy and noise amplification. Based on different types of target features (such as edge contours, surface scratches, red regions, and OCR characters), each type of feature has different sensitivities to parameters such as lighting intensity, angle, and type. Therefore, when adjusting the auxiliary light source configuration, the specific task requirements and the above comparison results should be combined to optimize each parameter accordingly.

[0056] That is, in this specific example, the S5, based on the comparison between the target feature saliency score and the preset target score, adjusts the auxiliary light source configuration parameters, including: when the target feature saliency score is equal to the preset target score, the auxiliary light source configuration parameters do not need to be adjusted; and when the target feature saliency score is less than or greater than the preset target score, the auxiliary light source configuration parameters need to be adjusted.

[0057] In this specific example, the strategy for adjusting the auxiliary light source configuration parameters is as follows: for OCR character recognition, when the character edge sharpness score is insufficient (that is, when the target feature saliency score is less than the preset target score), the system switches the light source type to a high-uniformity backlight, reduces the lighting angle to near the vertical direction to reduce stroke deformation, and dynamically adjusts the lighting intensity to the maximum difference interval between the character ink and the paper background reflectivity. In one specific example, the adjusted auxiliary light source configuration parameters are: the lighting intensity is 80% of the original lighting intensity, the lighting angle is 85°, and the light source type is a high-uniformity backlight. When the score exceeds the preset target, the system starts the parameter optimization verification process. For example, in red region detection, excessive enhancement can cause adjacent color domain interference, at which point the system gradually reduces the red light band intensity (for example, to 90% of the original red light band intensity) and introduces complementary color filtering to balance color distortion; for edge contours, if high contrast causes adjacent features to stick together, switch to a wide-angle diffuse light source to weaken the pseudo-edges through uniform illumination.

[0058] Meanwhile, the system feeds such overshoot cases back to the knowledge base for perfecting the future initial configuration recommendation strategy, forming a closed-loop learning mechanism for continuous optimization. Through the above multi-dimensional and feature-oriented dynamic adjustment strategy, the system can target the edge contour, surface scratch, red area, and OCR character, etc. for differentiated needs, thereby ensuring the optimal presentation of key visual information in complex application scenarios. This closed-loop adaptive mechanism not only improves the consistent visibility of key features in complex backgrounds, but also greatly reduces manual intervention and debugging time, making the entire image acquisition process more efficient, intelligent, and accurate.

[0059] In summary, the light source auxiliary adjustment method for image acquisition according to the embodiments of the present application is illustrated, which first acquires the initial auxiliary light source configuration matching the task requirements through knowledge base retrieval according to the user-specified target feature type, and completes the physical light source parameter setting and image acquisition accordingly. Further, after obtaining the initial image, the target feature extraction and saliency scoring are performed, the scoring results are compared with the preset standard, and the auxiliary light source parameters are dynamically adjusted accordingly to realize adaptive enhancement of key visual information for different scenarios and needs. In this way, a more high-quality and targeted image acquisition effect is achieved for different detection needs and environmental changes.

[0060] Further, a light source auxiliary adjustment system for image acquisition is also provided.

[0061] Figure 4 A block diagram of the light source auxiliary adjustment system for image acquisition according to the embodiments of the present application is shown. As shown in Figure 4 The light source auxiliary adjustment system for image acquisition 300 according to the embodiments of the present application includes: a target feature type acquisition module 310 for acquiring the target feature type specified by the user; a light source configuration parameter recommendation module 320 for knowledge base query and strategy selection on the target feature type to obtain recommended initial auxiliary light source configuration parameters; a target initial image data acquisition module 330 for configuring an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameters, and starting a camera to acquire target initial image data under the irradiation of the auxiliary physical light source; a target feature saliency evaluation module 340 for target feature extraction and saliency evaluation on the target initial image data to obtain a target feature saliency score; and a parameter adjustment module 350 for adjusting the auxiliary light source configuration parameters based on the comparison between the target feature saliency score and the preset target score.

[0062] As mentioned above, the light source assisted adjustment system 300 for image acquisition according to embodiments of the present application can be implemented in various wireless terminals, such as servers with light source assisted adjustment algorithms for image acquisition, etc. In one possible implementation, the light source assisted adjustment system 300 for image acquisition according to embodiments of the present application can be integrated into a wireless terminal as a software module and / or hardware module. For example, the light source assisted adjustment system 300 for image acquisition can be a software module in the operating system of the wireless terminal, or can be an application developed for the wireless terminal; of course, the light source assisted adjustment system 300 for image acquisition can also be one of the many hardware modules of the wireless terminal.

[0063] Alternatively, in another example, the light source assisted adjustment system 300 for image acquisition and the wireless terminal can also be separate devices, and the light source assisted adjustment system 300 for image acquisition can be connected to the wireless terminal through a wired and / or wireless network, and transmit interactive information in an agreed data format.

[0064] Embodiments of the present disclosure have been described above, the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles, practical applications, or improvements to the technology in the market of the embodiments, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.

Claims

1. A light source auxiliary adjustment method for image acquisition, characterized in that: include: S1: Get the target feature type specified by the user; S2: Perform knowledge base query and strategy selection on the target feature type to obtain the recommended initial auxiliary light source configuration parameters; S3: configuring an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameters, and starting the camera under the illumination of the auxiliary physical light source to collect target initial image data; S4: extracting target features and performing saliency evaluation on the target initial image data to obtain a target feature saliency score; S5: Adjusting auxiliary light source configuration parameters based on a comparison between the target feature significance score and a preset target score.

2. The light source auxiliary adjustment method for image acquisition according to claim 1, characterized in that: The target feature types include edge contours, surface scratches, red areas, and OCR characters.

3. The light source auxiliary adjustment method for image acquisition according to claim 1, characterized in that: The recommended initial auxiliary light source configuration parameters include light source type, light intensity and light angle.

4. The light source auxiliary adjustment method for image acquisition according to claim 1, characterized in that: Said S4 comprises: S41: performing target feature ROI recognition on the target initial image data to obtain a target feature focus area image; S42: extracting visual features of the target feature focus area image to obtain a target feature area visual feature map; S43: Performing local feature perception enhancement on the target feature region visual feature map to obtain an enhanced visual feature map of the target feature region; S44: Perform decoding regression on the enhanced visual feature map of the target feature area to obtain the target feature significance score.

5. The light source auxiliary adjustment method for image acquisition according to claim 4, characterized in that: The S41 includes: The target initial image data is passed through the target feature extraction network based on the YOLO model to obtain the target feature focus area image.

6. The light source auxiliary adjustment method for image acquisition according to claim 4, characterized in that: The S42 includes: The target feature focus area image is passed through a visual feature extractor based on a hole convolutional neural network model to obtain a visual feature map of the target feature area.

7. The light source auxiliary adjustment method for image acquisition according to claim 4, characterized in that: The S43 includes: S431: extracting the channel feature vector of the (h, w)th pixel position from the visual feature map of the target feature region as the visual feature vector of the target feature region to be enhanced; S432: Based on the visual feature vector of the target feature region to be enhanced, perform multi-directional visual feature sampling on the visual feature map of the target feature region to obtain a set of visual feature vectors of the first-direction context target feature region, a set of visual feature vectors of the second-direction context target feature region, and a set of visual feature vectors of the third-direction context target feature region; S433: inputting the set of visual feature vectors of the first directional context target feature region, the set of visual feature vectors of the second directional context target feature region, and the set of visual feature vectors of the third directional context target feature region into a directional context perception device based on a converter structure respectively to obtain a visual implicit coding vector of the first directional context perception target feature region to be enhanced, a visual implicit coding vector of the second directional context perception target feature region to be enhanced, and a visual implicit coding vector of the third directional context perception target feature region to be enhanced; S434: Construct a direction-sensitive attention module based on the first direction, the second direction, and the third direction, and input the visual implicit coding vector of the first direction context-aware target feature area to be enhanced, the visual implicit coding vector of the second direction context-aware target feature area to be enhanced, and the visual implicit coding vector of the third direction context-aware target feature area to be enhanced into the direction-sensitive attention module to obtain a visual enhancement feature vector of the target feature area, wherein the visual enhancement feature vector of the target feature area is the channel feature vector of the (h, w)th pixel position of the enhanced visual feature map of the target feature area.

8. The light source auxiliary adjustment method for image acquisition according to claim 7, characterized in that: The S432 includes: In the visual feature map of the target feature region, visual feature sampling is performed along a first direction with the visual feature vector of the target feature region to be enhanced as the center to obtain a set of visual feature vectors of the context target feature region in the first direction, wherein the visual feature vector of the target feature region to be enhanced is located at the center of the set of visual feature vectors of the context target feature region in the first direction; In the visual feature map of the target feature region, visual feature sampling is performed along a second direction with the visual feature vector of the target feature region to be enhanced as the center to obtain a set of visual feature vectors of the context target feature region in the second direction, wherein the visual feature vector of the target feature region to be enhanced is located at the center of the set of visual feature vectors of the context target feature region in the second direction; In the visual feature map of the target feature area, visual feature sampling is performed along the third direction with the visual feature vector of the target feature area to be enhanced as the center to obtain a set of visual feature vectors of the context target feature area in the third direction. The visual feature vector of the target feature area to be enhanced is located at the center position of the set of visual feature vectors of the context target feature area in the third direction.

9. The light source auxiliary adjustment method for image acquisition according to claim 8, characterized in that: The S434 includes: performing heterogeneity correction on the visual implicit coding vector of the first-direction context-aware target feature region to be enhanced, the visual implicit coding vector of the second-direction context-aware target feature region to be enhanced, and the visual implicit coding vector of the third-direction context-aware target feature region to be enhanced, respectively, to obtain a corrected visual implicit coding vector of the first-direction context-aware target feature region to be enhanced, a corrected visual implicit coding vector of the second-direction context-aware target feature region to be enhanced, and a corrected visual implicit coding vector of the third-direction context-aware target feature region to be enhanced; A direction-sensitive attention module is constructed based on the first direction, the second direction and the third direction, and the corrected visual implicit coding vector of the first direction context-aware target feature area to be enhanced, the corrected visual implicit coding vector of the second direction context-aware target feature area to be enhanced and the corrected visual implicit coding vector of the third direction context-aware target feature area to be enhanced are input into the direction-sensitive attention module to obtain a visual enhancement feature vector of the target feature area.

10. A light source auxiliary adjustment system for image acquisition, characterized in that: include: A target feature type acquisition module is used to acquire the target feature type specified by the user; The light source configuration parameter recommendation module is used to perform knowledge base query and strategy selection on the target feature type to obtain the recommended initial auxiliary light source configuration parameters; A target initial image data acquisition module is used to configure an auxiliary physical light source based on the recommended initial auxiliary light source configuration parameters, and start a camera under the illumination of the auxiliary physical light source to acquire target initial image data; The target feature saliency evaluation module is used to extract target features and perform saliency evaluation on the target initial image data to obtain a target feature saliency score; The parameter adjustment module is used to adjust the auxiliary light source configuration parameters based on the comparison between the target feature significance score and the preset target score.