Focusing height confirmation method and camera focusing method

By determining the height of the circuit board surface and calculating the focusing height, the problem of low focusing accuracy in industrial CCD cameras is solved, enabling automatic focusing and efficient processing of circuit boards of different thicknesses.

CN121728346APending Publication Date: 2026-03-24HANS CNC SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

During CNC machining, the focusing accuracy of industrial CCD cameras is not high, resulting in insufficient accuracy in photographing and recognizing CNC machined parts.

Method used

By determining the current and previous processing points of the circuit board to be processed, the focusing height is calculated to enable the camera to focus on the processing point, adapting to circuit boards of different thicknesses and areas, and improving focusing accuracy and efficiency.

Benefits of technology

It enables automatic focusing of the camera on circuit boards of different thicknesses and areas, improving focusing accuracy and processing efficiency, and ensuring image processing efficiency at processing points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728346A_ABST
    Figure CN121728346A_ABST
Patent Text Reader

Abstract

The invention relates to a focusing height confirmation method and a camera focusing method. The focusing height confirmation method comprises the following steps: determining a first board height of a to-be-processed circuit board measured at a current processing point; acquiring a second board surface height of the circuit board to be processed measured at a previous processing point; and based on the first plate surface height and the second plate surface height, the focusing height of the current processing point position is determined. The camera focusing method comprises the following steps: acquiring a focusing height of a current processing point position of a circuit board to be processed; the focusing height is obtained based on the focusing height determination method; and based on the focusing height, a camera is controlled to be focused with the current processing point position. By adopting the method, the focusing precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machining technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium and computer program product for confirming focus height, a camera focusing method, apparatus, equipment, computer-readable storage medium and computer program product, and a circuit board processing system. Background Technology

[0002] With the continuous development of the machinery manufacturing industry, modern manufacturing requires faster and more accurate detection and processing of workpieces in the CNC machining process. CNC machining CCD (charge coupled device) cameras have the characteristics of high detection efficiency, high precision, reliable performance and intelligence, making the use of industrial CCD cameras for visual positioning and detection an important technology in the field of modern industrial automation.

[0003] However, due to the small imaging and recognition range of industrial CCD cameras, when using industrial CCD cameras to photograph and recognize CNC machined parts on mechanical drilling machines or milling machines, it is usually necessary to adjust the photographed and recognized target on the CNC machined parts to be within the camera's depth of field so that the CCD camera can focus on the recognition target on the CNC machined parts. However, the above method still has the problem of low focusing accuracy of CCD cameras. Summary of the Invention

[0004] Based on this, it is necessary to address the above-mentioned technical problems by providing a focusing height confirmation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve focusing accuracy, as well as a camera focusing method, apparatus, equipment, computer-readable storage medium, and computer program product, and a circuit board processing system.

[0005] In a first aspect, this application provides a method for determining the focusing height, including:

[0006] Determine the height of the first surface of the circuit board to be processed, as measured at the current processing point;

[0007] Obtain the second board surface height of the circuit board to be processed, as measured at the previous processing point;

[0008] Based on the height of the first plate and the height of the second plate, determine the focusing height of the current processing point.

[0009] In one embodiment, determining the first surface height of the circuit board to be processed, measured at the current processing point, includes:

[0010] Identify multiple probe points on the circuit board to be processed;

[0011] Determine the detection height of each detection point relative to the reference plane;

[0012] Based on the detection height of each detection point, the first board surface height of the circuit board to be processed, measured at the current processing point, is determined.

[0013] In one embodiment, determining the first surface height of the circuit board to be processed at the current processing point, based on the detection height of each detection point, includes:

[0014] Determine the median detection height at each detection point;

[0015] The median is determined as the first board height of the circuit board to be processed, measured at the current processing point.

[0016] In one embodiment, multiple probe points are determined on the circuit board to be processed, including:

[0017] The circuit board to be processed is divided into multiple board surface areas, and multiple detection points are determined for each board surface area.

[0018] Based on the detection height of each detection point, determine the first surface height of the circuit board to be processed at the current processing point, including:

[0019] For each panel area, the detection height of the panel area is determined based on the detection height of multiple detection points in the panel area;

[0020] The detection height of the plate area where the current processing point is located is determined as the first plate height.

[0021] In one embodiment, determining the focusing height of the current processing point based on the first plate height and the second plate height includes:

[0022] Determine the height difference between the first plate height and the second plate height;

[0023] Based on the height difference, determine the focusing height of the current processing point.

[0024] Secondly, this application also provides a camera focusing method, including:

[0025] Obtain the focusing height of the current processing point of the circuit board to be processed. The focusing height is obtained based on the focusing height determination method described above.

