A method, device and electronic device for generating a simulated image
By performing multiple rounds of parameter calibration on the simulation camera equipment, a simulated image that is closer to the real image is generated, which solves the problem of insufficient real quality of the existing simulated image and improves the training and testing effect of deep learning algorithms.
Patent Information
- Application Number
- CN202111624717.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-28
AI Technical Summary
The image quality generated by existing simulation imaging devices is not realistic enough, resulting in large differences between the domains between the simulated images and the real images, affecting the training and testing effects of deep learning algorithms.
By performing multiple rounds of calibration of the basic parameters, defect parameters, brightness parameters, high frequency parameters and chrominance parameters of the simulation camera equipment, a virtual calibration environment is established to generate simulated images closer to the real image.
The quality of the simulated image is improved, making it closer to the images taken by real camera equipment, reducing the differences between the simulation and real images, thereby improving the training and testing effects of deep learning algorithms.
Smart Images

Figure CN114299159B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer information processing, and in particular relates to a simulation image generation method, device, system and electronic equipment. Background Art
[0002] The current development of computer vision mainly relies on the improvement of deep learning algorithms, which require a large amount of data to train models. However, the cost of collecting and labeling real data is relatively high, and data under various special weather conditions (such as rain, snow, fog, etc.), special lighting and extreme working conditions are even more difficult to collect. Therefore, simulation data has become an important source of deep learning training and testing data.
[0003] Camera device simulation can be used to obtain a large amount of simulated image data. Camera device simulation usually constructs a virtual three-dimensional model of the real world through graphics technology, adds color and optical properties to the three-dimensional model according to the real material and texture of the object, and uses physically based rendering and lighting technology to render the three-dimensional world from the perspective of the camera device.
[0004] This approach results in very different image quality results in the simulated scenes from the perspectives of cameras of different brands and models due to differences in lens characteristics, the photoelectric conversion process of the image sensor, and the ISP (Image Signal Processor) processing process. Computer vision deep learning algorithms rely on image quality details to extract target features, which leads to large inter-domain differences between the image sets of simulated camera devices and the image sets of real camera devices, and the simulated images are not realistic enough. Summary of the invention
[0005] The purpose of the embodiments of the present disclosure is to provide a method, device, system and electronic equipment for generating a simulated image, which realizes the calibration of parameters of a simulated camera device and improves the quality of the simulated image.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating a simulated image, the method comprising:
[0007] Calibrate the virtual calibration environment according to the basic parameters of the simulated camera device to obtain a first calibration result;
[0008] According to the first calibration result, calibrate the defect parameters of the simulation camera device to obtain a second calibration result;
[0009] Calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result;
[0010] Calibrate the high-frequency parameters of the simulated camera device according to the third calibration result to obtain a fourth calibration result;
[0011] Calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result;
[0012] According to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result, the target object is rendered to generate a simulation image.
[0013] Optionally, the basic parameters include: resolution and field of view; calibrating the basic parameters of the simulated camera device in the virtual calibration environment to obtain a first calibration result includes:
[0014] Determine the resolution of the simulated camera device according to the resolution of the real camera device;
[0015] Determine the field of view of the simulated camera device according to the field of view of the real camera device;
[0016] Determining a first target distance between a simulated camera device and a virtual calibration plate in a virtual calibration environment according to the field of view angle;
[0017] When the light intensity at the center point of the virtual calibration plate is the same as the real light intensity, the light intensity of the virtual point light source is obtained according to the light intensity at the center point of the virtual calibration plate and a second target distance between the virtual point light source and the virtual calibration plate, where the second target distance is a preset distance;
[0018] The first target distance, the second target distance, and the light intensity of the virtual point light source are determined as a first calibration result.
[0019] Optionally, the simulation camera device is located on a line connecting the virtual point light source and the center of the virtual calibration plate, and the first target distance is calculated according to the field of view angle and all images of the virtual calibration plate taken by the simulation camera device.
[0020] Optionally, the defect parameters include: distortion parameters and brightness uniformity parameters; and according to the first calibration result, the defect parameters of the simulated camera device are calibrated to obtain a second calibration result, including:
[0021] When the first calibration result is obtained, the distortion parameters of the simulated camera device are calibrated according to a preset distortion parameter calibration algorithm to obtain radial distortion parameters and tangential distortion parameters of the simulated camera device;
[0022] Obtaining a brightness uniformity parameter of the simulated camera device according to a brightness and darkness variation gradient of a first target image obtained by photographing a pure white calibration plate by the simulated camera device in a virtual calibration environment;
[0023] The radial distortion parameter, the tangential distortion parameter and the brightness uniformity parameter of the simulated camera device are determined as the second calibration result.
[0024] Optionally, the brightness parameters include: exposure value and tone response curve;
[0025] According to the second calibration result, the brightness parameter of the simulated camera device is calibrated to obtain a third calibration result, including:
[0026] When the second calibration result is obtained, the exposure value of the simulated camera device is obtained according to the exposure value of the second target image obtained by shooting the first test card by the simulated camera device in the virtual calibration environment, and the tone response curve of the simulated camera device is obtained according to the slope of the tone response curve of the second target image;
[0027] The exposure value and tone response curve of the simulated camera device are determined as the third calibration result.
[0028] Optionally, the high-frequency parameters include: clarity, noise, and dispersion purple fringing parameters; according to the third calibration result, the high-frequency parameters of the simulated camera device are calibrated to obtain a fourth calibration result, including:
[0029] When the third calibration result is obtained, the clarity of the simulated camera device is obtained according to the clarity of the third target image obtained by shooting the second test card by the simulated camera device in the virtual calibration environment, and the dispersion purple fringing parameters of the simulated camera device are obtained according to the dispersion purple fringing of the third target image;
[0030] Obtaining the noise of the simulated camera device according to the noise of the fourth target image obtained by photographing the third test card by the simulated camera device in the virtual calibration environment;
[0031] The clarity, noise and dispersion purple fringing parameters of the simulated camera device are determined as the fourth calibration result.
[0032] Optionally, the chromaticity parameters include: white balance parameters and color restoration parameters; according to the fourth calibration result, the chromaticity parameters of the simulated camera device are calibrated to obtain a fifth calibration result, including:
[0033] When the fourth calibration result is obtained, the white balance parameters and color restoration parameters of the simulated camera device are obtained according to the white balance parameters and color restoration parameters of the fifth target image obtained by photographing the fourth test card by the simulated camera device in the virtual calibration environment;
[0034] The white balance parameter and the color restoration parameter of the simulated camera device are determined as the fifth calibration result.
[0035] In a second aspect, an embodiment of the present disclosure provides a simulation image generation device, including:
[0036] A first obtaining module, used to calibrate a virtual calibration environment according to basic parameters of the simulated camera device to obtain a first calibration result;
[0037] A second obtaining module is used to calibrate the defect parameters of the simulation camera device according to the first calibration result to obtain a second calibration result;
[0038] A third obtaining module, used to calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result;
[0039] A fourth obtaining module, used to calibrate the high-frequency parameters of the simulation camera device according to the third calibration result to obtain a fourth calibration result;
[0040] A fifth obtaining module, used to calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result;
[0041] The image generation module is used to render the target object according to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result to generate a simulation image.
[0042] Optionally, the basic parameters include: resolution and field of view; the first acquisition module includes:
[0043] A first obtaining submodule is used to determine the resolution of the simulated camera device according to the resolution of the real camera device;
[0044] A second obtaining submodule is used to determine the field of view angle of the simulated camera device according to the field of view angle of the real camera device;
[0045] A third obtaining submodule is used to determine a first target distance between the simulated camera device and the virtual calibration plate in the virtual calibration environment according to the field of view;
[0046] A fourth obtaining submodule is used to obtain the light intensity of the virtual point light source according to the light intensity of the center point of the virtual calibration plate and a second target distance between the virtual point light source and the virtual calibration plate when the light intensity of the center point of the virtual calibration plate is the same as the real light intensity, where the second target distance is a preset distance;
[0047] The fifth obtaining submodule is used to determine the first target distance, the second target distance and the light intensity of the virtual point light source as a first calibration result.
[0048] Optionally, the simulation camera device is located on a line connecting the virtual point light source and the center of the virtual calibration plate, and the first target distance is calculated according to the field of view angle and all images of the virtual calibration plate taken by the simulation camera device.
[0049] Optionally, the defect parameters include: distortion parameters and brightness uniformity parameters; the second acquisition module includes:
[0050] A sixth obtaining submodule is used to calibrate the distortion parameters of the simulated camera device according to a preset distortion parameter calibration algorithm when the first calibration result is obtained, so as to obtain radial distortion parameters and tangential distortion parameters of the simulated camera device;
[0051] A seventh obtaining submodule is used to obtain a brightness uniformity parameter of the simulated camera device according to a brightness and darkness variation gradient of a first target image obtained by photographing a pure white calibration plate by the simulated camera device in a virtual calibration environment;
[0052] The eighth obtaining submodule is used to determine the radial distortion parameter, the tangential distortion parameter and the brightness uniformity parameter of the simulated camera device as the second calibration result.
[0053] Optionally, the brightness parameter includes: an exposure value and a tone response curve; and the third obtaining module includes:
[0054] A ninth obtaining submodule is used for obtaining, when the second calibration result is obtained, the exposure value of the simulated camera device according to the exposure value of the second target image obtained by shooting the first test card by the simulated camera device in the virtual calibration environment, and the tone response curve of the simulated camera device according to the slope of the tone response curve of the second target image;
[0055] The tenth obtaining submodule is used to determine the exposure value and the tone response curve of the simulated camera device as the third calibration result.
[0056] Optionally, the high-frequency parameters include: clarity, noise and dispersion purple fringing parameters; the fourth acquisition module includes:
[0057] An eleventh obtaining submodule is used to obtain the clarity of the simulated camera device according to the clarity of the third target image obtained by shooting the second test card by the simulated camera device in the virtual calibration environment when the third calibration result is obtained, and to obtain the dispersion purple fringing parameters of the simulated camera device according to the dispersion purple fringing of the third target image;
[0058] A twelfth obtaining submodule is used to obtain the noise of the simulated camera device according to the noise of the fourth target image obtained by shooting the third test card by the simulated camera device in the virtual calibration environment;
[0059] The thirteenth obtaining submodule is used to determine the clarity, noise and dispersion purple fringing parameters of the simulated camera device as a fourth calibration result.
[0060] Optionally, the chromaticity parameters include: white balance parameters and color restoration parameters; the fifth obtaining module includes:
[0061] A fourteenth obtaining submodule is used to obtain white balance parameters and color restoration parameters of the simulated camera device according to white balance parameters and color restoration parameters of a fifth target image obtained by photographing the fourth test card by the simulated camera device in the virtual calibration environment when the fourth calibration result is obtained;
[0062] The fifteenth obtaining submodule is used to determine the white balance parameters and color restoration parameters of the simulated camera device as the fifth calibration result.
[0063] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the simulation image generation method of the first aspect.
[0064] In a fourth aspect, an embodiment of the present disclosure provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the simulation image generation method of the first aspect are implemented.
[0065] In the disclosed embodiment, the simulated camera device is calibrated based on the real camera device, and a full process of image quality of the simulated camera device from calibration to generation of simulated images is established, so that a simulated image with image detail effects closer to those obtained by the real camera device can be simulated through the simulated camera device, thereby improving the quality of the simulated image. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 is a flow chart of a simulation image generation method provided by an embodiment of the present disclosure;
[0067] Figure 2 is a schematic diagram of the layout of a virtual calibration environment provided by an embodiment of the present disclosure;
[0068] Figure 3 It is a schematic diagram of a calibration process of a simulated camera device in a virtual calibration environment provided by an embodiment of the present disclosure;
[0069] Figure 4 is a structural schematic diagram of a simulation image generating device provided by an embodiment of the present disclosure;
[0070] Figure 5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure;
[0071] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present disclosure. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present disclosure to clearly describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present disclosure are within the scope of protection of the present disclosure.
[0073] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0074] The disclosed embodiments mainly relate to the generation of simulated images of simulated camera devices. Based on the real camera device, the simulated camera device is calibrated based on the image quality of the simulated image. The image quality here includes the distortion, white balance, color reproduction, dynamic range, signal-to-noise ratio and clarity of the simulated image. By calibrating the simulated camera device, the image quality difference between the simulated camera device and the real camera device at the microscopic pixel level is reduced. The simulated image obtained by the calibrated simulated camera device is closer to the real image obtained by the real camera device.
[0075] The virtual calibration environment and the scene rendered by the target object in which the simulation camera device involved in the present disclosure is located can be used to simulate a three-dimensional virtual space, or can be used to simulate a two-dimensional virtual space, and the three-dimensional virtual space or the two-dimensional virtual space can be an open space. The scene rendered by the virtual calibration environment and the target object can be used to simulate the real environment in reality. Of course, in a possible implementation, the scene rendered by the virtual calibration environment and the target object can also correspond to the real scene. The scene rendered by the target object in the virtual calibration environment can also support time control, and can freely adjust night and day, and can also support the weather system to set sunny days, rainy days, snowy days, foggy days, etc.
[0076] It should be noted that the virtual calibration environment and the scene in which the target object is rendered may include multiple virtual objects, wherein the virtual object may be a virtual image in the virtual scene that is used to represent a user or other image, and the virtual image may be in any form, for example, a simulated camera device, a virtual calibration plate, a virtual point light source, and a virtual calibration dark box, etc., which is not limited in this disclosure. The virtual calibration environment and the scene in which the target object is rendered may include multiple virtual objects, each of which has its own shape, structure, and volume in the virtual scene, and occupies a portion of the space in the virtual scene.
[0077] The simulation image generation method, device, system and electronic device provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0078] Figure 1 is a flow chart of a simulation image generation method provided by an embodiment of the present disclosure, see Figure 1 , the method may include the following steps:
[0079] Step 101, calibrating a virtual calibration environment according to basic parameters of a simulated camera device to obtain a first calibration result;
[0080] The basic parameters here include resolution and field of view. The resolution is used to determine the fineness of the details of the simulated image. The higher the resolution of the simulated image, the more pixels it contains and the clearer the simulated image. The field of view is used to determine the field of view of the optical instrument (camera). The larger the field of view, the larger the field of view and the smaller the optical magnification. That is, when the target object exceeds the field of view of the optical instrument (camera), the optical instrument (camera) will not capture the target object.
[0081] In an optional embodiment of the present disclosure, step 101 includes:
[0082] Step 1011, determining the resolution of the simulated camera device according to the resolution of the real camera device; here, preferably, the resolution of the real camera device can be determined as the resolution of the simulated camera device;
[0083] Step 1012, determining the field of view of the simulation camera device according to the field of view of the real camera device; here, preferably, the field of view of the real camera device can be determined as the field of view of the simulation camera device; for example, when the real image of the real camera device is 1920×1080 pixels and the horizontal field of view is 60°, it is preferred to determine the resolution of the simulation camera device to be 1920×1080 and the horizontal field of view is 60°;
[0084] Step 1013, determining a first target distance between the simulated camera device and the virtual calibration plate in the virtual calibration environment according to the field of view;
[0085] Here, the virtual calibration environment where the simulated camera equipment is located is described:
[0086] Figure 2 is a schematic diagram of the layout of the virtual calibration environment provided by the embodiment of the present disclosure, see Figure 2 , the virtual calibration environment includes a virtual calibration dark box, a virtual calibration plate arranged inside the virtual calibration dark box, a virtual point light source and a simulation camera device;
[0087] A virtual calibration dark box is built in the virtual calibration environment. The virtual calibration dark box is preferably made of absolute black body physical material, which is an ideal box that is completely black and does not reflect any light. The virtual calibration plate set inside the virtual calibration dark box will not be disturbed by any light from the external environment of the virtual calibration dark box, that is, the virtual calibration dark box can completely isolate any light interference from the outside of the box.
[0088] A virtual calibration plate is arranged inside the virtual calibration dark box. The virtual calibration plate is preferably made of standard Lambertian physical material. When light is irradiated to the virtual calibration plate, the virtual calibration plate can be completely diffusely reflected. In addition, in order not to produce specular reflection highlights that affect the shooting effect of the simulated camera equipment, the virtual calibration plate adopts a reflective type. The reflectivity of each block of the virtual calibration plate for different wavelengths corresponding to the three primary colors "red, green, and blue" is consistent with that of the real calibration plate, so as to ensure that the final color presented is consistent with the real calibration plate. In addition, the size of the virtual calibration plate is preferably 90cm*60cm, and the size of the black and white grid on each virtual calibration plate is preferably 6cm*6cm;
[0089] A virtual point light source is set at a certain distance from the virtual calibration plate; the virtual point light source preferably adopts a white point light source that meets the D65 power spectrum distribution, that is, the white standard light source specified by the International Illumination Commission, and an ideal light source with a color temperature of 6500K.
[0090] In an optional embodiment of the present disclosure, the simulated camera device is located on the line connecting the virtual point light source and the center of the virtual calibration plate, and the first target distance is calculated based on the field of view angle and all images of the virtual calibration plate taken by the simulated camera device. Here, the field of view angle of the simulated camera device is determined to be the same angle as the field of view angle of the real camera device, and the first target distance between the simulated camera device and the virtual calibration plate can be calculated by setting the simulated field of view angle at a position where all images of the virtual calibration plate can be taken.
[0091] Step 1014, when the light intensity at the center point of the virtual calibration plate is the same as the real light intensity, the light intensity of the virtual point light source is obtained according to the light intensity at the center point of the virtual calibration plate and a second target distance between the virtual point light source and the virtual calibration plate, where the second target distance is a preset distance;
[0092] In this embodiment, the illumination intensity of any point in the virtual calibration dark box is inversely proportional to the square of the distance of the point from the virtual point light source; based on the inverse relationship and the preset second target distance, the light intensity of the center point of the virtual calibration plate is set to be the same as the real light intensity, and the illumination intensity (i.e., light intensity) of the virtual point light source can be calculated;
[0093] In addition, it should be noted that, since the virtual calibration environment is a virtual space, the simulated camera device has no entity, so the simulated camera device in the virtual calibration environment has no entity and will not cause light occlusion to the light generated by the virtual point light source, and the imaging plane of the simulated camera device is parallel to the plane of the virtual calibration plate;
[0094] Here, the actual light intensity is preferably obtained by setting the illuminance meter at the center point of the actual calibration plate in a real-world environment and calibrating to obtain the actual light intensity.
[0095] In an implementation example, the light intensity of the virtual point light source is obtained by the light intensity of the center point of the virtual calibration plate and the second target distance between the virtual point light source and the virtual calibration plate, specifically including:
[0096] The virtual point light source is fixedly set at a position 3.162 meters away from the center of the virtual calibration plate, that is, the preset second target distance is 3.162 meters; when the real light intensity is 4W candela (cd), the illumination intensity of the virtual point light source should also be 4W candela (cd). Since the solid angle of the entire point light source of the virtual point light source is 4π steradian (sr), the luminous flux is about 50W lumens (lm), where 1 lumen (lm) is equal to the luminous flux emitted by a virtual point light source with a uniform illumination intensity of 1 candela (cd) within a unit solid angle of 1 steradian (sr), that is, 1lm=1cd*1sr; it can be seen that the illumination intensity at a distance of 1 meter from the virtual point light source is 4W lux (cd*sr / m 2 ); From the spherical area, we know that the spherical area corresponding to 1 steradian at S meters is S 2 (m 2 ), the illumination intensity of the virtual calibration plate at a distance of 3.162 meters (the second target distance) from the virtual point light source is about 4000 lux (cd*sr / m 2 ).
[0097] Step 1015: determine the first target distance, the second target distance, and the light intensity of the virtual point light source as a first calibration result.
[0098] In this embodiment, the first target distance, the second target distance and the light intensity of the virtual point light source are determined as the first calibration result. In the subsequent calibration process, the first target distance, the second target distance and the light intensity of the virtual point light source are fixed values. Similarly, the resolution and field of view determined in step 1011 and step 1012 are also fixed basic parameters in the subsequent calibration process.
[0099] Step 102, calibrating the defect parameters of the simulation camera device according to the first calibration result to obtain a second calibration result;
[0100] The defect parameters here are preferably distortion parameters and brightness uniformity parameters; wherein, the distortion parameters are used to determine the position of each block of the virtual calibration plate in the simulated image; the distortion parameters include radial distortion coefficients (k1, k2 and k3) and tangential distortion coefficients (p1 and p2); the radial distortion caused by the radial distortion coefficient usually occurs in the process of converting the camera coordinate system to the image physical coordinate system, while the tangential distortion caused by the tangential distortion coefficient usually occurs in the production process of the camera due to the non-parallelism of the photosensitive element plane and the lens; the brightness uniformity parameter can reflect the halo and dark corner conditions of the simulated image, and is used to determine the brightness and darkness of each block in the simulated image; when the uniformity of the brightness uniformity parameter is within the target limit, the photosensitivity of the simulated image will be uniform, and the quality of the generated simulated image will be improved.
[0101] In an optional embodiment of the present disclosure, step 102 includes:
[0102] Step 1021, when the first calibration result is obtained, the distortion parameters of the simulated camera device are calibrated according to a preset distortion parameter calibration algorithm to obtain radial distortion parameters and tangential distortion parameters of the simulated camera device;
[0103] Among them, the preset distortion parameter calibration algorithm can be an algorithm that realizes distortion parameter calibration through geometric distortion measurement standards, or it can be Zhang's chessboard calibration method, or it can be other methods that can realize the calibration of distortion parameters of simulated camera equipment. This application is not limited to this.
[0104] When the error between the radial distortion parameters of the real camera device and the radial distortion parameters of the simulated camera device is within the first preset range, and the error between the tangential distortion parameters of the real camera device and the tangential distortion parameters of the simulated camera device is within the second preset range, it can be determined that the simulation effect of the bright distortion parameters of the simulated camera device at this time is better.
[0105] Step 1022, obtaining a brightness uniformity parameter of the simulated camera device according to a brightness and darkness variation gradient of a first target image obtained by photographing a pure white calibration plate by the simulated camera device in a virtual calibration environment;
[0106] Here, the calibration of the brightness uniformity parameter may specifically include: photographing a pure white calibration plate by a simulation camera device to obtain a first target image; and calculating a brightness-darkness variation gradient according to the center of the first target image to obtain the brightness uniformity parameter of the simulation camera device.
[0107] When the error between the brightness uniformity parameter of the real camera device and the brightness uniformity parameter of the simulated camera device is within the third preset range, it can be determined that the simulation effect of the brightness uniformity parameter of the simulated camera device at this time is better.
[0108] Step 1023: determine the radial distortion parameter, tangential distortion parameter, and brightness uniformity parameter of the simulated camera device as a second calibration result.
[0109] In this embodiment, the calibrated radial distortion parameters, tangential distortion parameters and brightness uniformity parameters are determined as the second calibration result. In the subsequent calibration process, on the basis that the first target distance, the second target distance, the light intensity of the virtual point light source and the basic parameters in step 101 are fixed unchanged, the radial distortion parameters, the tangential distortion parameters and the brightness uniformity parameters are also fixed values.
[0110] Step 103, calibrating the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result;
[0111] Here, the brightness parameters of the simulated camera device preferably include an exposure value and a tone response curve; the exposure value and the tone response curve reflect the brightness and darkness of the simulated image generated by the simulated camera device, and affect the overall brightness, contrast and dynamic range value of the simulated image;
[0112] Among them, the exposure value EV is a logarithmic scale system with base 2 in the camera, which is generally controlled by the camera's shutter, aperture and sensitivity. It can be expressed by the formula:
[0113] Calculated;
[0114] Wherein, N is the aperture (f value) of the simulated camera device; t is the exposure time (shutter) of the simulated camera device, in seconds; it can be seen from the above formula that when the exposure value increases, the shutter speed will be faster or the aperture f value will be larger; each increase of 1 in the exposure value will change the exposure of the simulated camera device by one level, that is, the exposure will be halved;
[0115] The tone response curve is used to describe the process by which the simulated camera device photoelectrically converts the illumination value of an object on the sensor plane and processes it into the brightness value of each pixel; the tone response curve is preferably an S-curve, and the tone response curve in the form of an S-curve is insensitive to lower numerical responses and higher numerical responses, but sensitive to intermediate numerical responses.
[0116] The exposure value and the tone response curve need to be calibrated at the same time. The exposure value will affect the shape of the tone response curve. For example, when the exposure value is underexposed, the tone response curve value will be located in the dark part of the curve.
[0117] In an optional embodiment of the present disclosure, step 103 includes:
[0118] Step 1031, when the second calibration result is obtained, the exposure value of the simulated camera device is obtained according to the exposure value of the second target image obtained by shooting the first test card (such as a virtual grayscale card) by the simulated camera device in the virtual calibration environment, and the tone response curve of the simulated camera device is obtained according to the slope of the tone response curve of the second target image;
[0119] Here, based on the second calibration result, the basic parameters and defect parameters of the simulated camera device are set; the test of the exposure value and tone response curve of the simulated camera device belongs to the test of the photoelectric conversion function. In the virtual calibration environment, the test process of the photoelectric conversion function of the simulated camera device is a black box test process. Therefore, by simulating a second target image with the same exposure value and tone response curve slope as the real camera device, the exposure value and tone response curve are calibrated; when the exposure value of the second target image is obtained by shooting the virtual grayscale card, the second target image is preferably a grayscale image;
[0120] Step 1032: determine the exposure value and tone response curve of the simulated camera device as a third calibration result.
[0121] In this embodiment, the calibrated exposure value and tone response curve are determined as the third calibration result. In the subsequent calibration process, on the basis that the basic parameters and defect parameters remain unchanged, the exposure value and tone response curve are also fixed values.
[0122] Step 104, calibrating the high-frequency parameters of the simulated camera device according to the third calibration result to obtain a fourth calibration result;
[0123] Here, the high-frequency parameters of the simulated camera device preferably include clarity, noise and dispersion purple fringing parameters;
[0124] The clarity is used to reflect the edge quality of the simulated image. The clarity will be affected by the lens, sensor and ISP (Image Signal Processor) algorithm of the simulated camera device. The clarity calibration is preferably performed through a virtual e-SFR chart.
[0125] The noise is generated during the photoelectric conversion process;
[0126] The dispersion purple fringing parameter is related to the dispersion caused by the refraction of light at different wavelengths after passing through the lens. The dispersion purple fringing parameter is the chromatic aberration purple fringing phenomenon produced at the high-contrast edge of the image after the color interpolation of the sensor mask filter;
[0127] It should be noted that the above-mentioned clarity, noise and dispersion purple fringing parameters will affect each other, and the three should be calibrated at the same time, and cannot be calibrated in a certain order.
[0128] In an optional embodiment of the present disclosure, step 104 includes:
[0129] Step 1041, when the third calibration result is obtained, the clarity of the simulated camera device is obtained according to the clarity of the third target image obtained by shooting the second test card (such as the virtual e-SFR chart) by the simulated camera device in the virtual calibration environment, and the dispersion purple fringing parameters of the simulated camera device are obtained according to the dispersion purple fringing of the third target image;
[0130] Here, based on the calibration of basic parameters, defect parameters and high-frequency parameters, the clarity is calibrated through a virtual e-SFR chart, and the dispersion purple fringing parameters of the simulated camera equipment can be obtained in combination with the clarity calibration, that is, the color difference of the edge of the simulated image is calibrated with a virtual e-SFR chart.
[0131] Step 1042, obtaining the noise of the simulated camera device according to the noise of the fourth target image obtained by photographing the third test card (such as the virtual test card) by the simulated camera device in the virtual calibration environment;
[0132] Among them, the virtual test card can be used to calibrate noise and the signal-to-noise ratio of noise. The signal-to-noise ratio can be calculated according to the noise through the formula db=10lg(s / n), where db is the decibel number of noise and s / n is the signal-to-noise ratio of noise.
[0133] Step 1043: Determine the clarity, noise, and dispersion purple fringing parameters of the simulated camera device as a fourth calibration result.
[0134] In this embodiment, the calibrated clarity, noise and dispersion purple fringing parameters are taken as the fourth calibration result. In the subsequent calibration process, on the basis of the basic parameters, defect parameters and brightness parameters being fixed, the clarity, noise and dispersion purple fringing parameters are also fixed values.
[0135] It should be noted that it may also include:
[0136] The dynamic range is calibrated according to the clarity, noise and dispersion purple fringing parameters.
[0137] Step 105, calibrating the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result;
[0138] Here, the chromaticity parameters of the simulated camera device preferably include white balance parameters and color reproduction parameters; wherein the white balance parameter is an indicator used to describe the accuracy of white after the three primary colors of red, green and blue are mixed in the display; the color reproduction parameter refers to the degree of color reproduction of the simulated image to the actual captured picture.
[0139] In an optional embodiment of the present disclosure, step 105 includes:
[0140] Step 1051, when the fourth calibration result is obtained, the white balance parameters and color restoration parameters of the simulated camera device are obtained according to the white balance parameters and color restoration parameters of the fifth target image obtained by shooting the fourth test card (such as a virtual 24-color standard color card) by the simulated camera device in the virtual calibration environment;
[0141] In this embodiment, based on the fourth calibration result, a virtual 24-color standard color card is photographed in a virtual calibration darkroom in a virtual calibration environment to calibrate white balance parameters and color restoration parameters, so that each color block in the picture obtained by photographing the virtual 24-color standard color card in the virtual calibration environment is close to the color block in the virtual 24-color standard color card.
[0142] Step 1052: determine the white balance parameters and color restoration parameters of the simulated camera device as the fifth calibration result.
[0143] In this embodiment, the calibrated white balance parameters and color restoration parameters are taken as the fifth calibration result. In the subsequent calibration process, on the basis that the basic parameters, defect parameters, brightness parameters and high-frequency parameters remain unchanged, the white balance parameters and color restoration parameters are also fixed values.
[0144] Step 106 , rendering the target object according to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result to generate a simulation image.
[0145] In this embodiment, the basic parameters, defect parameters, brightness parameters, high-frequency parameters and chromaticity parameters are calibrated in sequence, and on this basis, the parameters of glare, camera delay and frame rate can be calibrated, and then the target object is rendered according to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result to generate a simulated image; the generated simulated image is closer to the real image; further, since the scene in which the target object is rendered is a virtual space, the rendering result in any virtual scene is obtained according to the calibrated simulated camera device, which greatly reduces the acquisition cost of data collection.
[0146] It should be noted that the simulation image generation method may further include:
[0147] Based on the fifth calibration result, calibrate the parameters of glare, delay and frame rate of the simulated camera device to obtain a sixth calibration result;
[0148] According to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result, the fifth calibration result and the sixth calibration result, the target object is rendered to generate a simulation video.
[0149] Here, the parameters of glare, camera delay and frame rate are calibrated so that the simulated video captured by the simulated camera is closer to the real video captured by the real camera.
[0150] Figure 3 is a schematic diagram of the calibration process of the simulated camera device in the virtual calibration environment provided by the embodiment of the present disclosure, see Figure 3 In another implementation example, calibrating a simulated camera device in a virtual calibration environment includes:
[0151] Step 31, calibrating the field of view angle and image resolution of the simulated camera device according to the real camera device; wherein the field of view angle and image resolution are basic parameters;
[0152] Step 32, based on the calibration of the basic parameters, the distortion parameters and the brightness uniformity are calibrated; wherein the distortion parameters and the brightness uniformity are defect parameters;
[0153] Step 33, calibrating the exposure value and the tone response curve on the basis that the basic parameters and the defect parameters have been calibrated; wherein the exposure value and the tone response curve are brightness parameters;
[0154] Step 34, based on the calibration of the basic parameters, defect parameters and brightness parameters, the clarity, noise and dispersion purple fringing are calibrated; wherein the clarity, noise and dispersion purple fringing are high-frequency parameters;
[0155] Step 35, calibrating white balance and color restoration based on the calibration of basic parameters, defect parameters, brightness parameters and high-frequency parameters; wherein white balance and color restoration are chromaticity parameters;
[0156] Wherein, in the simulation image generation method, step 35 may further include: calibrating the glare.
[0157] The simulated image or simulated video generated by the simulated camera device calibrated through the above steps 31 to 35 will be closer to the real image or real video captured by the real camera device.
[0158] The simulated image generation method in the disclosed embodiment calibrates the simulated camera device based on the real camera device, establishes a full process of image quality of the simulated camera device from calibration to generation of simulated images, and realizes the use of the simulated camera device to simulate a simulated image with image detail effects that are closer to those obtained by the real camera device, thereby improving the quality of the simulated image.
[0159] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, which will not be described one by one here.
[0160] Figure 4 is a structural diagram of a simulation image generation device provided by an embodiment of the present disclosure, see Figure 4 , the device 400 comprises:
[0161] A first obtaining module 401 is used to calibrate a virtual calibration environment according to basic parameters of a simulated camera device to obtain a first calibration result;
[0162] A second obtaining module 402 is used to calibrate the defect parameters of the simulation camera device according to the first calibration result to obtain a second calibration result;
[0163] A third obtaining module 403 is used to calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result;
[0164] A fourth obtaining module 404 is used to calibrate the high-frequency parameters of the simulated camera device according to the third calibration result to obtain a fourth calibration result;
[0165] A fifth obtaining module 405, configured to calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result;
[0166] The image generation module 406 is used to render the target object according to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result to generate a simulation image.
[0167] Optionally, the basic parameters include: resolution and field of view; the first obtaining module 401 includes:
[0168] A first obtaining submodule is used to determine the resolution of the simulated camera device according to the resolution of the real camera device;
[0169] A second obtaining submodule is used to determine the field of view angle of the simulated camera device according to the field of view angle of the real camera device;
[0170] A third obtaining submodule is used to determine a first target distance between the simulated camera device and the virtual calibration plate in the virtual calibration environment according to the field of view;
[0171] A fourth obtaining submodule is used to obtain the light intensity of the virtual point light source according to the light intensity of the center point of the virtual calibration plate and a second target distance between the virtual point light source and the virtual calibration plate when the light intensity of the center point of the virtual calibration plate is the same as the real light intensity, where the second target distance is a preset distance;
[0172] The fifth obtaining submodule is used to determine the first target distance, the second target distance and the light intensity of the virtual point light source as a first calibration result.
[0173] Optionally, the simulation camera device is located on a line connecting the virtual point light source and the center of the virtual calibration plate, and the first target distance is calculated according to the field of view angle and all images of the virtual calibration plate taken by the simulation camera device.
[0174] Optionally, the defect parameters include: distortion parameters and brightness uniformity parameters; the second obtaining module 402 includes:
[0175] A sixth obtaining submodule is used to calibrate the distortion parameters of the simulated camera device according to a preset distortion parameter calibration algorithm when the first calibration result is obtained, so as to obtain radial distortion parameters and tangential distortion parameters of the simulated camera device;
[0176] A seventh obtaining submodule is used to obtain a brightness uniformity parameter of the simulated camera device according to a brightness and darkness variation gradient of a first target image obtained by photographing a pure white calibration plate by the simulated camera device in a virtual calibration environment;
[0177] The eighth obtaining submodule is used to determine the radial distortion parameter, the tangential distortion parameter and the brightness uniformity parameter of the simulated camera device as the second calibration result.
[0178] Optionally, the brightness parameter includes: an exposure value and a tone response curve; the third obtaining module 403 includes:
[0179] A ninth obtaining submodule is used for obtaining, when the second calibration result is obtained, the exposure value of the simulated camera device according to the exposure value of the second target image obtained by shooting the first test card by the simulated camera device in the virtual calibration environment, and the tone response curve of the simulated camera device according to the slope of the tone response curve of the second target image;
[0180] The tenth obtaining submodule is used to determine the exposure value and the tone response curve of the simulated camera device as the third calibration result.
[0181] Optionally, the high-frequency parameters include: clarity, noise and dispersion purple fringing parameters; the fourth obtaining module 404 includes:
[0182] An eleventh obtaining submodule is used to obtain the clarity of the simulated camera device according to the clarity of the third target image obtained by shooting the second test card by the simulated camera device in the virtual calibration environment when the third calibration result is obtained, and to obtain the dispersion purple fringing parameters of the simulated camera device according to the dispersion purple fringing of the third target image;
[0183] A twelfth obtaining submodule is used to obtain the noise of the simulated camera device according to the noise of the fourth target image obtained by shooting the third test card by the simulated camera device in the virtual calibration environment;
[0184] The thirteenth obtaining submodule is used to determine the clarity, noise and dispersion purple fringing parameters of the simulated camera device as a fourth calibration result.
[0185] Optionally, the chromaticity parameters include: white balance parameters and color restoration parameters; the fifth obtaining module 405 includes:
[0186] A fourteenth obtaining submodule is used to obtain white balance parameters and color restoration parameters of the simulated camera device according to white balance parameters and color restoration parameters of a fifth target image obtained by photographing the fourth test card by the simulated camera device in the virtual calibration environment when the fourth calibration result is obtained;
[0187] The fifteenth obtaining submodule is used to determine the white balance parameters and color restoration parameters of the simulated camera device as the fifth calibration result.
[0188] The device provided by the embodiment of the present disclosure calibrates the simulated camera equipment in a virtual calibration environment in the order of basic parameters, defect parameters, brightness parameters, high-frequency parameters and chromaticity parameters, and then generates a simulated image based on the simulated camera equipment. The simulated image generated by the calibrated simulated camera equipment is closer to the real image taken by the real camera equipment, thereby improving the quality of the simulated image.
[0189] It should be noted that: the simulation image generation device provided in the above embodiment only uses the division of the above functional modules as an example during the simulation process. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the simulation image generation device provided in the above embodiment and the simulation image generation method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0190] The simulation image generation device in the embodiment of the present disclosure may be a virtual device, or a component, integrated circuit or chip in a server or terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present disclosure.
[0191] The simulation image generation device in the embodiment of the present disclosure may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present disclosure.
[0192] The simulation image generation device provided by the embodiment of the present disclosure can achieve Figures 1 to 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0193] Alternatively, if Figure 5 As shown, the embodiment of the present disclosure further provides an electronic device 500, including a processor 501, a memory 502, and a program or instruction stored in the memory 502 and executable on the processor 501. When the program or instruction is executed by the processor 501, each process of the above-mentioned simulation image generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. It should be noted that the electronic device in the embodiment of the present disclosure includes the above-mentioned mobile electronic device and non-mobile electronic device.
[0194] Figure 6 A schematic diagram of the hardware structure of an electronic device for implementing an embodiment of the present disclosure.
[0195] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.
[0196] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0197] It should be understood that in the embodiment of the present disclosure, the input unit 604 may include a graphics processor (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 609 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 610.
[0198] The embodiment of the present disclosure also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned simulation image generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0199] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0200] The disclosed embodiment further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned simulation image generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0201] It should be understood that the chip mentioned in the embodiments of the present disclosure may also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.
[0202] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present disclosure.
[0204] The embodiments of the present disclosure are described above in conjunction with the accompanying drawings, but the present disclosure is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present disclosure, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present disclosure and the claims, all of which are within the protection of the present disclosure.
Claims
1. A method for generating a simulation image, characterized in that: The method comprises: Calibrate the virtual calibration environment according to the basic parameters of the simulated camera device to obtain a first calibration result; Calibrate the defect parameters of the simulation camera device according to the first calibration result to obtain a second calibration result; Calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result; Calibrate the high-frequency parameters of the simulated camera device according to the third calibration result to obtain a fourth calibration result; Calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result; Rendering the target object according to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result to generate a simulation image; Wherein, the brightness parameters include: exposure value and tone response curve; Calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result, including: When the second calibration result is obtained, the exposure value of the simulated camera device is obtained according to the exposure value of the second target image obtained by shooting the first test card by the simulated camera device in the virtual calibration environment, and the tone response curve of the simulated camera device is obtained according to the slope of the tone response curve of the second target image; Determine the exposure value and tone response curve of the simulated camera device as the third calibration result; The high-frequency parameters include: clarity, noise and dispersion purple fringing parameters; Calibrate the high-frequency parameters of the simulated camera device according to the third calibration result to obtain a fourth calibration result, including: When the third calibration result is obtained, the clarity of the simulated camera device is obtained according to the clarity of the third target image obtained by shooting the second test card by the simulated camera device in the virtual calibration environment, and the dispersion purple fringing parameters of the simulated camera device are obtained according to the dispersion purple fringing of the third target image; Obtaining the noise of the simulated camera device according to the noise of the fourth target image obtained by photographing the third test card by the simulated camera device in the virtual calibration environment; Determine the clarity, noise and dispersion purple fringing parameters of the simulated camera device as the fourth calibration result; The chromaticity parameters include: white balance parameters and color restoration parameters; Calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result, including: When the fourth calibration result is obtained, the white balance parameters and color restoration parameters of the simulated camera device are obtained according to the white balance parameters and color restoration parameters of the fifth target image obtained by photographing the fourth test card by the simulated camera device in the virtual calibration environment; The white balance parameters and color restoration parameters of the simulated camera device are determined as the fifth calibration result.
2. The method for generating a simulation image according to claim 1, characterized in that: The basic parameters include: resolution and field of view; calibrating the virtual calibration environment according to the basic parameters of the simulated camera device to obtain a first calibration result, including: Determining the resolution of the simulated camera device according to the resolution of the real camera device; Determining the field of view of the simulated camera device according to the field of view of the real camera device; Determining a first target distance between the simulated camera device and a virtual calibration plate in a virtual calibration environment according to the field of view angle; When the light intensity at the center point of the virtual calibration plate is the same as the real light intensity, the light intensity of the virtual point light source is obtained according to the light intensity at the center point of the virtual calibration plate and a second target distance between the virtual point light source and the virtual calibration plate, wherein the second target distance is a preset distance; The first target distance, the second target distance, and the light intensity of the virtual point light source are determined as the first calibration result.
3. The method for generating a simulation image according to claim 2, characterized in that: The simulation camera device is located on a line connecting the virtual point light source and the center of the virtual calibration plate, and the first target distance is calculated based on the field of view angle and all images of the virtual calibration plate taken by the simulation camera device.
4. The method for generating a simulation image according to claim 1, wherein: The defect parameters include: distortion parameters and brightness uniformity parameters; according to the first calibration result, the defect parameters of the simulation camera device are calibrated to obtain a second calibration result, including: When the first calibration result is obtained, the distortion parameters of the simulated camera device are calibrated according to a preset distortion parameter calibration algorithm to obtain radial distortion parameters and tangential distortion parameters of the simulated camera device; Obtaining a brightness uniformity parameter of the simulated camera device according to a brightness and darkness variation gradient of a first target image obtained by photographing a pure white calibration plate by the simulated camera device in a virtual calibration environment; The radial distortion parameter, the tangential distortion parameter and the brightness uniformity parameter of the simulated camera device are determined as the second calibration result.
5. A simulation image generating device, characterized in that: include: A first obtaining module, used to calibrate a virtual calibration environment according to basic parameters of the simulated camera device to obtain a first calibration result; A second obtaining module, configured to calibrate the defect parameters of the simulation camera device according to the first calibration result to obtain a second calibration result; A third obtaining module, configured to calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result; A fourth obtaining module, used to calibrate the high-frequency parameters of the simulation camera device according to the third calibration result to obtain a fourth calibration result; A fifth obtaining module, configured to calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result; An image generation module, used for rendering the target object according to the first calibration result, the second calibration result, the third calibration result, the fourth calibration result and the fifth calibration result to generate a simulation image; Wherein, the brightness parameters include: exposure value and tone response curve; Calibrate the brightness parameter of the simulated camera device according to the second calibration result to obtain a third calibration result, including: When the second calibration result is obtained, the exposure value of the simulated camera device is obtained according to the exposure value of the second target image obtained by shooting the first test card by the simulated camera device in the virtual calibration environment, and the tone response curve of the simulated camera device is obtained according to the slope of the tone response curve of the second target image; Determine the exposure value and tone response curve of the simulated camera device as the third calibration result; The high-frequency parameters include: clarity, noise and dispersion purple fringing parameters; Calibrate the high-frequency parameters of the simulated camera device according to the third calibration result to obtain a fourth calibration result, including: When the third calibration result is obtained, the clarity of the simulated camera device is obtained according to the clarity of the third target image obtained by shooting the second test card by the simulated camera device in the virtual calibration environment, and the dispersion purple fringing parameters of the simulated camera device are obtained according to the dispersion purple fringing of the third target image; Obtaining the noise of the simulated camera device according to the noise of the fourth target image obtained by photographing the third test card by the simulated camera device in the virtual calibration environment; Determine the clarity, noise and dispersion purple fringing parameters of the simulated camera device as the fourth calibration result; The chromaticity parameters include: white balance parameters and color restoration parameters; Calibrate the chromaticity parameters of the simulated camera device according to the fourth calibration result to obtain a fifth calibration result, including: When the fourth calibration result is obtained, the white balance parameters and color restoration parameters of the simulated camera device are obtained according to the white balance parameters and color restoration parameters of the fifth target image obtained by photographing the fourth test card by the simulated camera device in the virtual calibration environment; The white balance parameters and color restoration parameters of the simulated camera device are determined as the fifth calibration result.
6. An electronic device, characterized in that: The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the simulation image generation method as described in any one of claims 1 to 4.
7. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the simulation image generation method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Camera positioning correction calibration method and system
CN105118055A
Method and device for adjusting camera parameters, storage medium and electronic equipment
CN112532872A