A method for camera exposure optimization and image quality assessment in structured light measurement
By using the camera response function to optimize exposure time and perform image quality assessment in structured light 3D measurement, the problem of the inability to quantitatively control camera exposure is solved, thus improving the accuracy and efficiency of measurement.
Patent Information
- Application Number
- CN202311183516.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-09-13
AI Technical Summary
In structured light 3D measurement, the camera exposure cannot be quantitatively controlled, resulting in inaccurate measurement results and making it impossible to quantitatively evaluate the image. Multiple repeated measurements are required to verify accuracy.
By acquiring grayscale images of the object under the same scene, lighting, and aperture, recording the exposure time, using the Debevec algorithm to solve the camera response function and its inverse function for pixel value correction, setting an ideal pixel mean threshold, interpolating to solve for the optimal exposure time, and performing background segmentation and image quality assessment.
This enables quantitative control of camera exposure, improving image quality and measurement accuracy, reducing redundant measurements, and ensuring the accuracy and stability of measurement results.
Smart Images

Figure CN117575981B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of structured light three-dimensional measurement technology, and particularly relates to a method for camera exposure optimization and image quality evaluation in structured light measurement. Background Technology
[0002] With the rapid development of computer and optical technologies, non-contact 3D measurement technology has demonstrated outstanding technical advantages and application value in fields such as intelligent manufacturing, aerospace, precision measurement, and quality inspection. Structured light 3D measurement technology occupies a very important position among non-contact measurement methods due to its high precision, low cost, and high speed.
[0003] CMOS image sensors (CIS), as the hardware for data acquisition, possess characteristics such as high integration, universal manufacturing processes, small size, low power consumption, and no halo effect, occupying a very important position in the field of non-contact measurement. Exposure is the process by which a camera's photosensitive element receives external light and maps it into an image. The exposure of an industrial camera is mainly determined by the aperture size, exposure time (shutter speed), and ISO sensitivity. In this embodiment of the invention, the camera's aperture and ISO sensitivity are fixed, and the exposure of the camera is controlled only by changing the exposure time.
[0004] Meanwhile, in structured light 3D measurement, the camera exposure usually needs to be adjusted by technicians based on experience, and it is impossible to accurately quantify and evaluate the image of the object being measured. As a result, when the camera captures the structured light pattern projected onto the object being measured, the object itself has insufficient dynamic range and high noise, resulting in incomplete acquisition of encoded information, which leads to a decrease in measurement accuracy.
[0005] The camera response function reflects the relationship between the input brightness and the image pixel values during the imaging process, and it is characterized by nonlinearity and monotonically increasing. The earliest attempt to solve this function dates back to 1997, when Debevec et al. proposed a method using least squares error estimation to calculate the camera response function. Li Qian et al. used the camera response function to estimate the grayscale values of highly reflective areas in measurements, thus solving the problem of overexposure in highly reflective areas of the measured object in 3D measurements. In recent years, many scholars have also studied the problem of camera exposure control in machine vision. Hou Xinglin et al. used information entropy as the optimization objective to search for suitable exposure times for all regions; Lu Keke et al. used image gradient information to control the camera exposure time to improve the positioning performance of visual inertial odometry.
[0006] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:
[0007] 1. In the acquisition process of structured light non-contact three-dimensional measurement technology, the camera exposure cannot be quantitatively controlled, and usually needs to be adjusted by technicians according to experience, and at the same time, it cannot be guaranteed that the adjusted camera exposure can be perfectly suitable for the measurement process, so that the measurement result is not accurate, and multiple repeated measurements are needed to verify the accuracy of the measurement, which reduces the accuracy of the measurement and also reduces the timeliness of the measurement.
[0008] 2. At present, the image under the determined camera exposure cannot be quantitatively evaluated, which leads to the result of directly using the collected image for three-dimensional measurement is not accurate, and multiple measurements are needed to approach the correct result, so a set of image quality evaluation method for quantifying the image quality in the structured light measurement acquisition process is needed. SUMMARY
[0009] In view of the problems existing in the prior art, the present application provides a camera exposure optimization and image quality evaluation method in structured light measurement.
[0010] The present application is implemented in a camera exposure optimization and image quality evaluation method in structured light measurement. First, the method collects a set of measured object gray images under the same scene, illumination, aperture and other factors, and records the corresponding exposure time, then uses Debevec algorithm to solve the camera response function and its inverse function to correct the pixel value. Then, by using the corresponding exposure time and the real pixel value for fitting, the ideal pixel mean threshold is set, so as to interpolate the optimal exposure time. Finally, the measured object gray image with the optimal exposure time is collected, and background segmentation and image quality evaluation are carried out. This method not only optimizes the exposure time and improves the image quality, but also evaluates the image quality and improves the measurement accuracy.
[0011] Further, the camera exposure optimization and image quality evaluation method in structured light measurement includes:
[0012] S1, input data: under the same scene, illumination, aperture and other factors, a set of measured object gray images is collected using the acquisition device , and the corresponding exposure time set is recorded ;
[0013] S2, solve the camera response curve: the OTSU background segmentation is carried out on the measured object gray image group collected in S1. The segmented gray image and the corresponding exposure time are used as input, and the Debevec algorithm is used to solve the camera response function for the measured object. The inverse function of the camera response function, i.e. the camera response inverse function, is used to correct the pixel value of the measured object gray image group, and the pixel value under the real scene is obtained;
[0014] S3, solving the optimal exposure time: using the camera response inverse function to correct the input measured object gray image set to obtain the real pixel value; using the corresponding exposure time and the real pixel value to fit to obtain the curve about the exposure time and the real pixel mean value, setting the ideal pixel mean value threshold G ideal , from the exposure time and the real pixel mean value curve, the optimal exposure time I result is solved by interpolation
[0015] S4, image acquisition: collecting the measured object gray image with the exposure time I result ;
[0016] S5, background segmentation: performing OTSU image segmentation on the collected image, removing the background part, saving the measured object pixel points for subsequent overall evaluation
[0017] S6, evaluating the image quality under the optimal exposure time: calculating the evaluation parameters p1, p2 for all pixel values of the measured object gray image to obtain the evaluation result parameter P, P>90% is qualified, wherein the evaluation parameters p1, p2 and the evaluation result parameter P are described in detail below.
[0018] Further, in S1, the process of camera image acquisition is that the light in the target scene enters the lens, the photosensitive element converts the received light signal into an electrical signal, and after processing, a digital image is obtained. The above variables are fixed, only by modifying the camera exposure time to change the camera exposure, a set of measured object gray images are collected.
[0019] Further, in S2, OTSU is used for image background segmentation to extract target object information. OTSU method is a global adaptive binary threshold image segmentation algorithm, which takes the maximum inter-class variance between background and target image as the threshold selection rule to calculate and classify target pixel points.
[0020] In S2, Debevec algorithm is used to solve the camera response function. This method solves the overdetermined equation by constructing a least squares cost function and using singular value decomposition to complete the solution of the camera response function.
[0021] Further, in S3, since the camera imaging process is nonlinear, the collected image is not real pixel value, and the camera response inverse function needs to be used to correct the image pixel value to obtain the pixel value in the real scene.
[0022] In the structured light three-dimensional measurement experiment, it is found that when the image pixel value is less than 30 and greater than 210, the measured object model reconstruction is incomplete, and the key size measurement result error is large. In order to collect the maximum dynamic range of the measured object, the mean value of the two is taken as the ideal pixel mean value, which is represented by G ideal .
[0023] The pixel mean value of each corrected image is calculated, the real pixel mean value corresponding to the exposure time is plotted, and the ideal pixel mean value threshold G ideal is set. result .
[0024] Further, in S4, the exposure time of the acquisition device is adjusted to I result , and under the condition that other scenes, illuminations, and apertures remain unchanged, the gray scale image of the measured object is collected.
[0025] Further, in S6, the image quality evaluation method needs to collect the image of the measured object before the structured light three-dimensional measurement, and the OTSU image segmentation is used to extract all the pixel points of the measured object. Since the overexposed and underexposed pixel points are not conducive to the capture of coding information, and in order to evaluate the quality of the collected measured object image, the overexposed and underexposed point ratio and the basic image quality evaluation parameters (range, etc.) are calculated to evaluate and verify, and after the evaluation parameters are normalized, the evaluation result in the range of [0, 1] is obtained.
[0026] Further, the evaluation result is mainly composed of the image overexposure and underexposure evaluation parameter p1 and the image quality evaluation parameter p2; wherein p1 is calculated by calculating the ratio of the number of overexposed and underexposed points to the number of pixel points of the measured object, to determine whether it has a good dynamic range, and the value range is [0, 1]; the smaller the ratio of overexposed and underexposed points, the more the pixel points of the measured object are in a good dynamic range, which is suitable for the collection of coding information and is conducive to the subsequent reconstruction and measurement of the target object.
[0027] Another object of the present application is to provide a structured light measurement camera exposure optimization and image quality evaluation system applying the structured light measurement camera exposure optimization and image quality evaluation method, the structured light measurement camera exposure optimization and image quality evaluation system comprising:
[0028] A data input module for inputting a series of measured object gray scale image groups under the same scene, illumination, and aperture , and corresponding exposure time set ;
[0029] A camera response curve solving module: all single-exposure collected images are subjected to background segmentation, and the Debevec algorithm is used to solve the camera response function and the camera response inverse function of the gray scale image and the corresponding exposure time input by the data input module, and the single-exposure camera response curve is fitted;
[0030] Optimal exposure time solving module: used for correcting input image pixels to obtain real pixel values by using camera response inverse function; exposure time and real pixel values are fitted to obtain a curve about exposure time and real pixel mean value, and an ideal pixel mean value threshold G is set ideal An optimal exposure time I is solved by interpolation from the exposure time and real pixel mean value curve result
[0031] Image acquisition module: used for acquiring an initial image group and an image of a measured object with an exposure time I result
[0032] Background segmentation module: used for performing image segmentation on the acquired image, removing the background part, saving the measured object pixel points for subsequent overall evaluation
[0033] Image quality evaluation module: used for evaluating image quality, calculating evaluation parameters p1 and p2 for all pixel values of the measured object, and obtaining an evaluation result parameter P, and P>90% is qualified.
[0034] Another object of the present application is to provide a computer device, which comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the camera exposure optimization and image quality evaluation method in the structured light measurement.
[0035] Another object of the present application is to provide a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the camera exposure optimization and image quality evaluation method in the structured light measurement.
[0036] Another object of the present application is to provide an information data processing terminal for realizing the camera exposure optimization and image quality evaluation system in the structured light measurement.
[0037] In combination with the above technical solutions and the technical problems solved, the technical solution to be protected by the present application has the following advantages and positive effects:
[0038] Firstly, the present application mainly aims at the problem that the exposure amount of the acquisition device in the structured light three-dimensional measurement cannot be quantitatively controlled, and proposes a method for solving the optimal exposure time based on the camera response function, and a quality evaluation method for verifying the quality of the acquired image.
[0039] Based on the camera response function to solve the optimal exposure time, first, the camera response function is solved for the pre-acquired image group, and the true pixel value of the image group is restored. In order to realize a larger dynamic range under single exposure, the ideal pixel mean value is set, and the optimal exposure time is solved by linear fitting of the corrected pixel value and the exposure time. According to the experimental verification, the optimal exposure time for the measured object can be accurately determined using this method, and the model completeness obtained by using this exposure time for structured light three-dimensional measurement is higher, and the measurement result is more accurate. Therefore, this method can be applied to the structured light three-dimensional measurement acquisition process, reduce the repeated measurement caused by exposure, and can stably output the measurement result.
[0040] In order to evaluate the image quality of the collected image, and verify the image quality under the optimal exposure time, the application provides an image quality evaluation method, which is used for quantitative evaluation of image quality, and comprehensively considers the problems of image exposure and dynamic range. After calculating the image pixel mean value, the standard deviation and the range are normalized to eliminate comparability, the evaluation index result of the image quality of the measured object in the structured light measurement is obtained. Mainly by calculating the overexposure and underexposure evaluation parameter p1, the image quality evaluation parameter p2, and the normalized image quality evaluation result P. This index can help the operator to find the image quality problem in advance, and reduce the repeated measurement.
[0041] In order to verify the effectiveness of the method, the application adopts binocular multi-frequency heterodyne method to reconstruct and measure the joint ball model of the brake pedal for vehicle. The experimental results show that when the images of the measured object are collected under different exposure times for model reconstruction, the number of matched points of the image collected by the optimal exposure time is obviously higher than that of other exposure times in phase information matching, and the key feature measurement result is accurate. The image quality under different exposure is evaluated, and the evaluation result P is positively correlated with the number of matched points of the phase information, that is, the higher the evaluation result P, the more the number of matched points of the phase information.
[0042] Secondly, the method proposed by the application studies the camera itself, summarizes the imaging process of the camera through the camera response function, corrects the non-linear process, completes the correction of the image in the real scene, fixes the scene, the aperture and the sensitivity, and only adjusts the exposure amount through the exposure time. The effect of quantitative control of the exposure amount is achieved, so that the camera exposure amount can be accurately controlled. Since the method used is the camera response function describing the imaging process of the camera itself, it has nothing to do with the target object, and any target object can be solved by the method to obtain a unique optimal exposure time for itself, so that the camera exposure amount can be quantitatively adjusted in the structured light acquisition process. According to the experimental verification, the model completeness of the structured light three-dimensional measurement using the solved exposure amount, that is, the optimal exposure time, is higher, the measurement result is more accurate, and the measurement result stability is higher.
[0043] In addition, the image quality evaluation method provided by the present application comprehensively considers the problems of the image in exposure and dynamic range for the elements concerned in structured light measurement, calculates the image pixel mean, standard deviation and range, normalizes and eliminates the comparability, and obtains the evaluation index result of the image quality of the measured object in structured light measurement. The index outputs the image quality in a numerical manner, which can help the operator to find the image quality problem in advance and reduce repeated measurement.
[0044] Experiments have verified that the above method is used for three-dimensional measurement of the joint ball of the vehicle brake pedal, the measurement result is relatively accurate, the maximum error is 0.02mm, and the image quality evaluation result index is high. Therefore, it is concluded that the optimal exposure time image acquisition and image quality evaluation method for evaluating the image quality of the measured object has certain advantages in structured light three-dimensional measurement.
[0045] Third, the expected income and commercial value of the technical scheme of the present application after transformation are: Nowadays, more and more complex and precise parts emerge, and the traditional contact measurement method cannot meet the measurement requirements nowadays, so the non-contact measurement technology based on optics emerges as the times require, and its role in the field of precision measurement is becoming more and more important. As a representative of structured light three-dimensional measurement technology, it occupies a very important position in the non-contact measurement method with the advantages of high precision, low cost, speed and the like. At present, there are many complete technologies on the market, which have completed the transformation from invention to achievement, and have realized the output of commercialized products. The representative brands are, for example: Xianlin three-dimensional, Keyence, Hexagon, Xintuo three-dimensional and the like. Among them, the products with higher market recognition are: EinScan HX Xianlin dual-blue-light handheld 3D scanner, Hexagon StereoScan neo R16.2 handheld three-dimensional 3D scanner and the like.
[0046] The basic principle of structured light three-dimensional measurement technology is to project the coded pattern onto the measured object under the target scene, the coded pattern is modulated by the height change of the object surface to obtain the deformed image, and then the camera is used to collect and send to the computer for processing. After hardware calibration and decoding, the object surface profile information is obtained. The present application mainly acts on the acquisition stage of three-dimensional measurement technology. This stage is a necessary and extremely important stage in structured light three-dimensional measurement, which directly affects the completeness of the final three-dimensional model reconstruction and the accuracy of the key size measurement of the target object.
[0047] Therefore, the following two schemes are used for achievement transformation:
[0048] One: In the self-developed structured light three-dimensional measurement system, the exposure of the camera in the collection stage is optimized using the application, and the image quality evaluation is carried out before model reconstruction and measurement, so as to improve the model integrity and the stability of the measurement result. At present, the self-developed structured light three-dimensional measurement algorithm is combined with the method of the application, and the model measurement accuracy can reach 0.02mm, so that the application has a good prospect in the transformation of achievements and commercial value.
[0049] Second: In the currently commercially available products, the method of the application is applied to improve the original basic measurement method, so that the measurement result and the model integrity are more stable on the basis of the effect of the product itself, and whether the number of measurement times of the technical personnel can be reduced to improve the work efficiency is verified.
[0050] Whether the technical solution of the application solves the technical problems that people have been eager to solve but have always failed to succeed:
[0051] The structured light three-dimensional measurement technology has been relatively mature, but there are still some difficulties in measuring some special scenes and target materials, for example: the color dynamic range of the target object is large, the smooth surface of the target object causes reflection, and the object reconstruction in the dynamic scene is a problem that the industry has been exploring.
[0052] The application proposes a new solution to the problem of large dynamic range of target objects in structured light three-dimensional measurement, that is, a method for solving the optimal exposure time based on the camera response function. The application uses the camera response function to correct the image collected by the camera to the image under the real scene, and then sets the ideal pixel mean in the structured light three-dimensional measurement, so that the camera can shoot the widest dynamic range and collect the target object information to the camera to the greatest extent, laying a good foundation for subsequent three-dimensional reconstruction and measurement.
[0053] The method used in the application is verified by experiments, which proves that the model integrity is high and the measurement result is accurate in the process of measuring the target object, and the examples are described in detail below.
[0054] Fourth, the following is the significant technical progress achieved in each step:
[0055] S1, input data: under the same scene, light, aperture factors, a set of measured object gray scale images are collected using the collection device, and the corresponding exposure time set is recorded. This step improves the accuracy and consistency of data collection, and provides accurate input data for the subsequent steps.
[0056] S2, solve the camera response curve: the Debevec algorithm is used to solve the camera response function and its inverse function, which improves the accuracy of pixel value correction and thus improves the image quality.
[0057] S3, solving the optimal exposure time: solving the optimal exposure time by interpolation, this step significantly improves the optimization efficiency and accuracy of the exposure time, thereby improving the quality of the image and the accuracy of the measurement.
[0058] S4, image acquisition: acquiring a grayscale image with an optimal exposure time, this step ensures that the acquired image has the highest quality, thereby improving the accuracy of the measurement.
[0059] S5, background segmentation: using OTSU algorithm for background segmentation, this step improves the efficiency of image processing and better highlights the measured object, providing more accurate data for subsequent image quality evaluation.
[0060] S6, evaluate the image quality under the optimal exposure time: calculate the evaluation parameters p1, p2, and get the evaluation result parameter P, this step provides a specific quantitative method to evaluate the image quality, making the image quality evaluation more accurate and objective. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0062] Figure 1 is the flow chart of the camera exposure optimization and image quality evaluation method provided by the embodiment of the present application in the structured light measurement;
[0063] Figure 2 is the structural schematic diagram of the camera exposure optimization and image quality evaluation system provided by the embodiment of the present application in the structured light measurement;
[0064] Figure 3 is the camera response function curve provided by the embodiment of the present application;
[0065] Figure 4 is the single exposure response curve of the camera provided by the embodiment of the present application;
[0066] Figure 5 is the relationship curve between the exposure amount and the corrected pixel mean value provided by the embodiment of the present application;
[0067] Figure 6 is the OTSU segmentation diagram provided by the embodiment of the present application Figure 1 ; wherein, (a) original image, (b) binary image after segmentation, (c) measured object after segmentation;
[0068] Figure 7 is the measured object image under the automatic exposure mode (gray value expectation: 50) provided by the embodiment of the present application;
[0069] Figure 8 is the measured object image histogram under the automatic exposure mode provided by the embodiment of the present application;
[0070] Figure 9 is the structured light encoding image collected in different modes provided by the embodiment of the present application; wherein, (a) the structured light image collected under the automatic exposure mode, (b) the structured light image collected under the optimal exposure amount;
[0071] Figure 10 is the wooden model image group with the exposure time of 0.05s~0.3s provided by the embodiment of the present application;
[0072] Figure 11 is the single-exposure camera response curve diagram of the wooden model provided by the embodiment of the present application;
[0073] Figure 12 is the pixel mean value and exposure amount relationship curve diagram of the wooden model after correction provided by the embodiment of the present application;
[0074] Figure 13 is the schematic diagram of using OTSU to segment the wooden model provided by the embodiment of the present application; Figure 2 ; wherein, (a) the measured object under the optimal exposure time, (b) the image after OTSU segmentation;
[0075] Figure 14 is the image histogram of the wooden model with the I result =0.1893s provided by the embodiment of the present application;
[0076] Figure 15 is the camera response curve diagram of the measured object as the joint ball of the vehicle brake pedal provided by the embodiment of the present application;
[0077] Figure 16 is the schematic diagram of using OTSU to segment the joint ball of the vehicle brake pedal provided by the embodiment of the present application; Figure 3 ; wherein, (a) the measured object under the optimal exposure time, (b) the image after OTSU segmentation;
[0078] Figure 17 is the image histogram of the joint ball with the I result =0.2217s provided by the embodiment of the present application;
[0079] Figure 18 is the schematic diagram of the binocular structured light measurement system provided by the embodiment of the present application;
[0080] Figure 19It is a vehicle brake pedal joint ball reconstruction model and result schematic diagram provided by the embodiment of the application; (a) vehicle brake pedal joint ball three-dimensional reconstruction model, (b) spherical surface fitting and fitting data;
[0081] Figure 20 It is an architecture diagram provided by the embodiment 1 of the application.
[0082] Figure 21 It is an architecture diagram provided by the embodiment 2 of the application. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical scheme and advantages of the application clearer, the application is further described in detail below in combination with embodiments.
[0084] In view of the problems in the prior art, the application provides a camera exposure optimization and image quality evaluation method in structured light measurement, and the application is described in detail below in combination with the drawings.
[0085] The technical scheme of the application provides a method for optimizing camera exposure and evaluating image quality in structured light measurement. Firstly, the method collects a group of measured object gray images under the same scene, illumination, aperture and other factors, and records the corresponding exposure time set, then uses Debevec algorithm to solve the camera response function and its inverse function to correct the pixel value. Next, the corresponding exposure time and the real pixel value are fitted, the ideal pixel mean threshold is set, and the optimal exposure time is solved by interpolation. Finally, the measured object gray image with the optimal exposure time is collected, and background segmentation and image quality evaluation are performed. This method not only optimizes the exposure time and improves the image quality, but also evaluates the image quality and improves the measurement accuracy.
[0086] As shown in Figure 1 The camera exposure optimization and image quality evaluation method in structured light measurement provided by the embodiment of the application includes:
[0087] S1, input data: under the same scene, illumination, aperture and other factors, a group of measured object gray images are collected using a collection device , and the corresponding exposure time set is recorded at the same time.
[0088] S2, solving the camera response curve: the OTSU background segmentation is performed on the measured object gray image group collected by S1. The segmented gray image and the corresponding exposure time are used as inputs to solve the camera response function by using the Debevec algorithm. The inverse function of the camera response function, i.e., the camera response inverse function, is used to correct the pixel values of the measured object gray image group to obtain the real scene pixel values;
[0089] S3, solving the optimal exposure time: the camera response inverse function is used to correct the input measured object gray image group to obtain real pixel values; the corresponding exposure time and the real pixel values are fitted to obtain a curve about the exposure time and the real pixel mean value, and an ideal pixel mean value threshold G ideal is set, and the optimal exposure time I result is solved by interpolation from the exposure time and real pixel mean value curve.
[0090] S4, image acquisition: the measured object gray image with the exposure time I result is collected.
[0091] S5, background segmentation: the OTSU image segmentation is performed on the collected image to remove the background part, and the measured object pixel points are saved for subsequent overall evaluation.
[0092] S6, evaluating the image quality under the optimal exposure time: the evaluation parameters p1 and p2 are calculated for all pixel values of the measured object gray image to obtain the evaluation result parameter P, and P>90% is qualified.
[0093] As shown in Figure 2 , the camera exposure optimization and image quality evaluation system in the structured light measurement provided by the embodiment of the application comprises:
[0094] A data input module is configured to input a series of measured object gray image groups and a corresponding exposure time set under the same scene, illumination and aperture. ;
[0095] A camera response curve solving module: the images collected by single exposure are subjected to background segmentation, the gray image and the corresponding exposure time input by the data input module are used to solve the camera response function and the camera response inverse function by using the Debevec algorithm, and the single-exposure camera response curve is fitted.
[0096] An optimal exposure time solving module: the camera response inverse function is used to correct the input image pixels to obtain real pixel values; the exposure time and the real pixel values are fitted to obtain a curve about the exposure time and the real pixel mean value, an ideal pixel mean value threshold G ideal is set, and the optimal exposure time I result ;
[0097] Image acquisition module: for acquiring initial image group and exposure time I result of the measured object image;
[0098] Background segmentation module: for image segmentation of the acquired picture, removing the background part, saving the measured object pixel points for subsequent overall evaluation;
[0099] Image quality evaluation module: for evaluating image quality, calculating evaluation parameters p1, p2 for all pixel values of the measured object, and obtaining evaluation result parameter P, P>90% is qualified.
[0100] In view of the problem that the camera exposure amount cannot be accurately determined in the structured light three-dimensional measurement, the embodiment of the application proposes a method for solving the optimal exposure time based on the camera response function. The method solves the nonlinear camera response function through the initial image group, corrects the measured object image pixel by using the camera response inverse function, linearly fits the relationship between the real pixel value and the exposure time in the initial image group, and finally solves the optimal exposure time. For different measured objects in the scene, this method can solve the optimal exposure time for structured light measurement, so that the reconstructed model is more complete and the feature measurement result is more accurate.
[0101] At the same time, the embodiment of the application proposes an image quality evaluation method for the measured object. The evaluation method pre-acquires the measured object before three-dimensional measurement, and uses OTSU image segmentation to obtain all pixel points of the measured object. By calculating the proportion of overexposure and underexposure points in the pixel points and other basic image quality evaluation parameters such as pixel mean value, the evaluation result is obtained by normalization processing. In order to verify the effectiveness of the evaluation method, the embodiment of the application uses a binocular multi-frequency heterodyne method to perform three-dimensional measurement on the measured object, and compares the number of matching points of the encoding information in the model reconstruction process of different image evaluation results. The more the matching points, the more the phase information contained in the acquired image, the more complete the reconstructed object, and the better the image quality in the acquisition process.
[0102] The camera exposure optimization and image quality evaluation method provided by the embodiment of the application in the structured light measurement has the following principles:
[0103] 1. Camera response curve
[0104] The process of camera acquiring an image is that the light in the target scene enters the lens, the photosensitive element converts the received light signal into an electrical signal, and after processing, a digital image is obtained. The response of light energy and pixel value energy in this imaging process is usually nonlinear, and the camera response function is used to describe this process. Figure 3In this embodiment of the invention, the Debevec algorithm is used to solve the response function curve of the Daheng CMOS industrial camera, model MER2-1220-32U3M / C. The horizontal axis represents the logarithmic exposure amount lnQ, where Q is the camera's exposure value; the vertical axis represents the pixel value, denoted by Z, with a value range of 0 to 255.
[0105] Generally, the exposure Q of the camera is linearly related to the product of the irradiance value E received by the lens and the shutter speed ∆t. Therefore, the scene irradiance obtained by the camera in a single exposure can be obtained as shown in expression (1):
[0106] (1)
[0107] In the formula: ∆t is the exposure time. Figure 4 The figure shows the camera's response curves between irradiance and image pixel values in the target scene during exposure times of 0.01s-0.8s. The horizontal axis represents the logarithm of the irradiance captured by the camera in the target scene, and the vertical axis represents the pixel values of the captured image.
[0108] Depend on Figure 4 It is known that the irradiance value of a scene is mapped to pixel values through the camera response curve. However, this mapping relationship is non-linear, meaning that the image pixel values are not equal to the true brightness information. To obtain the true brightness information, the image pixel values need to be corrected using the inverse function of the camera response function to obtain the brightness information of the real scene. This allows the brightness information of the real scene to be linearly mapped to the true pixel values, thus linearizing the camera response process.
[0109] Then, a linear relationship between the corrected image pixel mean and exposure time is obtained by linear fitting, such as... Figure 5 As shown. In the structured light 3D measurement experiment, it was found that when the image pixel value was less than 30 and greater than 210, the reconstruction of the object model was incomplete, and the measurement results of key dimensions had large errors. In order to obtain the maximum dynamic range of the object being measured, the average of the two values was taken as the ideal pixel average, and G was used. ideal This invention utilizes the ideal pixel mean G. ideal The optimal exposure time I is obtained by interpolation. result That is, when G ideal =120, solve for the optimal exposure time I. result .
[0110] 2. Image segmentation
[0111] In order to avoid the influence of background pixels on the calculation of the optimal exposure time, image segmentation technology is used to extract the target information, i.e. all pixels of the measured object. The image segmentation method is mainly based on threshold, edge, region, clustering, deep learning and other methods, and is mainly used for pre-processing of the image to obtain the target information. The embodiment of the present application uses Otsu method (OTSU) for image segmentation. The OTSU method is a global adaptive binary threshold image segmentation algorithm, which takes the maximum inter-class variance between the background and the target image as the threshold selection rule to calculate and classify the target pixels.
[0112] The OTSU method is used to segment the measured object in the target scene, as shown in Figure 6 All pixels of the measured object are solved and calculated, and the unique camera response curve for the measured object is fitted. The inverse function of the camera response function is solved to correct the measured pixel value, and the linear relationship between the corrected pixel mean value and the exposure time is fitted.
[0113] 3. Image quality evaluation method
[0114] In structured light three-dimensional measurement, appropriate exposure can make the camera correctly and clearly collect the coded structured light projected onto the measured object, which has a very important influence on subsequent model reconstruction and feature measurement. However, during the collection process, researchers cannot objectively evaluate the measured object image collected by the camera, so they need to find the results of complete model reconstruction and accurate measurement data in multiple measurement experiments. At the same time, in order to evaluate the measured object image collected by the optimal exposure time in the above, an image quality evaluation method is proposed. This evaluation method needs to collect the measured object image before structured light three-dimensional measurement, and uses OTSU image segmentation to extract all pixels of the measured object. Since overexposed and underexposed pixels are not conducive to the capture of coded information, and in order to evaluate the quality of the measured object image collected, the proportion of overexposed and underexposed pixels, basic image quality evaluation parameters (range, etc.) are calculated to evaluate and verify, and after normalization processing of the evaluation parameters, the evaluation result in the range of [0, 1] is obtained.
[0115] The evaluation results are mainly composed of the image overexposure and underexposure evaluation parameter p1 and the image quality evaluation parameter p2. Among them, p1 is determined by calculating the proportion of overexposure and underexposure points to the number of pixels of the measured object, and the value range is [0,1]. The smaller the proportion of overexposure and underexposure points, the more pixels of the measured object image are in a good dynamic range. This situation is suitable for the acquisition of encoded information and is beneficial for the subsequent reconstruction and measurement of the target object. According to experimental results, in structured light three-dimensional measurement, when the pixel value of the measured object is less than 30 or greater than 210, the quality of the reconstructed model of the measured object is poor and the feature measurement error is large. Therefore, in this embodiment of the invention, the underexposure pixel threshold is set to 30 and the overexposure pixel threshold is set to 210 to classify the pixels. Based on this premise, p1 is calculated as shown in (2):
[0116] (2)
[0117] In the formula: n is the total number of overexposed and underexposed points; N is the total number of pixels of the object being measured.
[0118] p2 calculates the range (r) and mean (r) of the pixels in the image of the object being measured. ), standard deviation ( The range can express the range of image pixel values, but its disadvantage is that it can be affected by extreme pixel values. The mean can express the brightness level of the entire image pixel values to make up for the defects brought by the range. The standard deviation is used to describe the fluctuation of the overall image pixel values. It can judge the fluctuation of the image pixel values under the current exposure relative to the pixel mean. The larger the fluctuation, the wider the dynamic range of the pixel values. When collecting coded structured light patterns, it is easier to distinguish coded structured light with different pixel values. In order to eliminate the comparability between the three basic image quality evaluation parameters, the three are normalized. The processed range, mean and standard deviation are represented by W1, W2 and W3, with a value range of [0,1]. The expression is shown in (3):
[0119] (3)
[0120] In the formula: T is the difference between the overexposure threshold and the underexposure threshold; ∆ max , ∆ min Δ represents the maximum and minimum standard deviations in the initial image group, respectively; Δ is the standard deviation under the ideal pixel mean, which can be obtained by curve fitting and interpolation of the pixel mean and standard deviation of the input image group. The obtained W1, W2, and W3 are normalized to obtain parameter p2, as shown in (4):
[0121] (4)
[0122] In the formula: ; ; A, B, C are weight parameters of evaluation indexes. Different weight parameters can be set for different reflectivity and different color saturation of the surface of the measured object, and generally can be set as 1. The expression (4) is simplified to the expression as shown in (5):
[0123] , (5)
[0124] The parameters p1 and p2 calculated above are defined as evaluation results, denoted as P, and the expression is as shown in (6):
[0125] , (6)
[0126] In the formula: p1 is an image overexposure and underexposure evaluation parameter, and p2 is an image quality evaluation parameter. ; ; The expression (6) is simplified to the expression as shown in (7):
[0127] , (7)
[0128] The application embodiment of the present application provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the camera exposure optimization and image quality evaluation method in structured light measurement.
[0129] The application embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the camera exposure optimization and image quality evaluation method in structured light measurement.
[0130] The application embodiment of the present application provides an information data processing terminal, which is used to realize the camera exposure optimization and image quality evaluation system in structured light measurement.
[0131] In order to prove the creativity and technical value of the technical scheme of the present application, this part is the application embodiment of the technical scheme of the claim on the specific product or related technology.
[0132] 1. Technical field and technical background
[0133] With the rapid development of science and technology, the product appearance design in industrial production gradually tends to be personalized and artistic, and the processing and manufacturing cycle is greatly shortened, so the requirements for product processing and measuring accuracy are more stringent, and the traditional design and measurement method cannot meet the needs of today, and professionals are constantly seeking a more rapid and accurate modeling and detection method. The structured light three-dimensional scanner has the advantages of simple operation, fast measurement speed and high precision through the structured light grating technology, and gradually becomes a mainstream technology for data acquisition.
[0134] The structured light three-dimensional measurement system mainly consists of five parts: image acquisition, camera calibration, feature extraction, stereo matching, and three-dimensional point cloud calculation and processing system. The principle of structured light scanning measurement technology is as follows: the light source projects the grating fringe onto the measured object through the projection system, and the measured object modulates the measurement fringe to form a measurement fringe image, which is collected by the camera, decoded and phase calculated, and finally the three-dimensional data of the measurement surface is obtained by using the epipolar constraint criterion and stereo vision technology.
[0135] The structured light three-dimensional scanner acquires three-dimensional point cloud data of the object surface by scanning the object, has the characteristics of full-automatic splicing, large scanning range, fast speed and high precision, and is widely used in various fields. In the field of automobile manufacturing, traditional automobile detection mainly relies on three-coordinate measuring machines, which has the disadvantages of slow speed and complex operation. The structured light three-dimensional scanning technology can accurately obtain the surface characteristics of existing parts, especially the curved surface characteristics, realize the research and modification design of complex structures, and quickly improve the production and manufacturing efficiency. In the field of mold manufacturing, there is an increasing demand for industrial product modification and innovation, and the structured light three-dimensional scanning technology can obtain three-dimensional data of almost all parts and hole positions, improve the efficiency of high-quality data acquisition of products, realize three-dimensional reconstruction, and use the reconstructed three-dimensional model for innovative design and mold design, reduce the redesign time, and avoid resource waste in mold manufacturing. In the field of cultural relic protection, the structured light three-dimensional scanning technology can scan the archaeological site and environment, and plays an important role in cultural relic replication, cultural relic restoration, cultural relic virtual display, and large cultural relic surveying and monitoring, and provides more comprehensive digital three-dimensional data for future research. 2. Specific embodiments
[0137] Embodiment 1: This embodiment is a structured light monocular measurement system, and the main equipment includes: one structured light projection device, one camera, one computer, and one object to be detected.
[0138] This embodiment needs to calibrate the entire system before measurement, calculate the internal parameter matrix between the camera and the structured light projection device, the distortion coefficient, and the external parameter matrix of the relative position between the two, and the actual coordinates of each point obtained by subsequent structured light measurement depend on the results of this system calibration.
[0139] The specific measurement method of this embodiment is to project a pattern with certain coding information onto the object to be detected by a structured light projection device. Due to the unevenness of the surface of the object to be detected, the coding pattern will change, which is called modulation by the surface height information of the object. Then, the modulated coding pattern is collected by a camera, and the correspondence between the structured light image points and the projected pattern points is obtained by decoding the image by a computer. Then, the three-dimensional point cloud data of the object surface is calculated based on the triangulation principle, so as to realize the three-dimensional reconstruction and measurement of the coding of the object to be detected.
[0140] Embodiment Example Figure 20 :
[0141] This embodiment is suitable for the case that the scene is simple, the surface texture of the object to be detected is clear, and the lighting condition is stable. The advantages of this embodiment are that the hardware devices are less and the cost is lower. The disadvantage of this embodiment is that only a single camera is used to collect information, and only the scale information in one direction is obtained. The projection device is used as an inverse camera, which reduces the measurement accuracy. Therefore, this embodiment is suitable for some lightweight measurement applications, such as face recognition and gesture recognition.
[0142] Embodiment 2: This embodiment is a structured light binocular measurement system, which mainly includes one structured light projection device, two cameras, one computer and one object to be detected.
[0143] This embodiment uses two cameras and one structured light projection device to measure. The cameras are placed on both sides of the projection device to form a binocular structured light measurement system. Before measurement, the system needs to be calibrated to calibrate the intrinsic parameters and distortion parameters of the two cameras and the relative positions of the two cameras. Based on the above information, the distance between the feature points can be calculated by the subsequent binocular structured light measurement system.
[0144] The specific measurement method of this embodiment is to project a pattern with certain phase difference onto the surface of the object to be detected by a computer. The grating fringe is deformed due to the modulation of the height information of the object surface. This deformed fringe can be explained as a spatial carrier signal whose phase and amplitude are both modulated. The phase variation containing height information can be obtained by phase unwrapping of the deformed fringe collected by the camera. Finally, the height information is calculated according to the triangulation method, and the topography of the object to be detected in space can be restored according to the parameters obtained by the above calibration. This method is called phase profilometry. Unlike the traditional optical triangulation method, this method does not directly find and judge the image points after the height of the object changes, but indirectly realizes it through phase measurement. Due to the participation of phase information, this method has lower requirements for the surface texture of the object to be detected. The present application optimizes and improves this measurement system and method. Experimental verification shows that the optimized method performs well in model reconstruction and key dimension measurement.
[0145] Embodiment example Figure 21 :
[0146] This embodiment can use the parallax information of the left and right cameras to improve the measurement accuracy, and is suitable for measuring complex scenes, unclear surface textures of the measured object, and large changes in lighting conditions. The disadvantage is that the device is complex and the cost is slightly higher, which is suitable for some high-precision measurement applications, such as industrial detection, robot vision, etc.
[0147] The embodiments of the present application have achieved some positive effects during research and development or use, and indeed have great advantages compared with the prior art. The following content is described in combination with the data and graphs of the test process.
[0148] 1. Experimental environment and related parameters
[0149] The imaging device used in the experiment of the present application is a large constant industrial camera of model MER2-1220-32U3MC, an Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz 3.00GHz CPU, a desktop computer with 16GB RAM, and a software platform of Matlab R2021b. The image accuracy captured in the experiment is 8 bits / channel, the image is a single-channel grayscale image, the pixel value is 0~255, and the camera exposure time range is 0.03s~1s.
[0150] First, use the Galaxy Viewer of the Daheng camera control software to collect in automatic exposure mode, the gray value is 50, and the collected image is as shown in Figure 7 The measured object image gray histogram after background segmentation is as shown in Figure 8 As shown in Figure 7 When the gray value is only set to 50, there are still overexposed points on the surface of the measured object. As shown in Figure 8 The overall pixel value is high. Using this automatic exposure mode to collect the sinusoidal stripe structure light on the measured object, the effect is as shown in Figure 9 (a). It can be found in the figure that the overexposure of the image causes part of the sinusoidal stripe coding information to be unable to be correctly collected, which reduces the integrity of the model and the accuracy of the feature measurement in the measurement process. The effect of collecting using the optimal exposure time proposed in the present application is as shown in Figure 9 (b), the exposure amount is appropriate, and the coding information is complete. Therefore, in the three-dimensional measurement process, if the coding information needs to be accurately collected, a more accurate exposure amount needs to be set for the camera to collect all the coding information.
[0151] 2. Data acquisition and result analysis
[0152] The present application uses a wooden teaching model and a joint ball of a vehicle brake pedal as a measured object to verify the experiment. First, the corresponding optimal exposure time is solved, and the optimal exposure time is used to collect the measured object, and then the image quality evaluation method is used to evaluate the measured object image under the optimal exposure time. In order to verify the feasibility and advantage of the optimal exposure time and the image quality evaluation method in the structured light three-dimensional measurement, the present application uses a binocular multi-frequency heterodyne method to perform three-dimensional reconstruction and measurement on the measured object. The number of phase matching points and the measurement results of the key size of the part under different exposure times and evaluation parameters are compared.
[0153] 1) Image acquisition and evaluation analysis
[0154] The present application first uses a wooden teaching model as a measured object to perform single exposure collection. The exposure time of the first image is 0.05s, and then the exposure time of the image is increased by a step of 0.01s, and the exposure time of the last image is 0.3s. The collected image group is shown in Figure 10 , a total of 26 images. The camera response curve obtained by solving the image group is shown in Figure 11 , the corresponding camera response inverse function is solved, and the pixel value of the image group is corrected, and then the corrected pixel mean value is obtained. Through linear fitting with the exposure time, the linear relationship between the exposure time and the corrected pixel mean value is obtained, as shown in Figure 12 , the ideal mean value is set as G ideal =120, the optimal exposure time is solved as I result =0.1893s.
[0155] The model is collected using the exposure time I result =0.1893s, and the measured object image is shown in Figure 13 (a), and the OTSU image segmentation is shown in Figure 13 (b).
[0156] The gray value histogram statistics of the image are shown in Figure 14 , and it can be seen from the figure that there are no a large number of overexposed or underexposed points in the measured object pixel points. The overexposed and underexposed points are classified, and the classification results are shown in Table 1. The underexposed threshold and the overexposed threshold are described above, which are 30 and 210 respectively. According to the statistical classification, the number of underexposed points is 6022, and the number of overexposed points is 802, accounting for 1.42% of the total number of pixel points, p1=98.58%.
[0157] Let T=210-30=180, G ideal =120, the standard deviation of the image group is solved, ∆ max =34.4952, ∆ min =7.3878, and G idealThe interpolation solution obtains Δ = 19.7532. The image quality of the optimal exposure image is evaluated, wherein the extreme difference value is 180, W1 = 1 indicates that the pixel value dynamic range of the image collected at the optimal exposure time is wide, reaches the pixel value requirement in three-dimensional measurement; the pixel mean value is 133.6037, W2 is 0.9154, which indicates that the average range of the image brightness value of the measured object at the optimal exposure time is close to the ideal pixel mean value; the standard deviation Δ of the ideal pixel mean value is 19.7532, and W3 = 0.9914 indicates that the image collected using the optimal exposure time is close to the pixel value uniformity in the ideal case, and more range of coding information can be clearly collected when the coding structured light pattern is collected.
[0158] According to the above analysis, it can be determined that the image of the wooden model collected using the optimal exposure time has a wide dynamic range, a uniform pixel value fluctuation and a pixel mean value close to the ideal pixel mean value, which achieves the purpose of finding a suitable exposure amount.
[0159] Meanwhile, p1 and W1, W2 and W3 are used to calculate the evaluation result P = 97.26%. According to the above analysis, the evaluation result P of the image collected using the suitable exposure amount is consistent with the image quality, so it can be considered that the image quality evaluation method proposed in the three-dimensional measurement of structured light can correctly reflect the actual quality of the measured object image.
[0160] Table 1 evaluation result of the wooden model image under the optimal exposure time
[0161]
[0162] According to the above process, the joint ball of the vehicle brake pedal is used as the measured object for single exposure collection, the exposure time of the first image is 0.05s, and the exposure time of the subsequent images is increased by a step of 0.02s, and the exposure time of the last image is 0.29s, the image group has 13 images, and other parameters are the same. The camera response function of the image group is solved as shown in Figure 15 , the ideal mean value is set to G ideal =120, and the optimal exposure time I result =0.2217s is obtained.
[0163] The model is collected using the exposure time I result =0.2217s, and the measured object image is obtained as shown in Figure 16 (a), and OTSU image segmentation is performed as shown in Figure 16 (b).
[0164] The pixel value of the measured object is statistically analyzed by a gray histogram as shown in Figure 17As shown in the figure, no large number of overexposed and underexposed points of the measured object pixel points can be seen. The overexposed and underexposed points are classified, and the classification results are shown in Table 2. According to statistics, the number of underexposed points is 0, the number of overexposed points is 3, about 0% of the total number of pixel points, and p1=100%.
[0165] The evaluation parameters T, and the like are consistent with the above, and Δ max =47.7143, Δ min =8.3485, Δ=38.141, and the actual calculation results are shown in Table 2. Among them, W1=0.8556 indicates that the image of the measured object collected at the optimal exposure time has a wide dynamic range; W2=0.8494 indicates that the average value of the measured object pixels at the optimal exposure time has a certain deviation from the ideal pixel average value G ideal =0.5, the analysis reason is that the measured object is a pedal joint ball and its support surface is relatively smooth, compared with the wooden model, the joint ball is more likely to produce overexposure points in the same exposure time range, so the pixel average value is larger, Figure 17 which can also be seen in Table 2. The standard deviation Δ of the ideal pixel average value is 36.5807, and W3=0.9604 indicates that the image collected using the optimal exposure is close to the uniformity of the pixel value under the ideal condition, and more dynamic range of coding information can be clearly collected when collecting the coded structured light pattern.
[0166] According to the above analysis and calculation, the image quality evaluation result P=94.42% is calculated. And the joint ball image collected at the optimal exposure time has a wide dynamic range, the pixel value fluctuates uniformly, and the expected effect is achieved.
[0167] Table 2 Evaluation results of joint ball image under optimal exposure time 2) Structured light three-dimensional measurement and result analysis
[0168] In order to verify the feasibility and advantages of the optimal exposure time and the evaluation method of the image quality of the measured object in the structured light three-dimensional measurement, the three-dimensional measurement of the brake pedal joint ball for vehicle is carried out. By comparing the matching point numbers under different exposure times and different evaluation result parameters in the three-dimensional measurement process, the key size is measured, which proves that it is feasible to use the optimal exposure time for collection and use in structured light three-dimensional measurement.
[0169] As shown in Fig. Figure 18 , the system includes two CMOS industrial digital cameras (MER2-1220-32U3M / C type of Daheng), with a resolution of 4024×3036, and a DLP projector (Otu code W318ST) with a resolution of 1280×800.
[0170] The present application uses a three-frequency heterodyne method to measure a three-dimensional object. The sine stripe periods are: T1=28, T2=26, and T3=24. The heterodyne formed stripe periods are: T 12 =364, T 23 =312, and T 123 =2184. The T 123 >1280 stripe periods can cover the entire projection range, satisfying the measurement conditions.
[0171] First, the system is calibrated using Zhang Zhengyou calibration method to obtain internal and external parameters, and the measured object is reconstructed based on a multi-frequency heterodyne method. The reconstruction model is shown in Figure 19 (a). The characteristic fitting of the joint ball surface is shown in Figure 19 (b), which contains the characteristic data of the fitted ball.
[0172] In order to verify the advantages of the optimal exposure time in three-dimensional measurement, different exposure times are used to measure the model. The number of matching points in the absolute phase information during the reconstruction process and the measurement results of the key features during the measurement process are compared under different exposure times. During the acquisition process, the exposure times are: I result =0.2217, I1=I result -0.05s, I2=I result -0.1s, I3=I result +0.05s, and I4=I result +0.1s. The number of matching points of the phase information and the joint ball surface fitting results in the structured light measurement are shown in Table 3.
[0173] Table 3 Measurement results under different exposure times
[0174] In three-dimensional reconstruction, the more matching points, the more complete the reconstructed model and the more accurate the key size measurement. At the same time, the images of the measured object acquired under different exposure times are evaluated for image quality, and the corresponding evaluation result index P is calculated. As shown in Table 3, the evaluation result index P of the image of the measured object acquired under the optimal exposure time I result =0.2217s is the highest, the number of matching encoded information points is much higher than that of other exposure times, and the integrity of the reconstructed model is higher, indicating that the optimal exposure time solved by the present application can accurately determine the exposure amount suitable for a specific model. Moreover, compared with other evaluation results, it can be found that the evaluation result index P and the number of matching points are positively correlated, so it can be considered that the image quality evaluation method proposed by the present application can effectively evaluate the images of the measured object.
[0175] In three-dimensional reconstruction, the number of matching points determines the completeness and accuracy of the reconstructed model, so the optimal exposure time with the most matching points has certain advantages in structured light three-dimensional measurement. In order to verify the advantages of using the optimal exposure time in structured light three-dimensional measurement, experiments use binocular multi-frequency heterodyne method and Hexagon non-contact commercial blue light photographic measuring instrument (precision: 0.02mm), Three-dimensional contact profile measuring instrument (precision: 8nm) to measure and compare the joint ball ball diameter of the brake pedal of the vehicle, among which the measurement results of the binocular structured light measurement system are based on the optimal exposure time, and the measurement results are shown in Table 4.
[0176] At the same time, in order to prove the advantages of the optimal exposure time in structured light three-dimensional measurement, the joint ball under different exposure times is reconstructed and measured, as shown in Table 3. By comparing Table 3 and Table 4, it can be found that the measurement result under the optimal exposure time I result =0.2217s is the most accurate, and the measurement error of the rest of the exposure time is different.
[0177] Table 4 Comparison of measurement results of different devices
[0178] All measurement results are the average value of the point cloud characteristics of the joint ball after three times of fitting. Since there is an error in the selection of the point cloud area in the fitting process, it will have a certain influence on the measurement results. According to the measurement results, the maximum error of the three measurement results is 0.0398mm, and the error of the structured light three-dimensional measurement and the other two measurement methods is about 0.02mm, so the measurement result is relatively accurate. Therefore, in structured light three-dimensional measurement, it is feasible to apply the optimal exposure time proposed in the application to reconstruction and measurement for different measured objects.
[0179] It should be noted that embodiments of the present application can be realized by hardware, software, or a combination of software and hardware. The hardware portion can be realized by a special logic; the software portion can be stored in a memory and executed by a proper instruction execution system, such as a microprocessor or a specially designed hardware. A person of ordinary skill in the art can understand that the above-mentioned apparatus and method can be realized by computer executable instructions and / or included in processor control codes, such as a carrier medium, such as a magnetic disk, CD or DVD-ROM, a programmable memory, such as a read-only memory (firmware), or a data carrier, such as an optical or electronic signal carrier. The apparatus of the present application and its modules can be realized by a hardware circuit, such as a very large scale integrated circuit or a gate array, a semiconductor, such as a logic chip, a transistor, or a programmable hardware device, such as a field programmable gate array, a programmable logic device, or the like, by software executed by various types of processors, or by a combination of the above-mentioned hardware circuit and software, such as firmware.
[0180] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any modification, equivalent replacement, and improvement within the technical range disclosed by the present application, and within the spirit and principle of the present application, should be covered within the protection scope of the present application.
Claims
1. A method for camera exposure optimization and image quality assessment in structured light measurement, characterized in that, Comprise: S1, input data: under the same scene, light, aperture factor, a set of measured object gray scale images are collected using the acquisition device , while recording the corresponding set of exposure time ; S2, solving the camera response curve: OTSU background segmentation is performed on the measured object gray image group collected by S1; the segmented gray image and the corresponding exposure time are used as input, and the Debevec algorithm is used to solve the camera response function for the measured object; the inverse function of the camera response function is solved, that is, the camera response inverse function, which is used for pixel value correction of the measured object gray image group, to obtain the pixel value in the real scene; S3, solving the optimal exposure time: the camera response inverse function is used to correct the input measured object gray image group to obtain the real pixel value; Fitting the corresponding exposure time and the real pixel value to obtain a curve about exposure time and real pixel mean value, setting ideal pixel mean value threshold G ideal , based on the exposure time and the real pixel mean value curve, solving the optimal exposure time I result corresponding to the ideal pixel mean value threshold G ideal by interpolation calculation; S4, image acquisition: acquire a gray scale image of the measured object with an exposure time of I result ; S5, background segmentation: OTSU image segmentation is performed on the collected picture, the background part is removed, and the measured object pixel points are saved for subsequent overall evaluation; S6, evaluate the image quality under the optimal exposure time: collect the measured object image before the structured light three-dimensional measurement, and use OTSU image segmentation to extract the measured object full pixel point; The image overexposure and underexposure evaluation parameter p1 and the image quality evaluation parameter p2 are calculated respectively, and the evaluation result parameter P is calculated by the formula The evaluation result parameter P is calculated, and P>90% is qualified. wherein, n is the total number of overexposed and underexposed points, and N is the total number of pixels of the measured object. , W1, W2, W3 are normalized range, mean and standard deviation, A, B, C are weight parameters of evaluation indexes.
2. The method of camera exposure optimization and image quality assessment in structured light measurement of claim 1, wherein, In S4, the process of camera image acquisition is that the light in the target scene enters the lens, the photosensitive element converts the received light signal into an electrical signal, and after processing, a digital image is obtained; The product of the exposure amount Q of the camera and the irradiance value E received by the lens and the shutter time At is in a linear relationship, so that the scene irradiance obtained by the camera under single exposure can be obtained, and the expression is: ; In the formula: At is the exposure time.
3. The method of camera exposure optimization and image quality assessment in structured light measurement of claim 1, wherein, In S2, OTSU method is used for image segmentation, and the maximum inter-class variance between the background and the target image is used as the threshold selection rule to calculate and classify the target pixel points; In S3, the measured object in the target scene is segmented using OTSU, and all pixel points of the measured object are solved and calculated to fit the unique camera response curve for the measured object. The measured pixel value is corrected by solving the inverse function of the camera response function, and the linear relationship between the corrected pixel mean value and the exposure time is fitted.
4. The method of camera exposure optimization and image quality assessment in structured light measurement of claim 1, wherein, The evaluation method of image quality in S6 includes: collecting the measured object image before the structured light three-dimensional measurement, and using OTSU image segmentation to extract the measured object full pixel point; by calculating the proportion of overexposed and underexposed points, the basic image quality evaluation parameters are evaluated and verified, and after normalization processing of the evaluation parameters, the evaluation result in the range of [0, 1] is obtained.
5. The method of camera exposure optimization and image quality assessment in structured light measurement of claim 4, wherein, The evaluation result is mainly composed of image overexposure and underexposure evaluation parameters p1 and image quality evaluation parameters p2; wherein, p1 is calculated by calculating the proportion of overexposed and underexposed points in the number of measured object pixel points, to judge whether it has a good dynamic range, the value range is [0, 1]; the smaller the proportion of overexposed and underexposed points, the more the measured object image pixel points are in good dynamic range, which is suitable for the collection of coding information, and is beneficial to the subsequent reconstruction and measurement of the target object.
6. A structured light measurement camera exposure optimization and image quality evaluation system using the structured light measurement camera exposure optimization and image quality evaluation method according to any one of claims 1 to 5, characterized in that, The camera exposure optimization and image quality evaluation system in structured light measurement comprises: A data input module is configured to input a series of measured object gray scale image groups under the same scene, light, and aperture , a corresponding set of exposure times Camera response curve solving module: all single exposure collected images are segmented, and the Debevec algorithm is used to solve the camera response function and the camera response inverse function for the gray image and the corresponding exposure time input by the data input module, and the single exposure camera response curve is fitted; The optimal exposure time solving module is configured to: correct input image pixels to obtain real pixel values by using a camera response inverse function; fit exposure time and real pixel values to obtain a curve about exposure time and real pixel mean values; set an ideal pixel mean value threshold G ideal ; and solve an optimal exposure time I result corresponding to the ideal pixel mean value threshold G ideal based on the curve about exposure time and real pixel mean values by interpolation calculation. result image acquisition module: for acquiring an initial image group and an image of the measured object with an exposure time of I result ; The background segmentation module is used for image segmentation of the collected picture, removing the background part, saving the pixel points of the measured object for subsequent overall evaluation. Image quality evaluation module: for evaluating image quality, collecting image of measured object before structured light three-dimensional measurement, using OTSU image segmentation to extract all pixel points of measured object; respectively calculating image overexposure and underexposure evaluation parameters p1 and image quality evaluation parameters p2, through formula Calculate evaluation result parameters P, P>90% is qualified; wherein, n is the total number of overexposed and underexposed points, and N is the total number of pixels of the measured object. , W1, W2, W3 are normalized range, mean and standard deviation, A, B, C are weight parameters of evaluation indexes. 7.A computer device, comprising a memory and a processor, the memory storing a computer program, and the computer program being executed by the processor to make the processor execute the steps of the camera exposure optimization and image quality evaluation method in the structured light measurement according to any one of claims 1-5. 8.A computer readable storage medium, storing a computer program, and the computer program being executed by a processor to make the processor execute the steps of the camera exposure optimization and image quality evaluation method in the structured light measurement according to any one of claims 1-5. 9.An information data processing terminal, used for implementing the camera exposure optimization and image quality evaluation system in the structured light measurement according to claim 6.
Citation Information
Patent Citations
Image capture device, image capture device control method, and program
CN103002290A
Imaging apparatus and imaging method
CN106254787A