[0026] Based on the focusing height, control the camera to focus on the current processing point.

[0027] Thirdly, this application also provides a circuit board processing system, including a camera, processing components, and a controller:

[0028] A camera, used in response to commands from the controller, focuses on the current processing point of the circuit board to be processed;

[0029] Processing components are used to process the circuit board to be processed in response to the controller's instructions;

[0030] The controller is used to perform the steps in any of the above embodiments of the focusing height determination method, to determine the focusing height of the current processing point of the circuit board to be processed, to control the camera to focus on the current processing point based on the focusing height of the current processing point, and to control the processing components to process the circuit board to be processed.

[0031] The controller is also used to control the camera to focus on the current processing point and to control the processing components to process the circuit board to be processed.

[0032] In one embodiment, the circuit board processing system is further configured with an automatic lifting mechanism for focusing the camera, and a controller for controlling the automatic lifting mechanism to move the camera to a predetermined height according to the focusing height, so as to achieve camera focusing.

[0033] Fourthly, this application also provides a focusing height determining device, comprising:

[0034] The board height determination module is used to determine the first board height of the circuit board to be processed, as measured at the current processing point.

[0035] The board height acquisition module is used to acquire the second board height of the circuit board to be processed, which was measured at the previous processing point.

[0036] The focusing height determination module is used to determine the focusing height of the current processing point based on the height of the first plate and the height of the second plate.

[0037] Fifthly, this application also provides a camera focusing device, comprising:

[0038] The focusing height acquisition module is used to acquire the focusing height of the current processing point of the circuit board to be processed, which is determined by any of the above focusing height confirmation methods.

[0039] The focusing module is used to control the camera to focus on the current processing point based on the focusing height.

[0040] Sixthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-described embodiments of the focusing height determination method or the above-described embodiments of the camera focusing method.

[0041] Seventhly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above-described embodiments of the focusing height determination method or the above-described embodiments of the camera focusing method.

[0042] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described embodiments of the focusing height determination method or the above-described embodiments of the camera focusing method.

[0043] The aforementioned method, apparatus, circuit board processing system, computer equipment, computer-readable storage medium, and computer program product for determining focusing height differ from the traditional method of manually focusing the camera. Before focusing the camera on the circuit board to be processed, it considers the influence of the circuit board manufacturing process and different circuit board design requirements, the possible differences in the thickness of the circuit board measured at different processing points, and the problem of low camera recognition accuracy. By determining the first height of the circuit board measured at the current processing point, the second height of the circuit board measured at the previous processing point is obtained. Based on the first and second heights, the focusing height required for the camera to focus on the current processing point is determined. This allows the camera to scan or identify the current processing point while ensuring that the current processing point is within the camera's depth of field. This enables automatic focusing on circuit boards of varying thicknesses and also on processing points on circuit boards of different thicknesses, improving focusing efficiency and accuracy. This, in turn, enhances the efficiency of image processing on the processing points of the circuit board and, consequently, improves the overall processing efficiency of the circuit board.

[0044] Furthermore, the aforementioned camera focusing method obtains the focusing height of the camera at different processing points on the circuit board to be processed through the aforementioned focusing height determination method, and controls the camera to focus on different processing points based on the focusing height, thereby improving focusing efficiency and focusing accuracy, and further contributing to improving the processing efficiency of the circuit board to be processed. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is an application environment diagram of the focusing height confirmation method in one embodiment;

[0047] Figure 2 This is a flowchart illustrating a focusing height confirmation method in one embodiment;

[0048] Figure 3 This is a flowchart illustrating the focusing height confirmation method in another embodiment;

[0049] Figure 4 This is a schematic diagram illustrating a scenario where the detection height of a detection point is determined in one embodiment.

[0050] Figure 5 This is a schematic diagram illustrating a scenario for determining the detection height of a detection point in another embodiment;

[0051] Figure 6 This is a flowchart illustrating the focusing height confirmation method in another embodiment;

[0052] Figure 7 This is a schematic diagram of the board surface area of ​​the circuit board to be processed in one embodiment;

[0053] Figure 8 This is a flowchart illustrating the focusing height confirmation method in yet another embodiment;

[0054] Figure 9 This is a flowchart illustrating a camera focusing method in a detailed embodiment;

[0055] Figure 10 This is a structural block diagram of a focusing height confirmation device in one embodiment;

[0056] Figure 11 This is a structural block diagram of a camera focusing device in one embodiment;

[0057] Figure 12 A structural block diagram of a circuit board manufacturing system;

[0058] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] The focusing height confirmation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, the control terminal 102 communicates with the circuit board processing equipment 104 equipped with a camera.

