Stable imaging method for surface defects of polished mobile phone middle frame
Through the combination of specific light source and the coordination of the motion system, the imaging instability caused by uneven reflection of the frame surface of the mobile phone after polishing is solved, efficient and stable defect detection is achieved, and the application of AI detection is supported.
Patent Information
- Application Number
- CN202511018763.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-09-02
AI Technical Summary
The uneven reflection on the surface of the middle frame of the polished mobile phone leads to unstable imaging effects, inaccurate artificial quality inspection results, and difficult to unify the detection standards.
A specific imaging acquisition device is adopted, including annular light sources and spherical integral light sources of different angles, colors and diameters, combined with a three-axis stroke adjustment assembly and a two-axis rotation assembly, and stable imaging is achieved through dynamic brightness adjustment and position adjustment.
It realizes stable imaging of defects on the surface of the mobile phone frame, improves detection efficiency and quality stability, reduces detection costs, and is suitable for the implementation of AI detection technology.
Smart Images

Figure CN120583307A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photographing and processing surface defects of a polished mobile phone middle frame, and in particular to a method for stably imaging surface defects of a polished mobile phone middle frame. Background Art
[0002] The polished mobile phone middle frame still requires a lot of manpower for traditional quality inspection due to defects such as scratches, crushing, bumps caused by the production process and transportation, as well as dirt and watermarks caused by abnormalities in the cleaning and drying process.
[0003] Manual comprehensive testing is not only time-consuming and laborious, but can also easily lead to fatigue among testers, resulting in oversights and inaccurate results. Furthermore, manual quality inspection standards are difficult to standardize and can be influenced by factors such as personal experience and subjective judgment. This can lead to varying quality assessments of the same product, impacting the stability of product quality.
[0004] In addition, since the polished surface of the mobile phone's middle frame is similar to the scratched image, the direction of the polishing is uncertain, and the middle frame itself is made of aluminum alloy and titanium alloy, uneven reflection will appear after the polishing process, resulting in unstable imaging effect when using ordinary lighting. Summary of the Invention
[0005] In view of this, the present invention proposes a stable imaging method for surface defects of a polished mobile phone middle frame, aiming to solve the problem in the current technology that uneven reflection will appear on the surface of the polished mobile phone middle frame, resulting in unstable imaging effect and inaccurate manual quality inspection results.
[0006] The present invention proposes a stable imaging method for surface defects of a polished mobile phone midframe, comprising: S1. Assume that the imaging acquisition device includes at least two sets of arc light sources (1) formed by stacking three ring lights of different angles, colors, and apertures layer by layer, and arc light source (2) formed by combining a spherical integrating light source and two strip lights placed parallel to each other below the spherical integrating light source. Either the arc light source (1) or the arc light source (2) is illuminated at a preset initial brightness. S2. Adjust the relative position between the product to be imaged and the imaging acquisition device using a three-axis stroke adjustment assembly and a two-axis rotation assembly so that the A surface, B surface, C surface, curved surface, and R angle of the product to be imaged are sequentially parallel to or facing the imaging plane of the imaging acquisition device, and capture the image using preset imaging parameters; S3. When photographing the product to be imaged, obtaining brightness data of the real-time captured image, adjusting the preset initial brightness according to the brightness data to obtain dynamic brightness, and lighting the product to be imaged based on the dynamic brightness; S4. When photographing the A side, B side, C side, and curved surface of the product to be imaged, the first curved light source is used; when photographing the R corner of the product to be imaged, the second curved light source is used.
[0007] In some embodiments of the present application, the arc-shaped light source in step S1 is a ring light of three colors: red, green, and blue.
[0008] In some embodiments of the present application, the imaging acquisition device in step S1 further includes an area array color camera and a lens, and the area array color camera and the lens are arranged directly above the first arc light source or the second arc light source.
[0009] In some embodiments of the present application, step S2 includes: S21. Move the product to be imaged along the X-axis to an imaging acquisition position provided with the imaging acquisition device using the X-axis stroke adjustment assembly of the three-axis stroke adjustment assembly, so that one of surface A and surface C is parallel to the imaging plane of the imaging acquisition device, and capture the side of one of surface A and surface C that is parallel to the Y-axis using the preset imaging parameters. Rotate the product to be imaged 90° along a horizontal plane perpendicular to the Z-axis using the horizontal rotation assembly of the two-axis rotation assembly until all four sides of one of surface A and surface C are captured. S22, moving the product to be imaged along the X-axis to the imaging acquisition position by the X-axis stroke adjustment assembly, moving the imaging acquisition device after step S21 upward by w units by the Z-axis stroke adjustment assembly of the three-axis stroke adjustment assembly, and rotating the product to be imaged by a preset angle along a vertical plane parallel to the Z-axis by the vertical rotation assembly of the two-axis rotation assembly, so that surface B is parallel to the imaging plane of the imaging acquisition device, and photographing the side of surface B parallel to the Y-axis with the preset imaging parameters. Simultaneously, the product to be imaged is rotated by preset angles along a horizontal plane perpendicular to the Z-axis by the horizontal rotation assembly until all four sides and all R corners of surface B are photographed; S23, rotating the product to be imaged 90° along a vertical plane parallel to the Z axis using the vertical rotation assembly in the two-axis rotation assembly, and repeating step S21 to complete the imaging of the four sides of the remaining surface A and surface C; S24, rotating the product to be imaged along a vertical plane parallel to the Z axis by a preset angle in a first direction by the vertical rotation component, so that any arc surface faces the imaging plane of the acquisition device, and starting to capture the current arc surface with the preset imaging parameters; S25. After the shooting in step S24 is completed, the product to be imaged is rotated by a preset angle in a second direction opposite to the first direction along a vertical plane parallel to the Z axis by the vertical rotation component, and the product to be imaged is rotated 90° along a horizontal plane perpendicular to the Z axis by the horizontal rotation component, and step S24 is repeated to shoot the next curved surface until all curved surfaces are shot.
[0010] In some embodiments of the present application, during the process of photographing a side of one of the A surface, B surface, C surface, and the curved surface parallel to the Y axis in step S2, the imaging acquisition device is moved y units along the Y axis at a preset moving speed by the Y-axis stroke adjustment component in the three-axis stroke adjustment component, wherein the y unit is greater than or equal to the length of the side of any one of the A surface, B surface, C surface, and the curved surface parallel to the Y axis during photographing, so that the photographing range of the imaging acquisition device completely covers the A surface, B surface, C surface, and one of the curved surfaces.
[0011] In some embodiments of the present application, step S22 moves the imaging acquisition device after step S21 upward by w units through the Z-axis stroke adjustment component, where w units are greater than the side length of any one of the A surface, B surface, C surface and arc surface parallel to the Z axis during shooting.
[0012] In some embodiments of the present application, the calculation formula of the preset moving speed in step S2 is as follows: Preset maximum pixel smear length And obtain the exposure time t in the preset imaging parameters; Based on the exposure time t and the maximum pixel smear length Calculate the preset movement speed: ; Where v is the preset moving speed; p is the physical size of a single pixel photosensitive unit in the area array color camera.
[0013] In some embodiments of the present application, the preset moving speed in step S2 is less than the maximum moving speed, wherein the maximum moving speed is calculated as follows: ; in, is the maximum movement speed; is the actual frame rate of the area array color camera; the field of view width is the physical size of the actual object or scene captured by the area array color camera in the horizontal direction; the overlap rate is the proportion of the overlapping area between adjacent images taken by the area array color camera; When the preset moving speed v is less than or equal to the maximum moving speed When , the Y-axis stroke adjustment component moves the imaging acquisition device along the Y-axis by y units at a preset moving speed v; When the preset moving speed v is greater than the maximum moving speed When the Y-axis stroke adjustment component moves at the maximum speed Move the imaging acquisition device along the Y axis by y units.
[0014] In some embodiments of the present application, when the preset initial brightness is adjusted according to the brightness data to obtain dynamic brightness in step S3, the method includes: Obtain the grayscale histogram of the real-time captured image; Obtain the maximum grayscale value and the minimum grayscale value in the grayscale histogram to calculate the real-time brightness uniformity: ; is the minimum grayscale value in the grayscale histogram; is the maximum grayscale value in the grayscale histogram; A light source uniformity threshold is preset. When the real-time brightness uniformity is less than the light source uniformity threshold, the preset initial brightness is adjusted according to the brightness data to obtain dynamic brightness, and lighting is performed with dynamic brightness; when the real-time brightness uniformity is greater than or equal to the light source uniformity threshold, lighting is performed according to the preset initial brightness.
[0015] In some embodiments of the present application, when the real-time brightness uniformity is less than the light source uniformity threshold, the preset initial brightness is adjusted according to the brightness data to obtain dynamic brightness, and lighting is performed with the dynamic brightness, including: Preset a pixel grayscale value overexposure threshold, and calculate the proportion of overexposed pixels in the grayscale histogram that are greater than or equal to the pixel grayscale value overexposure threshold, which is recorded as q; The dynamic brightness is calculated by selecting a corresponding brightness adjustment coefficient based on the overexposed pixel ratio q. The specific calculation formula is as follows: E = Ea × K; ; Where, E is the dynamic brightness; Ea is the initial brightness; K is the brightness adjustment coefficient.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention uses a specific imaging acquisition device in combination with a motion system including a three-axis stroke adjustment component and a two-axis rotation component. Different light sources can be selected according to the characteristics of the product to be imaged, and flexible position adjustment can be used to better meet imaging requirements. Among them, the three ring lights of different angles, colors, and apertures in the imaging acquisition device are layered and combined to obtain an arc light source. The first arc light source is aimed at the A, B, C, and arc surfaces of the mobile phone middle frame. With the help of the flexible angle movement of the servo motor of the motion system, all-round and multi-level shooting of defects of different depths, angles, and positions can be achieved, ensuring that defects on the A, B, C, and arc surfaces can be captured. The second arc light source is obtained by combining a spherical integral light source and two strip lights placed parallel to the spherical integral light source in the imaging acquisition device. It is aimed at the R angle of the mobile phone middle frame, which can meet the uneven reflection of the mobile phone middle frame after polishing, the clear comparison of defects of different severity, and the randomness of the direction of scratches and polishing marks on the imaging shooting angle and acquisition device, achieving the effect of stable imaging of defects.
[0017] Furthermore, the present invention can meet the demand for stable imaging of defective products in AI detection by achieving a stable imaging effect of surface defects of the mobile phone middle frame after polishing, facilitate the implementation of AI detection technology in the surface curve detection project of the mobile phone middle frame after polishing, improve detection efficiency, reduce detection costs, and improve the stability of detection quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings: Figure 1 A flowchart of a method for stably imaging surface defects of a polished mobile phone midframe provided by an embodiment of the present invention; Figure 2 A schematic structural diagram of an arc light source 1 provided in an embodiment of the present invention; Figure 3 This is a schematic structural diagram of the arc light source 2 provided in an embodiment of the present invention.
[0019] In the figure: 1. Area array color camera; 2. Lens; 3. Ring light; 4. Spherical integrating light source; 5. Strip light; 6. Product to be imaged. DETAILED DESCRIPTION
[0020] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, unless there is a conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0021] Example 1, see Figures 1 to 3 This embodiment provides a method for stably imaging surface defects of a polished mobile phone midframe, including: S1. Set the imaging acquisition device to include at least two sets of arc light sources (1) formed by stacking three ring lights (3) of different angles, colors, and apertures layer by layer, and arc light source (2) formed by combining a spherical integrating light source (4) and two strip lights (5) placed parallel to and below spherical integrating light source (4). Either arc light source (1) or arc light source (2) is illuminated at a preset initial brightness. S2. Adjust the relative position between the product to be imaged 6 and the imaging acquisition device using a three-axis stroke adjustment assembly and a two-axis rotation assembly so that the A surface, B surface, C surface, curved surface, and R angle of the product to be imaged 6 are sequentially parallel to or facing the imaging plane of the imaging acquisition device, and capture the image using preset imaging parameters; S3. When photographing the product 6 to be imaged, obtain brightness data of the real-time captured image, adjust the preset initial brightness according to the brightness data to obtain dynamic brightness, and illuminate the product 6 to be imaged based on the dynamic brightness; S4. When photographing the A side, B side, C side, and curved side of the product 6 to be imaged, the first curved light source is used; when photographing the R corner of the product 6 to be imaged, the second curved light source is used.
[0022] Specifically, surface A in this embodiment is the frame plane of the product to be imaged 6, i.e., the middle frame of the mobile phone, with the battery compartment side; surface C is the frame plane of the product to be imaged 6, i.e., the middle frame of the mobile phone, opposite to surface A; surface B is the surrounding surface of the frame with the volume button of the product to be imaged 6, i.e., the middle frame of the mobile phone; the arc surface is the curved surface at the connection between surface A and surface B, and the curved surface at the connection between surface B and surface C; the R angle is the four curved surfaces where the four surrounding surfaces of surface B are connected in pairs.
[0023] Specifically, the arc light source 1 in step S1 is obtained by stacking and combining two groups of three ring lights 3 with different angles, colors and apertures layer by layer, and the two groups of ring lights 3 are symmetrically arranged to form an arc.
[0024] It can be understood that in this embodiment, through the imaging acquisition device with differentiated light source combination, dynamic brightness adjustment mechanism and imaging position adjustment mechanism, high-quality image acquisition of complex metal structural parts such as the middle frame of a mobile phone is achieved, solving the problems of unstable image quality and low defect recognition rate in traditional imaging systems.
[0025] Furthermore, in this embodiment, different light source settings are selected for different surfaces or areas of the product to be imaged 6, i.e., the middle frame of the mobile phone. The arc light source 1 is aimed at the A surface, B surface, C surface and arc surface, and is used in conjunction with a low-magnification telecentric lens. While ensuring that defects can be clearly imaged, the imaging field of view can be expanded as much as possible, the number of shots can be reduced, and the image acquisition cycle time can be saved. The multi-angle, multi-color, and multi-aperture ring light 3 structure can effectively cover a large area of flat and curved surfaces, which can improve the defect recognition rate; the arc light source 2 is aimed at the R corner, and an ordinary lens is used at the same time. The spherical integral light source 4 is used to provide uniform background light, and the strip light 5 is used to highlight the edge information of the R corner, thereby solving the problem of blurred imaging caused by structural occlusion in traditional imaging, and achieving stable imaging of different structural surfaces through differentiated lighting optimization of different structural surfaces.
[0026] Furthermore, the imaging acquisition device in this embodiment combines a dynamic brightness adjustment mechanism to collect brightness data of the real-time captured image in real time during the imaging process, and dynamically adjusts the preset initial brightness based on the brightness data to avoid misjudgment of defects caused by excessive brightness or darkness.
[0027] Furthermore, the imaging acquisition device in this embodiment is also combined with an imaging position adjustment mechanism, which realizes precise spatial positioning and angular alignment between the product to be imaged 6 and the imaging acquisition device through the coordinated work of the three-axis stroke adjustment component and the two-axis rotation component. At the same time, it can be connected to the controller to realize automatic adjustment, thereby improving imaging efficiency and imaging stability and reducing manual dependence.
[0028] Specifically, the arc light source 1 and the arc light source 2 in the imaging acquisition device in this embodiment can be constructed by selecting one or both of them according to actual conditions, and suitable lenses and cameras can be selected in combination. This embodiment does not make specific limitations on this.
[0029] Preferably, the arc-shaped light source 1 in step S1 is a ring light 3 of three colors: red, green and blue.
[0030] Understandably, the polished metal surface of a phone's midframe is prone to specular highlights. Single white or monochromatic light often creates overexposed areas in the image, masking defects. Red, green, and blue light have different wavelengths and reflect at varying angles. Superimposing them creates "complementary shadows" within the same field of view, effectively breaking up specular highlights and allowing defects like scratches, pits, and dirt to appear clearly contrasted in at least one color channel. This improves overall defect detection and effectively resolves the issue of specular interference in imaging polished metal surfaces.
[0031] Preferably, the imaging acquisition device in step S1 further includes an area array color camera 1 and a lens 2, and the area array color camera 1 and the lens 2 are arranged directly above the first arc light source or the second arc light source.
[0032] It can be understood that the area array color camera 1 and lens 2 are coaxially installed with the arc light source 1 or the arc light source 2, and the camera optical axis coincides with the center of the light source, thereby reducing perspective distortion and edge vignetting caused by viewing angle differences and ensuring the geometric accuracy and brightness uniformity of the image.
[0033] Preferably, step S2 includes: S21. Move the product 6 to be imaged along the X-axis to the imaging acquisition position provided with the imaging acquisition device by using the X-axis stroke adjustment component in the three-axis stroke adjustment component, so that one of the A and C surfaces is parallel to the imaging plane of the imaging acquisition device, and photograph the side of one of the A and C surfaces parallel to the Y-axis with preset imaging parameters. Rotate the product 6 to be imaged 90° along the horizontal plane perpendicular to the Z-axis by using the horizontal rotation component in the two-axis rotation component until all four sides of one of the A and C surfaces are photographed.
[0034] S22. Move the product 6 to be imaged along the X-axis to the imaging acquisition position through the X-axis stroke adjustment assembly, move the imaging acquisition device after step S21 upward by w units through the Z-axis stroke adjustment assembly in the three-axis stroke adjustment assembly, and rotate the product 6 to be imaged by a preset angle along a vertical plane parallel to the Z-axis through the vertical rotation assembly in the two-axis rotation assembly, so that the B surface is parallel to the imaging plane of the imaging acquisition device, and photograph the side of the B surface parallel to the Y-axis with preset imaging parameters. At the same time, rotate the product 6 to be imaged by preset angles along a horizontal plane perpendicular to the Z-axis through the horizontal rotation assembly until all four sides and all R corners of the B surface are photographed.
[0035] S23, after rotating the product 6 to be imaged 90° along a vertical plane parallel to the Z axis using the vertical rotation assembly in the two-axis rotation assembly, repeat step S21 to complete the imaging of the four sides of the remaining surface A and surface C.
[0036] S24, using the vertical rotation component to rotate the product to be imaged 6 along a vertical plane parallel to the Z axis in a first direction by a preset angle, so that any arc surface faces the imaging plane of the acquisition device, and start shooting the current arc surface with preset imaging parameters.
[0037] S25. After the shooting of step S24 is completed, the product to be imaged 6 is rotated by a preset angle along a vertical plane parallel to the Z axis in a second direction opposite to the first direction through the vertical rotation component, and the product to be imaged 6 is rotated 90° along a horizontal plane perpendicular to the Z axis through the horizontal rotation component. Step S24 is repeated to shoot the next curved surface until all curved surfaces are shot.
[0038] Preferably, in the process of photographing the side of one of the A surface, B surface, C surface and the curved surface parallel to the Y axis in step S2, the imaging acquisition device is moved y units along the Y axis at a preset moving speed through the Y-axis stroke adjustment component in the three-axis stroke adjustment component, wherein the y unit is greater than or equal to the side length of any one of the A surface, B surface, C surface and the curved surface parallel to the Y axis during photographing, so that the photographing range of the imaging acquisition device completely covers the A surface, B surface, C surface and one of the curved surfaces.
[0039] Specifically, when photographing a side of one of surface A and surface C that is parallel to the Y axis in step S21, the imaging acquisition device is moved by y units along the Y axis through the Y-axis stroke adjustment component in the three-axis stroke adjustment component, wherein the y unit is greater than or equal to the length of the side of one of surface A and surface C that is parallel to the Y axis during photographing, so that the photographing range of the imaging acquisition device covers any side length of one of surface A and surface C; when photographing a side of surface B that is parallel to the Y axis in step S22, the imaging acquisition device is moved by y units along the Y axis through the Y-axis stroke adjustment component in the three-axis stroke adjustment component, wherein the y unit is greater than or equal to the length of the side of surface B that is parallel to the Y axis during photographing, so that the photographing range of the imaging acquisition device covers any side length of surface B; when photographing any curved surface in step S23, the imaging acquisition device is moved by y units along the Y axis through the Y-axis stroke adjustment component in the three-axis stroke adjustment component, wherein the y unit is greater than or equal to the length of the side of the curved surface that is parallel to the Y axis during photographing, so that the photographing range of the imaging acquisition device covers the length range of any curved surface.
[0040] Preferably, in step S22, the imaging acquisition device after step S21 is moved upward by w units through the Z-axis stroke adjustment component, wherein the w units are greater than the side length of any one of the A surface, B surface, C surface and the arc surface parallel to the Z axis during shooting.
[0041] Specifically, in this embodiment, when the imaging product 6 is moved by the X-axis stroke adjustment component, Y-axis stroke adjustment component, and Z-axis stroke adjustment component in the three-axis stroke adjustment component, the moving distances of the X-axis, Y-axis, and Z-axis can be determined according to the actual size of the imaging product 6.
[0042] Preferably, the calculation formula for the preset moving speed in step S2 is as follows: Preset maximum pixel smear length And obtain the exposure time t in the preset imaging parameters; Based on the exposure time t and the maximum pixel smear length Calculate the preset movement speed: ; Wherein, v is the preset moving speed; p is the physical size of a single pixel photosensitive unit in the area array color camera 1.
[0043] It is understandable that in this embodiment, the maximum value of the preset pixel smear length is The preset moving speed during the shooting process is determined by the exposure time t, which ensures shooting efficiency while avoiding unclear imaging caused by motion blur.
[0044] Preferably, the preset moving speed in step S2 is less than the maximum moving speed, wherein the maximum moving speed is calculated as follows: ; in, is the maximum movement speed; is the actual frame rate of the area array color camera 1; the field of view width is the physical size of the actual object or scene captured by the area array color camera 1 in the horizontal direction; the overlap rate is the proportion of the overlapping area between adjacent images taken by the area array color camera 1; When the preset moving speed v is less than or equal to the maximum moving speed When , the Y-axis stroke adjustment component moves the imaging acquisition device along the Y-axis by y units at a preset moving speed v; When the preset moving speed v is greater than the maximum moving speed When the Y-axis stroke adjustment component moves at the maximum speed Move the imaging acquisition device along the Y axis by y units.
[0045] Specifically, the shooting frame rate should match the moving speed to ensure that there is enough overlapping area between adjacent images to avoid missed detection. The wider the field of view, the faster the speed allowed, and the lower the overlap rate, the faster the speed allowed.
[0046] It can be understood that in this embodiment, the minimum speed is calculated based on the actual frame rate, field of view width and overlap rate of the camera to ensure that the captured image fully displays the product 6 to be imaged, thereby avoiding missed detection while ensuring imaging efficiency.
[0047] Furthermore, in this embodiment, a limit on the maximum pixel smear length is first introduced, and a preset movement speed is calculated to ensure imaging efficiency while avoiding motion blur. At the same time, factors such as actual frame rate, overlap rate, and field of view width are further introduced to limit the calculation of the maximum movement speed while avoiding missed detection. Finally, a suitable movement speed is selected from the preset movement speed and the maximum movement speed according to the specific situation to further ensure imaging efficiency and imaging effectiveness.
[0048] Preferably, when adjusting the preset initial brightness according to the brightness data to obtain the dynamic brightness in step S3, the method includes: Obtain the grayscale histogram of the real-time captured image; Get the maximum and minimum grayscale values in the grayscale histogram to calculate the real-time brightness uniformity: ; is the minimum grayscale value in the grayscale histogram; is the maximum grayscale value in the grayscale histogram; A light source uniformity threshold is preset. When the real-time brightness uniformity is less than the light source uniformity threshold, the initial brightness is preset according to the brightness data to adjust to obtain dynamic brightness, and lighting is performed with dynamic brightness; when the real-time brightness uniformity is greater than or equal to the light source uniformity threshold, lighting is performed according to the preset initial brightness.
[0049] Preferably, when the real-time brightness uniformity is less than the light source uniformity threshold, the initial brightness preset according to the brightness data is adjusted to obtain dynamic brightness, and when lighting is performed with the dynamic brightness, the method includes: Preset the pixel grayscale value overexposure threshold, calculate the proportion of overexposed pixels in the grayscale histogram that are greater than or equal to the pixel grayscale value overexposure threshold, and record it as q; Based on the overexposed pixel ratio q, the corresponding brightness adjustment coefficient is selected to calculate the dynamic brightness. The specific calculation formula is as follows: E = Ea × K; ; Where, E is the dynamic brightness; Ea is the initial brightness; K is the brightness adjustment coefficient.
[0050] It can be understood that in this embodiment, real-time monitoring of brightness uniformity is achieved through grayscale histogram analysis, and the initial brightness of the light source is dynamically adjusted in combination with a feedback mechanism to make the final image brightness distribution more uniform, thereby improving visual consistency and system stability.
[0051] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A method for stable imaging of surface defects of a polished mobile phone midframe, characterized in that: include: S1. The imaging acquisition device is set to include at least two groups of arc light sources (1) formed by stacking three ring lights (3) of different angles, different colors, and different apertures layer by layer, and arc light source (2) formed by combining a spherical integrating light source (4) and two strip lights (5) placed parallel to the spherical integrating light source (4). The arc light source (1) or the arc light source (2) is illuminated at a preset initial brightness; S2, adjusting the relative position between the product to be imaged (6) and the imaging acquisition device by a three-axis stroke adjustment component and a two-axis rotation component, so that the A surface, B surface, C surface, arc surface and R angle of the product to be imaged (6) are sequentially parallel to or facing the imaging plane of the imaging acquisition device to perform imaging with preset imaging parameters; S3, when photographing the product to be imaged (6), obtaining brightness data of the real-time photographed image, adjusting the preset initial brightness according to the brightness data to obtain dynamic brightness, and lighting the product to be imaged (6) based on the dynamic brightness; S4. When photographing the A surface, B surface, C surface and curved surface of the product to be imaged (6), the first curved light source is used; when photographing the R angle of the product to be imaged (6), the second curved light source is used.
2. The stable imaging method for surface defects of a polished mobile phone middle frame according to claim 1, characterized in that: The arc-shaped light source in step S1 is a ring light (3) of three colors: red, green and blue.
3. The stable imaging method for surface defects of a polished mobile phone middle frame according to claim 1, characterized in that: The imaging acquisition device in step S1 further comprises an area array color camera (1) and a lens (2), wherein the area array color camera (1) and the lens (2) are arranged directly above the first arc light source or the second arc light source.
4. The method for stable imaging of surface defects of a polished mobile phone middle frame according to claim 1, characterized in that: Step S2 includes: S21, using the X-axis stroke adjustment component in the three-axis stroke adjustment component, the product to be imaged (6) is moved along the X-axis to the imaging acquisition position provided with the imaging acquisition device, so that one of the A surface and the C surface is parallel to the imaging plane of the imaging acquisition device, and the side of one of the A surface and the C surface parallel to the Y-axis is photographed with the preset imaging parameters, and the product to be imaged (6) is rotated 90 degrees along the horizontal plane perpendicular to the Z-axis in sequence by the horizontal rotation component in the two-axis rotation component until all four sides of one of the A surface and the C surface are photographed; S22, move the product to be imaged (6) along the X-axis to the imaging acquisition position through the X-axis stroke adjustment component, move the imaging acquisition device after step S21 upward by w units through the Z-axis stroke adjustment component in the three-axis stroke adjustment component, and rotate the product to be imaged (6) along the vertical plane parallel to the Z-axis by a preset angle through the vertical rotation component in the two-axis rotation component, so that the B surface is parallel to the imaging plane of the imaging acquisition device, and shoot the side of the B surface parallel to the Y-axis with the preset imaging parameters, and at the same time, rotate the product to be imaged (6) along the horizontal plane perpendicular to the Z-axis by preset angles in sequence through the horizontal rotation component until all four sides of the B surface and all R angles are shot; S23, rotating the product (6) to be imaged by 90° along a vertical plane parallel to the Z axis by the vertical rotation assembly in the two-axis rotation assembly, and then repeating step S21, so that the four sides of the remaining surface A and surface C are all photographed; S24, rotating the product (6) to be imaged along a vertical plane parallel to the Z axis by a preset angle in a first direction by means of the vertical rotation component, so that any arc surface faces the imaging plane of the acquisition device, and starting to shoot the current arc surface with the preset imaging parameters; S25. After the shooting of step S24 is completed, the product to be imaged (6) is rotated by a preset angle along a vertical plane parallel to the Z axis in a second direction opposite to the first direction by the vertical rotation component, and the product to be imaged (6) is rotated by 90° along a horizontal plane perpendicular to the Z axis by the horizontal rotation component, and step S24 is repeated to shoot the next curved surface until all curved surfaces are shot.
5. The method for stable imaging of surface defects of a polished mobile phone middle frame according to claim 4, characterized in that: During the process of photographing the side of one of the A surface, the B surface, the C surface, and the curved surface that is parallel to the Y axis in step S2, the imaging acquisition device is moved by the Y-axis stroke adjustment component in the three-axis stroke adjustment component by a y-unit along the Y axis at a preset moving speed, wherein the y-unit is greater than or equal to the length of the side of any one of the A surface, the B surface, the C surface, and the curved surface that is parallel to the Y axis during photographing, so that the photographing range of the imaging acquisition device completely covers the A surface, the B surface, the C surface, and one of the curved surfaces.
6. The method for stable imaging of surface defects of a polished mobile phone middle frame according to claim 4, characterized in that: In step S22, the imaging acquisition device after step S21 is moved upward by w units through the Z-axis stroke adjustment component, wherein w units are greater than the side length of any one of the A surface, B surface, C surface and the arc surface parallel to the Z axis during shooting.
7. The method for stable imaging of surface defects of a polished mobile phone middle frame according to claim 5, characterized in that: The calculation formula of the preset moving speed in step S2 is as follows: Preset maximum pixel smear length And obtain the exposure time t in the preset imaging parameters; Based on the exposure time t and the maximum pixel smear length Calculate the preset movement speed: ; Wherein, v is the preset moving speed; p is the physical size of a single pixel photosensitive unit in the area array color camera (1).
8. The method for stable imaging of surface defects of a polished mobile phone middle frame according to claim 7, characterized in that: The preset moving speed in step S2 is less than the maximum moving speed, wherein the maximum moving speed is calculated as follows: ; in, is the maximum movement speed; is the actual frame rate of the area array color camera (1); the field of view width is the physical size of the actual object or scene captured by the area array color camera (1) in the horizontal direction; the overlap rate is the proportion of the overlapping area between adjacent images taken by the area array color camera (1); When the preset moving speed v is less than or equal to the maximum moving speed When , the Y-axis stroke adjustment component moves the imaging acquisition device along the Y-axis by y units at a preset moving speed v; When the preset moving speed v is greater than the maximum moving speed When the Y-axis stroke adjustment component moves at the maximum speed Move the imaging acquisition device along the Y axis by y units.
9. The method for stable imaging of surface defects of a polished mobile phone midframe according to claim 1, characterized in that: When the preset initial brightness is adjusted according to the brightness data to obtain dynamic brightness in step S3, the method includes: Obtain the grayscale histogram of the real-time captured image; Obtain the maximum grayscale value and the minimum grayscale value in the grayscale histogram to calculate the real-time brightness uniformity: ; is the minimum grayscale value in the grayscale histogram; is the maximum grayscale value in the grayscale histogram; A light source uniformity threshold is preset. When the real-time brightness uniformity is less than the light source uniformity threshold, the preset initial brightness is adjusted according to the brightness data to obtain dynamic brightness, and lighting is performed with dynamic brightness; when the real-time brightness uniformity is greater than or equal to the light source uniformity threshold, lighting is performed according to the preset initial brightness.
10. The method for stable imaging of surface defects of a polished mobile phone middle frame according to claim 9, characterized in that: When the real-time brightness uniformity is less than the light source uniformity threshold, the preset initial brightness is adjusted according to the brightness data to obtain dynamic brightness, and lighting is performed with the dynamic brightness, including: Preset a pixel grayscale value overexposure threshold, and calculate the proportion of overexposed pixels in the grayscale histogram that are greater than or equal to the pixel grayscale value overexposure threshold, which is recorded as q; The dynamic brightness is calculated by selecting a corresponding brightness adjustment coefficient based on the overexposed pixel ratio q. The specific calculation formula is as follows: E = Ea × K; ; Where, E is the dynamic brightness; Ea is the initial brightness; K is the brightness adjustment coefficient.