Method for determining the bidirectional reflection distribution function of a material
By using planar material samples and an automatic exposure strategy, combined with a camera array and a light source array, the problems of low accuracy and efficiency in the material BRDF acquisition process were solved, and efficient and accurate BRDF data acquisition was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2021-12-21
- Publication Date
- 2026-06-02
Smart Images

Figure CN116342705B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method for determining the bidirectional reflection distribution function of a material. Background Technology
[0002] Realistic rendering in computer graphics is a hot topic, with wide applications in augmented reality (AR) and virtual reality (VR). Material surface properties are crucial elements of realistic rendering, typically represented by bidirectional reflectance distribution functions (BRDFs).
[0003] In existing applications, BRDF data sources fall into two main categories: estimation and measurement. In rendering scenarios with lower realism requirements, material BRDFs are typically determined based on image-estimated parameters or by artists subjectively adjusting parameters. However, in applications where the virtual scene needs to approximate the real scene as closely as possible in subjective visual perception, it is necessary to adhere to the principle that both data and models are based on physical rules, and to obtain material BRDFs from the real world. Therefore, improving the accuracy and efficiency of material BRDF acquisition is a pressing technical problem that needs to be solved. Summary of the Invention
[0004] This application provides a method for determining the bidirectional reflection distribution function (BRDF) of a material, an acquisition device, a computer storage medium, and a computer program product, which can improve the accuracy and efficiency of acquiring the BRDF of the material.
[0005] In a first aspect, this application provides a method for determining the bidirectional reflectance distribution function (BRDF) of a material. The method includes: acquiring images of a material sample under different light source illumination directions in a darkroom using at least one camera in an acquisition device, wherein the upper surface of the material sample is a plane; determining the BRDF corresponding to the material sample based on the images acquired by the at least one camera, wherein, for any image of the upper surface of the material sample under any light source illumination direction acquired by any of the at least one camera, a first ratio of the brightness of each pixel in the image to the exposure time corresponding to the image is determined, and a second ratio between each of the first ratios and a target parameter is determined, and the average value of the RGB channels corresponding to the pixels in the image is obtained from the obtained second ratios, so as to obtain the BRDF of the material sample in the direction of the combination of the camera and the light source. Therefore, by utilizing the geometric characteristics of the material sample with a planar upper surface and the approximately parallel illumination, the brightness value of each pixel in the image of the upper surface of the material sample can be used to calculate the BRDF under the same angle combination. Thus, the BRDF measurement value of that channel at that angle can be determined based on the brightness values of all pixels representing each channel of R / G / B in the image, thereby improving the accuracy of material BRDF acquisition.
[0006] For example, the camera in the acquisition device can be an industrial camera. The target parameter can be a pre-calibrated illuminance value.
[0007] In one possible implementation, before determining the bidirectional reflectance distribution function (BRDF) corresponding to the material sample based on the images acquired by the at least one camera, the method further includes: for any of the at least one camera, during the process of acquiring an image of the material sample in any light source direction, if the first brightness of the upper surface of the material sample in the image acquired by the at least one camera at the current exposure time is within a preset brightness range, the image acquired by the at least one camera is retained; if the first brightness is not within the preset brightness range, the exposure time is adjusted, and the at least one camera is controlled to re-acquire an image of the material sample in the at least one light source direction. Thus, by utilizing the linear response characteristics of the camera, and based on linear interval calibration and black level correction, an automatic exposure strategy is introduced to calculate irradiance with fewer images, thereby improving the efficiency of acquiring the material BRDF.
[0008] In one possible implementation, adjusting the exposure time specifically includes: decreasing the exposure time by a preset step size when the first brightness is higher than the upper limit of a preset brightness range; and increasing the exposure time by a preset step size when the first brightness is lower than the lower limit of a preset brightness range. This ensures that the brightness of the acquired image is within the linear range of the camera response.
[0009] In one possible implementation, the image captured by any one of the at least one cameras is an image of the upper surface of the material sample cropped from the image captured by any one camera, based on the pre-calibrated coordinates of the upper surface of the material sample captured by any one camera.
[0010] In one possible implementation, the acquisition device includes: a spherical frame, a material sample platform, a light source array, a camera array, and a host computer; wherein, the spherical frame includes vertical profiles and horizontal profiles; the material sample platform includes a material sample stage and a motor for controlling the rotation and lifting of the stage, a material sample is placed on the material sample stage, and the material sample platform is fixed at the center of the spherical frame; the light source array includes multiple light sources, which are evenly distributed on the inner side of the spherical frame; the camera array includes at least one camera, and when there are multiple cameras, the multiple cameras are arranged at a uniform height angle on the same vertical profile of the spherical frame; the host computer is used at least to issue control commands to the light sources, cameras, and motors, and to process the images acquired by the cameras to generate BRDF data.
[0011] In one possible implementation, before acquiring images of the material sample under different light source illumination directions in a darkroom using at least one camera in the acquisition device, the method further includes: calibrating the position and angle of the camera in the acquisition device, calibrating the intrinsic and extrinsic parameters of the camera in the acquisition device, calibrating the linear range of the camera in the acquisition device, correcting the black level of the camera in the acquisition device, adjusting the aperture and focal length of the lens of the camera in the acquisition device, adjusting the position and brightness of the light source in the acquisition device, and calibrating the illuminance of the light source in the acquisition device.
[0012] In one possible implementation, the image captured by the camera is a Raw image. The step of obtaining the average value of each channel in the RGB channels corresponding to all pixels in any image specifically includes: for any channel in the RGB channels, determining the average value of the second ratio corresponding to all pixels representing that channel in the image, so as to obtain the average value of that channel in the RGB channels corresponding to all pixels in the image (i.e., obtaining the BRDF of that channel).
[0013] Secondly, this application provides a data acquisition device for acquiring the bidirectional reflectance distribution function (BRDF) corresponding to a material sample with a planar upper surface. The acquisition device includes: a spherical frame, comprising vertical and horizontal profiles; a material sample platform, comprising a material sample stage and a motor for controlling the rotation and lifting of the stage, the material sample platform being fixed at the center of the spherical frame, the material sample stage being used to place the material sample, and the motor being used to control the horizontal rotation and height lifting of the stage; a light source array, comprising multiple light sources uniformly distributed on the inner side of the spherical frame; a camera array, comprising at least one camera, wherein when there are multiple cameras, the multiple cameras are uniformly arranged on the same vertical profile on the spherical frame; and a host computer, at least used to issue control commands to the light sources, cameras, and motor, and to process the images acquired by the cameras to generate BRDF data.
[0014] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when run on an electronic device, causes the electronic device to perform the method provided in the first aspect.
[0015] Fourthly, this application provides a computer program product, characterized in that, when the computer program product is run on an electronic device, it causes the electronic device to execute the method provided in the first aspect.
[0016] It is understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of light reflection on a material surface provided in an embodiment of this application;
[0018] Figure 2 This is a schematic diagram of a BRDF material acquisition device provided in an embodiment of this application;
[0019] Figure 3 This is a schematic diagram of a data acquisition device for another material, BRDF, provided in an embodiment of this application;
[0020] Figure 4 This is a schematic diagram of a data acquisition device for another material BRDF provided in an embodiment of this application;
[0021] Figure 5 This is a schematic diagram of a data acquisition device for another material BRDF provided in the embodiments of this application;
[0022] Figure 6 This is a flowchart illustrating a method for determining the material BRDF provided in an embodiment of this application;
[0023] Figure 7 This is a schematic diagram illustrating the steps of an automatic exposure strategy provided in an embodiment of this application;
[0024] Figure 8 This is a schematic diagram illustrating the steps of a method for determining BRDF material according to an embodiment of this application;
[0025] Figure 9 This is a schematic diagram of the hardware structure of a material BRDF determination device provided in an embodiment of this application. Detailed Implementation
[0026] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0027] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0028] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0029] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0030] To facilitate understanding, the technical terms used in this application will be introduced below.
[0031] (1) Bidirectional reflection distribution function
[0032] The bidirectional reflectance distribution function (BRDF) is a fourth-dimensional function that defines the reflection of light from an opaque surface. It is measured by the ratio of the emissivity of the material in a given outgoing direction to the irradiance in a given incoming direction. It describes the distribution of incident light rays in various outgoing directions after reflection from a material surface. For example, ... Figure 1 As shown, BRDF can be understood as the emissivity of the reflected beam / the irradiance of the incident beam.
[0033] Based on BRDF, various material representations have been derived, such as Spatially Varying Bidirectional Reflectance Distribution Function (SVBRDF) and Bidirectional Texture Function (BTF). SVBRDF refers to the Spatially Varying Bidirectional Reflectance Distribution Function, meaning that each point on the material surface has its own BRDF, which can be understood as a set of BRDFs. BTF refers to the Bidirectional Texture Function, which directly stores the sequence of acquired images of material samples from all angles as the representation of the material.
[0034] (2) Gonioreflectometers
[0035] Goniore reflectometers are devices used to measure the bidirectional reflectance distribution function (BRDF). These devices consist of a light source illuminating the material being measured and an imaging sensor capturing the light reflected from that material. The light source can illuminate from different directions, and the imaging sensor can capture data from different directions within the hemisphere surrounding the target material. The sensor and light source provide the four angles defined in the BRDF (incident ray elevation angle θ, incident ray azimuth angle φ, outgoing ray elevation angle θ, and outgoing ray azimuth angle φ) through rotation on the hemisphere.
[0036] For example, Figure 2 A schematic diagram of a data acquisition device for BRDF material is shown. Figure 2As shown, the acquisition process is conducted in a darkroom. The required equipment includes a 10-bit camera, a computer-controlled turntable, and a light source with stable intensity and uniform spectral distribution. The light source is mounted on the robotic arm of the turntable, illuminating a spherical material sample placed at the center of the equipment at approximately 0.5° intervals, with the direction of illumination constantly changing. The camera and sample remain stationary, and the camera captures high dynamic range images of the material sample under different light source directions. Acquiring a single sample using this method takes approximately 4 hours. After calibrating the relative positions of the camera, light source, and material sample, as well as the camera's intrinsic and extrinsic parameters, the camera acquires 18 frames of raw images (raw grayscale images output by the imaging element) of the spherical sample under each light source angle at different exposure times. After discarding excessively dark or bright measurement images, the relationship between the measured illuminance value and the exposure time is fitted. In the acquired spherical image, each pixel in the spherical region represents a single-channel BRDF value at a different angle. By determining the actual position of each pixel on the sphere, the normal of that point on the spherical surface can be calculated, thus determining the relative direction between that point and the camera and the light source. Furthermore, the irradiance received by that point can be obtained (considering the attenuation of light source with distance, the irradiance of each point is different). Finally, by calculating the ratio of the high dynamic range emissivity of that point to the received irradiance, we obtain the measured value of that point on the sphere in the current light source direction.
[0037] However, this acquisition method requires the camera to perform 18 exposures from low to high for each light source direction, resulting in a long acquisition time. Defects and noise in the camera image, as well as imperfections from the sample sphere fabrication process, can affect the accuracy of single-pixel BRDF measurements. Furthermore, because the light source is only rotated horizontally, the acquisition information from different illumination angles is limited. Therefore, this acquisition method is time-consuming and has low accuracy; in other words, this method has both low precision and efficiency in acquiring BRDF data.
[0038] For example, Figure 3 A schematic diagram of a data acquisition device for another material, BRDF, is shown. (For example...) Figure 3As shown, the acquisition device mainly includes: a rotatable semi-circular arc light source arm 1 (with multiple light sources mounted on it), a fixed semi-circular arc camera arm (with multiple cameras 2 mounted on it), a planar material sample 3, a rotatable worktable 4 (a platform for the fixed material sample), a rotating shaft 5 that supports and drives the horizontal rotation of the stage, and an equipment base 6. After calibrating the camera's intrinsic and extrinsic parameters, inverse response curves, and light sources (the position of the high-gloss metal sphere is used for calibration, and the irradiance is calibrated using a standard diffuse white board), the main control computer can control the rotation of the light source arm 1, the rotation of the worktable 4, the LED light source activation sequence, the camera shooting sequence, and the data collection. It can acquire images of the sample from different illumination angles and camera viewpoints, acquiring two frames of images with different exposures at each angle. High dynamic range (HDR) images are generated using the calibrated inverse camera response function (ICRF), and the images are corrected by orthographic projection to adjust the captured images to a frontal projection angle. This acquisition process is similar to the one described above. Figure 2 The acquisition process described above is basically the same, except for camera response function (CRF) calibration. However, the description and calculation of materials in this scheme differ from those described above. Figure 2 The solution described in the previous article is different. In this solution, a BTF material representation is used to encode and store the camera position, light source position, and corresponding HDR image, and then apply them by looking up a table.
[0039] In addition, this scheme has at least the following drawbacks:
[0040] 1) The acquisition device obtains light sources from different directions by rotating the light source arm. During the rotation, the distribution of light sources at different height angles is uneven, and the acquisition density is relatively small in the light source direction that is close to parallel to the sample plane.
[0041] 2) The acquisition error caused by the rotation of mechanical parts is relatively large, and it increases the time required to control the rotation.
[0042] 3) This scheme ultimately calculates and organizes materials in BTF format, which, strictly speaking, is a different technical approach from BRDF calculation. BRDF stores data in numerical form and is flexible in use; while BTF stores data in image form, resulting in a large data volume and requiring more storage space.
[0043] For example, Figure 4 A schematic diagram of a data acquisition device for yet another material, BRDF, is shown. For example... Figure 4As shown, the acquisition device mainly consists of cameras and an array of LED lights. The overall shape of the device is a hemisphere with a diameter of 2m. Inside the hemisphere, one camera is placed at 7.5° intervals in the radial direction, for a total of 11 cameras. Four projectors are placed next to the cameras (for BTF acquisition of non-planar 3D objects). 188 LED lights are hung parallel to each other on the hemispherical frame. A sample holder on a rotating stage at the center of the hemisphere is used to hold the sampled samples (not limited to planar surfaces). The rotating stage rotates 15° each time, allowing the cameras to capture material information from all directions. Besides mentioning data compression after BTF calculation, the acquisition process and BTF calculation method are similar to... Figure 3 The solutions described in the article are basically the same, except that the equipment structure has been improved to make the data acquisition more accurate and efficient at a higher hardware cost.
[0044] To improve the accuracy and efficiency of acquiring material BRDF, this application also provides a method for acquiring material BRDF. This method uses planar material samples and introduces an automatic exposure strategy, thereby improving the accuracy and efficiency of acquiring material BRDF.
[0045] In this method, for samples made of planar materials, the light rays illuminating the sample surface at a uniform illumination distance of 1 meter can be reasonably approximated as parallel light. Therefore, it can be assumed that the sample area should have the same BRDF measurement value under the same set of angles. Without color interpolation, the average value of all R / G / B channel pixels in the central region of the sample image is calculated as the three-channel BRDF measurement value for that material. This is equivalent to noise reduction using an averaging method, improving the accuracy of the acquired data. In traditional methods for acquiring material BRDF, the camera acquires a raw image without color interpolation. Each pixel in the spherical sample image represents a single-channel BRDF measurement value under a set of angles (light source and camera), while the BRDF values of other channels can be obtained from sampling at other angles. However, dead pixels on the CCD sensor, noise during CCD imaging, and the unavoidable material inhomogeneities inherent in sample fabrication can all interfere with the BRDF measurement results, leading to insufficient data accuracy.
[0046] By introducing an automatic exposure strategy, images can be acquired at the current angle with a preset exposure time t0. The average brightness of the image after removing dark levels is calculated to see if it falls within the camera's linear response range (i.e., whether it is too dark or overexposed). If it is not within the linear range, the exposure time is increased / decreased in steps until the acquired image falls within the linear range. (After calibrating the CCD camera's dark level and linearity, we leverage the advantage that the camera's response curve within the linear range is a straight line passing through the origin. Therefore, acquiring one frame within the linear range allows us to calculate the slope of this curve, thus obtaining the relationship between illuminance and exposure time.) This avoids the traditional method of acquiring a fixed number of frames per angle, shortening the acquisition time. In contrast, traditional material BRDF acquisition methods require obtaining sample images at dense angles, and multiple exposures are needed for each angle to ensure complete image information. This involves acquiring multiple frames with different exposure times for each angle, filtering out overexposed and underexposed images, and then fitting the relationship between illuminance and exposure time to ensure high dynamic range. This results in a lengthy acquisition process.
[0047] For example, Figure 5 A schematic diagram of a data acquisition device for another material, BRDF, provided in an embodiment of this application is shown. For example... Figure 5 As shown, the acquisition device mainly includes: a spherical frame 51, a material sample platform 52, a light source array, a camera array, and a host computer. This acquisition device can be placed in a darkroom to meet the environmental requirements for acquiring BRDF material.
[0048] The spherical frame 51 is a spherical mesh surface formed by connecting vertical profiles (warp segments) and horizontal profiles (weft segments). The overall structure is a precise sphere to ensure the accurate positional distribution of the light source and camera on the sphere. For example, the spherical frame 51 can be, but is not limited to, a hemispherical frame.
[0049] The material sample platform 52 mainly consists of a material sample stage 521 and a motor that controls the rotation and lifting of the stage. A material sample 522 can be placed on the material sample stage 521. The material sample platform 52 is accurately fixed at the center of the spherical frame 51, and the material sample 522 is placed on it. The material sample 522 can be covered with light-absorbing fabric to prevent interference from reflected light from surrounding materials. The material sample platform 52 can rotate 360° horizontally and / or be raised and lowered under the drive of the motor. For example, the upper surface of the material sample can be a plane; furthermore, this plane can be, but is not limited to, rectangular.
[0050] The light source array consists of multiple light sources 53. These light sources 53 are evenly distributed inside the latitude and longitude grid of the spherical frame 51. The illumination distance between the light source 53 and the material sample 522 is 1 meter (other distances are also possible and not limited here) to ensure that the light illuminating the material is approximately parallel. This approximates the illumination on the sample surface as parallel light, ensuring that each camera captures the BRDF value at the same angle. The light sources 53 are controlled by a host computer to be turned on and off, and can be lit in a specified sequence. For example, the source 53 can be a light-emitting diode (LED); the number of light sources 53 can be, but is not limited to, 196.
[0051] The camera array consists of at least one camera 54. When there are multiple cameras 54, they can be uniformly arranged on a vertical profile of the spherical frame 51, wherein the multiple cameras 54 are located on the same vertical profile. The cameras 54 are controlled by a host computer to control parameters such as exposure and shooting actions, and simultaneously acquire images of the material sample 522 under light sources at various angles, transmitting them to the host computer for processing and storage in real time. For example, the camera 54 can be, but is not limited to, a charge-coupled device (CCD) camera. For example, the number of cameras 54 is nine.
[0052] The host computer is responsible for sending control commands to devices such as the light source 53, camera 54, and motor, and for processing the images uploaded by the camera 54 to generate BRDF data.
[0053] Next, based on Figure 5 The acquisition device described herein introduces the acquisition scheme for the BRDF material provided in the embodiments of this application.
[0054] For example, Figure 6 A method for collecting data on BRDF material is shown. Figure 6 The method shown can be used Figure 5 The data acquisition device described herein is implemented. For example... Figure 6 As shown, the method for collecting BRDF data for this material may include the following steps:
[0055] S601, Equipment Calibration and Verification
[0056] Specifically, equipment calibration mainly includes camera and lens adjustment, and light source adjustment. Specifically, after evenly distributing the camera at varying elevation angles on the camera arm of the spherical frame, and fixing the material sample platform and camera position, the aperture ring in the camera can be adjusted to the maximum aperture position that allows for clear imaging at different depths of field of the material sample. The focus ring in the camera can also be adjusted to the focal length position that provides the clearest image at the current distance. After evenly distributing the light source on the spherical frame, the appropriate brightness of the light source can be adjusted.
[0057] For example, during camera calibration, each camera can be controlled to capture images of different poses within a checkerboard pattern. Based on a checkerboard calibration algorithm, the intrinsic and extrinsic parameters and distortion coefficients of the camera lens can be calibrated for use in correcting radial distortion during image acquisition. Alternatively, a linear calibration method can be used to linearly calibrate each camera. For instance, it can be calibrated that an image is within the camera's response range when its brightness is within 80% of its maximum brightness.
[0058] When calibrating the light source, each camera can be controlled to capture and save an image of a standard diffuse white board under each light source, obtaining a calibrated illuminance value. This calibrated illuminance value can then be used to correct the acquired sample images. In one example, the calibrated illuminance value can be the ratio of the brightness of the image obtained when the camera captures the white board to the exposure time when capturing the white board.
[0059] In some embodiments, during device calibration and standardization, the following can be performed, but are not limited to: calibrating the position (e.g., distributing the cameras at uniform height angles on a profile) and angle (e.g., correcting the three-dimensional angles of the cameras so that the camera's field of view is directly facing the material sample); calibrating the intrinsic and extrinsic parameters of the cameras in the acquisition device; calibrating the linear range of the cameras in the acquisition device so that the brightness of the images captured by the cameras is proportional to the exposure time; correcting the black level of the cameras in the acquisition device so that the corresponding linear response curve of the cameras passes through the origin of the coordinates relating image brightness to exposure time (i.e., the image obtained when the camera does not expose is completely black); adjusting the aperture and focal length of the camera lens in the acquisition device; adjusting the position and brightness of the light source in the acquisition device; and calibrating the illuminance of the light source in the acquisition device. For example, during linear calibration of the camera, the camera can be controlled to continuously capture monochromatic, homogeneous scenes. During the shooting process, exposure times can be randomly selected, and the camera's response curve can be obtained based on the brightness of a series of captured images and the corresponding exposure times, thereby calibrating the camera's linear range.
[0060] In addition, the coordinates of the upper surface of the material sample captured by each camera can be determined so that the image of the upper surface of the material sample can be cropped from these coordinates.
[0061] In some embodiments of this application, S601 may be executed every time or only once, depending on the actual situation, and is not limited here.
[0062] S602, Sample Preparation
[0063] Specifically, when preparing the sample, a homogeneous, opaque material sample can be selected, and the upper surface of the material sample can be made into a plane to ensure that the incident angle and the exit angle of all parallel light irradiating it are consistent. Therefore, it can be assumed that the sample area should have the same BRDF measurement value under the same set of angles.
[0064] After the material sample is made, it can be placed on the material sample stage (i.e., the sample platform), and the height of the sample platform can be adjusted so that the material surface is level with the 0° latitude of the spherical frame, thereby ensuring the accuracy of the data when there are differences in the thickness of the material sample.
[0065] In some embodiments of this application, S602 may be executed every time or only once, depending on the actual situation, and is not limited here.
[0066] S603, Image Acquisition and Processing
[0067] Specifically, during image acquisition and processing, a light source array can be sequentially illuminated, and cameras at different angles can acquire full-depth (12-bit or 16-bit) Raw images of the material sample in parallel. For example, but not limited to, this Raw image (i.e., grayscale image) can be...
[0068] After the camera captures an image of the material sample, each image can be cropped to extract the area containing the upper surface of the material sample, thereby removing interference from surrounding materials. For example, during device calibration, the coordinates of the area containing the upper surface of the material sample in each camera's image can be pre-defined. This allows for direct cropping of the image from the pre-defined coordinates after the camera captures the sample, effectively extracting the area containing the upper surface of the material sample.
[0069] For each camera, after obtaining an image of the area containing the upper surface of the material sample captured by that camera, the brightness of the image can be determined based on a pre-set brightness calculation method; for example, the average brightness value of all pixels in the image can be used as the image brightness. If the image is too dark or too bright, that is, the brightness of the image is below a preset value or above another preset value, it indicates that the brightness of the image is not within the pre-calibrated camera linear range, and automatic exposure can be performed in this case. During automatic exposure, the exposure time can be increased (if the image is too dark) or decreased (if the image is too bright) in certain steps to re-acquire the image, and the aforementioned image processing steps are repeated until the brightness of the image at the current exposure time falls within the camera response linear range. When the brightness of the acquired image is within the camera response linear range, the image can be saved. After saving all images captured by all cameras, parallel acquisition under the next light source can be performed, and the acquisition and processing ends when all light sources are lit and then turned off.
[0070] As one possible implementation, for each camera, such as Figure 7 As shown, the image acquisition and processing process may include the following steps:
[0071] S701, collect data using the preset exposure time t0.
[0072] Specifically, when the camera acquires images of a material sample, it can first acquire images of the material sample based on a preset exposure time t0.
[0073] S702. Determine the brightness of the acquired image.
[0074] Specifically, after the camera captures an image of the material sample, the brightness of the image can be determined based on a pre-set brightness calculation method.
[0075] S703. Determine whether the image is too dark or too bright.
[0076] Specifically, after obtaining the brightness of the image, it can be determined whether the image is too dark or too bright. If it is too dark or too bright, then S704 is executed; otherwise, S705 is executed.
[0077] For example, a brightness range can be preset. When the brightness of an image is within this range, the image is considered to meet the requirements; otherwise, the image is considered to be too dark or too bright.
[0078] S704. Save the image and record the exposure time.
[0079] Specifically, when the image is neither too dark nor too bright, it indicates that the image brightness is within the linear range of the camera response. At this time, the image can be saved and the exposure time recorded.
[0080] S705, Adjust the exposure time t, and re-acquire based on the adjusted exposure time t.
[0081] Specifically, when the image is too dark / too bright, it indicates that the image brightness is not within the camera's linear response range. In this case, the exposure time t can be adjusted, and the image can be re-acquired based on the adjusted exposure time t. For example, the exposure time can be adjusted according to a preset step size. For instance, when the image is too bright, the exposure time can be decreased by a certain step size, and when the image is too dark, the exposure time can be increased by a certain step size.
[0082] Once the images that the camera needs to capture are determined, S604 can be executed.
[0083] S604, BRDF calculation
[0084] Specifically, for an image captured by any camera at any light source, a first ratio of each pixel in the image to its corresponding exposure time can be obtained. Then, a second ratio is obtained between the first ratio for each pixel and the calibrated illuminance value obtained during calibration. Finally, the average of the second ratios for pixels corresponding to the red (R) channel, the average of the second ratios for pixels corresponding to the green (G) channel, and the average of the second ratios for pixels corresponding to the blue (B) channel are determined. This yields the BRDF of the material sample in the direction of any combination of camera and light source. In one example, the BRDFs corresponding to the images captured by each camera can be used to construct the BRDF of the material sample.
[0085] Therefore, by leveraging the linear response advantage of the camera and introducing an automatic exposure algorithm to replace the method of fitting irradiance by acquiring multiple exposure images at fixed intervals, the efficiency of material BRDF acquisition is improved. By calculating the average RGB three-channel BRDF in the RAW domain of the planar material sample image, the interference of camera dead pixels, noise, and material sample impurities on the measurement data is eliminated as much as possible, thus improving the accuracy of acquisition.
[0086] Taking the MERL Database as an example, traditional methods require 18 exposures for all materials, which is time-consuming. Furthermore, for materials like metals that easily reflect light and create highlights, most images may be overexposed and rejected under the fixed 18 exposures. To address this redundancy, the solution provided in this application leverages the linearity of the camera's response. Utilizing the characteristic that the response curve is a straight line passing through the origin within a defined linear range, a suitable exposure time can be found, and the relationship between illuminance and exposure time can be fitted using only one frame. Moreover, the number of sampling frames required to search for a suitable exposure time during automatic exposure is significantly less than the number of exposures in traditional methods. Considering the time saved across all angles, this technique improves acquisition efficiency to a certain extent.
[0087] Furthermore, in traditional methods for calculating BRDF, each pixel in the sample image is treated as a BRDF measurement value under a specific camera / light source angle. This means each pixel is assumed to have four distinct angles (incident ray elevation angle θ, incident ray azimuth angle φ, outgoing ray elevation angle θ, and outgoing ray azimuth angle φ). However, factors such as uneven sample fabrication and noise during camera acquisition can interfere, potentially rendering the BRDF measurement value at a particular point entirely noise, creating an outlier in the material's BRDF curve and impacting its application. In contrast, the solution provided in this application leverages the characteristics of planar material samples and near-parallel light to reasonably assume that each pixel in the material sample image has the same four angles. This means each point on the sample represents the same BRDF measurement value. Based on this, the average value is calculated for each of the three channels of the sample image, effectively smoothing and denoising the three-channel BRDF, thus avoiding the aforementioned interference factors and improving the accuracy and reliability of the measurement data.
[0088] Next, based on the material BRDF detection method described above, a material BRDF determination method provided in this application embodiment will be introduced. It is understood that this method is another expression of the material BRDF detection method described above, and the two are combined. This method is proposed based on the material BRDF detection method described above, and some or all of its content can be found in the description of the material BRDF detection method above.
[0089] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating the steps of a method for determining the BRDF (Brown-Redundant Surface Area) of a material according to an embodiment of this application. It is understood that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities. Figure 8 As shown, the method for determining the BRDF of this material includes:
[0090] S801. Using at least one camera in the acquisition device, images of the material sample under different light source illumination directions are acquired in a dark room. The upper surface of the material sample is a plane.
[0091] Specifically, at least one camera in the acquisition device can be used to acquire images of a material sample with a flat upper surface under different light source illumination directions in a darkroom. For example, the image can be a raw image.
[0092] For example, the data acquisition device can be the one described above. Figure 5 The device described herein. For example, when employing... Figure 5 In this device, during image acquisition by the camera, the light source array can be illuminated sequentially, and cameras at different angles can acquire images of the material sample in parallel, thereby obtaining images of the material sample under different light source illumination directions. For example, during the acquisition process, the material sample can be controlled to remain stationary, or it can be controlled to rotate horizontally in steps. For example, the distance between the light source and the material sample can be a preset distance (e.g., 1 meter), thus ensuring that the light illuminating the material is approximately parallel.
[0093] S802. Based on images acquired by at least one camera, determine the bidirectional reflectance distribution function (BRDF) corresponding to the material sample.
[0094] Specifically, after the camera acquires an image, the bidirectional reflectance distribution function (BRDF) corresponding to the material sample can be determined based on the image acquired by at least one camera.
[0095] Specifically, for any image of the upper surface of the material sample captured by any camera in at least one camera under any illumination direction of a light source, a first ratio of the brightness of each pixel in any image to the exposure time corresponding to that image can be determined, and a second ratio between each first ratio and a target parameter can be determined. The average value of each channel in the RGB channels corresponding to all pixels in any image is then obtained from the obtained second ratio, thus obtaining the BRDF of the material sample in the direction of any combination of camera and light source. For example, for any channel in the RGB channels corresponding to all pixels in any image, the average value of the second ratios corresponding to all pixels in that image representing that channel (e.g., R channel, G channel, or B channel) can be determined, thus obtaining the average value of any channel in the RGB channels corresponding to all pixels in that image, i.e., obtaining the BRDF of that image in that channel. In one example, the BRDFs corresponding to each image captured by each camera can form the BRDF corresponding to the material sample.
[0096] For example, the target parameter can be a pre-calibrated illuminance value.
[0097] For example, at least one camera captures an image of the material sample taken by any camera based on the pre-calibrated coordinates of the upper surface of the material sample captured by any camera, and the image of the upper surface of the material sample is cropped from the image taken by any camera based on the pre-calibrated coordinates.
[0098] Therefore, when determining the BRDF of a material, the geometric characteristics of the material sample with a flat upper surface and the approximately parallel illumination are utilized. The brightness value of each pixel in the image of the upper surface of the material sample can be used to calculate the BRDF under the same angle combination. Thus, the BRDF measurement value of that channel at that angle can be determined based on the brightness values of all pixels representing each channel of R / G / B in the image, thereby improving the acquisition accuracy of the material BRDF.
[0099] In some embodiments, before determining the bidirectional reflectance distribution function (BRDF) corresponding to the material sample based on images acquired by at least one camera, during the process of acquiring images of the material sample from any of the at least one camera in any light source direction, if the first brightness of the upper surface of the material sample in the image acquired by any camera at the current exposure time is within a preset brightness range, the image acquired by any camera is retained; if the first brightness is not within the preset brightness range, the exposure time is adjusted, and any camera is controlled to re-acquire images of the material sample in any light source direction. Thus, by introducing an automatic exposure strategy, the brightness of the acquired images is controlled to be within the linear range of the camera response, improving image acquisition efficiency and the accuracy of subsequent BRDF calculation.
[0100] For example, adjusting the exposure time can be done by decreasing the exposure time by a preset step size when the first brightness is higher than the upper limit of the preset brightness range, and by increasing the exposure time by a preset step size when the first brightness is lower than the lower limit of the preset brightness range.
[0101] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. Furthermore, in some possible implementations, each step in the above embodiments may be selectively executed according to actual circumstances; it may be partially or fully executed, without limitation here. Moreover, all or part of any feature of any embodiment of this application can be freely and arbitrarily combined without contradiction. The combined technical solutions are also within the scope of this application.
[0102] Based on the methods described in the above embodiments, this application also provides a BRDF (Brown-Redundant Fiber) material determination device. Please refer to... Figure 9 , Figure 9 This is a schematic diagram of a material BRDF determination device provided in an embodiment of this application. Figure 9 As shown, the material BRDF determination device 900 includes one or more processors 901 and interface circuitry 902. Optionally, the material BRDF determination device 900 may also include a bus 903. Wherein:
[0103] The processor 901 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed through integrated logic circuits in the hardware of the processor 901 or through software instructions. The processor 901 may be a general-purpose processor, a neural network processing unit (NPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods and steps disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0104] The interface circuit 902 can be used to send or receive data, instructions or information. The processor 901 can use the data, instructions or other information received by the interface circuit 902 to process the data, instructions or other information, and can send the processed information out through the interface circuit 902.
[0105] Optionally, the material BRDF determination device 900 also includes a memory, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM). This memory may be coupled to the processor 901.
[0106] Optionally, the memory stores executable software modules or data structures, and the processor 901 can execute corresponding operations by calling the operation instructions stored in the memory (which can be stored in the operating system).
[0107] Optionally, the interface circuit 902 can be used to output the execution results of the processor 901.
[0108] It should be noted that the functions of the processor 901 and the interface circuit 902 can be implemented through hardware design, software design, or a combination of hardware and software; no restrictions are imposed here.
[0109] It should be understood that each step of the above method embodiments can be completed by hardware logic circuits or software instructions in a processor.
[0110] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0111] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0112] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0113] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
Claims
1. A method for determining the bidirectional reflection distribution function of a material, characterized in that, The method includes: Images of a material sample under different light source illumination directions are acquired in a dark room using at least one camera in the acquisition device, wherein the upper surface of the material sample is a plane; For any one of the at least one cameras, during the process of acquiring an image of the material sample in any light source direction, when the first brightness of the upper surface of the material sample in the image acquired by the camera at the current exposure time is within a preset brightness range, the image acquired by the camera is retained, and the preset brightness range is determined based on a pre-calibrated camera linear range; When the first brightness is not within the preset brightness range, the exposure time is adjusted, and any camera is controlled to re-acquire the image of the material sample in any light source direction; Based on the images acquired by the at least one camera, the bidirectional reflectance distribution function (BRDF) corresponding to the material sample is determined. Specifically, for any image of the upper surface of the material sample acquired by any of the at least one camera in any direction of illumination from any light source, a first ratio of the brightness of each pixel in the image to the exposure time corresponding to the image is determined, and a second ratio between each of the first ratios and the target parameter is determined. The average value of each channel in the RGB channel corresponding to all pixels in the image is obtained from the obtained second ratio, so as to obtain the BRDF of the material sample in the direction of the combination of the camera and the light source.
2. The method according to claim 1, characterized in that, The adjustment of the exposure time specifically includes: When the first brightness is higher than the upper limit of the preset brightness range, the exposure time is reduced by a preset step size; When the first brightness is lower than the lower limit of the preset brightness range, the exposure time is increased by a preset step size.
3. The method according to claim 1, characterized in that, The image captured by any one of the at least one cameras is an image of the upper surface of the material sample cropped from the image captured by any one of the cameras, based on the pre-calibrated coordinates of the upper surface of the material sample captured by any one of the cameras.
4. The method according to claim 1, characterized in that, The data acquisition equipment includes: a spherical frame, a material sample platform, a light source array, a camera array, and a host computer; The spherical frame includes vertical profiles and horizontal profiles; The material sample platform includes a material sample stage and a motor for controlling the rotation and lifting of the stage. The material sample is placed on the material sample stage, and the material sample platform is fixed at the center of the spherical frame. The light source array includes multiple light sources, which are evenly distributed on the inner side of the spherical frame; The camera array includes at least one camera, and when there are multiple cameras, the multiple cameras are arranged at a uniform elevation angle on the same vertical profile of the spherical frame. The host computer is at least used to issue control commands to the light source, the camera, and the motor, and to process the images acquired by the camera to generate BRDF data.
5. The method according to claim 4, characterized in that, Before acquiring images of the material sample under different light source illumination directions in a darkroom using at least one camera in the acquisition device, the method further includes: The position and angle of the camera in the acquisition device are calibrated, the intrinsic and extrinsic parameters of the camera in the acquisition device are calibrated, the linear range of the camera in the acquisition device is calibrated, the black level of the camera in the acquisition device is corrected, the aperture and focal length of the lens of the camera in the acquisition device are adjusted, the position and brightness of the light source in the acquisition device are adjusted, and the illuminance of the light source in the acquisition device is calibrated.
6. The method according to any one of claims 1-5, characterized in that, The images captured by the camera are Raw images; The step of obtaining the average value of each channel in the RGB channels corresponding to all pixels in any image specifically includes: For any channel in the RGB channels, determine the average of the second ratios corresponding to all pixels representing that channel in the image, so as to obtain the average value of that channel in the RGB channels corresponding to all pixels in the image.
7. A data acquisition device, characterized in that, The acquisition device is used to acquire the bidirectional reflectance distribution function (BRDF) of a material sample with a planar upper surface. Spherical frame, including vertical profiles and horizontal profiles; A material sample platform includes a material sample stage and a motor for controlling the rotation and lifting of the stage. The material sample platform is fixed at the center of the spherical frame, and the material sample stage is used to place the material sample. A light source array, comprising multiple light sources, wherein the multiple light sources are uniformly distributed on the inner side of the spherical frame; A camera array, comprising at least one camera, wherein when there are multiple cameras, the multiple cameras are uniformly arranged on the same vertical profile on the spherical frame; The host computer is at least used to issue control commands to the light source, the camera, and the motor, and to process the images acquired by the camera and generate BRDF data. The host computer is also used to: when any of the at least one cameras is acquiring an image of the material sample in any light source direction, and when the first brightness of the upper surface of the material sample in the image acquired by the camera at the current exposure time is within a preset brightness range, retain the image acquired by the camera, wherein the preset brightness range is determined based on a pre-calibrated camera linear range; When the first brightness is not within the preset brightness range, the exposure time is adjusted, and any camera is controlled to re-acquire an image of the material sample in any light source direction.
8. A computer-readable storage medium storing a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-6.
9. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-6.