[0061] Specifically, the control terminal 102 can acquire the position coordinate data of the processing point on the circuit board to be processed. Then, the controller can determine the first board surface height of the circuit board to be processed measured at the current processing point through the circuit board processing equipment. Then, it can acquire the second board surface height of the circuit board to be processed measured at the previous processing point. Finally, based on the first board surface height and the second board surface height, the focusing height of the current processing point can be determined.

[0062] The control terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and other devices with data processing and control capabilities, or it can be a microcontroller.

[0063] In this application, focusing the circuit board to be processed can occur during processing operations using a camera and circuit board processing equipment. The processing can be either using the camera to locate drilling points on the circuit board, or performing actions such as hole position deviation detection, hole diameter detection, and hole wall burr detection on the circuit board. Taking the use of a camera to locate drilling points on the circuit board as an example, the circuit board processing equipment can be drilling equipment, forming equipment, milling machines, integrated drilling and milling machines, etc., without limitation.

[0064] In circuit board processing equipment, when processing the circuit board according to the processing points, the processing points can be located and identified by the camera in the camera component of the processing equipment. When taking pictures of the processing points on the circuit board, the target needs to be adjusted within the depth of field of the camera so that the camera component can locate and monitor them, thereby assisting the processing component in processing the circuit board at the processing points.

[0065] However, the thickness of PCBs (Printed Circuit Boards) varies considerably across different models and levels. For example, depending on the number of electronic components and signal transmission requirements of the product, PCBs with different numbers of layers can be designed, such as single-layer, double-layer, and multi-layer boards. The thickness of the PCBs can include specifications such as 0.6 mm, 0.8 mm, 1.2 mm, 2.0 mm, 2.5 mm, and 3.0 mm. Therefore, during the processing of PCBs of different thicknesses, it is necessary to align and focus the camera according to the thickness of the PCB to ensure processing accuracy.

[0066] In one exemplary embodiment, such as Figure 2 As shown, a method for confirming focus height is provided, which is applied to... Figure 1 Taking control terminal 102 as an example, the explanation includes the following steps S200 to S600. Wherein:

[0067] S200, determine the first board surface height of the circuit board to be processed, measured at the current processing point.

[0068] Here, the current processing point refers to the location on the circuit board to be processed at the current time. For example, if drilling is required on the circuit board, the processing point is the drilling point. The location of the processing point on the circuit board can be obtained by the controller by parsing the drilling file in the control system of the processing equipment. The drilling file is a file generated by professional design software that contains information such as the location and diameter of each hole.

[0069] The first board surface height refers to the height of the circuit board surface to be processed from the reference plane, measured at the current processing point. The reference plane can be the processing platform on the processing equipment where the circuit board to be processed is placed, or other known height planes. Taking the processing platform of a drilling machine as the reference plane as an example, it can be understood that the first board surface height is equivalent to the thickness of the circuit board to be processed at the current processing point.

[0070] Due to the influence of circuit board manufacturing processes and different circuit board design requirements, there may be different copper patterns formed by copper plating on the inner layer of the circuit board. The thickness of the circuit board in the area with copper patterns will increase, resulting in different thicknesses in different areas of the circuit board. Therefore, it is necessary to measure the first board height of the circuit board to be processed at each processing point.

[0071] In this embodiment, the measurement of the first board surface height can be achieved by determining a known height position based on a reference plane. At this known height position, the height of the circuit board to be processed is detected according to the current processing point. Specifically, the height difference between the circuit board to be processed and the known height position can be detected using sensors such as an optical encoder, linear displacement sensor, or laser displacement sensor to obtain the first board surface height of the circuit board to be processed at the current processing point. It is understandable that for multi-layer circuit boards, the thickness difference between different areas of the circuit board can be significant.

[0072] In practical applications, the first plate height can be determined in real time. The controller acquires the position of the processing point and, based on the current position, uses an optical encoder to detect the height of the current processing point on the circuit board to be processed, thereby determining the first plate height of the current processing point on the circuit board to be processed relative to the processing platform. In other embodiments, the first plate height can also be predetermined before determining the focusing height of each point. Based on circuit boards with different thickness specifications and processing requirements, the measured plate height of each processing point and its corresponding position can be compiled into a data table and stored in the controller's storage space. Before determining the focusing height of each point on the circuit board to be processed, upon receiving the plate height determination instruction from the controller, the corresponding data table is retrieved from the storage space in advance, and the first plate height corresponding to the point is obtained starting from a preset starting point.

[0073] S400: Obtain the second board surface height of the circuit board to be processed, as measured at the previous processing point.

[0074] The second board height refers to the height of the board surface of the circuit board to be processed from the reference surface, as measured at the previous processing point.

