WO2024011756A1 - Image acquisition parameter adjustment method and system, electronic device, and storage medium - Google Patents

Image acquisition parameter adjustment method and system, electronic device, and storage medium Download PDF

Info

Publication number
WO2024011756A1
WO2024011756A1 PCT/CN2022/121517 CN2022121517W WO2024011756A1 WO 2024011756 A1 WO2024011756 A1 WO 2024011756A1 CN 2022121517 W CN2022121517 W CN 2022121517W WO 2024011756 A1 WO2024011756 A1 WO 2024011756A1
Authority
WO
WIPO (PCT)
Prior art keywords
image acquisition
comprehensive test
image
adjustment
reference object
Prior art date
Application number
PCT/CN2022/121517
Other languages
French (fr)
Chinese (zh)
Inventor
马育锐
蒋念娟
沈小勇
吕江波
Original Assignee
深圳思谋信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳思谋信息科技有限公司 filed Critical 深圳思谋信息科技有限公司
Publication of WO2024011756A1 publication Critical patent/WO2024011756A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Definitions

  • the present application relates to the field of image technology, and in particular to an image acquisition parameter adjustment method and system, electronic equipment and computer-readable storage media.
  • the quality of image acquisition parameters determines the quality of the image.
  • the traditional method of adjusting image acquisition parameters is to adjust the corresponding parameters through special test cards corresponding to each image acquisition parameter, such as using grayscale test cards to adjust color saturation and using distortion test cards to adjust image distortion, etc.
  • this application provides a method for adjusting image acquisition parameters.
  • the method includes the following steps.
  • the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object is used for Adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter.
  • the image acquisition device is controlled to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart.
  • Corresponding image acquisition parameters are adjusted based on the second object image.
  • the location information includes coordinates of the first object image in the initial comprehensive test map.
  • the adjustment of the focal length parameter based on the position information includes the following steps.
  • a focal length parameter of the image acquisition device is adjusted so that the image acquisition device focuses on the first adjustment reference object.
  • adjusting the focal length parameter of the image acquisition device based on the coordinates includes the following steps.
  • the focal length parameters of the image acquisition device are gradually adjusted multiple times based on the coordinates, and images are collected on the comprehensive test card based on the focal length parameters after each adjustment to obtain multiple candidate images after multiple focal length adjustments.
  • the sharpness of the image corresponding to the first adjustment reference object in each of the candidate images is calculated respectively.
  • the focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures is determined as the focal length parameter after focusing on the first adjustment reference object.
  • the first adjustment reference object is a plurality of reference patterns with different shapes and sharpness greater than a sharpness threshold.
  • Calculating the sharpness of images corresponding to the first adjustment reference object in each of the candidate images includes the following steps.
  • For each candidate image calculate the edge gradient of each reference pattern in each candidate image.
  • the sharpness of the image corresponding to each of the reference patterns in the corresponding selected pictures is determined.
  • adjusting corresponding image acquisition parameters based on the second object image includes the following steps.
  • a correction matrix for the image acquisition parameters is determined.
  • the image acquisition parameters are adjusted.
  • the at least one second adjustment reference object includes a white balance adjustment color patch
  • the second object image includes a white balance color patch map in the target comprehensive test image.
  • Determining a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card includes the following steps.
  • a first color average of pixels within a central area of the white balance patch map is determined.
  • a white balance correction matrix for a white balance parameter is determined based on the difference between the first color average and the second color average.
  • the at least one second adjustment reference object includes a plurality of color correction color patches; the second object image includes a plurality of color correction color patch images in the target comprehensive test image.
  • Determining a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card includes the following steps.
  • Color values of the plurality of color correction color patch diagrams are determined respectively.
  • the color values of the multiple color correction color block diagrams are compared with the color values of the corresponding color correction color blocks in the comprehensive test card.
  • the electronic device identifies the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusts the focal length parameter based on the position information, including: identifying The position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart; based on the position information, determine whether the focal length parameter needs to be adjusted; if so, based on the position information, Adjust the focal length parameter to obtain the adjusted focus parameter; if not, the adjusted focus parameter is the same as the current focus parameter that does not need to be adjusted, that is, no adjustment is made to the current focus parameter, but the Adjustment processing of the next image acquisition parameter (that is, the image acquisition parameter corresponding to the second adjustment reference object).
  • the electronic device adjusts the corresponding image acquisition parameters based on the second object image, including: determining whether the corresponding image acquisition parameters need to be adjusted based on the second object image; if so , then the corresponding image acquisition parameters are adjusted based on the second object image to obtain the corresponding processed image acquisition parameters; if not, the corresponding image acquisition parameters that currently do not need to be processed remain unchanged. Change.
  • this application also provides an image acquisition parameter adjustment system, including an image acquisition device, a comprehensive test card and an image acquisition parameter adjustment device.
  • the image acquisition parameter adjustment device is connected to the image acquisition equipment, and the image acquisition equipment is connected to the comprehensive test card held.
  • the image acquisition parameter adjustment device includes an acquisition module, an identification module and an adjustment module.
  • the acquisition module is used to acquire the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first The adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter.
  • An identification module for identifying the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusting the focal length parameter based on the position information; controlling the image acquisition device based on the adjustment
  • the final focal length parameter is used to collect images of the comprehensive test card to obtain the target comprehensive test chart.
  • An adjustment module configured to identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; and adjust the corresponding image acquisition parameters based on the second object image.
  • the comprehensive test card includes a card body, and the first adjustment reference object and the at least one second adjustment reference object are provided on the surface of the card body.
  • the first adjustment reference object includes a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold; the second adjustment reference object includes white balance adjustment color blocks and color correction color blocks. of at least one.
  • the comprehensive test card also includes an identification code and a blank area; the identification code is used to identify the identity information of the comprehensive test card; the blank area is used to fill in target information, and the target information represents the need information filled in.
  • this application also provides an electronic device.
  • the electronic device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor executes the computer program, the steps of the above method are implemented.
  • this application also provides a computer-readable storage medium.
  • the computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above method are implemented.
  • the above-mentioned image acquisition parameter adjustment method and system, electronic equipment and storage medium obtain an initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one Each second adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter; identify where the first adjustment reference object is.
  • the position information of the corresponding first object image in the initial comprehensive test chart is used, and the focal length parameter is adjusted based on the position information; the image acquisition device is controlled to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive Test chart; identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; adjust the corresponding image acquisition parameters based on the second object image.
  • the image acquisition parameter adjustment system of this application includes comprehensive test cards for different adjustment reference objects. Based on this comprehensive test card, this application proposes an image acquisition parameter adjustment method, that is, through the first adjustment reference object, the focal length parameter of the image acquisition device is adjusted. Adjustment is made, and other image acquisition parameters except the focal length parameter are adjusted through the second adjustment reference object.
  • multiple image acquisition parameters are adjusted through a comprehensive test card to avoid frequent replacement of test cards in order to adjust different image acquisition parameters. This not only reduces the difficulty of adjusting image acquisition parameters, but also saves the time of manually adjusting image acquisition parameters and improves improve the efficiency of adjusting image acquisition parameters.
  • Figure 1 is an application environment diagram of the image acquisition parameter adjustment method in one embodiment.
  • Figure 2 is a schematic flowchart of an image acquisition parameter adjustment method in one embodiment.
  • Figure 3 is a schematic diagram of a comprehensive test card in one embodiment.
  • Figure 4 is a structural block diagram of an image acquisition parameter adjustment device in one embodiment.
  • Figure 5 is a structural block diagram of an identification module in an embodiment.
  • Figure 6 is an internal structure diagram of an electronic device in one embodiment.
  • the image acquisition parameter adjustment method provided by the embodiment of the present application can be applied in the application environment as shown in Figure 1.
  • the image acquisition device 101 collects images of the comprehensive test card 102.
  • the image acquisition device 101 sends the collected images to the electronic device 103.
  • the electronic device 103 analyzes and processes the images sent by the image acquisition device 101, and
  • the image acquisition device 101 is controlled to adjust image acquisition parameters.
  • the electronic device 103 obtains the initial comprehensive test chart obtained by image acquisition of the comprehensive test card 102 by the image acquisition device 101; the electronic device 103 identifies the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart. position information, and controls the image acquisition device 101 to adjust the focal length parameter based on the position information; the image acquisition device 101 performs image acquisition on the comprehensive test card based on the adjusted focal length parameter, and obtains the target comprehensive test chart; the electronic device 103 performs image acquisition on each third When adjusting the image acquisition parameters corresponding to the second adjustment reference object, identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; the image acquisition device 101 adjusts the corresponding image acquisition parameters based on the second object image. deal with.
  • the electronic device 103 can be independent from the outside of the image acquisition device 101 or integrated in the image acquisition device 101, which is not limited in this embodiment.
  • a method for adjusting image acquisition parameters is provided. This method is explained by taking the method applied to the electronic device 103 in FIG. 1 as an example, that is, the execution subject of the method is the electronic device 103 .
  • the image acquisition parameter adjustment method includes the following steps 201 to 205.
  • Step 201 Obtain the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object is used for The focal length parameter is adjusted; each second adjustment reference object is used to adjust the corresponding image acquisition parameter.
  • the image acquisition device is a device used to acquire images.
  • Image collection devices include but are not limited to mobile terminals with cameras, cameras, cameras, scanners, video capture cards, and other devices with image collection functions, etc.
  • the image acquisition parameters are parameters set by the image acquisition device to acquire images.
  • the image acquisition parameters include, but are not limited to, at least one of focal length parameters, resolution parameters, dynamic range parameters, distortion parameters, and the like.
  • the comprehensive test card is a test card used to adjust various image acquisition parameters.
  • the comprehensive test card includes multiple adjustment reference objects.
  • multiple image acquisition parameters can be adjusted by combining multiple adjustment objects in the test chart. It can be understood that the image obtained by collecting images of the comprehensive test card for the first time is the initial comprehensive test chart.
  • the adjustment reference object is an object that the image acquisition device refers to when adjusting image acquisition parameters.
  • the adjustment reference object appears as a pattern in the comprehensive test chart.
  • a variety of different patterns are included in the comprehensive test chart to adjust a variety of image acquisition parameters through a variety of different patterns.
  • the image acquisition parameters include dynamic range parameters.
  • the adjustment reference object is the grayscale pattern in the comprehensive test card. By analyzing the grayscale pattern on the initial comprehensive test chart collected, the current dynamic range parameters are determined. If the current dynamic range parameters do not meet the requirements, adjust the dynamic range parameters of the image acquisition device. It can be understood that different image acquisition parameters correspond to different adjustment reference objects.
  • the first adjustment reference object represents a corresponding reference object when adjusting the focal length parameter.
  • the first reference object includes at least one focus pattern, and the image acquisition device adjusts the focus parameter based on the focus pattern.
  • the second adjustment reference object is an object referenced when adjusting other image acquisition parameters except the focal length parameter.
  • the second adjustment reference object is related to the type of image acquisition parameter. For example, when adjusting distortion parameters, the second adjustment reference object is the grid lines on the comprehensive test card. When adjusting color parameters, the second adjustment reference object is each color block on the comprehensive test card.
  • the second adjustment reference object does not specifically refer to the adjustment reference object corresponding to a certain image acquisition parameter, but is just to distinguish it from the first adjustment reference object.
  • Other reference objects except the adjustment reference object corresponding to the focal length parameter All can be called the second adjustment reference object.
  • Step 202 Identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjust the focal length parameter based on the position information.
  • the first object image is an image of the first adjustment reference object presented in the initial comprehensive test chart.
  • the electronic device can locate the image corresponding to the comprehensive test card from the initial comprehensive test chart to obtain the test card image. Then, the position information of the first object image is identified from the test card image. The electronic device may also determine the position conversion relationship between the design drawing of the comprehensive test card and the initial comprehensive test chart, and directly determine the position information of the first object image corresponding to the first adjustment reference object from the initial comprehensive test chart. There is no restriction on this.
  • the electronic device can extract features of the design drawing of the comprehensive test chart and the test card image in the initial comprehensive test chart, and perform feature matching to obtain a homography transformation matrix.
  • the electronic device may determine the coordinates of the vertices of the comprehensive test card in the initial comprehensive test graph based on the coordinates of the vertices of the comprehensive test card in the design graph and the homography transformation matrix. Then, by first adjusting the relative position relationship of the reference object in the design drawing of the comprehensive test card, the first object image is determined from the test card image, so as to obtain the position information of the first object image in the initial comprehensive test chart.
  • the electronic device can extract features of the design drawing of the comprehensive test card and the test card image in the initial comprehensive test chart through a feature matching algorithm, and perform feature matching to obtain a homography transformation matrix.
  • the electronic device can analyze the initial comprehensive test chart to determine whether the focal length parameter adjustment process needs to be performed. If so, the focal length parameter adjustment process is performed. If not (that is, it is determined that the focal length parameter adjustment does not need to be performed), the focal length parameter adjustment process is not required. Instead of adjusting the parameters, the next image acquisition parameter (that is, the image acquisition parameter corresponding to the second adjustment reference object) is adjusted.
  • the electronic device identifies the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusts the focus parameter based on the position information, including: identifying The position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart; based on the position information, determine whether the focal length parameter needs to be adjusted; if so, based on the position information, Adjust the focal length parameter to obtain the adjusted focus parameter; if not, the adjusted focus parameter is the same as the current focus parameter that does not need to be adjusted, that is, no adjustment is made to the current focus parameter, but the Adjustment processing of the next image acquisition parameter (that is, the image acquisition parameter corresponding to the second adjustment reference object).
  • the electronic device adjusts the corresponding image acquisition parameters based on the second object image, including: determining whether the corresponding image acquisition parameters need to be adjusted based on the second object image; if so , then the corresponding image acquisition parameters are adjusted based on the second object image to obtain the corresponding processed image acquisition parameters; if not, the corresponding image acquisition parameters that currently do not need to be processed remain unchanged. Change.
  • the electronic device can determine whether the focus parameter reaches the sharpness threshold by calculating the sharpness of the first object image in the initial comprehensive test chart. If the sharpness does not reach the sharpness threshold, it is determined that the image acquisition device needs to adjust the focus parameter. adjustment processing. If the sharpness reaches the sharpness threshold, it is determined that the image acquisition device does not need to adjust the focal length parameter.
  • the sharpness threshold is the critical value that characterizes whether an image is clear or not.
  • the size of the sharpness threshold is related to the pixels and resolution of the image acquisition device. Different image acquisition devices have different sharpness thresholds.
  • Step 203 Control the image acquisition device to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart.
  • the target comprehensive test image is an image obtained by image acquisition of the comprehensive test card after the image acquisition equipment adjusts the focal length parameters. It can be understood that using the adjusted focal length parameter can meet the sharpness requirements of image acquisition, that is, the sharpness reaches the sharpness threshold. Therefore, the target comprehensive test chart is an image obtained by image acquisition of the comprehensive test card by the image acquisition device based on the adjusted focal length parameter. In other words, the clarity of the target comprehensive test chart has reached the sharpness threshold.
  • Step 204 Identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart.
  • the second object image is an image of the second adjustment reference object presented in the target comprehensive test chart.
  • the electronic device when it adjusts the image acquisition parameters corresponding to each second adjustment reference object, it first identifies the second object image corresponding to the second adjustment reference object in the target comprehensive test chart, and then uses each image acquisition parameter to The corresponding second object image is used to determine whether the image acquisition parameters meet the requirements. If the requirements are not met, the image acquisition parameters are adjusted based on the second object image. If the requirements are met, it is determined that the image acquisition device does not need to adjust the image acquisition parameters corresponding to the second object image.
  • Step 205 Adjust the corresponding image acquisition parameters based on the second object image.
  • the electronic device determines whether the image acquisition parameters meet the requirements through the second object image corresponding to each image acquisition parameter. If the requirements are not met, the image acquisition parameters corresponding to the second object image are adjusted. If the requirements are met, it is determined that there is no need to adjust the image acquisition parameters corresponding to the second object image of the image acquisition device. In some embodiments, the electronic device can determine the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card, and adjust the image acquisition parameters of the image acquisition device based on the difference.
  • the method of the present application is suitable for image acquisition parameters with corresponding second adjustment reference objects set in the comprehensive test card.
  • the image acquisition parameters of the corresponding second adjustment reference object are set in the comprehensive test card.
  • steps 204 to 205 can be performed.
  • the image acquisition parameters can be adjusted according to the preset adjustment rules. For example, the exposure time parameter can be adjusted to a preset time range.
  • an initial comprehensive test chart is obtained by acquiring an image acquisition device on a comprehensive test card; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; The first adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter; identify the corresponding first adjustment reference object in the comprehensive comprehensive test chart The position information of the first object image, and adjust the focal length parameter based on the position information; control the image acquisition device to perform image acquisition on the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart; identify the first 2. Adjust the second object image corresponding to the reference object in the target comprehensive test chart; adjust the corresponding image acquisition parameters based on the second object image.
  • Adjusting multiple image acquisition parameters through a comprehensive test card avoids frequent replacement of test cards in order to adjust different image acquisition parameters. It not only reduces the difficulty of adjusting image acquisition parameters, but also saves the time of manually adjusting image acquisition parameters and improves efficiency. Adjust image acquisition parameters for efficiency.
  • the location information includes coordinates of the first object image in the initial comprehensive test map.
  • the electronic device adjusting the focal length parameter based on the position information includes: adjusting the focal length parameter of the image acquisition device based on the coordinates, so that the image acquisition device focuses on the first adjustment reference object.
  • determining the coordinates of the first object image in the initial comprehensive test chart is to determine the coordinates of the first object image in the image coordinate system, and then based on the correspondence between the internal coordinate system of the image acquisition device and the image coordinate system relationship to determine the coordinates of the first adjustment reference object in the internal coordinate system.
  • adjusting the focal length parameter of the image acquisition device based on coordinates means that the image acquisition device moves the focus point to the coordinates of the first adjustment reference object in the internal coordinate system, that is to say, the first adjustment reference object is the focus subject, When the focus point is accurately aligned with the focus subject, an adjustment of the focal length parameter is completed.
  • the image coordinate system is a coordinate system with the center of the image plane as the coordinate origin, the X axis and the Y axis being parallel to the two vertical sides of the image plane respectively, and (x, y) representing its coordinate value.
  • the internal coordinate system takes the optical center of the image acquisition device as the coordinate origin.
  • the X-axis and Y-axis are parallel to the X-axis and Y-axis of the image coordinate system respectively.
  • the optical axis of the image acquisition device is the Z-axis.
  • Use (Xc, Yc ,Zc) represents its coordinate value.
  • adjusting the focal length parameter of the image acquisition device is by slowly moving the focus point of the image acquisition device so that the focus point is aligned with the first adjustment reference object.
  • the focal length parameter is adjusted based on the coordinates of the first object image in the initial comprehensive test chart, which is simple and efficient.
  • adjusting the focal length parameter of the image acquisition device based on the coordinates so that the image acquisition device focuses on the first adjustment reference object includes: the electronic device controls the image acquisition device to gradually adjust the focus of the image acquisition device multiple times based on the coordinates. parameters, and collect images of the comprehensive test card based on the focal length parameters after each adjustment, and obtain multiple candidate images after multiple focal length adjustments; the electronic device calculates the clarity of the image corresponding to the first adjustment reference object in each candidate image. degree; determining the focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures as the focal length parameter after focusing on the first adjustment reference object.
  • the candidate image is the image obtained by collecting the image of the comprehensive test card after the image acquisition device adjusts the focal length parameter each time. It can be understood that the number of candidate images is related to the number of adjustments to the focal length parameter.
  • the image acquisition device after each adjustment of the focal length parameter of the image acquisition device, the image acquisition device will re-acquire images of the comprehensive test card to obtain candidate images, and then calculate the first adjustment in the candidate images through the image sharpness evaluation function
  • the focal length parameter corresponding to the sharpness is determined to be the focal length parameter after focusing on the first adjusted reference object.
  • the focus point coordinates of the image acquisition device are adjusted multiple times, and the sharpness of the candidate image obtained each time is calculated until the sharpness of the candidate image is greater than the sharpness threshold.
  • the focal length parameter corresponding to the candidate image that meets the sharpness threshold is determined as the focal length parameter after focusing on the first adjustment reference object.
  • the electronic device calculates the sharpness of a limited number of candidate images, and selects the focal length parameter corresponding to the candidate image with the highest definition as the focal length parameter after focusing on the first adjustment reference object. It can be understood that the purpose of selecting a limited number of candidate images is to save adjustment time and avoid repeatedly adjusting the focal length parameter, which affects the adjustment of other image acquisition parameters.
  • the focal length parameter corresponding to the highest definition of the candidate image is determined as the focal length parameter after focusing on the first adjustment reference object, and the accuracy of the obtained focal length parameter is higher.
  • the first adjustment reference object is a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold; respectively calculating the sharpness of the image corresponding to the first adjustment reference object in each candidate image includes: For each candidate image, calculate the edge gradient of each reference pattern in each candidate image; based on the edge gradient, determine the clarity of the image corresponding to each reference pattern in the corresponding candidate image.
  • sharpness is an indicator that reflects the sharpness of image edges.
  • the sharpness of image edges is positively related to the size of the sharpness value.
  • the sharpness threshold is a critical value indicating that the sharpness of the reference pattern reaches the required sharpness requirement.
  • a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold are selected as the first adjustment reference objects.
  • the image acquisition device collects images of the comprehensive test card to obtain candidate images.
  • the edge gradient is the gradient value of the edge of the image, which is used to characterize the speed of the edge change of the image.
  • the electronic device calculates the edge gradient of each reference pattern in the candidate image by calling the image sharpness evaluation function.
  • the edge gradient is greater than the preset gradient value, it indicates that the edge change of each reference pattern is the most significant, that is to say, the candidate The image has met the clarity requirements.
  • the reference pattern is a pattern that the image acquisition device refers to when adjusting the focal length parameter. It can be understood that the purpose of adjusting the focal length parameter of the image acquisition device is to obtain a high-definition image. Each time the focal length parameter is adjusted, the sharpness of the candidate image needs to be calculated, and the sharpness is positively related to the edge gradient. In order to facilitate the calculation of the sharpness of the candidate image, a reference pattern with sharp edges (that is, the sharpness is greater than the sharpness threshold) is selected as the first adjustment reference object.
  • the sharpness of each candidate image is determined by calculating the edge gradient corresponding to each reference pattern in the candidate image, which is convenient and simple.
  • adjusting the corresponding image acquisition parameters based on the second object image includes: the electronic device determines the corresponding image acquisition parameter based on the difference between the second object image and the second adjustment reference object in the comprehensive test card. Correction matrix for image acquisition parameters; based on the correction matrix, the image acquisition parameters are adjusted.
  • the correction matrix is a matrix used to correct image acquisition parameters.
  • the correction matrix includes, but is not limited to, a white balance correction matrix for white balance parameters and a color correction matrix for color parameters.
  • whether there is a difference in the same image acquisition parameter corresponding to the second object image and the second adjustment reference object is compared.
  • the corresponding image acquisition parameters are adjusted based on the correction matrix.
  • there is no difference there is no need to adjust the corresponding image acquisition parameters.
  • the electronic device compares whether there is a difference in color values between the white balance color patch in the comprehensive test chart and the second object image.
  • the second object image is an image in which the white balance color patch appears in the target comprehensive test chart.
  • the white balance correction matrix is determined from the white balance color patch in the comprehensive test chart and the second object image.
  • there is no difference there is no need to adjust the white balance parameters.
  • the electronic device compares whether there is a difference in the average value of the color values of the multiple color correction color patches in the comprehensive test card and the second object image.
  • the second object image is the multiple color correction color patches in the target comprehensive test. The image presented in the figure.
  • the color correction matrix is determined from the plurality of color correction color patches in the comprehensive test card and the second object image. When there is no difference, there is no need to adjust the color parameters.
  • the image acquisition parameters are adjusted based on the correction matrix with high accuracy.
  • At least one second adjustment reference object includes a white balance adjustment color block; the second object image includes a white balance color block diagram in the target comprehensive test chart; and the electronic device is based on the second object image and the comprehensive test chart.
  • the second adjustment refers to the difference in the corresponding image acquisition parameters of the reference object.
  • Determining the correction matrix for the image acquisition parameters includes: determining the first color average value of the pixels in the center area of the white balance color block diagram; determining the white color in the comprehensive test card.
  • Balance adjusts the second color average value of the pixels in the central area of the color patch; determines a white balance correction matrix for the white balance parameter based on the difference between the first color average value and the second color average value.
  • the electronic device determines the difference in white balance parameters corresponding to the second object image and the second adjustment reference object, and when there is a difference, determines the white balance correction based on the first color average and the second color average. matrix.
  • the second object image in this embodiment is a white balance color patch map
  • the second adjustment reference object is a white balance adjustment color patch.
  • the electronic device calculates the average of the red, green, and blue channel values of each pixel in the central area of the white balance color patch map, that is, the first color average. Calculate the average value of the red, green, and blue channel values of each pixel in the central area of the white balance adjustment color block, that is, the second color average value. When there is a difference between the first color average value and the second color average value, an adjustment parameter between the first color average value and the second color average value is determined.
  • the average value of the red, green, and blue channel values of each pixel in the central area of the white balance color patch is divided by the average value of the red, green, and blue channel values of each pixel in the central area of the white balance adjustment color patch, that is,
  • the red channel value adjustment ratio is obtained by dividing the average red channel value of each pixel in the center area of the white balance color patch map by the average red channel value of each pixel in the center area of the white balance color patch map.
  • the same method can be used to obtain the green channel value adjustment ratio and the blue channel value adjustment ratio, and finally obtain the red, green, and blue channel value adjustment matrix, that is, the white balance correction matrix.
  • the white balance correction matrix is obtained through the first color average and the second color average, and the white balance parameters are adjusted through the white balance matrix, which is both efficient and accurate.
  • At least one second adjustment reference object includes a plurality of color correction color patches; the second object image includes a plurality of color correction color patch images in the target comprehensive test image; the electronic device is based on the second object image and
  • the second adjustment in the comprehensive test card refers to the difference in the corresponding image acquisition parameters of the reference object.
  • Determining the correction matrix for the image acquisition parameters includes: determining the color values of multiple color correction color patch diagrams respectively; combining the multiple color correction color patch diagrams. The color values are compared with the color values of the corresponding color correction color blocks in the comprehensive test card; a color correction matrix for color parameters is generated based on the difference comparison results.
  • the electronic device determines a difference between the color values in the color correction patch diagram and the color values in the color correction patch.
  • a color correction matrix is generated based on the color values of the color correction color patch diagram and the color values of the color correction color patch.
  • the generation of the color correction matrix is described by taking six color correction color patches as an example. It can be understood that the color correction color patch diagram is an image of the color correction color patches presented in the target comprehensive test chart, so the color patches in the color correction color patch diagram correspond to the color correction color patches one-to-one.
  • the electronic device calculates the red, green, and blue channel values of the six color correction color patches, and calculates the red, green, and blue channel values of the six color patches in the color correction color patch map. Compare the red, green, and blue channel values of the color blocks of the same color in the color correction color block diagram and the red, green, and blue channel values in the color correction color block in turn to obtain the difference in color values. If there is a difference in color, a color correction matrix is generated based on the red, green, and blue channel values of the color block of the same color in the color correction color block diagram, and the red, green, and blue channel values in the color correction color block.
  • a color correction matrix is generated based on the red, green, and blue channel values of each color correction color block in the comprehensive test card, and based on the red, green, and blue channel values of each color correction color block in the color correction color block diagram, that is, Efficient and accurate.
  • the present application also provides a comprehensive test card, which includes a card body; a first adjustment reference object and at least one second adjustment reference object are provided on the surface of the card body; the first adjustment reference object The object is the reference object used to adjust the focus parameters.
  • the first adjustment reference object includes a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold; the second adjustment reference object includes at least one of a white balance adjustment color patch and a color correction color patch. .
  • the comprehensive test card also includes an identification code and a blank area; the identification code is used to identify the identity information of the comprehensive test card; the blank area is used to fill in target information, and the target information represents the need information filled in.
  • FIG. 3 a schematic diagram of a comprehensive test card is provided.
  • test card The following is a detailed description of the comprehensive test card.
  • the comprehensive test card includes a white balance adjustment color block 301 (i.e., the second adjustment reference object), a reference pattern 302 (i.e., the first adjustment reference object), a color correction color block 303 (i.e., the second adjustment reference object), an identification code 304, and Blank area (not shown in the figure).
  • a white balance adjustment color block 301 i.e., the second adjustment reference object
  • a reference pattern 302 i.e., the first adjustment reference object
  • a color correction color block 303 i.e., the second adjustment reference object
  • Blank area not shown in the figure.
  • the white balance adjustment color block 301 is used to adjust the white balance parameters. It can be understood that, in order to facilitate white balance adjustment, the area of the white balance adjustment color patch 301 may be several times the area of the remaining reference patterns. The specific size of the white balance adjustment color block 301 is not limited.
  • the reference pattern 302 includes at least one pattern whose sharpness is greater than the sharpness threshold (i.e., the edge is sharp), and the reference pattern 302 is used to adjust the focal length parameter. It can be understood that there are many patterns whose sharpness is greater than the sharpness threshold, so the shape and number of the reference patterns can be selected according to requirements.
  • reference patterns 302 are not limited to those shown in FIG. 3 . This embodiment only illustrates the reference patterns and is not used to limit the present application.
  • the color correction color block 303 is used to adjust color parameters. It can be understood that, considering the difficulty of obtaining the color correction color block 303, a variety of colors with relatively simple manufacturing processes are selected from the standard color card as the color correction color block 303. The color and quantity of the color correction color block 303 can be selected according to needs. .
  • emerald green, deep red, orange, lake blue, lemon yellow and purple can be selected from the standard color card as the color correction color block 303 . It is also possible to select red, orange, titanium white, sky blue, and light green from the standard color card as the color correction color block 303 . You can also select purple, orange, light yellow, ultramarine, black, or purple from the standard color card as the color correction color block 303 .
  • color and quantity of the color correction color blocks can be selected according to requirements. This embodiment only illustrates the color correction color blocks and is not intended to limit the present application.
  • the identification code 304 is used to identify the identity information of the comprehensive test card.
  • Identity information includes but is not limited to the model and size of the comprehensive test card, etc.
  • the blank area is a blank area in the comprehensive test card, used for filling in target information, and the target information represents the information that needs to be filled in.
  • target information includes but is not limited to logos and barcodes.
  • the white balance adjustment color patch 301 i.e., the second adjustment reference object
  • the color correction color patch 303 i.e., the second adjustment reference object
  • the reference pattern 302 i.e., the first adjustment reference object
  • the order of arrangement of the reference object) and the identification code 304 is not fixed, and can be randomly combined and arranged.
  • the size of the comprehensive test card can be determined according to requirements, and is not limited in this embodiment.
  • a comprehensive test card that can adjust image acquisition parameters such as white balance parameters, color parameters, and focal length parameters. This avoids frequent replacement of test cards in order to adjust different image acquisition parameters, which not only reduces the cost of adjusting image acquisition parameters, saves the time of manually adjusting image acquisition parameters, and improves adjustment efficiency.
  • embodiments of the present application also provide an image acquisition parameter adjustment device for implementing the above-mentioned image acquisition parameter adjustment method.
  • the implementation solution provided by this device to solve the problem is similar to the implementation solution recorded in the above method. Therefore, the specific limitations in the one or more image acquisition parameter adjustment device embodiments provided below can be found in the image acquisition parameter adjustment above. The limitations of the method will not be repeated here.
  • an image acquisition parameter adjustment system includes an image acquisition device 101, a comprehensive test card 102, and an image acquisition parameter adjustment device.
  • the image acquisition parameter adjustment device is connected to the image acquisition device 101, and the image acquisition device 101 is connected to the comprehensive test card 102 held.
  • the image acquisition parameter adjustment device includes: an acquisition module 401, an identification module 402, and an adjustment module 403.
  • the acquisition module 401 is used to acquire the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object Used to adjust the focal length parameters; each second adjustment reference object is used to adjust the corresponding image acquisition parameters.
  • the identification module 402 is used to identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjust the focal length parameter based on the position information; control the image acquisition device to perform the comprehensive test based on the adjusted focal length parameter.
  • the card performs image acquisition and obtains the target comprehensive test chart.
  • the adjustment module 403 is used to identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; and adjust the corresponding image acquisition parameters based on the second object image.
  • the identification module 402 is used to adjust the focal length parameter of the image acquisition device based on the coordinates, so that the image acquisition device focuses on the first adjustment reference object.
  • a structural block diagram of the identification module 402 is provided, specifically including an adjustment unit 4021, a calculation unit 4022 and a determination unit 4023.
  • the adjustment unit 4021 is used to gradually adjust the focal length parameters of the image acquisition device multiple times based on coordinates, and perform image acquisition on the comprehensive test card based on the focal length parameters after each adjustment, to obtain multiple candidate images after multiple focal length adjustments.
  • the calculation unit 4022 is used to respectively calculate the sharpness of the image corresponding to the first adjustment reference object in each candidate image.
  • the determination unit 4023 is configured to determine the focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures as the focal length parameter after focusing on the first adjustment reference object.
  • the recognition module 402 is specifically configured to calculate, for each candidate image, the edge gradient of each reference pattern in each candidate image; based on the edge gradient, determine the edge gradient of each reference pattern in the corresponding candidate image. Clarity.
  • the adjustment module 403 is used to determine a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card; based on the correction matrix, Adjust image acquisition parameters.
  • the adjustment module 403 is specifically configured to determine the first color average of the pixels in the central area of the white balance color block diagram; determine the second color average of the pixels in the central area of the white balance adjustment color block in the comprehensive test card. value; determine a white balance correction matrix for the white balance parameter based on the difference between the first color average and the second color average.
  • the adjustment module 403 is further configured to determine the color values of multiple color correction color patch diagrams respectively; compare the color values of the multiple color correction color patch diagrams with the corresponding color correction color patch values in the comprehensive test card. Color values are compared for differences; a color correction matrix for color parameters is generated based on the difference comparison results.
  • Each module in the above image acquisition parameter adjustment device can be realized in whole or in part by software, hardware and combinations thereof.
  • Each of the above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
  • an electronic device is provided.
  • the electronic device may be a server, and its internal structure diagram may be as shown in FIG. 6 .
  • the electronic device includes a processor, memory and network interface connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities.
  • the memory of the electronic device includes non-volatile storage media and internal memory.
  • the non-volatile storage medium stores operating systems, computer programs and databases. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media.
  • the network interface of the electronic device is used to communicate with an external terminal through a network connection.
  • the computer program implements an image acquisition parameter adjustment method when executed by a processor.
  • FIG. 6 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the electronic equipment to which the solution of the present application is applied.
  • Specific electronic devices can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.
  • an electronic device including a memory and a processor.
  • a computer program is stored in the memory.
  • the processor executes the computer program, it implements the steps in the above method embodiments.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
  • the computer program can be stored in a non-volatile computer-readable storage.
  • the computer program when executed, may include the processes of the above method embodiments.
  • Any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory.
  • Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory (MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc.
  • Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc.
  • RAM Random Access Memory
  • RAM random access memory
  • RAM Random Access Memory
  • the databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database.
  • Non-relational databases may include blockchain-based distributed databases, etc., but are not limited thereto.
  • the processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to this.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

An image acquisition parameter adjustment method and system, an electronic device, and a storage medium. The method comprises: acquiring an initial comprehensive test chart obtained by an image acquisition device when performing image acquisition on a comprehensive test card; identifying position information of a first object image corresponding to a first adjustment reference object in the initial comprehensive test chart, and on the basis of the position information, adjusting a focal length parameter; controlling the image acquisition device to perform image acquisition on the comprehensive test card on the basis of the adjusted focal length parameter, obtaining a target comprehensive test chart; identifying a second object image corresponding to a second adjustment reference object in the target comprehensive test chart; and adjusting a corresponding image acquisition parameter on the basis of the second object image.

Description

图像采集参数调整方法及系统、电子设备和存储介质Image acquisition parameter adjustment method and system, electronic equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2022年7月13日提交中国专利局,申请号为202210819683.8,申请名称为“图像采集参数调整方法、综合测试卡、装置和电子设备”的中国专利申请的优先权,在此将其全文引入作为参考。This application requires the priority of the Chinese patent application submitted to the China Patent Office on July 13, 2022, with the application number 202210819683.8, and the application name is "Image acquisition parameter adjustment method, comprehensive test card, device and electronic equipment". Hereby, Its entire text is incorporated by reference.
技术领域Technical field
本申请涉及图像技术领域,特别是涉及一种图像采集参数调整方法及系统、电子设备和计算机可读存储介质。The present application relates to the field of image technology, and in particular to an image acquisition parameter adjustment method and system, electronic equipment and computer-readable storage media.
背景技术Background technique
随着图像技术的发展,出现了图像采集参数调整技术。图像采集参数的好坏决定了图像的质量。传统的图像采集参数调整方法是通过各图像采集参数对应的专门测试卡来调整对应的参数,例如使用灰度测试卡调整色彩饱和度和使用畸变测试卡调整图像的畸变等等。With the development of image technology, image acquisition parameter adjustment technology has emerged. The quality of image acquisition parameters determines the quality of the image. The traditional method of adjusting image acquisition parameters is to adjust the corresponding parameters through special test cards corresponding to each image acquisition parameter, such as using grayscale test cards to adjust color saturation and using distortion test cards to adjust image distortion, etc.
然而,图像采集参数种类较多,使用每种图像采集参数对应的专门测试卡来调整图像采集参数,对非专业人士来说不仅难度大,而且需要花费的时间也比较长,调整效率低下。However, there are many types of image acquisition parameters. Using special test cards corresponding to each image acquisition parameter to adjust the image acquisition parameters is not only difficult for non-professionals, but also takes a long time and the adjustment efficiency is low.
发明内容Contents of the invention
基于此,有必要针对上述技术问题,提供一种能够提高调整效率的图像采集参数调整方法及系统、电子设备和计算机可读存储介质。Based on this, it is necessary to address the above technical problems and provide an image acquisition parameter adjustment method and system, electronic equipment and computer-readable storage media that can improve adjustment efficiency.
第一方面,本申请提供了一种图像采集参数调整方法。所述方法包括如下步骤。In a first aspect, this application provides a method for adjusting image acquisition parameters. The method includes the following steps.
获取图像采集设备对综合测试卡进行图像采集得到的初始综合测试图;所述综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;所述第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整。Obtain the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object is used for Adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter.
识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整。Identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjust the focal length parameter based on the position information.
控制所述图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图。The image acquisition device is controlled to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart.
识别所述第二调整参照对象在所述目标综合测试图中对应的第二对象图像。Identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart.
基于所述第二对象图像对相应的图像采集参数进行调整处理。Corresponding image acquisition parameters are adjusted based on the second object image.
在一些实施例中,所述位置信息包括所述第一对象图像在所述初始综合测试图中的坐标。In some embodiments, the location information includes coordinates of the first object image in the initial comprehensive test map.
所述基于所述位置信息进行焦距参数调整,包括如下步骤。The adjustment of the focal length parameter based on the position information includes the following steps.
基于所述坐标,调整所述图像采集设备的焦距参数,以使得所述图像采集设备对所述第一调整参照对象进行对焦。Based on the coordinates, a focal length parameter of the image acquisition device is adjusted so that the image acquisition device focuses on the first adjustment reference object.
在一些实施例中,所述基于所述坐标,调整所述图像采集设备的焦距参数包括如下步骤。In some embodiments, adjusting the focal length parameter of the image acquisition device based on the coordinates includes the following steps.
基于所述坐标逐步地多次调整所述图像采集设备的焦距参数,并基于每次调整后的焦距参数对所述综合测试卡进行图像采集,得到多次焦距调整后的多个候选图。The focal length parameters of the image acquisition device are gradually adjusted multiple times based on the coordinates, and images are collected on the comprehensive test card based on the focal length parameters after each adjustment to obtain multiple candidate images after multiple focal length adjustments.
分别计算所述第一调整参照对象在各所述候选图中对应的图像的清晰度。The sharpness of the image corresponding to the first adjustment reference object in each of the candidate images is calculated respectively.
将所述多个候选图中清晰度最大的候选图所对应的焦距参数确定为对所述第一调整参照对象对焦后的焦距参数。The focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures is determined as the focal length parameter after focusing on the first adjustment reference object.
在一些实施例中,所述第一调整参照对象为多个不同形状的、且锐度大于锐度阈值的参照图案。In some embodiments, the first adjustment reference object is a plurality of reference patterns with different shapes and sharpness greater than a sharpness threshold.
所述分别计算所述第一调整参照对象在各所述候选图中对应的图像的清晰度,包括如下步骤。Calculating the sharpness of images corresponding to the first adjustment reference object in each of the candidate images includes the following steps.
针对每个所述候选图,计算每个所述候选图中各所述参照图案的边缘梯度。For each candidate image, calculate the edge gradient of each reference pattern in each candidate image.
基于所述边缘梯度,确定各所述参照图案在对应的各所述选图中对应的图像的清晰度。Based on the edge gradient, the sharpness of the image corresponding to each of the reference patterns in the corresponding selected pictures is determined.
在一些实施例中,所述基于所述第二对象图像对相应的图像采集参数进行调整处理,包括如下步骤。In some embodiments, adjusting corresponding image acquisition parameters based on the second object image includes the following steps.
基于所述第二对象图像与所述综合测试卡中的所述第二调整参照对象在相应图像采集参数上的差异,确定针对所述图像采集参数的校正矩阵。Based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card, a correction matrix for the image acquisition parameters is determined.
基于所述校正矩阵,对所述图像采集参数进行调整处理。Based on the correction matrix, the image acquisition parameters are adjusted.
在一些实施例中,所述至少一种第二调整参照对象中包括白平衡调整色块,所述第二对象图像包括所述目标综合测试图中的白平衡色块图。In some embodiments, the at least one second adjustment reference object includes a white balance adjustment color patch, and the second object image includes a white balance color patch map in the target comprehensive test image.
所述基于所述第二对象图像与所述综合测试卡中的所述第二调整参照对象在相应图像采集参数上的差异,确定针对所述图像采集参数的校正矩阵,包括如下步骤。Determining a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card includes the following steps.
确定所述白平衡色块图的中心区域内像素的第一颜色平均值。A first color average of pixels within a central area of the white balance patch map is determined.
确定所述综合测试卡中所述白平衡调整色块的中心区域内像素的第二颜色平均值。Determine the second color average value of the pixels in the central area of the white balance adjustment color block in the comprehensive test card.
根据所述第一颜色平均值和所述第二颜色平均值之间的差异,确定针对白平衡参数的白平衡校正矩阵。A white balance correction matrix for a white balance parameter is determined based on the difference between the first color average and the second color average.
在一些实施例中,所述至少一种第二调整参照对象中包括多个颜色校正色块;所述第二对象图像包括所述目标综合测试图中的多个颜色校正色块图。In some embodiments, the at least one second adjustment reference object includes a plurality of color correction color patches; the second object image includes a plurality of color correction color patch images in the target comprehensive test image.
所述基于所述第二对象图像与所述综合测试卡中的所述第二调整参照对象在相应图像采集参数上的差异,确定针对所述图像采集参数的校正矩阵,包括如下步骤。Determining a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card includes the following steps.
分别确定所述多个颜色校正色块图的颜色值。Color values of the plurality of color correction color patch diagrams are determined respectively.
将所述多个颜色校正色块图的颜色值分别与所述综合测试卡中相应的颜色校正色块的颜色值进行差异比对。The color values of the multiple color correction color block diagrams are compared with the color values of the corresponding color correction color blocks in the comprehensive test card.
根据差异比对结果生成针对颜色参数的颜色校正矩阵。Generate a color correction matrix for color parameters based on the difference comparison results.
在一些实施例中,所述电子设备识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整,包括:识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息;基于所述位置信息,判断是否需要调整所述焦距参数;如果是,则基于所述位置信息,调整所述焦距参数,得到所述调整后的聚焦参数;如果否,则所述调整后的聚焦参数和当前不需要调整的聚焦参数相同,即不对当前的聚焦参数做任何调整,而是进行针对下一图像采集参数(即对第二调整参照对象对应的图像采集参数)的调整处理。In some embodiments, the electronic device identifies the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusts the focal length parameter based on the position information, including: identifying The position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart; based on the position information, determine whether the focal length parameter needs to be adjusted; if so, based on the position information, Adjust the focal length parameter to obtain the adjusted focus parameter; if not, the adjusted focus parameter is the same as the current focus parameter that does not need to be adjusted, that is, no adjustment is made to the current focus parameter, but the Adjustment processing of the next image acquisition parameter (that is, the image acquisition parameter corresponding to the second adjustment reference object).
在一些实施例中,所述电子设别基于所述第二对象图像对相应的图像采集参数进行调整处理,包括:基于所述第二对象图像,判定是否需要调整相应的图像采集参数;如果是,则基于所述第二对象图像对相应的所述图像采集参数进行调整处理,得到相应的处理后的图像采集参数;如果否,当前不需要处理的所述相应的所述图像采集参数保持不变。In some embodiments, the electronic device adjusts the corresponding image acquisition parameters based on the second object image, including: determining whether the corresponding image acquisition parameters need to be adjusted based on the second object image; if so , then the corresponding image acquisition parameters are adjusted based on the second object image to obtain the corresponding processed image acquisition parameters; if not, the corresponding image acquisition parameters that currently do not need to be processed remain unchanged. Change.
第二方面,本申请还提供了一种图像采集参数调整系统,包括图像采集设备、综合测试卡和图像采集参数调整装置。In the second aspect, this application also provides an image acquisition parameter adjustment system, including an image acquisition device, a comprehensive test card and an image acquisition parameter adjustment device.
所述图像采集参数调整装置与所述图像采集设备连接,所述图像采集设备和所持综合测试卡连接。The image acquisition parameter adjustment device is connected to the image acquisition equipment, and the image acquisition equipment is connected to the comprehensive test card held.
所述图像采集参数调整装置包括获取模块、识别模块和调整模块。The image acquisition parameter adjustment device includes an acquisition module, an identification module and an adjustment module.
获取模块,用于获取图像采集设备对综合测试卡进行图像采集得到的初始综合测试图;所述综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;所述第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整。The acquisition module is used to acquire the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first The adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter.
识别模块,用于识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整;控制所述图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图。An identification module for identifying the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusting the focal length parameter based on the position information; controlling the image acquisition device based on the adjustment The final focal length parameter is used to collect images of the comprehensive test card to obtain the target comprehensive test chart.
调整模块,用于识别所述第二调整参照对象在所述目标综合测试图中对应的第二对象图像;基于所述第二对象图像对相应的图像采集参数进行调整处理。An adjustment module, configured to identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; and adjust the corresponding image acquisition parameters based on the second object image.
在一些实施例中,所述综合测试卡包括卡体,所述卡体的表面上设置有所述第一调整参照对象和所述至少一种第二调整参照对象。In some embodiments, the comprehensive test card includes a card body, and the first adjustment reference object and the at least one second adjustment reference object are provided on the surface of the card body.
在一些实施例中,所述第一调整参照对象包括多个不同形状的、且锐度大于锐度阈值的参照图案;所述第二调整参照对象包括白平衡调整色块和颜色校正色块中的至少一种。In some embodiments, the first adjustment reference object includes a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold; the second adjustment reference object includes white balance adjustment color blocks and color correction color blocks. of at least one.
在一些实施例中,所述综合测试卡还包括标识码和空白区域;所述标识码用于标识综合测试卡的身份信息;所述空白区域用于填入目标信息,所述目标信息表征需要填入的信息。In some embodiments, the comprehensive test card also includes an identification code and a blank area; the identification code is used to identify the identity information of the comprehensive test card; the blank area is used to fill in target information, and the target information represents the need information filled in.
第三方面,本申请还提供了一种电子设备。所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述的方法的步骤。In a third aspect, this application also provides an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the above method are implemented.
第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。In a fourth aspect, this application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above method are implemented.
上述图像采集参数调整方法及系统、电子设备和存储介质,通过获取图像采集设备对综合测试卡进行图像采集得到的初始综合测试图;所述综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;所述第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整;识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整;控制所述图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图;识别所述第二调整参照对象在所述目标综合测试图中对应的第二对象图像;基于所述第二对象图像对相应的图像采集参数进行调整处理。本申请的图像采集参数调整系统包括不同的调整参照对象的综合测试卡,本申请基于该综合测试卡提出了一种图像采集参数调整方法,即通过第一调整参照对象对图像采集设备的焦距参数进行调整,通过第二调整参照对象对除焦距参数之外的其他图像采集参数进行调整。进而通过一张综合测试卡调整多个图像采集参数,避免为了调整不同的图像采集参数而频繁更换测试卡,不仅降低了调整图像采集参数的难度,而且节约了人工调整图像采集参数的时间,提高了调整图像采集参数的效率。The above-mentioned image acquisition parameter adjustment method and system, electronic equipment and storage medium obtain an initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one Each second adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter; identify where the first adjustment reference object is. The position information of the corresponding first object image in the initial comprehensive test chart is used, and the focal length parameter is adjusted based on the position information; the image acquisition device is controlled to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive Test chart; identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; adjust the corresponding image acquisition parameters based on the second object image. The image acquisition parameter adjustment system of this application includes comprehensive test cards for different adjustment reference objects. Based on this comprehensive test card, this application proposes an image acquisition parameter adjustment method, that is, through the first adjustment reference object, the focal length parameter of the image acquisition device is adjusted. Adjustment is made, and other image acquisition parameters except the focal length parameter are adjusted through the second adjustment reference object. Furthermore, multiple image acquisition parameters are adjusted through a comprehensive test card to avoid frequent replacement of test cards in order to adjust different image acquisition parameters. This not only reduces the difficulty of adjusting image acquisition parameters, but also saves the time of manually adjusting image acquisition parameters and improves improve the efficiency of adjusting image acquisition parameters.
附图说明Description of drawings
图1为一个实施例中图像采集参数调整方法的应用环境图。Figure 1 is an application environment diagram of the image acquisition parameter adjustment method in one embodiment.
图2为一个实施例中图像采集参数调整方法的流程示意图。Figure 2 is a schematic flowchart of an image acquisition parameter adjustment method in one embodiment.
图3为一个实施例中一种综合测试卡的示意图。Figure 3 is a schematic diagram of a comprehensive test card in one embodiment.
图4为一个实施例中图像采集参数调整装置的结构框图。Figure 4 is a structural block diagram of an image acquisition parameter adjustment device in one embodiment.
图5为一个实施例中识别模块的结构框图。Figure 5 is a structural block diagram of an identification module in an embodiment.
图6为一个实施例中电子设备的内部结构图。Figure 6 is an internal structure diagram of an electronic device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing specific embodiments only and is not intended to limit the application.
本申请实施例提供的图像采集参数调整方法,可以应用于如图1所示的应用环境中。如图1所示,图像采集设备101对综合测试卡102进行图像采集,图像采集设备101将采集得到的图像发送给电子设备103,电子设备103对图像采集设备101发送的图像进行分析处理,并控制图像采集设备101调整图像采集参数。The image acquisition parameter adjustment method provided by the embodiment of the present application can be applied in the application environment as shown in Figure 1. As shown in Figure 1, the image acquisition device 101 collects images of the comprehensive test card 102. The image acquisition device 101 sends the collected images to the electronic device 103. The electronic device 103 analyzes and processes the images sent by the image acquisition device 101, and The image acquisition device 101 is controlled to adjust image acquisition parameters.
在一些实施例中,电子设备103获取图像采集设备101对综合测试卡102进行图像采集得到的初始综合测试图;电子设备103识别第一调整参照对象在初始综合测试图中对应的第一对象图像的位置信息,并基于位置信息控制图像采集设备101进行焦距参数调整;图像采集设备101基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图;电子设备103在对每种第二调整参照对象对应的图像采集参数进行调整处理时,识别第二调整参照对象在目标综合测试图中对应的第二对象图像;图像采集设备101基于第二对象图像对相应的图像采集参数进行调整处理。In some embodiments, the electronic device 103 obtains the initial comprehensive test chart obtained by image acquisition of the comprehensive test card 102 by the image acquisition device 101; the electronic device 103 identifies the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart. position information, and controls the image acquisition device 101 to adjust the focal length parameter based on the position information; the image acquisition device 101 performs image acquisition on the comprehensive test card based on the adjusted focal length parameter, and obtains the target comprehensive test chart; the electronic device 103 performs image acquisition on each third When adjusting the image acquisition parameters corresponding to the second adjustment reference object, identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; the image acquisition device 101 adjusts the corresponding image acquisition parameters based on the second object image. deal with.
需要说明的是,电子设备103可以独立于图像采集设备101外部,也可以集成在图像采集设备101中,本实施例在此不作限定。It should be noted that the electronic device 103 can be independent from the outside of the image acquisition device 101 or integrated in the image acquisition device 101, which is not limited in this embodiment.
在一些实施例中,如图2所示,提供了一种图像采集参数调整方法,以该方法应用于图1中的电子设备103为例进行说明,即该方法的执行主体为电子设备103。图像采集参 数调整方法包括以下步骤201至步骤205。In some embodiments, as shown in FIG. 2 , a method for adjusting image acquisition parameters is provided. This method is explained by taking the method applied to the electronic device 103 in FIG. 1 as an example, that is, the execution subject of the method is the electronic device 103 . The image acquisition parameter adjustment method includes the following steps 201 to 205.
步骤201、获取图像采集设备对综合测试卡进行图像采集得到的初始综合测试图;综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整。Step 201: Obtain the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object is used for The focal length parameter is adjusted; each second adjustment reference object is used to adjust the corresponding image acquisition parameter.
其中,图像采集设备是用于采集图像的设备。图像采集设备包括但不限于带有摄像头的移动终端、摄像机、相机、扫描仪、视频采集卡以及其他带有采集图像功能的设备等等。Among them, the image acquisition device is a device used to acquire images. Image collection devices include but are not limited to mobile terminals with cameras, cameras, cameras, scanners, video capture cards, and other devices with image collection functions, etc.
其中,图像采集参数是图像采集设备采集图像设置的参数。在一些实施例中,图像采集参数包括但不限于焦距参数、分辨率参数、动态范围参数或畸变参数等中的至少一种。Among them, the image acquisition parameters are parameters set by the image acquisition device to acquire images. In some embodiments, the image acquisition parameters include, but are not limited to, at least one of focal length parameters, resolution parameters, dynamic range parameters, distortion parameters, and the like.
其中,综合测试卡是一张用于调整多种图像采集参数的测试卡,综合测试卡中包括多个调整参照对象。在一些实施例中,通过综合测试卡中的多个调整对象可以调整多种图像采集参数。可以理解,初次对综合测试卡进行图像采集得到的图像就是初始综合测试图。Among them, the comprehensive test card is a test card used to adjust various image acquisition parameters. The comprehensive test card includes multiple adjustment reference objects. In some embodiments, multiple image acquisition parameters can be adjusted by combining multiple adjustment objects in the test chart. It can be understood that the image obtained by collecting images of the comprehensive test card for the first time is the initial comprehensive test chart.
其中,调整参照对象是图像采集设备调整图像采集参数时参照的对象。The adjustment reference object is an object that the image acquisition device refers to when adjusting image acquisition parameters.
在一些实施例中,调整参照对象表现为综合测试卡中的图案。综合测试卡中包括多种不同的图案,以通过多种不同的图案调整多种图像采集参数。示例性地,图像采集参数包括动态范围参数,以动态范围参数为例,在调整动态范围参数时,调整参照对象为综合测试卡中的灰阶图案。通过分析采集得到的初始综合测试图上的灰阶图案,确定当前动态范围参数,若当前动态范围参数不满足要求,调整图像采集设备的动态范围参数。可以理解,不同的图像采集参数对应的调整参照对象不同。In some embodiments, the adjustment reference object appears as a pattern in the comprehensive test chart. A variety of different patterns are included in the comprehensive test chart to adjust a variety of image acquisition parameters through a variety of different patterns. Exemplarily, the image acquisition parameters include dynamic range parameters. Taking the dynamic range parameters as an example, when adjusting the dynamic range parameters, the adjustment reference object is the grayscale pattern in the comprehensive test card. By analyzing the grayscale pattern on the initial comprehensive test chart collected, the current dynamic range parameters are determined. If the current dynamic range parameters do not meet the requirements, adjust the dynamic range parameters of the image acquisition device. It can be understood that different image acquisition parameters correspond to different adjustment reference objects.
其中,第一调整参照对象是表征调整焦距参数时对应的参照对象。在一些实施例中,第一参照对象包括至少一个对焦图案,图像采集设备基于对焦图案进行焦距参数的调整。The first adjustment reference object represents a corresponding reference object when adjusting the focal length parameter. In some embodiments, the first reference object includes at least one focus pattern, and the image acquisition device adjusts the focus parameter based on the focus pattern.
其中,第二调整参照对象是调整除焦距参数外的其余图像采集参数时所参照的对象。在一些实施例中,第二调整参照对象跟图像采集参数的种类有关。例如,进行畸变参数调整时,第二调整参照对象为综合测试卡上的网格线。进行色彩参数调整时,第二调整参照对象为综合测试卡上的各色块。The second adjustment reference object is an object referenced when adjusting other image acquisition parameters except the focal length parameter. In some embodiments, the second adjustment reference object is related to the type of image acquisition parameter. For example, when adjusting distortion parameters, the second adjustment reference object is the grid lines on the comprehensive test card. When adjusting color parameters, the second adjustment reference object is each color block on the comprehensive test card.
需要说明的是,第二调整参照对象并不特指某一图像采集参数对应的调整参照对象,仅仅只是为了和第一调整参照对象作区分,除焦距参数对应的调整参照对象以外的其他参照对象都可称为第二调整参照对象。It should be noted that the second adjustment reference object does not specifically refer to the adjustment reference object corresponding to a certain image acquisition parameter, but is just to distinguish it from the first adjustment reference object. Other reference objects except the adjustment reference object corresponding to the focal length parameter All can be called the second adjustment reference object.
步骤202、识别第一调整参照对象在初始综合测试图中对应的第一对象图像的位置信息,并基于位置信息进行焦距参数调整。Step 202: Identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjust the focal length parameter based on the position information.
其中,第一对象图像是第一调整参照对象在初始综合测试图中呈现的图像。Wherein, the first object image is an image of the first adjustment reference object presented in the initial comprehensive test chart.
可以理解,电子设备可以从初始综合测试图中定位综合测试卡对应的图像,得到测试卡图像。再从测试卡图像中识别第一对象图像的位置信息。电子设备也可以确定综合测试卡的设计图和初始综合测试图之间的位置转换关系,直接从所述初始综合测试图中确定第一调整参照对象对应的第一对象图像的位置信息。对此不做限定。It can be understood that the electronic device can locate the image corresponding to the comprehensive test card from the initial comprehensive test chart to obtain the test card image. Then, the position information of the first object image is identified from the test card image. The electronic device may also determine the position conversion relationship between the design drawing of the comprehensive test card and the initial comprehensive test chart, and directly determine the position information of the first object image corresponding to the first adjustment reference object from the initial comprehensive test chart. There is no restriction on this.
在一些实施例中,电子设备可以提取综合测试卡的设计图和初始综合测试图中的测试卡图像的特征,并进行特征匹配,得到单应性变换矩阵。电子设备可以基于设计图中的综合测试卡的顶点的坐标,以及该单应性变换矩阵,确定综合测试卡在初始综合测试图中的顶点的坐标。再通过第一调整参照对象在综合测试卡的设计图中的相对位置关系,从测试卡图像中确定第一对象图像,以得到第一对象图像在初始综合测试图中的位置信息。In some embodiments, the electronic device can extract features of the design drawing of the comprehensive test chart and the test card image in the initial comprehensive test chart, and perform feature matching to obtain a homography transformation matrix. The electronic device may determine the coordinates of the vertices of the comprehensive test card in the initial comprehensive test graph based on the coordinates of the vertices of the comprehensive test card in the design graph and the homography transformation matrix. Then, by first adjusting the relative position relationship of the reference object in the design drawing of the comprehensive test card, the first object image is determined from the test card image, so as to obtain the position information of the first object image in the initial comprehensive test chart.
在一些实施例中,电子设备可以通过特征匹配算法,提取综合测试卡的设计图和初始综合测试图中的测试卡图像的特征,并进行特征匹配,得到单应性变换矩阵。In some embodiments, the electronic device can extract features of the design drawing of the comprehensive test card and the test card image in the initial comprehensive test chart through a feature matching algorithm, and perform feature matching to obtain a homography transformation matrix.
可以理解,电子设备可以对初始综合测试图进行分析,判断是否需要做焦距参数调整处理,若是,则进行焦距参数调整,若否(即,判定不需要做焦距参数调整),则可以不做焦距参数的调整处理,而是进行针对下一图像采集参数(即对第二调整参照对象对应的图像采集参数)的调整处理。It can be understood that the electronic device can analyze the initial comprehensive test chart to determine whether the focal length parameter adjustment process needs to be performed. If so, the focal length parameter adjustment process is performed. If not (that is, it is determined that the focal length parameter adjustment does not need to be performed), the focal length parameter adjustment process is not required. Instead of adjusting the parameters, the next image acquisition parameter (that is, the image acquisition parameter corresponding to the second adjustment reference object) is adjusted.
在一些实施例中,所述电子设备识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整,包括:识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息;基于所述位置信息,判断是否需要调整所述焦距参数;如果是,则基于所述位置信息,调整所述焦距参数,得到所述调整后的聚焦参数;如果否,则所述调整后的聚焦参数和当前不需要调整的聚焦参数相同,即不对当前的聚焦参数做任何调整,而是进行针对下一图像采集参数(即对第二调整参照对象对应的图像采集参数)的调整处理。In some embodiments, the electronic device identifies the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusts the focus parameter based on the position information, including: identifying The position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart; based on the position information, determine whether the focal length parameter needs to be adjusted; if so, based on the position information, Adjust the focal length parameter to obtain the adjusted focus parameter; if not, the adjusted focus parameter is the same as the current focus parameter that does not need to be adjusted, that is, no adjustment is made to the current focus parameter, but the Adjustment processing of the next image acquisition parameter (that is, the image acquisition parameter corresponding to the second adjustment reference object).
在一些实施例中,所述电子设别基于所述第二对象图像对相应的图像采集参数进行调整处理,包括:基于所述第二对象图像,判定是否需要调整相应的图像采集参数;如果是,则基于所述第二对象图像对相应的所述图像采集参数进行调整处理,得到相应的处理后的图像采集参数;如果否,当前不需要处理的所述相应的所述图像采集参数保持不变。In some embodiments, the electronic device adjusts the corresponding image acquisition parameters based on the second object image, including: determining whether the corresponding image acquisition parameters need to be adjusted based on the second object image; if so , then the corresponding image acquisition parameters are adjusted based on the second object image to obtain the corresponding processed image acquisition parameters; if not, the corresponding image acquisition parameters that currently do not need to be processed remain unchanged. Change.
在一些实施例中,电子设备可以通过计算初始综合测试图中第一对象图像的清晰度判断焦距参数是否达到清晰度阈值,若清晰度未达到清晰度阈值,则判定图像采集设备需要做焦距参数的调整处理。若清晰度达到清晰度阈值,则判定图像采集设备不需要做焦距参数的调整处理。In some embodiments, the electronic device can determine whether the focus parameter reaches the sharpness threshold by calculating the sharpness of the first object image in the initial comprehensive test chart. If the sharpness does not reach the sharpness threshold, it is determined that the image acquisition device needs to adjust the focus parameter. adjustment processing. If the sharpness reaches the sharpness threshold, it is determined that the image acquisition device does not need to adjust the focal length parameter.
其中,清晰度是图像质量的决定因素之一,清晰度越高,图像表现越细致。清晰度阈值是表征图像是否清晰的临界值。清晰度阈值的大小跟图像采集设备的像素和分辨率有关,不同的图像采集设备的清晰度阈值有所不同。Among them, clarity is one of the determining factors of image quality. The higher the clarity, the more detailed the image performance. The sharpness threshold is the critical value that characterizes whether an image is clear or not. The size of the sharpness threshold is related to the pixels and resolution of the image acquisition device. Different image acquisition devices have different sharpness thresholds.
步骤203、控制图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图。Step 203: Control the image acquisition device to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart.
其中,目标综合测试图是图像采集设备调整好焦距参数后,对综合测试卡进行图像采集得到的图像。可以理解,使用调整后的焦距参数能满足图像采集的清晰度要求,即,清晰度达到清晰度阈值。所以,目标综合测试图是图像采集设备基于调整好的焦距参数,对综合测试卡进行图像采集得到的图像,也就是说,目标综合测试图的清晰度已经达到清晰度阈值。Among them, the target comprehensive test image is an image obtained by image acquisition of the comprehensive test card after the image acquisition equipment adjusts the focal length parameters. It can be understood that using the adjusted focal length parameter can meet the sharpness requirements of image acquisition, that is, the sharpness reaches the sharpness threshold. Therefore, the target comprehensive test chart is an image obtained by image acquisition of the comprehensive test card by the image acquisition device based on the adjusted focal length parameter. In other words, the clarity of the target comprehensive test chart has reached the sharpness threshold.
步骤204、识别第二调整参照对象在目标综合测试图中对应的第二对象图像。Step 204: Identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart.
其中,第二对象图像是第二调整参照对象在目标综合测试图中呈现的图像。Wherein, the second object image is an image of the second adjustment reference object presented in the target comprehensive test chart.
可以理解,电子设备在对每种第二调整参照对象对应的图像采集参数进行调整处理时,首先识别第二调整参照对象在目标综合测试图中对应的第二对象图像,然后通过各图像采集参数对应的第二对象图像判断图像采集参数是否达到要求。若没达到要求,则基于第二对象图像对图像采集参数进行调整。若达到要求,则判定图像采集设备无需做第二对象图像对应的图像采集参数的调整处理It can be understood that when the electronic device adjusts the image acquisition parameters corresponding to each second adjustment reference object, it first identifies the second object image corresponding to the second adjustment reference object in the target comprehensive test chart, and then uses each image acquisition parameter to The corresponding second object image is used to determine whether the image acquisition parameters meet the requirements. If the requirements are not met, the image acquisition parameters are adjusted based on the second object image. If the requirements are met, it is determined that the image acquisition device does not need to adjust the image acquisition parameters corresponding to the second object image.
步骤205、基于第二对象图像对相应的图像采集参数进行调整处理。Step 205: Adjust the corresponding image acquisition parameters based on the second object image.
具体地,电子设备通过各图像采集参数对应的第二对象图像,判断图像采集参数是否达到要求。若没达到要求,则对第二对象图像对应的图像采集参数进行调整。若达到要求,则判定无需对图像采集设备的第二对象图像对应的图像采集参数调整处理。在一些实施例中,电子设备可以确定第二对象图像与综合测试卡中的第二调整参照对象在相应图像采集参数上的差异,基于该差异对图像采集设备的图像采集参数进行调整处理。Specifically, the electronic device determines whether the image acquisition parameters meet the requirements through the second object image corresponding to each image acquisition parameter. If the requirements are not met, the image acquisition parameters corresponding to the second object image are adjusted. If the requirements are met, it is determined that there is no need to adjust the image acquisition parameters corresponding to the second object image of the image acquisition device. In some embodiments, the electronic device can determine the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card, and adjust the image acquisition parameters of the image acquisition device based on the difference.
可以理解,本申请的方法适用于在综合测试卡中设置有对应的第二调整参照对象的图像采集参数。It can be understood that the method of the present application is suitable for image acquisition parameters with corresponding second adjustment reference objects set in the comprehensive test card.
需要说明的是,在综合测试卡中设置有对应的第二调整参照对象的图像采集参数,进行图像采集参数调整时,可以执行步骤204至205。针对在综合测试卡中没有设置对应的第二定位参照对象的图像采集参数,则可以按照预设的调整规则,对图像采集参数进行调整。比如,针对曝光时间参数,可以调整为预设的时间范围。It should be noted that the image acquisition parameters of the corresponding second adjustment reference object are set in the comprehensive test card. When adjusting the image acquisition parameters, steps 204 to 205 can be performed. If the image acquisition parameters of the corresponding second positioning reference object are not set in the comprehensive test card, the image acquisition parameters can be adjusted according to the preset adjustment rules. For example, the exposure time parameter can be adjusted to a preset time range.
上述图像采集参数调整方法中,通过获取图像采集设备对综合测试卡进行图像采集得 到的初始综合测试图;所述综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;所述第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整;识别所述第一调整参照对象在所述综合综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整;控制所述图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图;识别所述第二调整参照对象在所述目标综合测试图中对应的第二对象图像;基于所述第二对象图像对相应的图像采集参数进行调整处理。通过一张综合测试卡调整多个图像采集参数,避免为了调整不同的图像采集参数而频繁更换测试卡,不仅降低了调整图像采集参数的难度,而且节约了人工调整图像采集参数的时间,提高了调整图像采集参数的效率。In the above image acquisition parameter adjustment method, an initial comprehensive test chart is obtained by acquiring an image acquisition device on a comprehensive test card; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; The first adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter; identify the corresponding first adjustment reference object in the comprehensive comprehensive test chart The position information of the first object image, and adjust the focal length parameter based on the position information; control the image acquisition device to perform image acquisition on the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart; identify the first 2. Adjust the second object image corresponding to the reference object in the target comprehensive test chart; adjust the corresponding image acquisition parameters based on the second object image. Adjusting multiple image acquisition parameters through a comprehensive test card avoids frequent replacement of test cards in order to adjust different image acquisition parameters. It not only reduces the difficulty of adjusting image acquisition parameters, but also saves the time of manually adjusting image acquisition parameters and improves efficiency. Adjust image acquisition parameters for efficiency.
在一些实施例中,位置信息包括第一对象图像在初始综合测试图中的坐标。电子设备基于位置信息进行焦距参数调整包括:基于坐标,调整图像采集设备的焦距参数,以使得图像采集设备对第一调整参照对象进行对焦。In some embodiments, the location information includes coordinates of the first object image in the initial comprehensive test map. The electronic device adjusting the focal length parameter based on the position information includes: adjusting the focal length parameter of the image acquisition device based on the coordinates, so that the image acquisition device focuses on the first adjustment reference object.
可以理解,初始综合测试图和第一对象图像处于同一个图像坐标系。在一些实施例中,确定第一对象图像在初始综合测试图中的坐标是确定第一对象图像在图像坐标系中的坐标,再根据图像采集设备的内部坐标系和图像坐标系之间的对应关系,确定第一调整参照对象在内部坐标系中的坐标。It can be understood that the initial comprehensive test image and the first object image are in the same image coordinate system. In some embodiments, determining the coordinates of the first object image in the initial comprehensive test chart is to determine the coordinates of the first object image in the image coordinate system, and then based on the correspondence between the internal coordinate system of the image acquisition device and the image coordinate system relationship to determine the coordinates of the first adjustment reference object in the internal coordinate system.
在一些实施例中,基于坐标调整图像采集设备的焦距参数是指图像采集设备将对焦点移动到第一调整参照对象在内部坐标系中的坐标,也就是说第一调整参照对象是对焦主体,对焦点准确地对准对焦主体时,就完成了一次焦距参数的调整。In some embodiments, adjusting the focal length parameter of the image acquisition device based on coordinates means that the image acquisition device moves the focus point to the coordinates of the first adjustment reference object in the internal coordinate system, that is to say, the first adjustment reference object is the focus subject, When the focus point is accurately aligned with the focus subject, an adjustment of the focal length parameter is completed.
其中,图像坐标系是以图像平面中心为坐标原点,X轴和Y轴分别平行于图像平面的两条垂直边,用(x,y)表示其坐标值的一种坐标系。Among them, the image coordinate system is a coordinate system with the center of the image plane as the coordinate origin, the X axis and the Y axis being parallel to the two vertical sides of the image plane respectively, and (x, y) representing its coordinate value.
其中,内部坐标系是以图像采集设备的光心为坐标原点,X轴和Y轴分别平行于图像坐标系的X轴和Y轴,图像采集设备的光轴为Z轴,用(Xc,Yc,Zc)表示其坐标值。Among them, the internal coordinate system takes the optical center of the image acquisition device as the coordinate origin. The X-axis and Y-axis are parallel to the X-axis and Y-axis of the image coordinate system respectively. The optical axis of the image acquisition device is the Z-axis. Use (Xc, Yc ,Zc) represents its coordinate value.
可以理解,通过内部坐标系和图像坐标系的投影映射关系,可以确定第一调整参照对象在内部坐标系中的坐标。在另一些实施例中,调整图像采集设备的焦距参数是通过缓慢移动图像采集设备的对焦点,使得对焦点对准第一调整参照对象。It can be understood that through the projection mapping relationship between the internal coordinate system and the image coordinate system, the coordinates of the first adjustment reference object in the internal coordinate system can be determined. In other embodiments, adjusting the focal length parameter of the image acquisition device is by slowly moving the focus point of the image acquisition device so that the focus point is aligned with the first adjustment reference object.
上述实施例中,通过第一对象图像在初始综合测试图中的坐标进行焦距参数调整,简单高效。In the above embodiment, the focal length parameter is adjusted based on the coordinates of the first object image in the initial comprehensive test chart, which is simple and efficient.
在一些实施例中,基于坐标,调整图像采集设备的焦距参数,以使得图像采集设备对第一调整参照对象进行对焦包括:电子设备控制图像采集设备基于坐标逐步地多次调整图 像采集设备的焦距参数,并基于每次调整后的焦距参数对综合测试卡进行图像采集,得到多次焦距调整后的多个候选图;电子设备分别计算第一调整参照对象在各候选图中对应的图像的清晰度;将多个候选图中清晰度最大的候选图所对应的焦距参数确定为对第一调整参照对象对焦后的焦距参数。In some embodiments, adjusting the focal length parameter of the image acquisition device based on the coordinates so that the image acquisition device focuses on the first adjustment reference object includes: the electronic device controls the image acquisition device to gradually adjust the focus of the image acquisition device multiple times based on the coordinates. parameters, and collect images of the comprehensive test card based on the focal length parameters after each adjustment, and obtain multiple candidate images after multiple focal length adjustments; the electronic device calculates the clarity of the image corresponding to the first adjustment reference object in each candidate image. degree; determining the focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures as the focal length parameter after focusing on the first adjustment reference object.
其中,候选图是图像采集设备每次调整完焦距参数后,对综合测试卡进行图像采集得到的图像。可以理解,候选图的数量跟焦距参数的调整次数有关。Among them, the candidate image is the image obtained by collecting the image of the comprehensive test card after the image acquisition device adjusts the focal length parameter each time. It can be understood that the number of candidate images is related to the number of adjustments to the focal length parameter.
在一些实施例中,每次调整完图像采集设备的焦距参数后,图像采集设备都要重新对综合测试卡进行图像采集得到候选图,再通过图像清晰度评价函数计算候选图中的第一调整参照对象的清晰度,当清晰度大于清晰度阈值时,确定清晰度对应的焦距参数为对第一调整参照对象对焦后的焦距参数。当清晰度小于清晰度阈值时,多次调整图像采集设备的对焦点坐标,并计算每次得到的候选图的清晰度,直到候选图的清晰度大于清晰度阈值。确定满足清晰度阈值的候选图所对应的焦距参数作为对第一调整参照对象对焦后的焦距参数。In some embodiments, after each adjustment of the focal length parameter of the image acquisition device, the image acquisition device will re-acquire images of the comprehensive test card to obtain candidate images, and then calculate the first adjustment in the candidate images through the image sharpness evaluation function Referring to the sharpness of the reference object, when the sharpness is greater than the sharpness threshold, the focal length parameter corresponding to the sharpness is determined to be the focal length parameter after focusing on the first adjusted reference object. When the sharpness is less than the sharpness threshold, the focus point coordinates of the image acquisition device are adjusted multiple times, and the sharpness of the candidate image obtained each time is calculated until the sharpness of the candidate image is greater than the sharpness threshold. The focal length parameter corresponding to the candidate image that meets the sharpness threshold is determined as the focal length parameter after focusing on the first adjustment reference object.
在一些实施例中,电子设备计算有限数量的候选图的清晰度,选取清晰度最大的候选图所对应的焦距参数作为对第一调整参照对象对焦后的焦距参数。可以理解,选取有限数量的候选图是为了节省调整时间,避免反复调整焦距参数而影响了其余图像采集参数的调整。In some embodiments, the electronic device calculates the sharpness of a limited number of candidate images, and selects the focal length parameter corresponding to the candidate image with the highest definition as the focal length parameter after focusing on the first adjustment reference object. It can be understood that the purpose of selecting a limited number of candidate images is to save adjustment time and avoid repeatedly adjusting the focal length parameter, which affects the adjustment of other image acquisition parameters.
上述实施例中,通过多次调整图像采集设备的焦距参数,确定候选图清晰度最高时对应的焦距参数作为对第一调整参照对象对焦后的焦距参数,得到的焦距参数的准确度更高。In the above embodiment, by adjusting the focal length parameter of the image acquisition device multiple times, the focal length parameter corresponding to the highest definition of the candidate image is determined as the focal length parameter after focusing on the first adjustment reference object, and the accuracy of the obtained focal length parameter is higher.
在一些实施例中,第一调整参照对象为多个不同形状的、且锐度大于锐度阈值的参照图案;分别计算第一调整参照对象在各候选图中对应的图像的清晰度包括:针对每个候选图,计算每个候选图中各参照图案的边缘梯度;基于边缘梯度,确定各参照图案在对应的各候选图中对应的图像的清晰度。In some embodiments, the first adjustment reference object is a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold; respectively calculating the sharpness of the image corresponding to the first adjustment reference object in each candidate image includes: For each candidate image, calculate the edge gradient of each reference pattern in each candidate image; based on the edge gradient, determine the clarity of the image corresponding to each reference pattern in the corresponding candidate image.
其中,锐度是反映图像边缘锐利程度的一个指标。图像边缘锐利程度跟锐度值的大小呈正相关。Among them, sharpness is an indicator that reflects the sharpness of image edges. The sharpness of image edges is positively related to the size of the sharpness value.
其中,锐度阈值是表征参照图案的锐度达到要求锐度要求的临界值。Among them, the sharpness threshold is a critical value indicating that the sharpness of the reference pattern reaches the required sharpness requirement.
在一些实施例中,选取多个不同形状、锐度大于锐度阈值(即边缘锐利)的参照图案作为第一调整参照对象。对焦距参数进行调整时,将对焦点对准参照图案后,图像采集设备对综合测试卡进行图像采集得到候选图。In some embodiments, a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold (ie, sharp edges) are selected as the first adjustment reference objects. When adjusting the focal length parameter, after aligning the focus with the reference pattern, the image acquisition device collects images of the comprehensive test card to obtain candidate images.
其中,边缘梯度是图像边缘的梯度值,用以表征图像边缘变化的快慢。Among them, the edge gradient is the gradient value of the edge of the image, which is used to characterize the speed of the edge change of the image.
在一些实施例中,电子设备通过调用图像清晰度评价函数计算候选图中各参照图案的边缘梯度,当边缘梯度大于预设梯度值时,表明各参照图案的边缘变化最显著,也就是说候选图已经达到清晰度要求。In some embodiments, the electronic device calculates the edge gradient of each reference pattern in the candidate image by calling the image sharpness evaluation function. When the edge gradient is greater than the preset gradient value, it indicates that the edge change of each reference pattern is the most significant, that is to say, the candidate The image has met the clarity requirements.
其中,参照图案是图像采集设备进行焦距参数调整时参照的图案。可以理解,调整图像采集设备的焦距参数是为了得到清晰度高的图像。每次进行焦距参数调整后都需要计算候选图的清晰度,而清晰度跟边缘梯度正相关。为了便于计算候选图的清晰度,选用边缘锐利(即锐度大于锐度阈值)的参照图案作为第一调整参照对象。The reference pattern is a pattern that the image acquisition device refers to when adjusting the focal length parameter. It can be understood that the purpose of adjusting the focal length parameter of the image acquisition device is to obtain a high-definition image. Each time the focal length parameter is adjusted, the sharpness of the candidate image needs to be calculated, and the sharpness is positively related to the edge gradient. In order to facilitate the calculation of the sharpness of the candidate image, a reference pattern with sharp edges (that is, the sharpness is greater than the sharpness threshold) is selected as the first adjustment reference object.
上述实施例中,通过计算各参照图案在候选图中对应的边缘梯度,确定各候选图像的清晰度,方便简单。In the above embodiment, the sharpness of each candidate image is determined by calculating the edge gradient corresponding to each reference pattern in the candidate image, which is convenient and simple.
在一些实施例中,基于第二对象图像对相应图像采集参数进行调整处理包括:电子设备基于第二对象图像与综合测试卡中的第二调整参照对象在相应图像采集参数上的差异,确定针对图像采集参数的校正矩阵;基于校正矩阵,对图像采集参数进行调整处理。In some embodiments, adjusting the corresponding image acquisition parameters based on the second object image includes: the electronic device determines the corresponding image acquisition parameter based on the difference between the second object image and the second adjustment reference object in the comprehensive test card. Correction matrix for image acquisition parameters; based on the correction matrix, the image acquisition parameters are adjusted.
其中,校正矩阵是用于校正图像采集参数的矩阵。校正矩阵包括但不限于针对白平衡参数的白平衡校正矩阵和针对颜色参数的颜色校正矩阵。Among them, the correction matrix is a matrix used to correct image acquisition parameters. The correction matrix includes, but is not limited to, a white balance correction matrix for white balance parameters and a color correction matrix for color parameters.
在一些实施例中,通过比较第二对象图像和第二调整参照对象对应的同一图像采集参数是否有差异。当有差异时,基于校正矩阵调整对应的图像采集参数。当无差异时,则无需调整对应的图像采集参数。In some embodiments, whether there is a difference in the same image acquisition parameter corresponding to the second object image and the second adjustment reference object is compared. When there is a difference, the corresponding image acquisition parameters are adjusted based on the correction matrix. When there is no difference, there is no need to adjust the corresponding image acquisition parameters.
在一些实施例中,电子设备比较综合测试卡中的白平衡色块和第二对象图像的颜色值是否有差异,第二对象图像为白平衡色块在目标综合测试图中呈现的图像。当有差异时,由综合测试卡中的白平衡色块和第二对象图像确定白平衡校正矩阵。当无差异时,无需对白平衡参数进行调整。In some embodiments, the electronic device compares whether there is a difference in color values between the white balance color patch in the comprehensive test chart and the second object image. The second object image is an image in which the white balance color patch appears in the target comprehensive test chart. When there is a difference, the white balance correction matrix is determined from the white balance color patch in the comprehensive test chart and the second object image. When there is no difference, there is no need to adjust the white balance parameters.
在一些实施例中,电子设备比较综合测试卡中的多个颜色校正色块和第二对象图像的颜色值的平均值是否有差异,第二对象图像为多个颜色校正色块在目标综合测试图中呈现的图像。当有差异时,由综合测试卡中的多个颜色校正色块和第二对象图像确定颜色校正矩阵。当无差异时,无需对颜色参数进行调整。In some embodiments, the electronic device compares whether there is a difference in the average value of the color values of the multiple color correction color patches in the comprehensive test card and the second object image. The second object image is the multiple color correction color patches in the target comprehensive test. The image presented in the figure. When there is a difference, the color correction matrix is determined from the plurality of color correction color patches in the comprehensive test card and the second object image. When there is no difference, there is no need to adjust the color parameters.
上述实施例中,基于校正矩阵对图像采集参数进行调整,准确度高。In the above embodiment, the image acquisition parameters are adjusted based on the correction matrix with high accuracy.
在一些实施例中,至少一种第二调整参照对象中包括白平衡调整色块;第二对象图像包括目标综合测试图中的白平衡色块图;电子设备基于第二对象图像与综合测试卡中的第二调整参照对象在相应图像采集参数上的差异,确定针对图像采集参数的校正矩阵包括:确定白平衡色块图的中心区域内像素的第一颜色平均值;确定综合测试卡中白平衡调整色 块的中心区域内像素的第二颜色平均值;根据第一颜色平均值和第二颜色平均值之间的差异,确定针对白平衡参数的白平衡校正矩阵。In some embodiments, at least one second adjustment reference object includes a white balance adjustment color block; the second object image includes a white balance color block diagram in the target comprehensive test chart; and the electronic device is based on the second object image and the comprehensive test chart. The second adjustment refers to the difference in the corresponding image acquisition parameters of the reference object. Determining the correction matrix for the image acquisition parameters includes: determining the first color average value of the pixels in the center area of the white balance color block diagram; determining the white color in the comprehensive test card. Balance adjusts the second color average value of the pixels in the central area of the color patch; determines a white balance correction matrix for the white balance parameter based on the difference between the first color average value and the second color average value.
在一些实施例中,电子设备确定第二对象图像与第二调整参照对象共同对应的白平衡参数的差异情况,当存在差异时,根据第一颜色平均值和第二颜色平均值确定白平衡校正矩阵。可以理解,本实施例中的第二对象图像是白平衡色块图,第二调整参照对象是白平衡调整色块。In some embodiments, the electronic device determines the difference in white balance parameters corresponding to the second object image and the second adjustment reference object, and when there is a difference, determines the white balance correction based on the first color average and the second color average. matrix. It can be understood that the second object image in this embodiment is a white balance color patch map, and the second adjustment reference object is a white balance adjustment color patch.
在一些实施例中,电子设备计算白平衡色块图的中心区域各像素点的红绿蓝通道值的平均值,即第一颜色平均值。计算白平衡调整色块的中心区域各像素点的红绿蓝通道值的平均值,即第二颜色平均值。当第一颜色平均值和第二颜色平均值有差异时,确定第一颜色平均值和第二颜色平均值间的调整参数。示例性地,用白平衡色块图的中心区域各像素点的红绿蓝通道值的平均值,除以白平衡调整色块的中心区域各像素点的红绿蓝通道值的平均值,即用白平衡色块图的中心区域各像素点的红色通道值的平均值,除以白平衡色块图的中心区域各像素点的红色通道值的平均值,得到红色通道值调整比例。同样的方法可以得到绿色通道值调整比例和蓝色通道值调整比例,最后得到红绿蓝通道值调整矩阵,即白平衡校正矩阵。In some embodiments, the electronic device calculates the average of the red, green, and blue channel values of each pixel in the central area of the white balance color patch map, that is, the first color average. Calculate the average value of the red, green, and blue channel values of each pixel in the central area of the white balance adjustment color block, that is, the second color average value. When there is a difference between the first color average value and the second color average value, an adjustment parameter between the first color average value and the second color average value is determined. For example, the average value of the red, green, and blue channel values of each pixel in the central area of the white balance color patch is divided by the average value of the red, green, and blue channel values of each pixel in the central area of the white balance adjustment color patch, that is, The red channel value adjustment ratio is obtained by dividing the average red channel value of each pixel in the center area of the white balance color patch map by the average red channel value of each pixel in the center area of the white balance color patch map. The same method can be used to obtain the green channel value adjustment ratio and the blue channel value adjustment ratio, and finally obtain the red, green, and blue channel value adjustment matrix, that is, the white balance correction matrix.
上述实施例中,通过第一颜色平均值和第二颜色平均值得到白平衡校正矩阵,通过白平衡矩阵调整白平衡参数,既高效又准确。In the above embodiment, the white balance correction matrix is obtained through the first color average and the second color average, and the white balance parameters are adjusted through the white balance matrix, which is both efficient and accurate.
在一些实施例中,至少一种第二调整参照对象中包括多个颜色校正色块;第二对象图像包括目标综合测试图中的多个颜色校正色块图;电子设备基于第二对象图像与综合测试卡中的第二调整参照对象在相应图像采集参数上的差异,确定针对图像采集参数的校正矩阵包括:分别确定多个颜色校正色块图的颜色值;将多个颜色校正色块图的颜色值分别与综合测试卡中相应的颜色校正色块的颜色值进行差异比对;根据差异比对结果生成针对颜色参数的颜色校正矩阵。In some embodiments, at least one second adjustment reference object includes a plurality of color correction color patches; the second object image includes a plurality of color correction color patch images in the target comprehensive test image; the electronic device is based on the second object image and The second adjustment in the comprehensive test card refers to the difference in the corresponding image acquisition parameters of the reference object. Determining the correction matrix for the image acquisition parameters includes: determining the color values of multiple color correction color patch diagrams respectively; combining the multiple color correction color patch diagrams. The color values are compared with the color values of the corresponding color correction color blocks in the comprehensive test card; a color correction matrix for color parameters is generated based on the difference comparison results.
在一些实施例中,电子设备确定颜色校正色块图中的颜色值和颜色校正色块中的颜色值的差异情况。当存在差异时,根据颜色校正色块图的颜色值和颜色校正色块的颜色值生成颜色校正矩阵。In some embodiments, the electronic device determines a difference between the color values in the color correction patch diagram and the color values in the color correction patch. When there is a difference, a color correction matrix is generated based on the color values of the color correction color patch diagram and the color values of the color correction color patch.
在一些实施例中,以颜色校正色块有6个为例,进行生成颜色校正矩阵的说明。可以理解,颜色校正色块图是颜色校正色块在目标综合测试图中呈现的图像,因此颜色校正色块图中的色块与颜色校正色块一一对应。In some embodiments, the generation of the color correction matrix is described by taking six color correction color patches as an example. It can be understood that the color correction color patch diagram is an image of the color correction color patches presented in the target comprehensive test chart, so the color patches in the color correction color patch diagram correspond to the color correction color patches one-to-one.
在一些实施例中,电子设备计算6个颜色校正色块的红绿蓝通道值,以及计算颜色校 正色块图中的6个色块的红绿蓝通道值。依次比较相同颜色的色块在颜色校正色块图中的红绿蓝通道值和在颜色校正色块中的红绿蓝通道值,得到颜色值差异情况。若颜色有差异,则根据相同颜色的色块在颜色校正色块图中的红绿蓝通道值,以及和在颜色校正色块中的红绿蓝通道值,生成颜色校正矩阵。In some embodiments, the electronic device calculates the red, green, and blue channel values of the six color correction color patches, and calculates the red, green, and blue channel values of the six color patches in the color correction color patch map. Compare the red, green, and blue channel values of the color blocks of the same color in the color correction color block diagram and the red, green, and blue channel values in the color correction color block in turn to obtain the difference in color values. If there is a difference in color, a color correction matrix is generated based on the red, green, and blue channel values of the color block of the same color in the color correction color block diagram, and the red, green, and blue channel values in the color correction color block.
上述实施例中,根据各颜色校正色块在综合测试卡中的红绿蓝通道值,以及根据各颜色校正色块在颜色校正色块图中的红绿蓝通道值,生成颜色校正矩阵,既高效又准确。In the above embodiment, a color correction matrix is generated based on the red, green, and blue channel values of each color correction color block in the comprehensive test card, and based on the red, green, and blue channel values of each color correction color block in the color correction color block diagram, that is, Efficient and accurate.
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts involved in the above-mentioned embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments may include multiple steps or stages. These steps or stages are not necessarily executed at the same time, but may be completed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
在一些实施例中,本申请还提供一种综合测试卡,该综合测试卡包括卡体;卡体的表面上设置有第一调整参照对象和至少一种第二调整参照对象;第一调整参照对象是用于调整焦距参数的参照对象。In some embodiments, the present application also provides a comprehensive test card, which includes a card body; a first adjustment reference object and at least one second adjustment reference object are provided on the surface of the card body; the first adjustment reference object The object is the reference object used to adjust the focus parameters.
在一些实施例中,第一调整参照对象包括多个不同形状的、且锐度大于锐度阈值的参照图案;第二调整参照对象包括白平衡调整色块和颜色校正色块中的至少一种。In some embodiments, the first adjustment reference object includes a plurality of reference patterns with different shapes and sharpness greater than the sharpness threshold; the second adjustment reference object includes at least one of a white balance adjustment color patch and a color correction color patch. .
在一些实施例中,所述综合测试卡还包括标识码和空白区域;所述标识码用于标识综合测试卡的身份信息;所述空白区域用于填入目标信息,所述目标信息表征需要填入的信息。In some embodiments, the comprehensive test card also includes an identification code and a blank area; the identification code is used to identify the identity information of the comprehensive test card; the blank area is used to fill in target information, and the target information represents the need information filled in.
在一些实施例中,如图3所示,提供了一种综合测试卡的示意图。In some embodiments, as shown in Figure 3, a schematic diagram of a comprehensive test card is provided.
以下针对综合测试卡作具体的说明。The following is a detailed description of the comprehensive test card.
综合测试卡中包括白平衡调整色块301(即第二调整参照对象)、参照图案302(即第一调整参照对象)、颜色校正色块303(即第二调整参照对象)、标识码304和空白区域(图中未示出)。The comprehensive test card includes a white balance adjustment color block 301 (i.e., the second adjustment reference object), a reference pattern 302 (i.e., the first adjustment reference object), a color correction color block 303 (i.e., the second adjustment reference object), an identification code 304, and Blank area (not shown in the figure).
其中,白平衡调整色块301用于调整白平衡参数。可以理解,为了便于调节白平衡,白平衡调整色块301的面积可以为其余参照图案面积的数倍。对白平衡调整色块301的具体尺寸不作限定。Among them, the white balance adjustment color block 301 is used to adjust the white balance parameters. It can be understood that, in order to facilitate white balance adjustment, the area of the white balance adjustment color patch 301 may be several times the area of the remaining reference patterns. The specific size of the white balance adjustment color block 301 is not limited.
其中,参照图案302包括至少一个锐度大于锐度阈值(即边缘锐利)的图案,参照图 案302用于调整焦距参数。可以理解,锐度大于锐度阈值的图案有许多,因此可以根据需求选定参照图案的形状和数量。Among them, the reference pattern 302 includes at least one pattern whose sharpness is greater than the sharpness threshold (i.e., the edge is sharp), and the reference pattern 302 is used to adjust the focal length parameter. It can be understood that there are many patterns whose sharpness is greater than the sharpness threshold, so the shape and number of the reference patterns can be selected according to requirements.
需要说明的是,参照图案302的数量和形状并不限于图3所示,本实施例仅仅只是对参照图案进行说明,并不用于限定本申请。It should be noted that the number and shape of the reference patterns 302 are not limited to those shown in FIG. 3 . This embodiment only illustrates the reference patterns and is not used to limit the present application.
其中,颜色校正色块303用于调整颜色参数。可以理解,考虑到颜色校正色块303的获取难度,从标准的色卡中选取工艺制造较为简单的多种颜色作为颜色校正色块303,颜色校正色块303的颜色和数量可以根据需求选定。Among them, the color correction color block 303 is used to adjust color parameters. It can be understood that, considering the difficulty of obtaining the color correction color block 303, a variety of colors with relatively simple manufacturing processes are selected from the standard color card as the color correction color block 303. The color and quantity of the color correction color block 303 can be selected according to needs. .
在一些实施例中,可以是从标准色卡中选取翠绿、深红、橘黄、湖蓝、柠檬黄和紫色作为颜色校正色块303。也可以是从标准色卡中选取大红、橘黄、钛白、天蓝、浅绿作为颜色校正色块303。还可以是从标准色卡中选取紫红、橘红、淡黄、群青、黑色、紫色作为颜色校正色块303。In some embodiments, emerald green, deep red, orange, lake blue, lemon yellow and purple can be selected from the standard color card as the color correction color block 303 . It is also possible to select red, orange, titanium white, sky blue, and light green from the standard color card as the color correction color block 303 . You can also select purple, orange, light yellow, ultramarine, black, or purple from the standard color card as the color correction color block 303 .
需要说明的是,颜色校正色块的颜色和数量可根据需求选定,本实施例仅仅只是对颜色校正色块进行说明,并不用于限定本申请。It should be noted that the color and quantity of the color correction color blocks can be selected according to requirements. This embodiment only illustrates the color correction color blocks and is not intended to limit the present application.
其中,标识码304用于标识综合测试卡的身份信息。身份信息包括但不限于综合测试卡的型号和大小等等。Among them, the identification code 304 is used to identify the identity information of the comprehensive test card. Identity information includes but is not limited to the model and size of the comprehensive test card, etc.
其中,空白区域是综合测试卡中的空白区域,用于填入目标信息,所述目标信息表征需要填入的信息。例如,目标信息包括但不限于Logo和条码等。The blank area is a blank area in the comprehensive test card, used for filling in target information, and the target information represents the information that needs to be filled in. For example, target information includes but is not limited to logos and barcodes.
可以理解,图3所示的综合测试卡中的白平衡调整色块301(即第二调整参照对象)、颜色校正色块303(即第二调整参照对象)、参照图案302(即第一调整参照对象)和标识码304的排列顺序不是固定的,可以随机组合排列。并且综合测试卡的尺寸可以根据需求确定,本实施例在此不作限定。It can be understood that the white balance adjustment color patch 301 (i.e., the second adjustment reference object), the color correction color patch 303 (i.e., the second adjustment reference object), and the reference pattern 302 (i.e., the first adjustment reference object) in the comprehensive test card shown in Figure 3 The order of arrangement of the reference object) and the identification code 304 is not fixed, and can be randomly combined and arranged. In addition, the size of the comprehensive test card can be determined according to requirements, and is not limited in this embodiment.
上述实施例中,提供了一种可以对白平衡参数、颜色参数和焦距参数等图像采集参数进行调整的综合测试卡,避免为了调整不同的图像采集参数而频繁更换测试卡,不仅降低了调整图像采集参数的难度,而且节约了人工调整图像采集参数的时间,提高了调整效率。In the above embodiment, a comprehensive test card is provided that can adjust image acquisition parameters such as white balance parameters, color parameters, and focal length parameters. This avoids frequent replacement of test cards in order to adjust different image acquisition parameters, which not only reduces the cost of adjusting image acquisition parameters, saves the time of manually adjusting image acquisition parameters, and improves adjustment efficiency.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的图像采集参数调整方法的图像采集参数调整装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个图像采集参数调整装置实施例中的具体限定可以参见上文中对于图像采集参数调整方法的限定,在此不再赘述。Based on the same inventive concept, embodiments of the present application also provide an image acquisition parameter adjustment device for implementing the above-mentioned image acquisition parameter adjustment method. The implementation solution provided by this device to solve the problem is similar to the implementation solution recorded in the above method. Therefore, the specific limitations in the one or more image acquisition parameter adjustment device embodiments provided below can be found in the image acquisition parameter adjustment above. The limitations of the method will not be repeated here.
在一些实施例中,如图4所示,提供了一种图像采集参数调整系统,此图像采集参数调整系统包括图像采集设备101,综合测试卡102,和图像采集参数调整装置。所述图像采 集参数调整装置与所述图像采集设备101连接,所述图像采集设备101和所持综合测试卡102连接。所述图像采集参数调整装置包括:获取模块401、识别模块402和调整模块403。In some embodiments, as shown in Figure 4, an image acquisition parameter adjustment system is provided. The image acquisition parameter adjustment system includes an image acquisition device 101, a comprehensive test card 102, and an image acquisition parameter adjustment device. The image acquisition parameter adjustment device is connected to the image acquisition device 101, and the image acquisition device 101 is connected to the comprehensive test card 102 held. The image acquisition parameter adjustment device includes: an acquisition module 401, an identification module 402, and an adjustment module 403.
获取模块401,用于获取图像采集设备对综合测试卡进行图像采集得到的初始综合测试图;综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整。The acquisition module 401 is used to acquire the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object Used to adjust the focal length parameters; each second adjustment reference object is used to adjust the corresponding image acquisition parameters.
识别模块402,用于识别第一调整参照对象在初始综合测试图中对应的第一对象图像的位置信息,并基于位置信息进行焦距参数调整;控制图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图。The identification module 402 is used to identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjust the focal length parameter based on the position information; control the image acquisition device to perform the comprehensive test based on the adjusted focal length parameter. The card performs image acquisition and obtains the target comprehensive test chart.
调整模块403,用于识别第二调整参照对象在目标综合测试图中对应的第二对象图像;基于第二对象图像对相应的图像采集参数进行调整处理。The adjustment module 403 is used to identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; and adjust the corresponding image acquisition parameters based on the second object image.
在一些实施例中,识别模块402用于基于坐标,调整图像采集设备的焦距参数,以使得图像采集设备对第一调整参照对象进行对焦。In some embodiments, the identification module 402 is used to adjust the focal length parameter of the image acquisition device based on the coordinates, so that the image acquisition device focuses on the first adjustment reference object.
在一些实施例中,如图5所示,提供了一种识别模块402的结构框图,具体包括调整单元4021、计算单元4022和确定单元4023。In some embodiments, as shown in Figure 5, a structural block diagram of the identification module 402 is provided, specifically including an adjustment unit 4021, a calculation unit 4022 and a determination unit 4023.
调整单元4021,用于基于坐标逐步地多次调整图像采集设备的焦距参数,并基于每次调整后的焦距参数对综合测试卡进行图像采集,得到多次焦距调整后的多个候选图。The adjustment unit 4021 is used to gradually adjust the focal length parameters of the image acquisition device multiple times based on coordinates, and perform image acquisition on the comprehensive test card based on the focal length parameters after each adjustment, to obtain multiple candidate images after multiple focal length adjustments.
计算单元4022,用于分别计算第一调整参照对象在各候选图中对应的图像的清晰度。The calculation unit 4022 is used to respectively calculate the sharpness of the image corresponding to the first adjustment reference object in each candidate image.
确定单元4023,用于将多个候选图中清晰度最大的候选图所对应的焦距参数确定为对第一调整参照对象对焦后的焦距参数。The determination unit 4023 is configured to determine the focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures as the focal length parameter after focusing on the first adjustment reference object.
在一些实施例中,识别模块402具体用于针对每个候选图,计算每个候选图中各参照图案的边缘梯度;基于边缘梯度,确定各参照图案在对应的各候选图中对应的图像的清晰度。In some embodiments, the recognition module 402 is specifically configured to calculate, for each candidate image, the edge gradient of each reference pattern in each candidate image; based on the edge gradient, determine the edge gradient of each reference pattern in the corresponding candidate image. Clarity.
在一些实施例中,调整模块403用于基于第二对象图像与综合测试卡中的第二调整参照对象在相应的图像采集参数上的差异,确定针对图像采集参数的校正矩阵;基于校正矩阵,对图像采集参数进行调整处理。In some embodiments, the adjustment module 403 is used to determine a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card; based on the correction matrix, Adjust image acquisition parameters.
在一些实施例中,调整模块403具体用于确定白平衡色块图的中心区域内像素的第一颜色平均值;确定综合测试卡中白平衡调整色块的中心区域内像素的第二颜色平均值;根据第一颜色平均值和第二颜色平均值之间的差异,确定针对白平衡参数的白平衡校正矩阵。In some embodiments, the adjustment module 403 is specifically configured to determine the first color average of the pixels in the central area of the white balance color block diagram; determine the second color average of the pixels in the central area of the white balance adjustment color block in the comprehensive test card. value; determine a white balance correction matrix for the white balance parameter based on the difference between the first color average and the second color average.
在一些实施例中,调整模块403具体还用于分别确定多个颜色校正色块图的颜色值; 将多个颜色校正色块图的颜色值分别与综合测试卡中相应的颜色校正色块的颜色值进行差异比对;根据差异比对结果生成针对颜色参数的颜色校正矩阵。In some embodiments, the adjustment module 403 is further configured to determine the color values of multiple color correction color patch diagrams respectively; compare the color values of the multiple color correction color patch diagrams with the corresponding color correction color patch values in the comprehensive test card. Color values are compared for differences; a color correction matrix for color parameters is generated based on the difference comparison results.
上述图像采集参数调整装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above image acquisition parameter adjustment device can be realized in whole or in part by software, hardware and combinations thereof. Each of the above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
在一些实施例中,提供了一种电子设备,该电子设备可以是服务器,其内部结构图可以如图6所示。该电子设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种图像采集参数调整方法。In some embodiments, an electronic device is provided. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. 6 . The electronic device includes a processor, memory and network interface connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes non-volatile storage media and internal memory. The non-volatile storage medium stores operating systems, computer programs and databases. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media. The network interface of the electronic device is used to communicate with an external terminal through a network connection. The computer program implements an image acquisition parameter adjustment method when executed by a processor.
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 6 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the electronic equipment to which the solution of the present application is applied. Specific electronic devices can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.
在一些实施例中,提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In some embodiments, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements the steps in the above method embodiments.
在一些实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic  Random Access Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage. In the media, when executed, the computer program may include the processes of the above method embodiments. Any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory (MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in many forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include blockchain-based distributed databases, etc., but are not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined in any way. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, all possible combinations should be used. It is considered to be within the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation modes of the present application, and their descriptions are relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all fall within the protection scope of the present application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims (15)

  1. 一种图像采集参数调整方法,其特征在于,包括:An image acquisition parameter adjustment method, characterized by including:
    获取图像采集设备对综合测试卡进行图像采集得到的初始综合测试图;所述综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;所述第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整;Obtain the initial comprehensive test chart obtained by image acquisition of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; the first adjustment reference object is used for Adjust the focal length parameters; each second adjustment reference object is used to adjust the corresponding image acquisition parameters;
    识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整;Identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjust the focal length parameter based on the position information;
    控制所述图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图;Control the image acquisition device to collect images of the comprehensive test card based on the adjusted focal length parameter to obtain the target comprehensive test chart;
    识别所述第二调整参照对象在所述目标综合测试图中对应的第二对象图像;Identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart;
    基于所述第二对象图像对相应的图像采集参数进行调整处理。Corresponding image acquisition parameters are adjusted based on the second object image.
  2. 根据权利要求1所述的方法,其特征在于,所述位置信息包括所述第一对象图像在所述初始综合测试图中的坐标;The method according to claim 1, wherein the position information includes the coordinates of the first object image in the initial comprehensive test chart;
    所述基于所述位置信息进行焦距参数调整,包括:The adjustment of focal length parameters based on the position information includes:
    基于所述坐标,调整所述图像采集设备的焦距参数,以使得所述图像采集设备对所述第一调整参照对象进行对焦。Based on the coordinates, a focal length parameter of the image acquisition device is adjusted so that the image acquisition device focuses on the first adjustment reference object.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述坐标,调整所述图像采集设备的焦距参数,包括:The method of claim 2, wherein adjusting the focal length parameter of the image acquisition device based on the coordinates includes:
    基于所述坐标逐步地多次调整所述图像采集设备的焦距参数,并基于每次调整后的焦距参数对所述综合测试卡进行图像采集,得到多次焦距调整后的多个候选图;Step by step adjust the focal length parameter of the image acquisition device multiple times based on the coordinates, and perform image acquisition on the comprehensive test card based on the focal length parameter after each adjustment to obtain multiple candidate images after multiple focal length adjustments;
    分别计算所述第一调整参照对象在各所述候选图中对应的图像的清晰度;Calculate respectively the sharpness of the image corresponding to the first adjustment reference object in each of the candidate images;
    将所述多个候选图中清晰度最大的候选图所对应的焦距参数确定为对所述第一调整参照对象对焦后的焦距参数。The focal length parameter corresponding to the candidate picture with the highest definition among the plurality of candidate pictures is determined as the focal length parameter after focusing on the first adjustment reference object.
  4. 根据权利要求3所述的方法,其特征在于,所述第一调整参照对象为多个不同形状的、且锐度大于锐度阈值的参照图案;The method according to claim 3, characterized in that the first adjustment reference object is a plurality of reference patterns with different shapes and sharpness greater than a sharpness threshold;
    所述分别计算所述第一调整参照对象在各所述候选图中对应的图像的清晰度,包括:The separately calculating the sharpness of the image corresponding to the first adjustment reference object in each of the candidate images includes:
    针对每个所述候选图,计算每个所述候选图中各所述参照图案的边缘梯度;For each candidate image, calculate the edge gradient of each reference pattern in each candidate image;
    基于所述边缘梯度,确定各所述参照图案在对应的各所述候选图中对应的图像的清晰度。Based on the edge gradient, the sharpness of the image corresponding to each reference pattern in the corresponding candidate image is determined.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述基于所述第二对象图像对相应的图像采集参数进行调整处理,包括:The method according to any one of claims 1 to 4, characterized in that the adjustment of corresponding image acquisition parameters based on the second object image includes:
    基于所述第二对象图像与所述综合测试卡中的所述第二调整参照对象在相应图像采集参数上的差异,确定针对所述图像采集参数的校正矩阵;Based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card, determine a correction matrix for the image acquisition parameters;
    基于所述校正矩阵,对所述图像采集参数进行调整处理。Based on the correction matrix, the image acquisition parameters are adjusted.
  6. 根据权利要求5所述的方法,其特征在于,所述至少一种第二调整参照对象中包括白平衡调整色块;所述第二对象图像包括所述目标综合测试图中的白平衡色块图;The method of claim 5, wherein the at least one second adjustment reference object includes a white balance adjustment color patch; the second object image includes a white balance color patch in the target comprehensive test image. picture;
    所述基于所述第二对象图像与所述综合测试卡中的所述第二调整参照对象在相应图像采集参数上的差异,确定针对所述图像采集参数的校正矩阵,包括:Determining a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card includes:
    确定所述白平衡色块图的中心区域内像素的第一颜色平均值;Determining a first color average value of pixels in the central area of the white balance color patch map;
    确定所述综合测试卡中所述白平衡调整色块的中心区域内像素的第二颜色平均值;Determine the second color average value of the pixels in the central area of the white balance adjustment color block in the comprehensive test card;
    根据所述第一颜色平均值和所述第二颜色平均值之间的差异,确定针对白平衡参数的白平衡校正矩阵。A white balance correction matrix for a white balance parameter is determined based on the difference between the first color average and the second color average.
  7. 根据权利要求5所述的方法,其特征在于,所述至少一种第二调整参照对象中包括多个颜色校正色块;所述第二对象图像包括所述目标综合测试图中的多个颜色校正色块图;The method of claim 5, wherein the at least one second adjustment reference object includes a plurality of color correction color blocks; the second object image includes a plurality of colors in the target comprehensive test chart. Corrected color block diagram;
    所述基于所述第二对象图像与所述综合测试卡中的所述第二调整参照对象在相应图像采集参数上的差异,确定针对所述图像采集参数的校正矩阵,包括:Determining a correction matrix for the image acquisition parameters based on the difference in corresponding image acquisition parameters between the second object image and the second adjustment reference object in the comprehensive test card includes:
    分别确定所述多个颜色校正色块图的颜色值;Determine the color values of the plurality of color correction color block diagrams respectively;
    将所述多个颜色校正色块图的颜色值分别与所述综合测试卡中相应的颜色校正色块的颜色值进行差异比对;Compare the color values of the plurality of color correction color block diagrams with the color values of the corresponding color correction color blocks in the comprehensive test card;
    根据差异比对结果,生成针对颜色参数的颜色校正矩阵。Based on the difference comparison results, a color correction matrix for color parameters is generated.
  8. 根据权利要求1所述的方法,其特征在于,所述识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整,包括:The method according to claim 1, characterized in that the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart is identified, and the focal length parameter is determined based on the position information. Adjustments include:
    识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息;Identify the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart;
    基于所述位置信息,判断是否需要调整所述焦距参数;Based on the position information, determine whether the focal length parameter needs to be adjusted;
    如果是,则基于所述位置信息,调整所述焦距参数,得到所述调整后的聚焦参数;If so, adjust the focus parameter based on the position information to obtain the adjusted focus parameter;
    如果否,则所述调整后的聚焦参数和当前不需要调整的聚焦参数相同。If not, the adjusted focus parameter is the same as the focus parameter that currently does not need to be adjusted.
  9. 根据权利要求1所述的方法,其特征在于,所述基于所述第二对象图像对相应的图像采集参数进行调整处理,包括:The method according to claim 1, characterized in that the adjustment of corresponding image acquisition parameters based on the second object image includes:
    基于所述第二对象图像,判定是否需要调整相应的图像采集参数;Based on the second object image, determine whether corresponding image acquisition parameters need to be adjusted;
    如果是,则基于所述第二对象图像对相应的所述图像采集参数进行调整处理,得到相应的处理后的图像采集参数;If yes, adjust the corresponding image acquisition parameters based on the second object image to obtain the corresponding processed image acquisition parameters;
    如果否,当前不需要处理的所述相应的所述图像采集参数保持不变。If not, the corresponding image acquisition parameters that currently do not need to be processed remain unchanged.
  10. 一种图像采集参数调整系统,包括图像采集设备、综合测试卡和图像采集参数调整装置,其特征在于:An image acquisition parameter adjustment system, including image acquisition equipment, a comprehensive test card and an image acquisition parameter adjustment device, which is characterized by:
    所述图像采集参数调整装置与所述图像采集设备连接,所述图像采集设备和所持综合测试卡连接;The image acquisition parameter adjustment device is connected to the image acquisition equipment, and the image acquisition equipment is connected to the comprehensive test card held;
    所述图像采集参数调整装置包括:The image acquisition parameter adjustment device includes:
    获取模块,用于获取所述图像采集设备对所述综合测试卡进行图像采集得到的初始综合测试图;所述综合测试卡中设置有第一调整参照对象和至少一种第二调整参照对象;所述第一调整参照对象用于对焦距参数进行调整;每种第二调整参照对象用于对相应的图像采集参数进行调整;An acquisition module, configured to acquire an initial comprehensive test chart obtained by collecting images of the comprehensive test card by the image acquisition device; the comprehensive test card is provided with a first adjustment reference object and at least one second adjustment reference object; The first adjustment reference object is used to adjust the focal length parameter; each second adjustment reference object is used to adjust the corresponding image acquisition parameter;
    识别模块,用于识别所述第一调整参照对象在所述初始综合测试图中对应的第一对象图像的位置信息,并基于所述位置信息进行焦距参数调整;控制所述图像采集设备基于调整后的焦距参数对综合测试卡进行图像采集,得到目标综合测试图;An identification module for identifying the position information of the first object image corresponding to the first adjustment reference object in the initial comprehensive test chart, and adjusting the focal length parameter based on the position information; controlling the image acquisition device based on the adjustment The final focal length parameter is used to collect images of the comprehensive test card to obtain the target comprehensive test chart;
    调整模块,用于识别所述第二调整参照对象在所述目标综合测试图中对应的第二对象图像;基于所述第二对象图像对相应的图像采集参数进行调整处理。An adjustment module, configured to identify the second object image corresponding to the second adjustment reference object in the target comprehensive test chart; and adjust the corresponding image acquisition parameters based on the second object image.
  11. 根据权利要求10所述的图像采集参数调整系统,其特征在于:The image acquisition parameter adjustment system according to claim 10, characterized in that:
    所述综合测试卡包括卡体;The comprehensive test card includes a card body;
    所述卡体的表面上设置有所述第一调整参照对象和所述至少一种第二调整参照对象。The first adjustment reference object and the at least one second adjustment reference object are provided on the surface of the card body.
  12. 根据权利要求11所述的图像采集参数调整系统,其特征在于,所述第一调整参照对象包括多个不同形状的、且锐度大于锐度阈值的参照图案;所述第二调整参照对象包括白平衡调整色块和颜色校正色块中的至少一种。The image acquisition parameter adjustment system according to claim 11, wherein the first adjustment reference object includes a plurality of reference patterns with different shapes and sharpness greater than a sharpness threshold; the second adjustment reference object includes At least one of a white balance adjustment patch and a color correction patch.
  13. 根据权利要求11所述的综合测试卡,其特征在于,所述综合测试卡还包括标识码和空白区域;所述标识码用于标识综合测试卡的身份信息;所述空白区域用于填入目标信息,所述目标信息表征需要填入的信息。The comprehensive test card according to claim 11, characterized in that the comprehensive test card further includes an identification code and a blank area; the identification code is used to identify the identity information of the comprehensive test card; the blank area is used to fill in Target information, which represents the information that needs to be filled in.
  14. 一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至9中任一项所述的方法的步骤。An electronic device includes a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method described in any one of claims 1 to 9 are implemented.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9中任一项所述的方法的步骤。A computer-readable storage medium with a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.
PCT/CN2022/121517 2022-07-13 2022-09-27 Image acquisition parameter adjustment method and system, electronic device, and storage medium WO2024011756A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210819683.8 2022-07-13
CN202210819683.8A CN115170426A (en) 2022-07-13 2022-07-13 Image acquisition parameter adjusting method, comprehensive test card, device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2024011756A1 true WO2024011756A1 (en) 2024-01-18

Family

ID=83493561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/121517 WO2024011756A1 (en) 2022-07-13 2022-09-27 Image acquisition parameter adjustment method and system, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN115170426A (en)
WO (1) WO2024011756A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050213128A1 (en) * 2004-03-12 2005-09-29 Shun Imai Image color adjustment
CN108833770A (en) * 2018-05-23 2018-11-16 释码融和(上海)信息科技有限公司 Image definition calculation method, calculating equipment and focusing system for focusing
CN110519588A (en) * 2019-09-05 2019-11-29 普联技术有限公司 For the Approach for detecting image sharpness of focusing, device and photographic device
CN111031311A (en) * 2020-01-14 2020-04-17 深圳安智杰科技有限公司 Imaging quality detection method and device, electronic equipment and readable storage medium
CN114374760A (en) * 2022-01-21 2022-04-19 惠州Tcl移动通信有限公司 Image testing method and device, computer equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050213128A1 (en) * 2004-03-12 2005-09-29 Shun Imai Image color adjustment
CN108833770A (en) * 2018-05-23 2018-11-16 释码融和(上海)信息科技有限公司 Image definition calculation method, calculating equipment and focusing system for focusing
CN110519588A (en) * 2019-09-05 2019-11-29 普联技术有限公司 For the Approach for detecting image sharpness of focusing, device and photographic device
CN111031311A (en) * 2020-01-14 2020-04-17 深圳安智杰科技有限公司 Imaging quality detection method and device, electronic equipment and readable storage medium
CN114374760A (en) * 2022-01-21 2022-04-19 惠州Tcl移动通信有限公司 Image testing method and device, computer equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN115170426A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
US10803554B2 (en) Image processing method and device
CN107633526B (en) Image tracking point acquisition method and device and storage medium
WO2022141178A1 (en) Image processing method and apparatus
JP2004522228A (en) A method for representing and comparing digital images.
US20150023587A1 (en) Method for generating a depth map, related system and computer program product
WO2022127225A1 (en) Image stitching method and apparatus, and device and storage medium
CN110288612A (en) Nameplate positioning and bearing calibration and equipment
US20190279022A1 (en) Object recognition method and device thereof
CN107844803B (en) Picture comparison method and device
CN110909772B (en) High-precision real-time multi-scale dial pointer detection method and system
CN116320334A (en) Projection picture color correction method, apparatus, projection device and storage medium
US11699303B2 (en) System and method of acquiring coordinates of pupil center point
CN117557565A (en) Detection method and device for lithium battery pole piece
WO2024011756A1 (en) Image acquisition parameter adjustment method and system, electronic device, and storage medium
WO2023066142A1 (en) Target detection method and apparatus for panoramic image, computer device and storage medium
CN111630569B (en) Binocular matching method, visual imaging device and device with storage function
JP2023540995A (en) Method and device for determining values of camera parameters
WO2020107196A1 (en) Photographing quality evaluation method and apparatus for photographing apparatus, and terminal device
CN112634377B (en) Camera calibration method, terminal and computer readable storage medium of sweeping robot
CN111209922B (en) Image color system style marking method, device, equipment and medium based on svm and opencv
CN114463534A (en) Target key point detection method, device, equipment and storage medium
AU2017204848A1 (en) Projecting rectified images on a surface using uncalibrated devices
CN113095147A (en) Skin area detection method, system, image processing terminal and storage medium
CN108665434B (en) Image synthesis method and device
Shao et al. Digital image aesthetic composition optimization based on perspective tilt correction

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22950867

Country of ref document: EP

Kind code of ref document: A1