Light source calibration method, system, electronic device and medium
By acquiring images of a small ball from multiple light sources and automatically calculating the light source vector, the problems of excessive manual intervention, long time consumption, and inaccurate calibration results in light source calibration methods are solved, thus achieving automation and accuracy in light source calibration.
Patent Information
- Application Number
- CN202410567039.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2044-05-09
AI Technical Summary
Existing light source calibration methods suffer from problems such as excessive manual intervention, long processing time, and susceptibility of calibration results to changes in light source conditions and defects in the sphere. Furthermore, existing technologies struggle to automate light source calibration.
By acquiring images of a small ball from multiple light sources, statistically analyzing image information, obtaining a small ball mask, performing circle fitting and calculating the coordinates of the brightest point, optimizing the image using morphological and filtering processing, and automatically calculating the light source vector.
It automates the light source calibration process, improves the accuracy and anti-interference capabilities of the calibration results, simplifies the calculation process, and is suitable for hardware implementation.
Smart Images

Figure CN118470089B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of light source calibration technology, and particularly to light source calibration methods, systems, electronic devices, and media. Background Technology
[0002] Photometric stereo is a non-contact detection method based on reconstructing 3D or 2.5D information of objects from 2D images. It has important applications in fields requiring the detection of surface scratches, dents, and other objects with slight height differences. Photometric stereo involves using a camera at a fixed position to photograph an object under illumination from multiple light sources in different directions. Before performing photometric stereo calculations, it is usually necessary to calibrate the angular information of the illumination from the different light sources.
[0003] In the existing technology, the light source calibration algorithm based on metal spheres is a commonly used method, but it has the following problems: (1) In actual shooting, it is not possible to obtain a metal sphere image with a perfect background. It is often necessary to manually find the position mask of the metal sphere for each light source so as to eliminate background interference during calibration calculation. (2) When the light source conditions change, recalibration is required, and finding the metal sphere mask will consume a lot of time in the calibration process. (3) The metal sphere may have defects or stray light spots, which will affect the calibration results.
[0004] Chinese patent CN115631243A discloses a method, related equipment, and storage medium for calibrating a light source in a light field acquisition system. The method includes: acquiring multiple first images of a reflective object simultaneously from different viewing angles under a first ambient brightness; the first ambient brightness is obtained based on the incident light from a target light source in the light field acquisition system, where the target light source is any light source in the system; determining the image position information of the target light source in each first image based on the position of the reflected light spot in each first image; determining the first reflection position information and the first incident light direction information corresponding to each first image based on the spatial position information of the reflective object and the aforementioned image position information of the target light source; and determining the spatial position information of the target light source based on the first reflection position information and the first incident light direction information corresponding to each of the multiple first images. This patent improves the accuracy of light source calibration by individually calibrating the light source. However, the content described in this patent cannot automate the light source calibration process.
[0005] Chinese patent CN116664760A proposes a method for generating photometric stereo images based on a neural network model. The method involves acquiring illumination information as follows: obtaining original images of the object under different illumination directions and extracting mask images; constructing and training a neural network model, which includes an encoder and a decoder; merging each original image and its corresponding mask image along the channel direction to obtain multiple sets of combined images; and inputting these combined images into the encoder of the trained neural network model to obtain global illumination information. This patent proposes a method for acquiring illumination information based on a neural network model. However, this method requires a large amount of raw data to train the neural network model, a complex and time-consuming process that significantly increases the difficulty of automating light source calibration.
[0006] To address the aforementioned issues, this invention proposes a light source calibration method that ensures the accuracy of the calibration results and improves the automation level of light source calibration in photometric stereo algorithms. Summary of the Invention
[0007] This invention proposes a light source calibration method, system, electronic device, and medium, which can solve at least one of the above-mentioned technical problems.
[0008] To achieve the above objectives, the present invention proposes the following technical solution: A light source calibration method, comprising: With the image acquisition device in a fixed position, K images of the sphere from different angle light sources are acquired; where K is not less than 3. Analyze the information from K images of small balls to obtain a statistical graph; binarize the statistical graph to obtain an initial mask; optimize the initial mask to obtain the small ball mask; Extract the edges of the spherical mask to obtain the set of circumferential pixel coordinates; perform circle fitting based on the relationship between the circumferential pixel coordinates and the center and radius of the circle to obtain the center coordinates and radius; Based on the sphere mask, the corresponding mask region image is selected from the sphere image, and image segmentation is performed on the mask region image to obtain the bright spot region; based on the bright spot region, the coordinates of the brightest point are calculated; Calculate the light source vector based on the center coordinates, radius, and coordinates of the brightest point.
[0009] Furthermore, the step of analyzing the K ball images to obtain a statistical graph includes: analyzing the K ball images to obtain K analysis graphs; and fusing the analysis graphs based on the relationship that there are overlapping areas in any two ball images corresponding to light sources from different angles to obtain a single statistical graph.
[0010] Furthermore, the binarization processing of the statistical graph to obtain the initial mask includes: calculating an initial binarization threshold, adding correction coefficients to form a binarization threshold; and using the binarization threshold to process the statistical graph to obtain an initial mask with only two grayscale values.
[0011] Furthermore, the step of calculating the coordinates of the brightest spot based on the bright spot region includes finding the K bright spot region images corresponding to the K bright spot regions from the K small ball images, and calculating the coordinates of the brightest spot.
[0012] Furthermore, the calculation of the coordinates of the brightest spot based on the bright spot region includes: after image segmentation of K mask region images, obtaining more than K bright spot regions, or several bright spot regions containing impurities with uneven bright spots; optimizing several bright spot regions containing impurities using morphological opening operation and hole filling method, so that after image segmentation of any mask region image, there is one and only one bright spot region with uniform bright spots; and finding the K bright spot region images corresponding to the K bright spot regions from the K ball images, and calculating the coordinates of the brightest spot.
[0013] Furthermore, the calculation of the brightest point coordinates includes: calculating the centroid coordinates of the bright spot region image, which is used as the brightest point coordinates of the ball image.
[0014] Furthermore, the calculation of the brightest point coordinates includes: filtering the bright spot region image, obtaining the filtered image, and calculating the centroid coordinates of the filtered image as the brightest point coordinates of the ball image.
[0015] Based on the same inventive concept, the present invention also proposes a light source calibration system, comprising: The image acquisition module fixes the position of the image acquisition device and acquires K images of the ball from different angle light sources; where K is not less than 3. The ball mask acquisition module analyzes K ball images to obtain a statistical image; it binarizes the statistical image to obtain an initial mask; and it optimizes the initial mask to obtain the ball mask. The circle fitting calculation module extracts the edge of the spherical mask and obtains the set of circumferential pixel coordinate points; based on the relationship between the circumferential pixel coordinate points and the center and radius of the circle, it performs circle fitting to obtain the center coordinates and radius. The brightest point coordinate calculation module, based on the sphere mask, selects the corresponding mask region image from the sphere image, performs image segmentation on the mask region image to obtain the bright spot region, and calculates the coordinates of the brightest point based on the bright spot region; The light source vector acquisition module calculates the light source vector based on the center coordinates, radius, and coordinates of the brightest point.
[0016] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described light source calibration method.
[0017] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the light source calibration method as described above.
[0018] The beneficial effects of this invention are as follows: The light source calibration method disclosed in this invention acquires multi-angle light source images of small balls collected by an image acquisition device with a fixed position, obtains a statistical graph based on the relationship between multiple small ball images, calculates a small ball mask, obtains fitting circle information and the coordinates of the brightest point based on the small ball mask, and finally calculates the light source vector.
[0019] This invention obtains a ball mask based on K images of a ball from multiple angle light sources. It considers various cases of ball images with different angles and lighting conditions, fully takes into account the influence of lighting angle and other conditions on light source calibration, and further eliminates such interference factors.
[0020] In the calculation of the ball mask, the initial threshold is obtained by using the conventional threshold calculation formula. In order to enhance the robustness of the binarization result, a correction coefficient is added to form a new binarization threshold, which is then obtained as mask0. Secondly, considering the influence of the acquisition environment on the ball image and the background interference of the binarization threshold, morphological methods are used to optimize based on mask0 to improve the anti-interference ability of the ball mask.
[0021] The spherical mask proposed in this invention calculates the entire process by processing information from the spherical image, without involving a manual calibration process, resulting in more accurate calculation results.
[0022] This invention, based on the calculated spherical mask, further calculates the fitted circle information and the coordinates of the brightest point. In calculating the coordinates of the brightest point, this invention considers the influence of imperfections in the spherical image and optimizes the acquired bright spot regions to ensure consistent processing, thereby automating the light source calibration process. Furthermore, to improve the accuracy of the calibration results, the bright spot region image is filtered, and the centroid coordinates of the filtered image are used as the coordinates of the brightest point in the spherical image.
[0023] The light source calibration method proposed in this invention does not use complex calculations such as neural networks and deep learning, which greatly simplifies the calculation process and is applicable to hardware implementation. Moreover, this method fully considers various interference factors such as lighting conditions and ball images, and the calculation results are reliable, accurate and highly resistant to interference. Attached Figure Description
[0024] Figure 1This is a flowchart illustrating the light source calibration method in this invention; Figure 2 This is a schematic diagram of the process for obtaining the ball mask in this invention; Figure 3 This is a flowchart illustrating the process of calculating the center coordinates and radius of a circle in this invention; Figure 4 This is a flowchart illustrating the process of calculating the coordinates of the brightest point in this invention; Figure 5 This is a schematic diagram of the surface reflection of the small ball in this invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0026] like Figure 1 As shown, this invention proposes a light source calibration method, comprising: With the image acquisition device in a fixed position, K images of the sphere from different angle light sources are acquired; where K is not less than 3.
[0027] Analyze the information from K images of small balls to obtain a statistical graph; binarize the statistical graph to obtain an initial mask; optimize the initial mask to obtain the small ball mask.
[0028] Specifically, this includes: analyzing K images of a small ball to obtain K analysis maps; based on the relationship that there are overlapping areas in any two images of a small ball corresponding to light sources from different angles, fusing the analysis maps to obtain a single statistical map; calculating an initial binarization threshold, adding correction coefficients to form a binarization threshold; using the binarization threshold, processing the statistical map to obtain an initial mask with only two grayscale values.
[0029] Extract the edges of the spherical mask to obtain the set of circumferential pixel coordinates; perform circle fitting based on the relationship between the circumferential pixel coordinates and the center and radius of the circle to obtain the center coordinates and radius.
[0030] Based on the sphere mask, the corresponding mask region image is selected from the sphere image, and image segmentation is performed on the mask region image to obtain the bright spot region; based on the bright spot region, the coordinates of the brightest point are calculated.
[0031] Specifically, this includes: finding the K bright spot region images corresponding to the K bright spot regions from the K small ball images, and calculating the coordinates of the brightest spot.
[0032] Furthermore, after image segmentation of the K mask region images, more than K bright spot regions are obtained, or several bright spot regions containing impurities with uneven brightness are obtained. Morphological opening operation and hole filling method are used to optimize several bright spot regions containing impurities, so that after image segmentation of any mask region image, there is one and only one bright spot region with uniform brightness. From the K ball images, the K bright spot region images corresponding to the K bright spot regions are found respectively, and the coordinates of the brightest point are calculated.
[0033] Further, calculating the coordinates of the brightest point includes: calculating the centroid coordinates of the bright spot region image, which is used as the coordinates of the brightest point in the ball image. Alternatively, before calculating the coordinates of the brightest point, the bright spot region image is filtered to obtain a filtered image, and the centroid coordinates of the filtered image are calculated as the coordinates of the brightest point in the ball image.
[0034] Calculate the light source vector based on the center coordinates, radius, and coordinates of the brightest point.
[0035] The light source calibration method in this embodiment is as follows: S1 fixes the position of the image acquisition device and acquires K images of the sphere from different angle light sources. Where K is not less than 3 and is a positive integer.
[0036] With the image acquisition device positioned fixed, K images of a small ball are acquired from light sources at different angles. Overlapping areas exist between any two images of the ball corresponding to light sources at different angles. The object being acquired is a small metal ball, referred to simply as the ball.
[0037] S2 analyzes the information from K images of small balls to obtain a statistical graph; the statistical graph is binarized to obtain an initial mask; the initial mask is optimized to obtain a small ball mask.
[0038] like Figure 2 As shown, K images of the ball were acquired from light sources at different angles. The analytical information from these K images was then compiled to obtain a statistical graph I. s Based on Statistical Chart I s Obtain the sphere mask.
[0039] S201 Analyzes the information from K images of small balls to obtain a statistical graph I. s ,include: By analyzing the data in the ball images, analytical plots are obtained. These plots include median and mean plots.
[0040] Based on the connections between overlapping regions, the analytical graphs of K ball images are weighted and fused to obtain a single statistical graph I. s .
[0041] S202 Binarization Processing Statistical Chart I s Obtain the initial mask mask0.
[0042] Binarization involves setting a binarization threshold to transform the statistical graph I... s All pixels with pixel values less than or equal to the threshold are set to a single pixel value, and I is simultaneously set to... s All pixels with pixel values greater than the threshold are set to another pixel value; so that after binarization, the initial mask mask0 has only two gray values.
[0043] In this embodiment, calculation processes such as Otsu's method, trigonometric method, and iterative method can be used to obtain the initial binarization threshold.
[0044] To improve the robustness of the binarization results, the binarization threshold in this implementation is αδ, that is, a correction coefficient δ is added to the initial binarization threshold α to obtain the initial mask mask0, as shown in the following formula:
[0045] S203 optimizes the initial mask mask0 and obtains the sphere mask mask.
[0046] This method, when using the initially constructed mask0 for light source calibration, also considers the following influencing factors: 1. Inconsistencies in the acquisition environment and acquisition equipment, which may lead to interference factors such as defects or stray spots in the acquired ball images; 2. Considering that mask0 uses a global threshold for binarization, background information exists in mask0, which leads to errors in the final calibration results.
[0047] Based on the above considerations, morphological methods are used to further optimize mask0 in order to further improve the adaptability and accuracy of this method.
[0048] Optimization operations include: First, a hole-filling method is used to address the effects of imperfections or stray spots in the sphere image; then, a morphological opening operation is used to address the influence of background information in mask0. Both the hole-filling method and the morphological opening operation are conventional image processing techniques and will not be elaborated upon here.
[0049] After the above optimization operations, the spherical mask is obtained. The calculation formula is as follows: mask=open(fill(mask0)) The fill(·) and open(·) operations represent the morphological hole filling and opening operations, respectively.
[0050] S3 uses a small sphere mask to obtain the fitted circle information and the coordinates of the brightest point. S31 describes the method for obtaining the fitted circle information, and S32 describes the method for obtaining the coordinates of the brightest point. S31 and S32 are not in any particular order; they are distinguished by numbers only for clarity in explaining the process.
[0051] S31 Figure 3 As shown, the fitted circle information is obtained based on the sphere mask. The fitted circle information includes the coordinates of the sphere's center and its radius.
[0052] S3101 extracts the edge of the sphere mask to obtain the circumferential pixel coordinate point set A.
[0053] S3102 uses the circumferential pixel coordinate point set A and the circumferential relation to perform circle fitting to obtain the center coordinates of the circle as (C). x C y ) and radius R.
[0054] In this embodiment, the least squares method is used for circle fitting, as detailed below: Assume the coordinates of the center of the circle are (C x C y ), with a radius of R.
[0055] Based on the relationship between the circumferential pixel coordinates and the center and radius of the circle, that is, the coordinates of any point in the circumferential pixel coordinate set A and the center of the circle are (C x C y The distance to the center of the circle is always R, and the coordinates of the center (C) are calculated. x C y ), the specific value of the radius R.
[0056] S32 Figure 4 As shown, based on the sphere mask, image processing is performed sequentially on K sphere images to obtain the coordinates of the brightest point.
[0057] S3201 selects the mask region image corresponding to the sphere mask from the current sphere image.
[0058] S3202 performs image segmentation on the selected mask region image in the current ball image to obtain the bright spot region.
[0059] In this embodiment, for ease of calculation, binarization segmentation is used to obtain the bright spot region. Other calculation methods can also be used for image segmentation.
[0060] If the collected image of the ball has no stray spots or defects, after binarization segmentation, a bright spot region with only one bright spot is obtained.
[0061] If stray spots or imperfections exist in the acquired image of the sphere, binarization segmentation may result in multiple bright spot areas or uneven bright spots, i.e., bright spot areas containing impurities. To achieve consistent processing of these bright spot areas and automate the light source calibration process, [further steps are needed].
[0062] For the aforementioned images of spheres affected by stray spots or imperfections, i.e., images with multiple bright spot areas or uneven bright spots, after acquiring the bright spot areas containing impurities, a morphological opening operation is used to filter out the influence of stray bright spots; then a hole filling operation is used to filter out the influence of sphere imperfections, ultimately obtaining a bright spot area with only one bright spot. That is, after image segmentation, any masked region image has one and only one uniformly bright spot area.
[0063] S3203 finds the bright spot region image corresponding to the bright spot region in the current ball image and calculates the coordinates of the brightest spot.
[0064] In this embodiment, the bright spot region image is the target image calibrated by the light source, and the centroid coordinates of the bright spot region image are used as the coordinates of the brightest point of the ball image.
[0065] Furthermore, to improve the accuracy of the calibration results, the bright spot region image is filtered to obtain a filtered image; the centroid coordinates of the filtered image are calculated as the coordinates of the brightest point in the ball image.
[0066] In this implementation, the specific method of filtering is not limited; the filtered image can be obtained by calculation methods such as median filtering, mean filtering, or Gaussian filtering.
[0067] S3204 repeats S3201~S3202 until the coordinates of the brightest point in all ball images are obtained. Represents the coordinates of the brightest point in the Kth image of the ball.
[0068] After S3, the center coordinates (C) of the small sphere mask are obtained. x C y And radius R, and coordinates of the brightest point. .
[0069] S4 is based on the center coordinates (C) of the sphere mask. x C y And radius R, and coordinates of the brightest point. Calculate the light source vector L of the Kth ball image sequentially. K This is used to determine the light source direction information corresponding to the Kth image of the ball. K In the middle, K represents the Kth image of the ball.
[0070] like Figure 5As shown, with the axis of the image acquisition device as the z-axis direction, let the camera axis vector be... , where T represents the matrix transpose.
[0071] In the following formula, all superscripts K represent the coordinates corresponding to the Kth ball image, and do not represent exponentiation.
[0072] The coordinates of the brightest point in the Kth image of the ball Relative to the center coordinates (C x C y The normal vector of ) is denoted as N K In this context, K represents the Kth image of the ball, and the calculation formula is as follows:
[0073] Let V be in N K The projection on is |S K |,|S K In the image, K represents the Kth image of the ball. Then:
[0074] In the formula, (·) represents the vector inner product, and |·| represents the magnitude of the vector.
[0075] If the source direction, normal vector, and axis direction of the image acquisition device are coplanar, and the source direction and the source normal vector of the image acquisition device axis are symmetrical, then the source direction can be calculated using the following formula:
[0076] The light source vector L in the above formula K Let this be the desired light source direction information.
[0077] Based on the same inventive concept, the present invention also proposes a light source calibration system, comprising: The image acquisition module fixes the position of the image acquisition device and acquires K images of the ball from different angle light sources; where K is not less than 3. The ball mask acquisition module analyzes K ball images to obtain a statistical image; it binarizes the statistical image to obtain an initial mask; and it optimizes the initial mask to obtain the ball mask. The circle fitting calculation module extracts the edge of the spherical mask and obtains the set of circumferential pixel coordinate points; based on the relationship between the circumferential pixel coordinate points and the center and radius of the circle, it performs circle fitting to obtain the center coordinates and radius. The brightest point coordinate calculation module, based on the sphere mask, selects the corresponding mask region image from the sphere image, performs image segmentation on the mask region image to obtain the bright spot region, and calculates the coordinates of the brightest point based on the bright spot region; The light source vector acquisition module calculates the light source vector based on the center coordinates, radius, and coordinates of the brightest point.
[0078] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described light source calibration method.
[0079] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the light source calibration method as described above.
[0080] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0081] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calibrating a light source, characterized in that, include: With the image acquisition device in a fixed position, K images of the sphere from different angle light sources are acquired; where K is not less than 3. The analysis of K ball images yields a single statistical graph. This process includes: analyzing the K ball images to obtain K analysis graphs; weighted fusion of the analysis graphs based on the existence of overlapping regions between any two ball images from different light sources to obtain a single statistical graph; the analysis graphs include a median and a mean graph; binarizing the statistical graphs to obtain an initial mask; and optimizing the initial mask to obtain a ball mask. Extract the edges of the spherical mask to obtain the set of circumferential pixel coordinates; perform circle fitting based on the relationship between the circumferential pixel coordinates and the center and radius of the circle to obtain the center coordinates and radius; Based on the sphere mask, the corresponding mask region image is selected from the sphere image, and image segmentation is performed on the mask region image to obtain the bright spot region; based on the bright spot region, the coordinates of the brightest point are calculated; Calculate the light source vector based on the center coordinates, radius, and coordinates of the brightest point.
2. The light source calibration method according to claim 1, characterized in that, The binarization processing of the statistical graph to obtain the initial mask includes: calculating the initial binarization threshold, adding correction coefficients to form the binarization threshold; and using the binarization threshold to process the statistical graph to obtain the initial mask with only two grayscale values.
3. The light source calibration method according to claim 1, characterized in that, The step of calculating the coordinates of the brightest spot based on the bright spot region includes finding the K bright spot region images corresponding to the K bright spot regions from the K small ball images, and calculating the coordinates of the brightest spot.
4. The light source calibration method according to claim 1, characterized in that, The calculation of the coordinates of the brightest spot based on the bright spot region includes: after image segmentation of K mask region images, obtaining more than K bright spot regions, or several bright spot regions containing impurities with uneven bright spots; optimizing several bright spot regions containing impurities using morphological opening operation and hole filling method, so that after image segmentation of any mask region image, there is exactly one bright spot region with uniform bright spots; from K ball images, finding K bright spot region images corresponding to the K bright spot regions respectively, and calculating the coordinates of the brightest spot.
5. The light source calibration method according to claim 3 or 4, characterized in that, The calculation of the brightest point coordinates includes: calculating the centroid coordinates of the bright spot region image, which is used as the brightest point coordinates of the ball image.
6. The light source calibration method according to claim 3 or 4, characterized in that, The calculation of the brightest point coordinates includes: filtering the bright spot area image, obtaining the filtered image, and calculating the centroid coordinates of the filtered image as the brightest point coordinates of the ball image.
7. A light source calibration system, characterized in that, include: The image acquisition module fixes the position of the image acquisition device and acquires K images of the ball from different angle light sources; where K is not less than 3. The ball mask acquisition module analyzes K ball images to obtain a statistical image. This includes: analyzing the K ball images to obtain K analysis images; weighted fusion processing of the analysis images based on the existence of overlapping regions in any two ball images from different light sources to obtain a single statistical image; the analysis images include a median image and a mean image; binarizing the statistical image to obtain an initial mask; and optimizing the initial mask to obtain the ball mask. The circle fitting calculation module extracts the edge of the spherical mask and obtains the set of circumferential pixel coordinate points; based on the relationship between the circumferential pixel coordinate points and the center and radius of the circle, it performs circle fitting to obtain the center coordinates and radius. The brightest point coordinate calculation module, based on the sphere mask, selects the corresponding mask region image from the sphere image, performs image segmentation on the mask region image to obtain the bright spot region, and calculates the coordinates of the brightest point based on the bright spot region; The light source vector acquisition module calculates the light source vector based on the center coordinates, radius, and coordinates of the brightest point.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the light source calibration method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the light source calibration method as described in any one of claims 1-6.
Citation Information
Patent Citations
Calibration method of light source in light field acquisition system, related equipment and storage medium
CN115631243A
Photometric stereogram generation method based on neural network model
CN116664760A
Photometric stereoscopic vision point light source parameter calibration method
CN111986266A
Synchronous calibration method for camera and light source in photometric stereoscopic vision system
CN114241059A