[0075] After determining the first board height of the circuit board to be processed at the current processing point, the second board height of the circuit board to be processed, measured at the previous processing point, can be obtained from the data table.

[0076] S600 determines the focusing height of the current processing point based on the height of the first plate and the height of the second plate.

[0077] Since the thickness specifications of the circuit boards to be processed may vary, and even circuit boards of the same thickness may have different thicknesses in different areas, the depth of field of the camera used to locate and identify the processing points on the circuit board is relatively small when the circuit board processing equipment performs drilling, hole position deviation detection, hole diameter detection, and hole wall burr detection. Therefore, when using the camera to locate and identify different processing points on the processing equipment, it is necessary to determine the focusing height of the processing point to adjust the camera height so that the camera is focused on the processing point. Specifically, the focusing height of the current processing point can be determined based on the height difference between the first and second board surfaces.

[0078] The aforementioned method for determining the focusing height differs from the traditional method of manually focusing the camera. Before focusing the camera on the circuit board to be processed, it considers the influence of the circuit board's manufacturing process and different design requirements. This means the thickness of the circuit board measured at different processing points may vary, and the camera's recognition accuracy may be low. By determining the first height of the circuit board measured at the current processing point and obtaining the second height measured at the previous processing point, the required focusing height for focusing the camera on the current processing point is determined based on these two heights. This ensures that the current processing point is within the camera's depth of field when the camera scans or recognizes the image. This method is suitable for automatic focusing on circuit boards of varying thicknesses and for focusing on processing points on circuit boards of different thicknesses, improving focusing efficiency and accuracy. This, in turn, improves the efficiency of image processing of the processing points on the circuit board and ultimately enhances the overall processing efficiency of the circuit board.

[0079] Considering the varying thicknesses of different areas of the circuit board to be processed, when photographing and recognizing the current processing point of the circuit board, the height of the circuit board relative to the reference surface measured at the current processing point can be determined to establish the focusing height. Therefore, in an exemplary embodiment, such as... Figure 3 As shown, S100 includes S220 to S260. Wherein:

[0080] S220 identifies multiple probe points on the circuit board to be processed.

[0081] The detection points are pre-marked points on the circuit board to be processed, used to detect the height of the circuit board relative to a reference surface. The coordinates of the detection points on the circuit board and the number of detection points can be randomly generated or determined based on the processing requirements of the circuit board, the board size, and the depth of field of the camera. For example, the number of detection points can be determined based on the size of the circuit board: the larger the circuit board, the more detection points, and vice versa. Similarly, the number of detection points can be determined based on the depth of field of the camera: the larger the depth of field, the fewer detection points, and vice versa. The coordinates of the detection points can also be determined based on the distribution of the coordinates of the processing points on the circuit board, or by combining the number of detection points with the size of the circuit board, to ensure that the detection points are evenly distributed on the circuit board.

[0082] In practical applications, the position coordinates of each detection point are determined so that the height of the circuit board to be processed relative to the reference surface can be detected based on each detection point.

[0083] S240, determine the detection height of each detection point relative to the reference plane.

[0084] The detection height refers to the height of the circuit board to be processed relative to the reference surface, measured at the detection point. For example... Figure 4 As shown, the height of the detection point can be measured using processing components, a linear encoder, and a sensor in the circuit board processing equipment. The processing components include a spindle, spindle pressure feet, and cutting tools.

[0085] In one exemplary embodiment, the detection height of each detection point relative to the reference plane can be determined based on the machining components, Z-axis grating ruler, photoelectric sensor, and fast drill induction plate.

[0086] Specifically, before height detection, a reference plane can be set as a plane with a Z-value of 0. The height of the spindle in the Z-axis direction, i.e., the Z-value, is determined based on the reference plane and the Z-axis grating ruler. The photoelectric sensor and the fast-drilling sensor are installed on the spindle pressure foot of the machining component of the machining equipment. The relative position of the spindle and the spindle pressure foot is determined by the photoelectric sensor and the fast-drilling sensor.

[0087] For example, determining the detection height of each detection point relative to the reference plane can be as follows: Based on the position coordinates of the detection point, control the spindle to translate above the detection point, control the spindle to hold the tool and the spindle pressure foot to descend together. At this time, the relative position of the spindle and the spindle pressure foot does not change, and no signal is triggered by the photoelectric sensor. During the descent, the spindle pressure foot will first contact the surface of the circuit board to be processed. At this time, the spindle pressure foot stops descending, and the spindle holds the tool to continue descending. When the tool tip does not contact the board surface and the height of the tool tip is not lower than the height of the contact surface between the spindle pressure foot and the board surface, the signal of the photoelectric sensor is triggered, and the Z value of the spindle output by the Z-axis grating ruler is recorded at this time.

