Modulation degree correction method, modulation degree correction device, modulation degree correction equipment, medium and illumination measurement system
By screening and correcting the interpolated pixel points of the color imaging device, and using the modulation system correction algorithm to calculate the modulation system of the interpolated pixel points, the error problem caused by grayscale interpolation in high-precision measurement is solved, and the accuracy of the lighting measurement system and the accuracy of the three-dimensional morphological reconstruction are improved.
Patent Information
- Application Number
- CN202510575989.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, when color cameras perform color recording in the field of high-precision measurement, grayscale interpolation leads to image acquisition errors, which in turn causes modulation calculation errors.
By obtaining the phase shifted stripe images collected by the color imaging device, the interpolated pixel points are filtered out, and the modulation system of the interpolated pixel points is calculated using the modulation system correction algorithm, the uncorrected modulation image is corrected, and the interpolation error is reduced.
Accurate modulation calculation is realized, the accuracy of the lighting measurement system is improved, and high-precision three-dimensional morphological reconstruction is supported.
Smart Images

Figure CN120495373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical measurement technology, and in particular to a modulation correction method, device, equipment, medium and lighting measurement system. Background Art
[0002] Structured illumination measurement is an optical measurement method that uses a projector to project multiple phase-shifted fringe images and calculates the modulation image of the object's surface using the phase shift method. Combined with axial scanning technology, the focus position of each object point can be precisely determined, enabling high-precision measurement of the object's surface topography. Structured illumination measurement excels at measuring rough surfaces and has become an important research area in the field of 3D surface topography measurement. Furthermore, by recording the object's true color with a color camera, color mapping can be performed during the reconstruction process, enabling true-color 3D reconstruction of the object.
[0003] However, color cameras typically use a Bayer filter to capture the intensity of light of different colors, combined with pixel interpolation between color channels to achieve complete color recording. While this method can meet the recording needs of real-world scenes in general imaging, in the field of high-precision measurement, the interpolation process can lead to errors in the grayscale values of the captured image, which in turn causes errors in the modulation calculation. Summary of the Invention
[0004] Embodiments of the present invention provide a modulation correction method, apparatus, device, medium, and lighting measurement system, aiming to solve the problem in the prior art of color cameras recording color, where grayscale interpolation causes image capture errors, which further leads to modulation calculation errors.
[0005] In a first aspect, an embodiment of the present invention provides a fringe modulation correction method based on a color structured illumination measurement system, comprising:
[0006] Acquiring a phase-shift fringe image captured by a color imaging device, wherein the phase-shift fringe image is obtained by projecting the measured object by a projection device;
[0007] Solving the phase-shifted fringe image to obtain an uncorrected modulation image;
[0008] Filtering interpolated pixel points of the phase-shifted fringe image as interpolated pixel points according to a color filter window distribution of a color imaging device, wherein the interpolated pixel points cannot pass through the color filter window;
[0009] The modulation degree of the interpolation pixel point is calculated using a modulation degree correction algorithm, and the uncorrected modulation degree image is corrected according to the modulation degree of the interpolation pixel point to obtain a corrected modulation degree image.
[0010] In a second aspect, an embodiment of the present invention provides a color structured lighting measurement system, comprising:
[0011] The stage is used to fix the object to be measured;
[0012] A projection device, used for projecting a phase-shifted fringe image onto the object to be measured;
[0013] A color imaging device, used for collecting the phase-shifted fringe image reflected by the object under test;
[0014] a coaxial optical path device, disposed between the color imaging device and the stage, and between the projection device and the stage, for irradiating the phase-shifted fringe image projected by the projection device onto the object to be measured, and reflecting the fringe image reflected by the object to be measured to the color imaging device;
[0015] An image processing unit is connected to the color imaging device and is used to obtain a phase-shifted fringe image captured by the color imaging device, solve the phase-shifted fringe image to obtain an uncorrected modulation image, screen out interpolated pixel points of the phase-shifted fringe image as interpolated pixel points based on the color filter window distribution of the color imaging device, wherein the interpolated pixel points cannot be modulated by the color filter window, calculate the modulation of the interpolated pixel points using a modulation correction algorithm, and correct the uncorrected modulation image based on the modulation of the interpolated pixel points to obtain a corrected modulation image.
[0016] In a third aspect, an embodiment of the present invention further provides a fringe modulation correction device based on a color structured illumination measurement system, comprising:
[0017] an acquisition unit, configured to acquire a phase-shift fringe image acquired by a color imaging device, wherein the phase-shift fringe image is obtained by projecting the measured object by a projection device;
[0018] A solving unit, configured to solve the phase-shifted fringe image to obtain an uncorrected modulation image;
[0019] a screening unit, configured to screen out interpolated pixel points of the phase-shifted fringe image as interpolated pixel points according to a color filter window distribution of a color imaging device, wherein the interpolated pixel points cannot pass through the color filter window;
[0020] The correction unit is used to calculate the modulation of the interpolation pixel point by using a modulation correction algorithm, and correct the uncorrected modulation image according to the modulation of the interpolation pixel point to obtain a corrected modulation image.
[0021] In a fourth aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for correcting the fringe modulation depth based on the color structure illumination measurement system described in the first aspect above is implemented.
[0022] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the fringe modulation correction method based on the color structure illumination measurement system described in the first aspect above.
[0023] Embodiments of the present invention disclose a modulation correction method, device, equipment, medium, and lighting measurement system. The method uses a projection device to project a phase-shifted fringe image onto the surface of a measured object, collects the reflected phase-shifted fringe image through a color imaging device, processes the collected phase-shifted fringe image, and obtains an uncorrected modulation image. Then, based on the color filter window distribution of the color imaging device, interpolated pixels in the phase-shifted fringe image are screened out. These interpolated pixels cannot directly obtain complete grayscale values through the color filter window and need to be obtained through interpolation calculation. Finally, a modulation correction algorithm is used to calculate the modulation values of the interpolated pixels. The algorithm takes into account the grayscale value errors of the interpolated pixels and recalculates the modulation using a correction formula. Based on the corrected modulation value, the uncorrected modulation image is corrected to obtain a corrected modulation image. By correcting the modulation, this embodiment effectively reduces the error caused by interpolation, achieves accurate modulation calculation, and further improves the accuracy of the lighting measurement system. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A schematic flow chart of a method for correcting fringe modulation depth based on a color structured illumination measurement system provided by an embodiment of the present invention;
[0026] Figure 2 A schematic diagram of pixel distribution of a color imaging device provided by an embodiment of the present invention;
[0027] Figure 3 A schematic diagram of the grayscale value distribution of four pixels in a set of phase-shifted fringe images provided by an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of an uncorrected modulation image slice provided by an embodiment of the present invention;
[0029] Figure 5 A schematic diagram of an uncorrected modulation image slice (distinguishing between odd and even pixels) provided by an embodiment of the present invention;
[0030] Figure 6 A schematic diagram of a modified modulation image slice provided by an embodiment of the present invention;
[0031] Figure 7 A schematic diagram of local comparison of a modulation image before and after correction provided by an embodiment of the present invention;
[0032] Figure 8 A schematic diagram illustrating the positional relationship between green pixels, red pixels, and blue pixels in a color camera provided by an embodiment of the present invention;
[0033] Figure 9 A schematic diagram of a fringe modulation correction device based on a color structured illumination measurement system provided by an embodiment of the present invention;
[0034] Figure 10 A schematic diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0036] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0037] It should also be understood that the terms used in the present specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0038] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0039] See also Figure 1 , Figure 1 A flowchart of a method for correcting fringe modulation based on a color structured illumination measurement system provided by an embodiment of the present invention includes steps S101 to S104:
[0040] S101, acquiring a phase-shift fringe image collected by a color imaging device, wherein the phase-shift fringe image is obtained by projecting a projecting device onto a measured object;
[0041] In this embodiment, the projection device is one of the key components of the structured illumination measurement system. Its primary function is to project a designed phase-shifted fringe image onto the surface of the object being measured. The projection device is typically a projector, such as a DLP (digital light processing) projector, an LCD (liquid crystal display) projector, or a DMD (digital micromirror device) projector. These projectors are capable of accurately displaying the generated fringe image and projecting it onto the surface of the object being measured. The phase-shifted fringe image is generated by computer software and typically has a specific projected fringe frequency, phase shift amount, and background intensity. These phase-shifted fringe images can be sinusoidal or other periodic waveforms.
[0042] Furthermore, a color imaging device (e.g., a color camera) is used to capture phase-shifted fringe images projected onto the surface of the object being measured. This device typically uses a Bayer filter to record light intensity information for different colors (e.g., red, green, and blue). This device can capture fringe images reflected from the surface of the object being measured, which contain information about the object's surface topography.
[0043] It should be noted that in order to improve the accuracy of the measurement, the projection device and the color imaging device need to work synchronously. This means that while projecting each phase-shifted fringe image, the color imaging device needs to be able to accurately capture the reflected fringe image. Preferably, the pixel sizes of the projection device and the color imaging device are the same, so that there is a one-to-one correspondence between the projected phase-shifted fringe image and the captured phase-shifted fringe image. In other words, the projection of each pixel point of the projection device on the surface of the object to be measured will be recorded by the corresponding pixel point of the color imaging device. If the pixel sizes of the projection device and the color imaging device do not match, the projected phase-shifted fringe image may be blurred or distorted during capture. This distortion will directly affect the calculation of the modulation index, thereby reducing the accuracy of the measurement.
[0044] S102, solving the phase-shifted fringe image to obtain an uncorrected modulation image;
[0045] In this embodiment, modulation is a measure of light intensity variation within a phase-shifted fringe image, reflecting its contrast. The uncorrected modulation image reflects the original contrast of the phase-shifted fringe image and may be affected by pixel interpolation in the color imaging device, resulting in some error.
[0046] In a specific embodiment, the overall pixel distribution of the color imaging device is as follows: Figure 2 First, we take out several adjacent pixels in the phase-shifted fringe image and analyze whether their grayscale values have an interpolation relationship. The experimental results are as follows Figure 3 As shown, the grayscale values of four consecutive pixels in the 12 phase-shifted fringe images are selected here, the two blue lines correspond to two blue pixels, and the two green lines correspond to two green pixels. Figure 3 In the equation (1561, 1242), the pixel coordinates of the dark green line on the phase-shifted fringe image are represented by 1561 as the horizontal coordinate and 1242 as the vertical coordinate. X2 marked on the dark green line represents the second phase-shifted fringe image, and Y115 represents the grayscale value of the dark green line at the pixel point (1561, 1242). Figure 3 The values in can be calculated: the grayscale value of the dark green line is obtained by interpolating the two blue lines above and below. This embodiment has an interpolation problem, that is, the recorded grayscale value of the stripe is incorrect. Comparing the two green lines, we can see that the overall grayscale is similar. The other green pixel is also obtained by interpolation and also has an error.
[0047] In this case, if Figure 4 The figure shows a schematic diagram of an uncorrected modulation image slice. A modulation image slice is a one-dimensional data sequence extracted from a two-dimensional modulation image, which is used to analyze and visualize the local features of the modulation image. In the process of calculating the modulation image, the result of one row is taken out and the result of the modulation image is obtained. Figure 4 It can be seen that the modulation is not a uniform gradient, but a continuous jump. Observing the local image, we can see that this jump occurs between adjacent pixels. If we distinguish the odd and even pixels and draw them separately, we can get the following Figure 5 The two moving averages shown, that is, Figure 5 Shown is a schematic diagram of an uncorrected modulation image slice (distinguishing between odd and even pixels). In this row, even-numbered pixels are blue, and odd-numbered pixels are green. According to the modulation calculation principle, the modulation should be reduced after interpolation. This phenomenon confirms that the modulation calculation error is caused by interpolation, that is, the uncorrected modulation image is obtained by solving the phase-shifted fringe image.
[0048] S103, screening out interpolated pixel points of the phase-shifted fringe image as interpolated pixel points according to the color filter window distribution of the color imaging device, wherein the interpolated pixel points cannot pass through the color filter window;
[0049] In this embodiment, as described above, to achieve color recording for a pixel, at least three colors (red, green, and blue) must be simultaneously captured, meaning that three channels of pixel grayscale values are required. However, each pixel can only capture one grayscale value, so additional pixel information is needed to achieve color recording. Therefore, color imaging devices (color cameras) typically use a Bayer filter to capture different colors. A Bayer filter consists of filter windows for red, green, and blue wavelengths, each of which is the same size as a pixel. A Bayer filter is used in front of the camera sensor, with each pixel capturing light of a specific wavelength. For example, in the blue channel, only pixels behind the blue filter window (referred to as "blue pixels") capture blue light. For other pixels, such as green pixels, blue light cannot pass through their filter windows, so no grayscale value is recorded. Instead, their grayscale value is interpolated from neighboring blue pixels. Therefore, the green pixel is selected as the interpolated pixel.
[0050] S104 , calculating the modulation of the interpolated pixel using a modulation correction algorithm, and correcting the uncorrected modulation image according to the modulation of the interpolated pixel to obtain a corrected modulation image.
[0051] In this embodiment, a modulation correction algorithm is used to calculate the modulation of interpolated pixels. The uncorrected modulation image is then corrected based on these corrected modulation values, resulting in a corrected modulation image. This process effectively reduces errors caused by interpolation and improves the accuracy of modulation measurement, providing more accurate data support for high-precision 3D reconstruction.
[0052] In one embodiment, in step S104, the step of calculating the modulation degree of the interpolated pixel point using a modulation degree correction algorithm includes step S201:
[0053] S201, calculate the modulation degree of the interpolation pixel point according to the following formula:
[0054]
[0055] Among them, B(x0, y0) represents the modulation degree of the interpolated pixel point (x0, y0), ν0 is the frequency of the projected fringe, I n (x0, y0) represents the grayscale value of the interpolated pixel (x0, y0) in the nth phase-shifted fringe image. Represents the phase shift amount, and N is the number of phase shift steps.
[0056] In this embodiment, Figure 6 A schematic diagram of a modified modulation image slice is shown. The green pixels in the phase-shifted fringe image are modified using the formula in step S201. It can be seen that the modified green pixel modulation distribution is similar to the original blue pixel modulation distribution. Figure 7 A local comparison of the modulation image before and after correction is shown. The image before correction exhibits noticeable streaks and significant differences in modulation values between adjacent pixels, while the image after correction exhibits a gradual change overall, consistent with normal modulation distribution.
[0057] Furthermore, the I n (x0, y0) is obtained by averaging the grayscale values of adjacent target pixels, where the target pixel can pass through the color filter window.
[0058] Furthermore, in one embodiment, the grayscale value of the target pixel is calculated as follows:
[0059]
[0060] Among them, I n (x, y) represents the grayscale value of the target pixel (x, y) in the nth phase-shifted fringe image, A(x, y) represents the background intensity of the target pixel, and B(x, y) represents the modulation degree of the target pixel. In a specific embodiment, when blue light is used as the illumination light source, the blue channel of the color camera can accurately record the intensity of the blue light. Specifically, the blue pixel can directly capture the intensity information of the blue light. However, due to the characteristics of the green and red pixels, the intensity of the blue light cannot be directly recorded. Therefore, the blue light intensity of these green and red pixels needs to be calculated using the intensity information of the adjacent blue pixels through an interpolation algorithm. In this case, the blue pixel is regarded as the target pixel, and the green and red pixels are regarded as interpolation pixels. As described above, the overall pixel distribution of the color imaging device is as follows: Figure 2 As shown. If we classify them, there are three types of positional relationships among green pixels, red pixels and blue pixels, such as Figure 8 As shown, then Figure 8 Taking the leftmost pixel position relationship as an example, the grayscale values of the blue pixels on the left and right sides adjacent to the green pixel can be calculated according to the following formula:
[0061]
[0062] Among them, A(x-1, y) represents the background intensity of the blue pixel on the left, B(x-1, y) represents the modulation degree of the blue pixel on the left, and I n(x-1, y) represents the grayscale value of the blue pixel to the left of the green coordinate, I n (x+1,y) represents the grayscale value of the blue pixel to the right of the green pixel in the nth stripe image. Indicates the phase shift amount.
[0063] It should be noted that, based on the grayscale values of the blue pixels adjacent to the green pixel on the left and right sides, the grayscale value I of the green pixel point (that is, the interpolated pixel point (x0, y0)) can be obtained according to the following formula: n (x0, y0):
[0064]
[0065] Among them, A(x-1, y)=A(x+1, y), B(x-1, y)=B(x+1, y), so the coordinate signs can be ignored in the expressions of A and B in the above formula for solving the interpolated pixel points.
[0066] Furthermore, according to the grayscale value of the target pixel obtained above, the I n (x0, y0) is calculated as follows:
[0067]
[0068] Among them, I C represents the grayscale value of the interpolated pixel (x0, y0), N8(C) is the 8-neighborhood of the interpolated pixel, and I b and n b They represent the grayscale value and the number of target pixels in the 8-neighborhood of the interpolated pixel, respectively.
[0069] In this embodiment, as described above, according to Figure 8 The positional relationship between green pixels, red pixels and blue pixels. When blue light is used as the illumination light source, the blue channel of the color camera can accurately record the intensity of the blue light. Specifically, the blue pixel can directly capture the intensity information of the blue light. However, due to the characteristics of the green and red pixels, they cannot directly record the intensity of the blue light. Therefore, the blue light intensity of these green and red pixels needs to be calculated using the intensity information of the adjacent blue pixels through an interpolation algorithm. In this case, the blue pixel is regarded as the target pixel, while the green and red pixels are regarded as interpolation pixels. By taking the average of the grayscale values of the blue pixels in the neighborhood (that is, the grayscale value of the target pixel mentioned above), the interpolated light intensity of the current pixel can be obtained, that is, the grayscale value of the interpolated pixel can be obtained.
[0070] Then, we can get Figure 8The pixel interpolation relationships corresponding to the three situations shown are as follows. For the first situation, the green pixel has only blue pixels on the left and right sides, so n b =2, That is, the sum of the grayscale values of the left and right blue pixels. Therefore, in the first case, the grayscale value of the green pixel is For the second case, the green pixel has only blue pixels above and below it, so n b =2, Therefore, in the second case, the grayscale value of the green pixel is Similarly, in the third case, the grayscale value of the red pixel is
[0071] An embodiment of the present invention further provides a color structured illumination measurement system, comprising: a stage for fixing a measured object; a projection device for projecting a phase-shifted fringe image onto the measured object; a color imaging device for collecting the phase-shifted fringe image reflected by the measured object; a coaxial optical path device disposed between the color imaging device and the stage, and between the projection device and the stage, for irradiating the phase-shifted fringe image projected by the projection device onto the measured object, and reflecting the fringe image reflected by the measured object to the color imaging device; an image processing unit connected to the color imaging device, for acquiring the phase-shifted fringe image collected by the color imaging device, solving the phase-shifted fringe image to obtain an uncorrected modulation image, screening interpolated pixel points of the phase-shifted fringe image as interpolated pixel points based on a color filter window distribution of the color imaging device, wherein the interpolated pixel points cannot be modulated by the color filter window, calculating the modulation of the interpolated pixel points using a modulation correction algorithm, and correcting the uncorrected modulation image based on the modulation of the interpolated pixel points to obtain a corrected modulation image.
[0072] like Figure 9 As shown, an embodiment of the present invention further provides a fringe modulation correction device 300 based on a color structured illumination measurement system, comprising: an acquisition unit 301 , a solution unit 302 , a screening unit 303 , and a correction unit 304 .
[0073] An acquisition unit 301 is configured to acquire a phase-shift fringe image acquired by a color imaging device, wherein the phase-shift fringe image is obtained by projecting a projecting device onto the object to be measured;
[0074] A solving unit 302 is configured to solve the phase-shifted fringe image to obtain an uncorrected modulation image;
[0075] a screening unit 303 configured to screen out interpolated pixel points of the phase-shifted fringe image as interpolated pixel points according to a color filter window distribution of a color imaging device, wherein the interpolated pixel points cannot pass through the color filter window;
[0076] The correction unit 304 is configured to calculate the modulation of the interpolated pixel using a modulation correction algorithm, and correct the uncorrected modulation image according to the modulation of the interpolated pixel to obtain a corrected modulation image.
[0077] The device uses a projection device to project a phase-shifted fringe image onto the surface of the object being measured, collects the reflected phase-shifted fringe image through a color imaging device, processes the collected phase-shifted fringe image, and obtains an uncorrected modulation image. Then, based on the color filter window distribution of the color imaging device, the interpolated pixel points in the phase-shifted fringe image are screened out. These interpolated pixel points cannot directly obtain the complete grayscale value through the color filter window and need to be obtained through interpolation calculation. Finally, a modulation correction algorithm is used to calculate the modulation value of the interpolated pixel points. The algorithm takes into account the grayscale value error of the interpolated pixel points and recalculates the modulation through a correction formula. Based on the corrected modulation value, the uncorrected modulation image is corrected to obtain a corrected modulation image. This embodiment effectively reduces the error caused by interpolation by correcting the modulation, achieves accurate modulation calculation, and further improves the accuracy of the lighting measurement system.
[0078] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned device and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of description, it will not be repeated here.
[0079] The above-mentioned device for predicting the optimal read voltage can be implemented in the form of a computer program. The computer program can be used in a computer system such as Figure 10 Runs on the computer device shown.
[0080] See also Figure 10 , Figure 10 4 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device 400 is a server, which can be an independent server or a server cluster composed of multiple servers.
[0081] See Figure 10 The computer device 400 includes a processor 402 , a memory, and a network interface 405 connected via a system bus 401 , wherein the memory may include a non-volatile storage medium 403 and an internal memory 404 .
[0082] The non-volatile storage medium 403 can store an operating system 4031 and a computer program 4032. When the computer program 4032 is executed, the processor 402 can execute a fringe modulation correction method based on a color structured illumination measurement system.
[0083] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device 400.
[0084] The internal memory 404 provides an environment for running the computer program 4032 in the non-volatile storage medium 403 . When the computer program 4032 is executed by the processor 402 , the processor 402 can execute the fringe modulation correction method based on the color structured illumination measurement system.
[0085] The network interface 405 is used for network communication, such as providing data information transmission. Those skilled in the art will understand that Figure 10 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 400 to which the solution of the present invention is applied. The specific computer device 400 may include more or fewer processing units than shown in the figure, or combine certain processing units, or have a different arrangement of processing units.
[0086] Those skilled in the art will understand that Figure 10 The embodiment of the computer device shown in the figure does not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer processing units than shown in the figure, or combine certain processing units, or arrange the processing units differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are the same as those in the figure. Figure 1 The embodiments shown are consistent and will not be described again here.
[0087] It should be understood that in the embodiment of the present invention, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0088] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the fringe modulation correction method for a color structured illumination measurement system according to an embodiment of the present invention.
[0089] The storage medium is a physical, non-transient storage medium, for example, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which can store program codes.
[0090] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0091] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A fringe modulation correction method based on a color structured illumination measurement system, characterized in that: include: Acquiring a phase-shift fringe image captured by a color imaging device, wherein the phase-shift fringe image is obtained by projecting the measured object by a projection device; Solving the phase-shifted fringe image to obtain an uncorrected modulation image; Filtering interpolated pixel points of the phase-shifted fringe image as interpolated pixel points according to a color filter window distribution of a color imaging device, wherein the interpolated pixel points cannot pass through the color filter window; The modulation degree of the interpolation pixel point is calculated using a modulation degree correction algorithm, and the uncorrected modulation degree image is corrected according to the modulation degree of the interpolation pixel point to obtain a corrected modulation degree image.
2. The fringe modulation correction method based on the color structured illumination measurement system according to claim 1, characterized in that: The method of calculating the modulation degree of the interpolation pixel point by using a modulation degree correction algorithm includes: The modulation degree of the interpolated pixel is calculated according to the following formula: Among them, B(x0, y0) represents the modulation degree of the interpolated pixel point (x0, y0), ν0 is the frequency of the projected fringe, I n (x0, y0) represents the grayscale value of the interpolated pixel (x0, y0) in the nth phase-shifted fringe image. Represents the phase shift amount, and N is the number of phase shift steps.
3. The fringe modulation correction method based on the color structured illumination measurement system according to claim 2, characterized in that: I n (x0, y0) is obtained by averaging the grayscale values of adjacent target pixels, where the target pixel can pass through the color filter window.
4. The fringe modulation correction method based on the color structured illumination measurement system according to claim 3, characterized in that: The grayscale value of the target pixel is calculated as follows: Among them, I n (x, y) represents the grayscale value of the target pixel (x, y) in the nth phase-shifted fringe image, A(x, y) represents the background intensity of the target pixel, and B(x, y) represents the modulation degree of the target pixel.
5. The fringe modulation correction method based on the color structured illumination measurement system according to claim 4, characterized in that: I n (x0, y0) is calculated as follows: Among them, I C represents the grayscale value of the interpolated pixel (x0, y0), N8(C) is the 8-neighborhood of the interpolated pixel, and I b and n b They represent the grayscale value and the number of target pixels in the 8-neighborhood of the interpolated pixel, respectively.
6. The fringe modulation correction method based on the color structured illumination measurement system according to claim 1, characterized in that: The pixel sizes of the projection device and the color imaging device are the same.
7. A color structured lighting measurement system, characterized in that: include: The stage is used to fix the object to be measured; A projection device, used for projecting a phase-shifted fringe image onto the object to be measured; A color imaging device, used for collecting the phase-shifted fringe image reflected by the object under test; a coaxial optical path device, disposed between the color imaging device and the stage, and between the projection device and the stage, for irradiating the phase-shifted fringe image projected by the projection device onto the object to be measured, and reflecting the fringe image reflected by the object to be measured to the color imaging device; An image processing unit is connected to the color imaging device and is used to obtain a phase-shifted fringe image captured by the color imaging device, solve the phase-shifted fringe image to obtain an uncorrected modulation image, screen out interpolated pixel points of the phase-shifted fringe image as interpolated pixel points based on the color filter window distribution of the color imaging device, wherein the interpolated pixel points cannot be modulated by the color filter window, calculate the modulation of the interpolated pixel points using a modulation correction algorithm, and correct the uncorrected modulation image based on the modulation of the interpolated pixel points to obtain a corrected modulation image.
8. A fringe modulation correction device based on a color structured illumination measurement system, characterized in that: include: an acquisition unit, configured to acquire a phase-shift fringe image acquired by a color imaging device, wherein the phase-shift fringe image is obtained by projecting the measured object by a projection device; A solving unit, configured to solve the phase-shifted fringe image to obtain an uncorrected modulation image; a screening unit, configured to screen out interpolated pixel points of the phase-shifted fringe image as interpolated pixel points according to a color filter window distribution of a color imaging device, wherein the interpolated pixel points cannot pass through the color filter window; The correction unit is used to calculate the modulation of the interpolation pixel point by using a modulation correction algorithm, and correct the uncorrected modulation image according to the modulation of the interpolation pixel point to obtain a corrected modulation image.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the fringe modulation correction method based on the color structured illumination measurement system according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to execute the fringe modulation correction method based on a color structured illumination measurement system according to any one of claims 1 to 6.