Image quality adjustment method and device, equipment and storage medium
By automatically adjusting the imaging parameters of the imaging system, the inconsistency of image quality caused by operator experience dependence is solved, and higher consistent imaging quality and measurement results are achieved.
Patent Information
- Application Number
- CN202311766117.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
Adjustment of imaging parameters in the prior art depends on the operator's experience, resulting in inconsistent image quality and affecting the consistency of the measurement of polar ear size.
By acquiring the image of the imaging system under the current imaging parameters, the image quality is evaluated. If the expected quality is not achieved, the imaging parameters of the imaging system are adjusted until the image quality reaches the expected quality.
Automatically adjust the imaging parameters of the imaging system to improve the consistency of imaging quality, thereby helping to improve the consistency of measurement results.
Smart Images

Figure CN120186320A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of image quality adjustment, and particularly relates to an image quality adjustment method, apparatus, device, and storage medium. Background Art
[0002] In some application scenarios, an imaging system can be used to measure the tab size of a battery. For example, the imaging system includes a 2.5D image measuring instrument. The imaging parameters of the imaging system affect the imaging quality, and the imaging parameters need to be adjusted during application to adjust the imaging quality.
[0003] However, in the related art, the adjustment of imaging parameters depends on the experience of operators, and the adjustment criteria of different operators are also different, resulting in inconsistent image quality. Whether the imaging quality is consistent is an important factor affecting the consistency of tab size measurement. Therefore, inconsistent image quality will lead to inconsistent measurement results obtained based on the images. Summary of the Invention
[0004] Embodiments of this application provide an image quality adjustment method, apparatus, device, and storage medium, which can automatically adjust the imaging parameters of the imaging system and improve the consistency of imaging quality.
[0005] In a first aspect, embodiments of this application provide an image quality adjustment method applied to a 2.5D image measuring instrument. The method includes: obtaining an image of the imaging system under current imaging parameters, where the imaging parameters of the imaging system include a focusing parameter and an illumination parameter; evaluating the quality of the image; if the image quality evaluation result indicates that the image quality does not reach the expected quality, adjusting the imaging parameters of the imaging system, and returning to obtain the image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality.
[0006] The image quality adjustment method provided by the embodiments of this application evaluates the imaging quality of the imaging system, and determines whether to adjust the imaging parameters of the imaging system according to the quality evaluation result. When the image quality converges to the expected quality, the adjustment of the imaging parameters is ended, so as to automatically adjust the imaging parameters of the imaging system, improve the consistency of imaging quality, and thus be beneficial to improving the consistency of measurement results.
[0007] In some embodiments of the first aspect, evaluating the quality of the image includes:
[0008] Calculating a first evaluation index and a second evaluation index of the image respectively, where the first evaluation index is used to indicate the image quality corresponding to the focusing parameter, the second evaluation index is used to indicate the image quality corresponding to the illumination parameter, and the first evaluation index and the second evaluation index are different.
[0009] In the embodiments of the present application, different evaluation metrics are used to evaluate the image quality corresponding to different parameters respectively, which is more conducive to the correctness of the image quality evaluation result, and thus more conducive to improving the consistency of the final imaging quality.
[0010] In some embodiments of the first aspect, the first evaluation metric includes the ratio of the gray gradient value of the image to the gray standard deviation of the image, and the ratio is positively correlated with the image quality corresponding to the focusing parameter.
[0011] In the embodiments of the present application, the first evaluation metric includes the ratio of the gray gradient value of the image to the gray standard deviation of the image. In this way, there is a single peak in the process of changing the focusing parameter for the first evaluation metric, and the value of the focusing parameter corresponding to this single peak can be determined as the expected value of the focusing parameter, which is thus more conducive to improving the consistency of the imaging quality.
[0012] In some embodiments of the first aspect, the second evaluation metric includes the gray standard deviation of the image, and the gray standard deviation is positively correlated with the image quality corresponding to the illumination parameter.
[0013] In the embodiments of the present application, the second evaluation metric includes the gray standard deviation of the image. In this way, there is a single peak in the process of changing the illumination parameter for the second evaluation metric, and the value of the illumination parameter corresponding to this single peak can be determined as the expected value of the illumination parameter, which is thus more conducive to improving the consistency of the imaging quality.
[0014] In some embodiments of the first aspect, if the image quality evaluation result of the image is that the image quality does not reach the expected quality, it includes:
[0015] If the first evaluation metric does not reach the first expected value and / or the second evaluation metric does not reach the second expected value, then it is determined that the image quality evaluation result of the image is that the image quality does not reach the expected quality.
[0016] In the embodiments of the present application, when at least one of the first evaluation metric and the second evaluation metric does not reach its corresponding expected value, it is determined that the image quality evaluation result of the image is that the image quality does not reach the expected quality. In this way, the influence of the focusing parameter and the illumination parameter on the image quality can be taken into account.
[0017] In some embodiments of the first aspect, if the image quality evaluation result of the image is that the image quality does not reach the expected quality, then adjust the imaging parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the best quality, including:
[0018] If the first evaluation index does not reach the first optimal value and the second evaluation index reaches the second optimal value, keep the illumination parameters of the imaging system unchanged, adjust the focusing parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the first evaluation index of the imaging system under the adjusted focusing parameters reaches the first optimal value.
[0019] In the embodiments of the present application, keeping the illumination parameters that have reached the expectation unchanged and only adjusting the focusing parameters that have not reached the expectation helps to improve efficiency.
[0020] In some embodiments of the first aspect, if the image quality evaluation result of the image is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality, including:
[0021] If the first evaluation index reaches the first expected value and the second evaluation index does not reach the second expected value, keep the focusing parameters of the imaging system unchanged, adjust the illumination parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the second evaluation index of the imaging system under the adjusted illumination parameters reaches the second optimal value.
[0022] In the embodiments of the present application, keeping the focusing parameters that have reached the expectation unchanged and only adjusting the illumination parameters that have not reached the expectation helps to improve efficiency.
[0023] In some embodiments of the first aspect, if the image quality evaluation result of the image is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, including:
[0024] If the image quality evaluation result of the image is that the image quality does not reach the expected quality, determine the adjustment direction of the imaging parameters of the imaging system according to the image quality evaluation result and the preset corresponding relationship, and the preset relationship includes the corresponding relationships between multiple imaging parameters and quality;
[0025] Adjust the imaging parameters of the imaging system according to the adjustment direction.
[0026] In the embodiments of the present application, according to the preset corresponding relationship, adjusting the adjustment direction of the imaging parameters of the imaging system can make the imaging parameters adjusted to the expectation faster, thereby improving efficiency.
[0027] Based on the same inventive concept, in the second aspect, the embodiments of the present application provide an image quality adjustment device, including:
[0028] An image acquisition module, configured to acquire an image of the imaging system under the current imaging parameters, where the imaging parameters of the imaging system include focusing parameters and illumination parameters;
[0029] A quality evaluation module for evaluating the quality of an image;
[0030] A parameter adjustment module for adjusting the imaging parameters of the imaging system if the quality evaluation result of the image indicates that the image quality does not meet the expected quality, and returning the image obtained by the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the pre-fetched quality.
[0031] Based on the same inventive concept, in a third aspect, an embodiment of the present application provides an electronic device, including:
[0032] A processor and a memory storing computer program instructions, where when the processor executes the computer program instructions, the image quality adjustment method described in any one of the embodiments in the first aspect is implemented.
[0033] Based on the same inventive concept, in a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the image quality adjustment method described in any one of the embodiments in the first aspect is implemented.
[0034] Based on the same inventive concept, in a fifth aspect, an embodiment of the present application provides a computer program product, and when the instructions in the computer program product are executed by the processor of the electronic device, the electronic device executes the image quality adjustment method shown in any one of the embodiments in the first aspect.
[0035] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] By reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings, other features, objects and advantages of the present application will become more obvious, wherein the same or similar reference numerals represent the same or similar features, and the drawings are not drawn to actual scale.
[0037] Figure 1 A flowchart showing an image quality adjustment method provided by an embodiment of the present application;
[0038] Figure 2 A scenario diagram showing an image quality adjustment method provided by an embodiment of the present application;
[0039] Figure 3 A curve diagram showing an image quality adjustment method provided by an embodiment of the present application;
[0040] Figure 4 Another curve schematic diagram in the image quality adjustment method provided by an embodiment of the present application is shown;
[0041] Figure 5 A structural schematic diagram of an image quality adjustment device provided by an embodiment of the present application is shown;
[0042] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown. Detailed implementation manners
[0043] Hereinafter, embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and thus are only examples and cannot be used to limit the protection scope of the present application.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion.
[0045] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is more than two, unless otherwise specifically defined.
[0046] Referring to "embodiments" herein means that specific features, structures or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0047] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the front and rear associated objects.
[0048] In the description of the embodiments of the present application, the term "plurality" means two or more (including two). Similarly, "multiple groups" means two or more groups (including two groups), and "multiple pieces" means two or more pieces (including two pieces).
[0049] The embodiments of the present application provide an image quality adjustment method, apparatus, device, and storage medium, which will be described below with reference to the accompanying drawings.
[0050] First, the image quality adjustment method provided by the embodiments of the present application will be introduced below.
[0051] The image quality adjustment method provided by the embodiments of the present application can be applied to a 2.5D image measuring instrument.
[0052] As Figure 1 shown, the image quality adjustment method provided by the embodiments of the present application may include Step 10 to Step 30.
[0053] Step 10: Obtain an image of the imaging system under the current imaging parameters, where the imaging parameters of the imaging system include focusing parameters and illumination parameters.
[0054] Step 20: Evaluate the quality of the image.
[0055] Step 30: If the image quality evaluation result indicates that the image quality does not meet the expected quality, adjust the imaging parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality.
[0056] The specific implementation manners of the above steps will be described in detail below.
[0057] According to the image quality adjustment method provided by the embodiments of the present application, by evaluating the imaging quality of the imaging system and determining whether to adjust the imaging parameters of the imaging system according to the quality evaluation result, when the image quality converges to the expected quality, the adjustment of the imaging parameters is ended, so as to realize the automatic adjustment of the imaging parameters of the imaging system, improve the consistency of the imaging quality, and thus contribute to improving the consistency of the measurement results.
[0058] As Figure 2 shown, taking the measurement of the tab die-cutting process as an example, die-cutting is an important step in the process of processing the electrode sheet in the battery cell. In the tab area, the die-cutting process removes the excess electrode sheet substrate, leaving only the tab as the current transmission path. To ensure the quality of the battery cell, certain requirements are imposed on the tab size, etc. Therefore, the tab size on the die-cut electrode sheet is detected offline to obtain its size.
[0059] In some application scenarios, for example, a 2.5D imaging measuring instrument is used to detect the tab size of a battery. Before measurement, the image quality adjustment method provided by the embodiments of the present application can be used to obtain a suitable image.
[0060] During measurement, for example, the width and height of the tab, as well as the height of the ceramic coating, can be obtained. Therefore, tab detection has the characteristics of a large brightness span and relatively high detection accuracy requirements. This requires appropriate brightness and accurate focusing during imaging, so that the brightness differences between the background, tab, ceramic coating, and electrode in the image are large, and the boundaries are sharp.
[0061] However, traditional 2.5D imaging measuring instruments cannot perform automatic adjustment of imaging quality, and the adjustment of imaging parameters completely depends on the operator's experience. When manually adjusting the imaging quality, it often requires multiple adjustments based on experience, consuming a large amount of manpower and time, and also resulting in inconsistent imaging quality of the 2.5D imaging measuring instrument, thus affecting the consistency of the measurement results of the tab size. If the equipment is updated, the cost is relatively high.
[0062] If the image quality adjustment method provided by the embodiments of the present application is used, it can realize automatic adjustment of the imaging parameters of the imaging system. During the adjustment process of the imaging parameters, it is no longer dependent on the operator's operation, and an image with appropriate brightness and accurate focusing can be quickly obtained. Moreover, since the image quality is not limited by the operator's experience, different operators can quickly obtain images with consistent quality. Correspondingly, the consistency of the detection results will also be improved.
[0063] Exemplarily, the image quality adjustment method provided by the embodiments of the present application can automatically control the native control software of the 2.5D imaging measuring instrument, reducing the risk of warranty invalidation caused by excessive intrusion, so it can have low invasiveness and high generalization.
[0064] It should be noted that although the above embodiments take the 2.5D imaging measuring instrument as an example, the imaging system in the imaging quality adjustment method provided by the embodiments of the present application may include but is not limited to the 2.5D imaging measuring instrument. For example, the imaging system may include more models of imaging measuring instruments or other types of imaging devices.
[0065] For the sake of easy understanding, the implementation process of each step will be illustrated by examples below.
[0066] In step 10, when the imaging parameters of the imaging system are controlled to be the current focusing parameter and the current illumination parameter, the imaging system is used to collect an image of the target object (such as the tab of the battery), and then the collected image is obtained. Then, in step 20, the quality of the obtained image is evaluated.
[0067] It can be understood that the focusing parameter and the illumination parameter are different parameters.
[0068] In some embodiments, step 20 includes:
[0069] Calculating a first evaluation index and a second evaluation index of the image respectively, where the first evaluation index is used to indicate the image quality corresponding to the focusing parameter, the second evaluation index is used to indicate the image quality corresponding to the illumination parameter, and the first evaluation index and the second evaluation index are different.
[0070] In this embodiment, after obtaining the image under the current imaging parameters, the image quality corresponding to the focusing parameter and the image quality corresponding to the illumination parameter are calculated respectively using different evaluation indexes. The different evaluation indexes can be understood as different evaluation angles.
[0071] Since the focusing parameter and the illumination parameter are different, if the same evaluation index is used to evaluate the image quality corresponding to the focusing parameter and the image quality corresponding to the illumination parameter, the influence of different parameters on the image quality cannot be correctly evaluated.
[0072] In the embodiments of the present application, different evaluation indexes are used to evaluate the image quality corresponding to different parameters respectively, which is more conducive to the correctness of the image quality evaluation result, and thus more conducive to improving the consistency of the final imaging quality.
[0073] Exemplarily, although the evaluation indexes in this step are different, the quality evaluation is performed on the same image.
[0074] In some embodiments, the first evaluation index includes the ratio of the gray gradient value of the image to the gray standard deviation of the image, and this ratio is positively correlated with the image quality corresponding to the focusing parameter.
[0075] That is to say, the larger the ratio of the gray gradient value of the image to the gray standard deviation of the image, the better the image quality corresponding to the focusing parameter; the smaller the ratio of the gray gradient value of the image to the gray standard deviation of the image, the worse the image quality corresponding to the focusing parameter.
[0076] The larger the ratio of the gray gradient value of the image to the gray standard deviation of the image, the better the focusing position and the corresponding image quality; the smaller the ratio of the gray gradient value of the image to the gray standard deviation of the image, the worse the focusing position and the corresponding image quality.
[0077] Exemplarily, the gray gradient value and the gray standard deviation of the image can be calculated according to the gray values of all pixel points in the image. The gray standard deviation of the image can include the gray standard deviation of all pixel points in the image.
[0078] In the case where the first evaluation index includes the ratio of the gray gradient value of the image to the gray standard deviation of the image, there is a single peak in the change process of the first evaluation index with respect to the focusing parameter, and this peak can be used as the expected value, so that the expected quality is the best quality. For ease of understanding, please refer toFigure 3 , Figure 3 The curve shown in Figure 3 is the correspondence between the first evaluation index and the focusing parameter. Here, the horizontal axis represents the focusing parameter, and the vertical axis represents the first evaluation index. For example, during the process of the focusing parameter gradually increasing, the first evaluation index first increases and then decreases. When the first evaluation index reaches the maximum value, the image quality corresponding to the focusing parameter reaches the expected quality.
[0079] In addition, the first evaluation index includes the standard deviation of the gray level of the image. Therefore, the first evaluation index takes into account the gray level range of the image, which is equivalent to standardizing the first evaluation index. For example, the focusing of the image is less affected by factors such as illumination and exposure time that cause changes in the image brightness. In this way, during the process of adjusting the image quality, the adjustment of the illumination brightness and the adjustment of the focusing parameter can be carried out simultaneously. On the other hand, during the focusing process, if external factors such as ambient light change, it will not affect the focusing process and cause focusing failure.
[0080] In the embodiments of the present application, the first evaluation index includes the ratio of the gray level gradient value of the image to the standard deviation of the gray level of the image. In this way, there is a single peak in the change process of the first evaluation index with respect to the focusing parameter, and the value of the focusing parameter corresponding to this single peak can be determined as the expected value of the focusing parameter, which is more conducive to improving the consistency of the imaging quality.
[0081] Exemplarily, the imaging system may include a probe and a probe position adjustment button. The probe can be controlled to move up or down through the probe position adjustment button to adjust the focusing parameter. Figure 3 In Figure 3 , the horizontal axis can represent the position of the probe position adjustment button. Different positions of the probe position adjustment button result in different focusing parameters. The expected value of the focusing parameter corresponds to the expected position of the probe position adjustment button. When the probe position adjustment button is in the expected position, the image quality corresponding to the focusing parameter can reach the expected quality.
[0082] In some embodiments, the second evaluation index may include the standard deviation of the gray level of the image, and the standard deviation of the gray level is positively correlated with the image quality corresponding to the illumination parameter.
[0083] That is to say, the larger the value of the standard deviation of the gray level of the image, the better the image quality corresponding to the illumination parameter; the smaller the value of the standard deviation of the gray level of the image, the worse the image quality corresponding to the illumination parameter.
[0084] The larger the value of the standard deviation of the gray level of the image, the better the illumination condition and the better the corresponding image quality; the smaller the value of the standard deviation of the gray level of the image, the worse the illumination condition and the better the corresponding image quality.
[0085] Exemplarily, the gray standard deviation of an image can be calculated based on the gray values of all pixel points in the image. Here, the gray standard deviation of the image can include the gray standard deviations of all pixel points in the image.
[0086] When the second evaluation index can include the gray standard deviation of the image, there can also be a single peak in the process of change of the illumination parameter for the second evaluation index, and this peak can be used as the expected value. For ease of understanding, please refer to Figure 4 , Figure 4 The curve shown in is the correspondence between the second evaluation index and the illumination parameter, where the horizontal axis represents the illumination parameter and the vertical axis represents the second evaluation index. For example, in the process of gradually increasing the illumination parameter, the second evaluation index first increases and then decreases. When the second evaluation index reaches the maximum value, the image quality corresponding to the illumination parameter reaches the expected quality.
[0087] In the embodiments of the present application, the second evaluation index includes the gray standard deviation of the image, so that there is a single peak in the process of change of the illumination parameter for the second evaluation index, and the value of the illumination parameter corresponding to this single peak can be determined as the expected value of the illumination parameter, which is more conducive to improving the consistency of the imaging quality.
[0088] Exemplarily, the imaging system can include an illumination device and an illumination adjustment button, and the brightness of the illumination device can be controlled through the illumination adjustment button, such as increasing the brightness or decreasing the brightness, to adjust the illumination parameter. Figure 4 In, the horizontal axis can represent the position of the illumination adjustment button. Different positions of the illumination adjustment button result in different illumination parameters. The expected value of the illumination parameter corresponds to the expected position of the illumination adjustment button. When the illumination adjustment button is in the expected position, the image quality corresponding to the illumination parameter can reach the expected quality.
[0089] In some embodiments, in step 30, if the image quality evaluation result is that the image quality does not reach the expected quality, it includes:
[0090] If the first evaluation index does not reach the first expected value and / or the second evaluation index does not reach the second expected value, then it is determined that the image quality evaluation result is that the image quality does not reach the expected quality.
[0091] As introduced above, in the process of change of the focusing parameter, there is a single peak in the first evaluation index, and this single peak is the first expected value. When the first evaluation index reaches the first expected value, the first evaluation index reaches the maximum value, and the image quality corresponding to the focusing parameter reaches the expected quality.
[0092] Similarly, in the process of change of the illumination parameter, there is also a single peak in the second evaluation index, and this single peak is the second expected value. When the second evaluation index reaches the second expected value, the second evaluation index reaches the maximum value, and the image quality corresponding to the illumination parameter reaches the expected quality.
[0093] In the embodiments of the present application, when at least one of the first evaluation index and the second evaluation index fails to reach its corresponding expected value, it is determined that the image quality evaluation result of the image is that the image quality does not reach the expected quality, so that the influence of the focusing parameter and the illumination parameter on the image quality can be taken into account.
[0094] In some embodiments, if the image quality evaluation result of the image is that the image quality does not reach the expected quality, the imaging parameters of the imaging system are adjusted, and the image of the imaging system under the current imaging parameters is retrieved until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality, including:
[0095] If the first evaluation index fails to reach the first expected value and the second evaluation index reaches the second expected value, the illumination parameter of the imaging system is kept unchanged, the focusing parameter of the imaging system is adjusted, and the image of the imaging system under the current imaging parameters is retrieved until the first evaluation index under the adjusted focusing parameter reaches the first expected value.
[0096] The first evaluation index and the second evaluation index can be independent of each other. When the first evaluation index fails to reach the first expected value while the second evaluation index reaches the second expected value, the image quality corresponding to the focusing parameter does not reach the expected quality, and the image quality corresponding to the illumination parameter reaches the expected quality. Therefore, if the focusing parameter fails to reach the expected value and the illumination parameter reaches the expected value, the illumination parameter can be kept unchanged and only the focusing parameter is adjusted.
[0097] It can be understood that each time the focusing parameter is adjusted, an image after the adjustment of the focusing parameter can be retrieved, and then the quality of the image after the adjustment of the focusing parameter is evaluated until the first evaluation index under the finally adjusted focusing parameter reaches the first expected value.
[0098] The determination method of the first evaluation index introduced in the above embodiments can be used to evaluate the quality of the image after each adjustment of the focusing parameter, which will not be elaborated here.
[0099] In the embodiments of the present application, keeping the illumination parameter that has reached the expected value unchanged and only adjusting the focusing parameter that has not reached the expected value helps to improve the efficiency.
[0100] In other embodiments, if the image quality evaluation result of the image is that the image quality does not reach the expected quality, the imaging parameters of the imaging system are adjusted, and the image of the imaging system under the current imaging parameters is retrieved until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality, including:
[0101] If the first evaluation index reaches the first expected value and the second evaluation index does not reach the second expected value, keep the focusing parameters of the imaging system unchanged, adjust the illumination parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the second evaluation index of the imaging system under the adjusted illumination parameters reaches the second expected value.
[0102] The first evaluation index and the second evaluation index can be independent of each other. When the first evaluation index has reached the expected value while the second evaluation index has not reached the expected value, the image quality corresponding to the illumination parameters has reached the expected quality, and the image quality corresponding to the illumination parameters has not reached the expected quality. Therefore, the focusing parameters have reached the expected value and the illumination parameters have not reached the expected value. The focusing parameters can be kept unchanged and only the illumination parameters are adjusted.
[0103] It can be understood that each time the illumination parameters are adjusted, an image after the adjustment of the illumination parameters can be obtained, and then the quality of the image after the adjustment of the illumination parameters is evaluated until the second evaluation index under the finally adjusted illumination parameters reaches the second expected value.
[0104] The method for determining the second evaluation index introduced in the above embodiments can be used to evaluate the quality of the image after each adjustment of the illumination parameters, which will not be elaborated here.
[0105] Similarly, in the embodiments of the present application, keeping the focusing parameters that have reached the expected value unchanged and only adjusting the illumination parameters that have not reached the expected value helps to improve efficiency.
[0106] It can be understood that in some other embodiments, if the image quality evaluation result is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality, including:
[0107] If the first evaluation index does not reach the first expected value and the second evaluation index does not reach the second expected value, adjust the focusing parameters and illumination parameters of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the first evaluation index of the imaging system under the adjusted focusing parameters reaches the first expected value and the second evaluation index of the imaging system under the adjusted illumination parameters reaches the second expected value.
[0108] In some embodiments, if the image quality evaluation result is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, including:
[0109] If the image quality evaluation result is that the image quality does not reach the expected quality, determine the adjustment direction of the imaging parameters of the imaging system according to the image quality evaluation result and the preset corresponding relationship. The preset relationship includes the corresponding relationships between multiple imaging parameters and multiple image qualities;
[0110] Adjust the imaging parameters of the imaging system according to the adjustment direction.
[0111] The imaging parameters of the imaging system include focusing parameters and illumination parameters. The preset corresponding relationships may include a preset first corresponding relationship and a preset second corresponding relationship. The preset first corresponding relationship may include the corresponding relationship between multiple focusing parameters and the image quality corresponding to the multiple focusing parameters. The preset second corresponding relationship may include the corresponding relationship between multiple illumination parameters and the image quality corresponding to the multiple illumination parameters.
[0112] For example, Figure 3 The curve shown is the corresponding relationship between the first evaluation index and the focusing parameter, and the first evaluation index is positively correlated with the image quality corresponding to the focusing parameter. Therefore, Figure 3 The curve shown can also be understood as the corresponding relationship between the image quality corresponding to the focusing parameter and the focusing parameter. The preset first corresponding relationship may include, for example, Figure 3 the curve shown.
[0113] As an example, as Figure 3 shown, when the focusing parameter is u1, the image quality corresponding to the focusing parameter reaches the maximum quality. If the focusing parameter is u11, the image quality corresponding to the focusing parameter u11 does not reach the expected quality, then the value of the focusing parameter can be adjusted in the direction closer to u1.
[0114] For example, the focusing parameter is the focusing parameter, and the imaging system may include a probe and a probe position adjustment button. The preset first corresponding relationship may further include the corresponding relationship between the focusing parameter and the adjustment direction of the probe position adjustment button. For example, when the focusing parameter changes from u11 in the direction closer to u1, the adjustment direction of the probe position adjustment button is to control the probe to move downward or upward.
[0115] For example, Figure 4 The curve shown is the corresponding relationship between the second evaluation index and the illumination parameter, and the second evaluation index is positively correlated with the image quality corresponding to the illumination parameter. Therefore, Figure 4 The curve shown can also be understood as the corresponding relationship between the image quality corresponding to the illumination parameter and the illumination parameter. The preset second corresponding relationship may include, for example, Figure 4 the curve shown.
[0116] As an example, as Figure 4 shown, when the illumination parameter is u2, the image quality corresponding to the illumination parameter reaches the maximum quality. If the illumination parameter is u21, the image quality corresponding to the illumination parameter u21 does not reach the expected quality, then the value of the illumination parameter can be adjusted in the direction closer to u2.
[0117] For example, the imaging system may include an illumination device and an illumination adjustment button. The preset second correspondence may further include the correspondence between the illumination parameters and the adjustment direction of the illumination adjustment button. For instance, when the illumination parameter changes from u21 towards the direction closer to u2, the adjustment direction of the illumination adjustment button is to control the illumination device to increase or decrease the brightness.
[0118] Exemplarily, a sample imaging system may be selected, and the imaging parameters of the sample imaging system may be adjusted multiple times to obtain the preset correspondence. It can be understood that there may be an error between the actual expected value of the imaging parameters of the imaging system and the expected difference of the imaging parameters in the preset correspondence.
[0119] In the embodiments of the present application, according to the preset correspondence, the adjustment direction of the imaging parameters of the imaging system is adjusted, which can more quickly adjust the imaging parameters to the expected value, thereby improving the efficiency.
[0120] It should be noted that the application scenarios described in the above embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0121] Based on the same inventive concept, the present application also provides an image quality adjustment device. Specifically, it will be described in detail in combination with Figure 5 for elaboration.
[0122] Figure 5 FIG. shows a schematic structural diagram of an image quality adjustment device provided by an embodiment of the present application. As Figure 5 shown, the image quality adjustment device 500 may include an image acquisition module 501, a quality evaluation module 502, and a parameter adjustment module 503.
[0123] The image acquisition module 501 is configured to acquire an image of the imaging system under the current imaging parameters, and the imaging parameters of the imaging system include a focusing parameter and an illumination parameter;
[0124] The quality evaluation module 502 is configured to evaluate the quality of the image;
[0125] The parameter adjustment module 503 is configured to, if the quality evaluation result of the image is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, and return to acquire the image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality.
[0126] According to the image quality adjustment device provided by the embodiments of the present application, by evaluating the imaging quality of the imaging system and determining whether to adjust the imaging parameters of the imaging system according to the quality evaluation result, when the image quality converges to the expected quality, the adjustment of the imaging parameters is ended, so as to realize the automatic adjustment of the imaging parameters of the imaging system, improve the consistency of the imaging quality, and thus be conducive to improving the consistency of the measurement results.
[0127] In some embodiments, the quality evaluation module 502 is configured to:
[0128] Calculate the first evaluation index and the second evaluation index of the image respectively. The first evaluation index is used to indicate the image quality corresponding to the focusing parameter, and the second evaluation index is used to indicate the image quality corresponding to the illumination parameter. The first evaluation index and the second evaluation index are different.
[0129] In the embodiments of the present application, different evaluation indexes are used to evaluate the image quality corresponding to different parameters respectively, which is more conducive to the correctness of the image quality evaluation result, and thus more conducive to improving the consistency of the final imaging quality.
[0130] In some embodiments, the first evaluation index includes the ratio of the gray gradient value of the image to the gray standard deviation of the image, and the ratio is positively correlated with the image quality corresponding to the focusing parameter.
[0131] In the embodiments of the present application, the first evaluation index includes the ratio of the gray gradient value of the image to the gray standard deviation of the image. In this way, there is a single peak in the change process of the focusing parameter for the first evaluation index, and the value of the focusing parameter corresponding to the single peak can be determined as the expected value of the focusing parameter, which is more conducive to improving the consistency of the imaging quality.
[0132] In some embodiments, the second evaluation index includes the gray standard deviation of the image, and the gray standard deviation is positively correlated with the image quality corresponding to the illumination parameter.
[0133] In the embodiments of the present application, the second evaluation index includes the gray standard deviation of the image. In this way, there is a single peak in the change process of the illumination parameter for the second evaluation index, and the value of the illumination parameter corresponding to the single peak can be determined as the expected value of the illumination parameter, which is more conducive to improving the consistency of the imaging quality.
[0134] In some embodiments, if the quality evaluation result of the image is that the image quality does not reach the expected quality, it includes:
[0135] If the first evaluation index does not reach the first expected value and / or the second evaluation index does not reach the second expected value, it is determined that the quality evaluation result of the image is that the image quality does not reach the expected quality.
[0136] In the embodiments of the present application, when at least one of the first evaluation index and the second evaluation index fails to reach its corresponding expected value, it is determined that the image quality evaluation result of the image is that the image quality does not reach the expected quality, so as to take into account the influence of the focusing parameter and the illumination parameter on the image quality.
[0137] In some embodiments, the parameter adjustment module 503 is configured to:
[0138] If the first evaluation index fails to reach the first optimal value and the second evaluation index reaches the second optimal value, keep the illumination parameter of the imaging system unchanged, adjust the focusing parameter of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the first evaluation index of the imaging system under the adjusted focusing parameter reaches the first optimal value.
[0139] In the embodiments of the present application, keeping the illumination parameter that has reached the expectation unchanged and only adjusting the focusing parameter that has not reached the expectation helps to improve the efficiency.
[0140] In some embodiments, the parameter adjustment module 503 is configured to:
[0141] If the first evaluation index reaches the first expected value and the second evaluation index fails to reach the second expected value, keep the focusing parameter of the imaging system unchanged, adjust the illumination parameter of the imaging system, and return to obtain the image of the imaging system under the current imaging parameters until the second evaluation index of the imaging system under the adjusted illumination parameter reaches the second optimal value.
[0142] In the embodiments of the present application, keeping the focusing parameter that has reached the expectation unchanged and only adjusting the illumination parameter that has not reached the expectation helps to improve the efficiency.
[0143] In some embodiments, the parameter adjustment module 503 is configured to:
[0144] If the image quality evaluation result of the image is that the image quality does not reach the expected quality, determine the adjustment direction of the imaging parameters of the imaging system according to the image quality evaluation result and the preset corresponding relationship, and the preset relationship includes the corresponding relationships between multiple imaging parameters and quality;
[0145] Adjust the imaging parameters of the imaging system according to the adjustment direction.
[0146] In the embodiments of the present application, according to the preset corresponding relationship, adjusting the adjustment direction of the imaging parameters of the imaging system can make the imaging parameters adjusted to the expectation faster, thereby improving the efficiency.
[0147] The image quality adjustment device in the embodiments of the present application may be a device, or a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an Ultra-mobile Personal Computer (UMPC), a netbook, or a Personal Digital Assistant (PDA), etc., and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), etc. The embodiments of the present application do not make specific limitations.
[0148] The image quality adjustment device provided in the embodiments of the present application can implement Figure 1 each process in the image quality adjustment method embodiments shown. To avoid repetition, details are not described herein again.
[0149] Based on the same inventive concept, the embodiments of the present application further provide an electronic device. Figure 6 The schematic diagram of the hardware structure of the electronic device provided in the embodiments of the present application is shown.
[0150] In the electronic device, a processor 1001 and a memory 1002 storing computer program instructions may be included.
[0151] Specifically, the above-mentioned processor 1001 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0152] The memory 1002 may include a mass memory for data or instructions. By way of example and not limitation, the memory 1002 may include a Hard Disk Drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 1002 may include a removable or non-removable (or fixed) medium. In a suitable case, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory.
[0153] In a specific embodiment, the memory 1002 includes a read-only memory (ROM). When appropriate, the ROM can be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these. Exemplarily, the memory may include non-volatile transient memory.
[0154] The processor 1001 reads and executes the computer program instructions stored in the memory 1002 to implement any one of the collision handling methods in the above embodiments.
[0155] In one example, the electronic device may further include a communication interface 1003 and a bus 1010. Among them, as Figure 6 shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected through the bus 1010 to complete communication with each other.
[0156] The communication interface 1003 is mainly used to implement communication between the various modules, devices, units, and / or devices in the embodiments of the present invention.
[0157] The bus 1010 includes hardware, software, or both, and couples the components of the electronic device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or a combination of two or more of these. When appropriate, the bus 1010 may include one or more buses. Although the embodiments of the present invention describe and illustrate specific buses, the present invention contemplates any suitable bus or interconnect.
[0158] Exemplarily, the electronic device 1000 can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc.
[0159] The electronic device can execute the image quality adjustment method in the embodiments of the present application, so as to achieve the combination Figure 1 and Figure 5The described image quality adjustment method and image quality adjustment device.
[0160] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the image quality adjustment method in the above embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here. Among them, the above computer-readable storage medium may include a read-only memory (ROM for short), a random access memory (RAM for short), a magnetic disk, an optical disk, etc., which are not limited herein.
[0161] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, the detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0162] The functional blocks shown in the above structure block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. "Computer-readable medium" can include any medium capable of storing or transmitting information. Examples of computer-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency links, etc. The code segment can be downloaded via a computer network such as the Internet or an intranet.
[0163] According to an embodiment of the present application, the computer-readable storage medium can be a non-transitory computer-readable storage medium.
[0164] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0165] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each block in the flowchart and / or block diagram, and the combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It should also be understood that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0166] In accordance with the embodiments of the present application as described above, these embodiments do not describe all the details in detail, nor do they limit the application to the specific embodiments described. Obviously, many modifications and variations can be made according to the above description. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can make good use of the present application and its modifications based on the present application. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. An image quality adjustment method, applied to a 2.5D imaging measuring instrument, characterized in that, Including: Obtain an image of the imaging system under current imaging parameters, where the imaging parameters of the imaging system include a focusing parameter and an illumination parameter; Evaluate the quality of the image; If the result of the image quality evaluation is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, and return to obtain an image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality.
2. The method according to claim 1, characterized in that, The evaluating the quality of the image includes: Calculate a first evaluation index and a second evaluation index of the image respectively. The first evaluation index is used to indicate the image quality corresponding to the focusing parameter, and the second evaluation index is used to indicate the image quality corresponding to the illumination parameter. The first evaluation index and the second evaluation index are different.
3. The method according to claim 2, characterized in that, The first evaluation index includes the ratio of the gray gradient value of the image to the gray standard deviation of the image, and the ratio is positively correlated with the image quality corresponding to the focusing parameter.
4. The method according to claim 2, characterized in that, The second evaluation index includes the gray standard deviation of the image, and the gray standard deviation is positively correlated with the image quality corresponding to the illumination parameter.
5. The method according to claim 2, characterized in that, The if the result of the image quality evaluation is that the image quality does not reach the expected quality includes: If the first evaluation index does not reach the first expected value and / or the second evaluation index does not reach the second expected value, determine that the result of the image quality evaluation is that the image quality does not reach the expected quality.
6. The method according to claim 5, characterized in that, If the result of the image quality evaluation is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, and return to obtain an image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the best quality, including: If the first evaluation index does not reach the first optimal value and the second evaluation index reaches the second optimal value, keep the illumination parameter of the imaging system unchanged, adjust the focusing parameter of the imaging system, and return to obtain an image of the imaging system under the current imaging parameters until the first evaluation index of the imaging system under the adjusted focusing parameter reaches the first optimal value.
7. The method according to claim 5, characterized in that, If the result of the image quality evaluation is that the image quality does not reach the expected quality, adjust the imaging parameters of the imaging system, and return to obtain an image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality, including: If the first evaluation index reaches the first expected value and the second evaluation index does not reach the second expected value, keep the focusing parameter of the imaging system unchanged, adjust the illumination parameter of the imaging system, and return to obtain an image of the imaging system under the current imaging parameters until the second evaluation index of the imaging system under the adjusted illumination parameter reaches the second optimal value.
8. The method according to any one of claims 1 to 7, characterized in that, If the result of the image quality evaluation is that the image quality does not reach the expected quality, adjusting the imaging parameters of the imaging system includes: If the quality evaluation result of the image indicates that the image quality does not meet the expected quality, determine the adjustment direction of the imaging parameters of the imaging system according to the quality evaluation result of the image and a preset corresponding relationship, where the preset relationship includes the corresponding relationships between multiple imaging parameters and quality; Adjust the imaging parameters of the imaging system according to the adjustment direction.
9. An image quality adjustment device, characterized in that, Comprising: An image acquisition module, configured to acquire an image of the imaging system under current imaging parameters, where the imaging parameters of the imaging system include a focusing parameter and an illumination parameter; A quality evaluation module, configured to evaluate the quality of the image; A parameter adjustment module, configured to, if the quality evaluation result of the image indicates that the image quality does not meet the expected quality, adjust the imaging parameters of the imaging system, and return to acquire an image of the imaging system under the current imaging parameters until the image quality of the imaging system under the adjusted imaging parameters reaches the expected quality.
10. An electronic device, characterized in that, Comprising: A processor and a memory storing computer program instructions, where when the processor executes the computer program instructions, the image quality adjustment method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the image quality adjustment method according to any one of claims 1 to 8 is implemented.