[0088] Considering that the spindle pressure feet in the processing components may experience varying degrees of wear after continuous operation or prolonged use on the circuit board processing equipment, which can affect the accuracy of height detection based on the spindle pressure feet, specifically, when the spindle pressure feet stop descending after contacting the surface of the circuit board to be processed, while the spindle continues to descend while holding the tool, the wear of the spindle pressure feet may prematurely trigger the signal of the photoelectric sensor, resulting in an error in the measured detection height of the detection point. Therefore, after obtaining the Z value of the spindle at the moment the photoelectric sensor signal is triggered, it is also necessary to compensate for the height of the wear of the spindle pressure feet to obtain the actual detection height of the detection point relative to the reference surface.

[0089] The method for determining the wear height of the spindle presser foot can be as follows: First, the height of the reference surface is detected by the spindle presser foot, similar to the method described above for determining the detection height of the detection point relative to the reference surface. The spindle is controlled to translate above the reference surface, and the spindle holding the tool and the spindle presser foot are controlled to descend together. At this time, the relative position of the spindle and the spindle presser foot does not change, and the photoelectric sensor signal is not triggered. Then, the spindle holding the tool and the spindle presser foot continue to descend. The spindle presser foot will first contact the reference surface. At this time, the spindle presser foot stops descending, while the spindle holding the tool continues to descend. When the tool tip does not contact the reference surface and the height of the tool tip is not lower than the height of the contact surface between the spindle presser foot and the reference surface, the photoelectric sensor signal is triggered. The Z value of the spindle output by the Z-axis grating ruler is recorded at this time. This Z value is compared with the original height of the reference surface, i.e., compared with Z=0. The difference between the two Z values ​​is determined as the wear height of the spindle presser foot. For example, if the measured height of the reference surface is -0.5 and the original height of the reference surface is 0, then the wear height of the spindle presser foot is 0.5. Understandably, the wear height of the spindle pressure foot can be predetermined in advance using the above method before focusing the surface to be processed. After a certain period of operation, the wear height of the spindle pressure foot can be re-determined to improve the accuracy of the detection height of the detection point calculated by the spindle pressure foot.

[0090] In one exemplary embodiment, such as Figure 5 As shown, the detection height of each detection point relative to the reference plane can also be determined based on the processing components, Z-axis grating ruler, CBD sensor (Contact Bit Detection), and cover plate.

[0091] Specifically, before height detection, an aluminum cover plate is placed on the circuit board to be processed. The reference plane can be set as a plane with a Z value of 0. The height of the spindle in the Z-axis direction, i.e., the Z value, is determined based on the reference plane and the Z-axis grating ruler. Whether the tool contacts the aluminum cover plate is detected by a CBD sensor.

[0092] For example, determining the detection height of each detection point relative to the reference plane can be as follows: based on the position coordinates of the detection point, control the spindle to translate above the detection point, control the spindle to lower the tool clamping the tool, and when the tool tip contacts the aluminum sheet cover plate, trigger the signal of the CBD sensor, record the Z value of the spindle output by the Z-axis grating ruler at this time, obtain the thickness of the aluminum sheet cover plate, and determine the detection height of the detection point relative to the reference plane based on the thickness of the aluminum sheet cover plate and the Z value.

[0093] In this way, the height of the detection point can be detected at low cost by using the processing components, grating rulers and sensors in the processing equipment.

[0094] S260, based on the detection height of each detection point, determines the first board surface height of the circuit board to be processed at the current processing point.

[0095] Following the previous step, after determining the detection height of each detection point, a standard board height of the circuit board to be processed can be determined based on the average, median, and weighted average of the detection heights of each detection point. This standard board height is then set as the first board height of the circuit board to be processed measured at the current processing point. Thus, when focusing at different processing points of the circuit board to be processed, the focusing height of the current processing point is determined based on this standard board height.

[0096] In other embodiments, to achieve high-precision focusing, the following steps can be taken: First, determine multiple detection points of the circuit board to be processed. Each processing point can be determined as a detection point of the circuit board to be processed based on the obtained position coordinates of each processing point. Second, determine the detection height of each processing point relative to the reference plane. For details, refer to the implementation process of S240 above, which will not be repeated here. Finally, based on the detection height of each detection point, determine the first board surface height of the circuit board to be processed measured at the current processing point. The detection height of the current processing point can be used as the first board surface height.

[0097] In this embodiment, by marking detection points on the circuit board to be processed, the detection height of each marked detection point relative to the reference surface is determined. Based on the detection height of each detection point, the first surface height of the circuit board to be processed at the current processing point is determined. This reduces the possibility that the camera cannot focus on the current processing point when taking pictures and identifying the current processing point due to the different heights of different areas of the circuit board to be processed. This helps to improve the focusing accuracy of focusing on the current processing point.

[0098] To improve the focusing efficiency of focusing at the processing point, in an exemplary embodiment, S260 includes S261 to S263. Wherein:

[0099] S261, determine the median detection height of each detection point.

[0100] S263, the median is determined as the first board height of the circuit board to be processed, measured at the current processing point.

[0101] The median is calculated based on the detection height of each detection point. The calculated median is then determined as the standard board height of the circuit board to be processed. In other words, the median is determined as the board height corresponding to each processing point. That is, the median is determined as the first board height of the circuit board to be processed measured at the current processing point.

[0102] In this embodiment, the median of the detection heights measured at each detection point is determined as the first plate height corresponding to the current processing point. The focusing height is calculated based on this median each time the current processing point is focused, which helps to improve focusing efficiency.

[0103] In order to meet the requirements of different focusing accuracy, in an exemplary embodiment, such as Figure 6 As shown, S220 includes S222, and S260 further includes S262 to S264. Wherein:

[0104] S222, the circuit board to be processed is divided into multiple board areas, and multiple detection points are determined for each board area.

[0105] The board surface area can be a rectangular area of ​​the circuit board to be processed.

[0106] The number of board areas can be randomly generated or determined based on the processing requirements of the circuit board, its size, and the depth of field of the camera. For example, the number of board areas can be determined based on the size of the circuit board; the larger the circuit board, the more areas it can be divided into, and vice versa. Similarly, the number of detection points can be determined based on the depth of field of the camera; the larger the depth of field, the fewer areas it can be divided into, and vice versa. Alternatively, the size of each divided board area can be determined based on the size of the circuit board, resulting in multiple board areas of similar size. Or, the circuit board can be divided into multiple board areas of varying sizes based on the distribution of the coordinates of the processing points on the circuit board.

[0107] One way to determine the detection points for each board area is to determine the position coordinates of the detection points within the board area based on the number of detection points in that area. The number of detection points can be determined according to the processing accuracy; it can be four, five, nine, sixteen, etc. Understandably, the more detection points in a board area, the higher the accuracy of determining the detection height of that area. For example, such as... Figure 7 As shown, the circuit board to be processed is divided into four board areas. For each board area, when there are four detection points, the four corners of the board area can be used as detection points; when there are five detection points, the four corners and the center point of the board area can be used as detection points.

[0108] S262, for each board area, determine the detection height of the board area based on the detection height of multiple detection points in the board area.

[0109] In practical applications, referring to the method for determining the detection height of detection points described above, in this embodiment, the same height detection method can also be used to determine the detection height of each detection point in the board area. For details, please refer to the implementation process of S104 in the above embodiment, which will not be repeated here. For each board area, after obtaining the detection height of each detection point in the board area, the average, median, or weighted average of the detection heights in the board area can be determined and used as the detection height of the board area.

[0110] S264, determine the detection height of the plate area where the current processing point is located as the first plate height.

[0111] In practical applications, after determining the detection height of each area of ​​the board, the method for determining the first board height of the current processing point can be as follows: compare the position coordinates of the current processing point with the area range of each board region to determine the board region in which the current processing point falls, and determine the detection height of the board region into which the current processing point falls as the first board height. The area range of each board region can be determined based on the position coordinates of the detection points at the corners of the region.

[0112] Understandably, the more plate areas are divided, and the more detection points are in each plate area, the higher the accuracy of the detection height of the determined plate area, and the higher the accuracy of the focusing height determined based on the detection height of the plate area where the current processing point is located.

[0113] In this embodiment, by dividing the circuit board to be processed into board areas and marking detection points in each board area, the detection height of each board area is determined based on the detection height of each detection point. This allows for the division of areas of different sizes and the marking of different numbers of detection points according to different focusing accuracy requirements, which is beneficial to improving the accuracy and flexibility of focusing. Thus, the detection height of the board area where the current processing point is located is determined as the first board height corresponding to the current processing point. This can adapt to automatic focusing work with different focusing accuracy requirements and improve the efficiency of focusing height confirmation while ensuring a certain focusing accuracy.

[0114] Based on the current processing point and the plate height corresponding to the previous processing point, the focusing height of the current processing point is calculated. In an exemplary embodiment, such as... Figure 8 As shown, S600 includes S620 to S640. Wherein:

[0115] S620, determine the height difference between the first plate height and the second plate height.

[0116] S640 determines the focusing height of the current processing point based on the height difference.

[0117] Calculate the height difference between the second plate height and the first plate height, and determine the absolute value of the height difference as the required height for the camera to rise or fall when focusing on the current processing point. For example, the second plate height B is 50, the first plate height A is 60, and the direction of the rise or fall is determined based on the sign of B and A. The focusing height of the current point is 10.

[0118] In another embodiment, before focusing on the processing points of the circuit board to be processed, the circuit boards of different thicknesses and processing requirements can be marked with part numbers according to their thickness specifications and processing requirements. Based on the position coordinates of each processing point on the circuit board to be processed and the detection height of the detection point, the board surface height corresponding to each processing point can be determined. Based on the board surface height corresponding to each processing point, the focusing height corresponding to each processing point can be determined. For each part number of the circuit board to be processed, the focusing height corresponding to each processing point is saved in the controller. When focusing processing is performed on the same part number, the focusing height corresponding to the processing point is directly obtained for focusing.

[0119] In this embodiment, when switching from the previous processing point to the current processing point, the focusing height required for the camera to focus on the current processing point is determined based on the height difference between the second surface height of the circuit board to be processed measured at the previous processing point and the first surface height of the circuit board to be processed measured at the current processing point. This improves the accuracy of the focusing height and enables automatic focusing based on the focusing height, which is beneficial to improving focusing efficiency.

[0120] After determining the focusing height of the current processing point of the circuit board to be processed, in an exemplary embodiment, this application also provides a camera focusing method, including the following steps S500 to S700. Wherein:

[0121] S700: Obtain the focusing height of the current processing point on the circuit board to be processed.

[0122] The controller obtains the focusing height of the current processing point of the circuit board to be processed. The steps in the method embodiment for determining the focusing height based on the current processing point of the circuit board to be processed will not be repeated here.

[0123] S800, based on the focusing height, controls the camera to focus on the current processing point.

[0124] After obtaining the focusing height, control the camera to rise or fall according to the focusing height so that the camera can focus on the current processing point.

[0125] To provide a clearer explanation of the focusing height determination method provided in this application, a specific embodiment and accompanying drawings are described below. Figure 9The specific embodiment includes the following steps:

[0126] S1, the circuit board to be processed is divided into multiple board areas, and multiple detection points are determined for each board area.

[0127] S2, for each board area, determine the detection height of the board area based on the detection height of multiple detection points in the board area.

[0128] S3 determines the detection height of the plate area where the current processing point is located as the first plate height.

[0129] S4, obtain the second board surface height of the circuit board to be processed, which was measured at the previous processing point.

[0130] S5, determine the height difference between the first plate height and the second plate height.

[0131] S6, based on the height difference, determines the focusing height of the current processing point.

[0132] The S7 controls the camera to focus on the current processing point based on the focusing height.

[0133] S8 controls the processing components to process the circuit board to be processed.

[0134] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0135] In one exemplary embodiment, such as Figure 10 As shown, a focusing height determining device 300 is provided, including: a plate height determining module 310, a plate height acquiring module 320, and a focusing height determining module 330, wherein:

[0136] The board height determination module 310 is used to determine the first board height of the circuit board to be processed, as measured at the current processing point.

[0137] The board height acquisition module 320 is used to acquire the second board height of the circuit board to be processed, which was measured at the previous processing point.

[0138] The focusing height determination module 330 is used to determine the focusing height of the current processing point based on the height of the first plate and the height of the second plate.

[0139] In an exemplary embodiment, the board height determination module 310 is further configured to determine multiple detection points of the circuit board to be processed, determine the detection height of each detection point relative to the reference surface, and determine the first board height of the circuit board to be processed measured at the current processing point based on the detection height of each detection point.

[0140] In an exemplary embodiment, the board height determination module 310 is further configured to determine the median of the detection heights of each detection point, and to determine the median as the first board height of the circuit board to be processed measured at the current processing point.

[0141] In an exemplary embodiment, the board height determination module 310 is further configured to divide the circuit board to be processed into multiple board areas, determine multiple detection points in each board area, determine the detection height of the board area based on the detection height of the multiple detection points in the board area for each board area, and determine the detection height of the board area where the current processing point is located as the first board height.

[0142] In an exemplary embodiment, the focusing height determination module 330 is further configured to determine the height difference between the first plate height and the second plate height, and determine the focusing height of the current processing point based on the height difference.

[0143] Each module in the aforementioned focusing height determining device 300 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0144] In one exemplary embodiment, such as Figure 11 As shown, a camera focusing device 500 is provided, including: a focusing height acquisition module 510 and a focusing module 520, wherein:

[0145] The focusing height acquisition module 510 is used to acquire the focusing height of the current processing point of the circuit board to be processed, which is determined by the above-described focusing height confirmation method.

[0146] The focusing module 520 is used to control the camera to focus on the current processing point based on the focusing height.

[0147] Each module in the aforementioned camera focusing device 500 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0148] In one exemplary embodiment, such as Figure 12 The diagram shows a circuit board processing system, including a controller 120, a camera 140, and a processing assembly 160, wherein:

[0149] Camera 140 is used to focus on the current processing point of the circuit board to be processed in response to instructions from the controller. Processing assembly 160 is used to process the circuit board to be processed in response to instructions from the controller.

[0150] The controller 120 is used to execute any of the steps in the above-described embodiments of the focusing height confirmation method, determine the focusing height of the current processing point of the circuit board to be processed, control the camera to focus on the current processing point based on the focusing height of the current processing point, and control the processing component to process the circuit board to be processed.

[0151] The controller 120 is also used to control the camera to focus on the current processing point and to control the processing components to process the circuit board to be processed.

[0152] In an exemplary embodiment, the circuit board processing system is further configured with an automatic lifting mechanism for camera focusing, and the controller 120 is further configured to control the automatic lifting mechanism to move the camera to a predetermined height according to the focusing height, so as to achieve camera focusing.

[0153] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for determining focus height. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0154] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0155] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above embodiments of the focus height determination method.

[0156] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in any of the above embodiments of the focusing height determination method.

[0157] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the focusing height determination method.

[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0159] 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 application.

[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for determining focusing height, characterized in that, The method includes: Determine the height of the first surface of the circuit board to be processed, as measured at the current processing point; Obtain the second board surface height of the circuit board to be processed, as measured at the previous processing point; Based on the height of the first plate and the height of the second plate, the focusing height of the current processing point is determined.

2. The method according to claim 1, characterized in that, Determining the first board surface height of the circuit board to be processed, measured at the current processing point, includes: Determine multiple probe points on the circuit board to be processed; Determine the detection height of each detection point relative to the reference plane; Based on the detection height of each detection point, the first board surface height of the circuit board to be processed, measured at the current processing point, is determined.

3. The method according to claim 2, characterized in that, The determination of the first board surface height of the circuit board to be processed, measured at the current processing point, based on the detection height of each of the detection points, includes: Determine the median detection height of each of the aforementioned detection points; The median is determined as the first board height of the circuit board to be processed, measured at the current processing point.

4. The method according to claim 2, characterized in that, The determination of multiple probe points on the circuit board to be processed includes: The circuit board to be processed is divided into multiple board surface regions, and multiple detection points are determined for each board surface region; The determination of the first board surface height of the circuit board to be processed, measured at the current processing point, based on the detection height of each of the detection points, includes: For each panel area, the detection height of the panel area is determined based on the detection height of multiple detection points in the panel area; The detection height of the plate area where the current processing point is located is determined as the first plate height.

5. The method according to any one of claims 1 to 4, characterized in that, Determining the focusing height of the current processing point based on the height of the first plate and the height of the second plate includes: Determine the height difference between the height of the first plate and the height of the second plate; Based on the height difference, the focusing height of the current processing point is determined.

6. A camera focusing method, characterized in that, The method includes: The focusing height of the current processing point of the circuit board to be processed is obtained, wherein the focusing height is obtained based on the focusing height determination method according to any one of claims 1 to 5; Based on the focusing height, control the camera to focus on the current processing point.

7. A circuit board processing system, characterized in that, The circuit board processing system includes a camera, processing components, and a controller: The camera is used to focus on the current processing point of the circuit board to be processed in response to the controller's instructions; The processing component is used to process the circuit board to be processed in response to the controller's instructions; The controller is configured to execute the focusing height determination method as described in any one of claims 1 to 5, determine the focusing height of the current processing point of the circuit board to be processed, and based on the focusing height of the current processing point, control the camera to focus on the current processing point and control the processing component to process the circuit board to be processed, or execute the camera focusing method as described in claim 6, to control the camera to focus on the current processing point and control the processing component to process the circuit board to be processed.

8. A circuit board processing system according to claim 7, characterized in that, The circuit board processing system is also equipped with an automatic lifting mechanism for focusing the camera. The controller is also used to control the automatic lifting mechanism to move the camera to a predetermined height according to the focusing height, so as to achieve focusing of the camera.

9. A focusing height determining device, characterized in that, The device includes: The board height determination module is used to determine the first board height of the circuit board to be processed, as measured at the current processing point. The board height acquisition module is used to acquire the second board height of the circuit board to be processed, which was measured at the previous processing point. The focusing height determination module is used to determine the focusing height of the current processing point based on the height of the first plate and the height of the second plate.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5 or 6.