A printer-based visual camera level adjustment method and adjustment device

Through the automated adjustment of laser rangefinder and hydraulic drive, combined with sliding average filter and PID control algorithm, the position prediction is achieved using Kalman filter, which solves the problem of difficulty and time-consuming adjustment of visual cameras in universal printers, and achieves high efficiency, Accurate printing process.

CN118617877BActive Publication Date: 2024-12-24GUANGZHOU SENYANG ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410888560.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-12-24
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

The level adjustment of vision cameras in existing universal printers is difficult, time-consuming and high learning costs, resulting in low print quality and efficiency.

Method used

A laser rangefinder is used to monitor the distance between the camera and the scanning platform in real time, and automatically adjust it through hydraulic drive, combine the sliding average filter and PID control algorithm for precise control, and use the Kalman filter for position prediction to realize the camera and the scanning platform. Accurate alignment.

Benefits of technology

Significantly improves print quality and efficiency, simplifies operational processes, improves the accuracy and consistency of the printing process, and reduces noise interference and system lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118617877B_ABST
    Figure CN118617877B_ABST
Patent Text Reader

Abstract

The present invention discloses a visual camera level adjustment method and adjustment device based on a printer, comprising S1, initial scanning and data sampling, S2, a laser distance measuring instrument that monitors the distance between a camera and a scanning platform in real time, S3, data application before formal scanning, and S4, synchronous lifting and lowering adjustment; the present invention significantly improves printing quality and efficiency through precise camera position adjustment, firstly scans through a laser distance measuring instrument to collect distance data in real time, and uses a sliding average filter to smooth the data, effectively reducing noise interference and improving data stability, then uses a PID control algorithm to accurately control the lifting and lowering of the camera to ensure that the distance between the camera and the scanning platform is always maintained in an optimal state, and in addition, a Kalman filter is integrated to perform position prediction, and the hydraulic drive is adjusted in advance, thereby reducing the lag and overshoot of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of printer adjustment, in particular to a printer-based visual camera level adjustment method and an adjustment device. Background Art

[0002] In the application scenarios of universal printers, machine vision is widely introduced to speed up production efficiency. When the camera scans the plane of the universal printer, the lens plane needs to remain relatively horizontal with the printing plane / scanning plane, and the central axis of the lens needs to remain relatively vertical with the printing plane / scanning plane.

[0003] The existing technical solution uses hardware to fix the camera, and manually adjusts the hardware for horizontal / vertical adjustment. It needs to use a series of tools such as an external level, a rangefinder, a computer, and computer software for adjustment. The adjustment is difficult and time-consuming. The adjustment method and auxiliary software of each camera are different, which increases the learning cost of users / integrators. Summary of the invention

[0004] The purpose of the present invention is to provide a printer-based visual camera horizontal adjustment method and adjustment device, which solves the problems of difficult adjustment, long time consumption and high learning cost in traditional visual scanning systems, and realizes an automated and intelligent adjustment process.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] The present application provides a printer-based visual camera level adjustment method and adjustment device, comprising the following steps:

[0007] S1. Initial scanning and data sampling. Before visual scanning, remove debris and printing consumables on the scanning plane, use a laser rangefinder to scan, and sample distance data every 20 milliseconds.

[0008] S2. The laser distance measuring instrument will monitor the distance between the camera and the scanning platform in real time. When the distance is detected to be offset, the corresponding hydraulic drive will be activated to adjust the lifting and lowering to keep the camera and the scanning platform level.

[0009] During the adjustment process, the lifting data information is transmitted back to the printer control mainboard, and the current XY axis position information of the trolley and the corresponding lifting information are recorded at the same time;

[0010] S3, data application before formal scanning, after the printing consumables are formally stacked, a scan is performed, the printer control mainboard drives the XY axis motor to move, and the carriage is moved to the correct position according to the previously recorded position information;

[0011] The control main board will send the previously recorded hydraulic drive lifting information to the hydraulic drive boards at the four corners for synchronous lifting and lowering adjustments;

[0012] S4, synchronous lifting and lowering adjustment. After the hydraulic drive boards at the four corners receive the instructions from the control main board, they will perform lifting and lowering adjustments synchronously. After completing the synchronous lifting and lowering adjustments, they will perform final confirmation and fine-tuning.

[0013] Further, in step S1, the data collected by the laser rangefinder is used to determine the initial reference distance between the camera and the scanning platform, and a deviation threshold ε is set. When the difference between the monitored distance and the reference distance exceeds this threshold, it is considered that a deviation occurs.

[0014] The collected distance data is analyzed in real time to compare the difference between the current distance and the reference distance. When the distance data collected continuously for multiple times indicates the distance between the camera and the scanning platform, when it exceeds the preset offset threshold, the offset detection signal is triggered.

[0015] When the deviation is detected, the hydraulic drive is automatically started to adjust the position of the camera and calculate the required adjustment amount to return the distance between the camera and the scanning platform to the reference distance. The specific calculation process is: Δh = d 基准 -d 当前 , where d 基准 is the reference distance, d 当前 It is the currently measured distance. According to the calculated adjustment amount, the camera is raised and lowered by hydraulic drive.

[0016] Furthermore, during the distance data sampling process, a sliding average filter is used to smooth the collected distance data. The specific formula is expressed as follows:

[0017] Where D f is the distance data after smoothing at the i-th moment, D i represents the distance data collected at the i-th moment, and N is the size of the sliding window.

[0018] Furthermore, a suitable sliding window size N is selected. The selection of the window size requires a balance between smoothing effect and real-time performance. If the window is too large, the response will be slow, and if the window is too small, the smoothing effect will not be obvious.

[0019] Create an array of size N to store the latest N sampling points. Initially, the array is empty.

[0020] Real-time sampling and storage, sampling the distance data every 20 milliseconds, adding the latest sampled data to the array, and when the array has stored N data, removing the earliest data to keep the array size N;

[0021] Calculate the sliding average value. After each sampling, calculate the average value of all data in the current window to obtain the smoothed distance data. The calculated smoothed data is used as the input data for hydraulic drive adjustment.

[0022] Furthermore, during the hydraulic drive adjustment process, the PID control algorithm is used to accurately control the lifting of the camera, which is specifically expressed as follows: Among them, e(t) is the current error, K p , K i , K d are the proportional, integral and differential coefficients respectively;

[0023] The specific implementation process includes:

[0024] Choose the initial scaling factor K p , integral coefficient K i and the differential coefficient K d ;

[0025] Calculate the current error e(t), which is the difference between the set position and the actual position;

[0026] Calculate the proportional term P = K p e(t), adjusted according to the current error, with a faster response speed;

[0027] Calculate the integral term Adjust according to the accumulated error to eliminate the steady-state error;

[0028] Calculate the differential term Adjust according to the error change rate, foresee the error change trend, and reduce overshoot and oscillation;

[0029] The calculated control signal Δh(t) is output to the hydraulic drive lifting component to perform lifting adjustment;

[0030] Monitor the position change of the camera in real time, update the error e(t) until it converges to the allowable range, and repeat the above steps continuously until the error e(t) converges to the allowable range to achieve the purpose of precise control.

[0031] Furthermore, the camera position is predicted based on the sampled data combined with the Kalman filter, and the hydraulic drive is adjusted in advance;

[0032] Specifically, state variables and measurement variables are defined, where the state variable x includes the position and velocity of the camera, and the measurement variable z is the distance between the current camera and the scanning platform obtained from the laser rangefinder;

[0033] Determine the state transfer matrix F, which describes how the state evolves within the time step. When the change in the camera position is uniform motion, the state transfer matrix is ​​expressed as: Where Δt is the sampling period;

[0034] Establish an observation model, determine the observation matrix H, and map the state vector to the measurement space. When the camera position is measured, H is expressed as: H = [1, 0];

[0035] Initialize the Kalman filter and set the initial state estimate and the initial covariance matrix P 0 , determine the process noise covariance Q and the measurement noise covariance R;

[0036] The distance between the camera and the scanning platform is sampled from the laser rangefinder at fixed time intervals. The state at the next moment is predicted through the state transfer matrix F using the current control input and the estimated state at the previous moment, which is expressed as: Update the covariance matrix of the predicted state, denoted as P k∣k-1 =FP k-1 F T +Q;

[0037] The state estimate is updated using the newly sampled data, and based on the predictions of the Kalman filter, the required adjustment is calculated and the camera position is adjusted via hydraulic drive.

[0038] Furthermore, an adjustment device based on the printer visual camera level adjustment method includes a visual camera mechanism, the visual camera mechanism includes a bottom plate, a camera fixing groove is arranged in the middle of the bottom plate, and laser ranging and hydraulic driving lifting components are installed at the four corners of the bottom plate.

[0039] The laser rangefinder and hydraulically driven lifting assembly comprises a laser rangefinder and a hydraulically driven lifting assembly, and the hydraulically driven lifting assembly is connected to the laser rangefinder via a movable hardware frame, a fixed hardware frame is arranged on the top of the hydraulically driven lifting assembly, and an industrial camera is arranged between the two groups of laser rangefinders.

[0040] Furthermore, the visual camera mechanism also includes a printer control mainboard and a printer printing tool. The printer printing tool communicates with the printer control mainboard and the industrial visual camera in real time through the network. When the visual scanning is working, the printer control mainboard exchanges information with the P1 driver board through the 485 protocol. The printer control mainboard controls the trolley motor group in real time to scan. Before the visual scanning, the camera focal length parameters are set through the human-computer interaction interface, and the hydraulic drive is adjusted to make the four corners reach a fixed focal length.

[0041] The beneficial effects of the present invention are:

[0042] Through precise camera position adjustment, the printing quality and efficiency are significantly improved. First, a laser rangefinder is used to scan and collect distance data in real time. The sliding average filter is used to smooth the data, which effectively reduces noise interference and improves data stability. Subsequently, the PID control algorithm is used to accurately control the lifting and lowering of the camera to ensure that the distance between the camera and the scanning platform is always maintained at the optimal state. In addition, the Kalman filter is integrated for position prediction and the hydraulic drive is adjusted in advance to reduce the lag and overshoot of the system. This series of automated and intelligent adjustment steps not only simplifies the operation process, but also greatly improves the accuracy and consistency of the printing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] For better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.

[0044] Figure 1 A schematic flow chart of a method for adjusting the level of a visual camera based on a printer provided in Example 1 of the present application;

[0045] Figure 2 One of the structural diagrams of a printer-based visual camera level adjustment device provided in Example 1 of the present application;

[0046] Figure 3 A second structural diagram of a printer-based visual camera level adjustment device provided in Example 1 of the present application;

[0047] Figure 4 This is a third structural schematic diagram of a printer-based visual camera horizontal adjustment device provided in Example 1 of the present application.

[0048] 1-base plate, 2-camera fixing slot, 3-laser distance measurement and hydraulically driven lifting assembly, 4-laser distance meter, 5-hydraulic driven lifting assembly, 6-movable hardware rack, 7-fixed hardware rack, 8-industrial camera. DETAILED DESCRIPTION

[0049] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.

[0050] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0051] The specific implementation methods, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0052] Example 1

[0053] See also Figure 1-Figure 4 This embodiment provides a printer-based visual camera horizontal adjustment method and adjustment device, which solves the problems of difficult adjustment, long time consumption and high learning cost in traditional visual scanning systems, and realizes an automated and intelligent adjustment process.

[0054] The present invention provides a printer-based visual camera level adjustment method, comprising the following steps:

[0055] S1. Initial scanning and data sampling. Before performing visual scanning, remove debris and printing consumables on the scanning plane to ensure that the scanning plane is clean and tidy. Use a laser rangefinder to scan and sample distance data every 20 milliseconds.

[0056] S2. The laser distance measuring instrument will monitor the distance between the camera and the scanning platform in real time. When the distance is detected to be offset, the corresponding hydraulic drive will be activated to adjust the lifting and lowering to keep the camera and the scanning platform level.

[0057] During the adjustment process, the lifting data information is transmitted back to the printer control mainboard, and the current XY axis position information of the trolley and the corresponding lifting information are recorded at the same time;

[0058] S3, data application before formal scanning, after the printing consumables are formally stacked, a scan is performed, the printer control mainboard drives the XY axis motor to move, and the carriage is moved to the correct position according to the previously recorded position information;

[0059] At the same time, the control main board will send the previously recorded hydraulic drive lifting information to the hydraulic drive boards at the four corners for synchronous lifting and lowering adjustments;

[0060] S4, synchronous lifting and adjustment. After receiving the command from the control main board, the hydraulic drive boards at the four corners will be raised and lowered synchronously to ensure that the camera and the scanning platform remain level throughout the entire scanning range. After completing the synchronous lifting and adjustment, final confirmation and fine-tuning are performed to ensure the precise alignment of the camera.

[0061] Ensure that the scanning system can be accurately adjusted to the best state before printing to ensure printing quality and efficiency. Through precise data sampling, adjustment and application, it can adapt to the placement of printing consumables to ensure accuracy and consistency during the printing process.

[0062] Further, in step S1, the data collected by the laser rangefinder is used to determine the initial reference distance between the camera and the scanning platform, and an offset threshold ε is set. When the difference between the monitored distance and the reference distance exceeds this threshold, it is considered that an offset that needs to be adjusted occurs.

[0063] The collected distance data is analyzed in real time to compare the difference between the current distance and the reference distance. When the distance data collected continuously for multiple times indicates that the distance between the camera and the scanning platform exceeds the preset offset threshold, an offset detection signal is triggered.

[0064] Once the deviation is detected, the system automatically starts the hydraulic drive, adjusts the position of the camera, and calculates the required adjustment amount to return the distance between the camera and the scanning platform to the reference distance. The specific calculation process is: Δh = d 基准 -d 当前 , where d 基准 is the reference distance, d 当前 is the currently measured distance. According to the calculated adjustment amount, the camera is raised and lowered by hydraulic drive. After adjustment, the distance between the camera and the scanning platform continues to be monitored to ensure that the adjusted camera position meets the accuracy requirements. If there is still an offset, the system will continue to adjust until the required accuracy is achieved.

[0065] Furthermore, in the process of distance data sampling, a sliding average filter is used to smooth the collected distance data to reduce noise interference and improve data stability. The specific formula is expressed as:

[0066] Where D f is the distance data after smoothing at the i-th moment, D i represents the distance data collected at the i-th moment, and N is the size of the sliding window.

[0067] Furthermore, a suitable sliding window size N is selected. The selection of the window size requires a balance between smoothing effect and real-time performance. If the window is too large, the response will be slow, and if the window is too small, the smoothing effect will not be obvious.

[0068] Create an array of size N to store the latest N sampling points. Initially, the array is empty.

[0069] Real-time sampling and storage, sampling the distance data every 20 milliseconds, adding the latest sampled data to the array, and when the array has stored N data, removing the earliest data to keep the array size N;

[0070] Calculate the sliding average. After each sampling, calculate the average of all data in the current window to obtain the smoothed distance data. Use the calculated smoothed data as the input data for hydraulic drive adjustment to perform subsequent hydraulic drive adjustment operations.

[0071] Furthermore, during the hydraulic drive adjustment process, the PID control algorithm is used to accurately control the lifting of the camera, which is specifically expressed as follows: Among them, e(t) is the current error, K p , K i , K d are the proportional, integral and differential coefficients respectively;

[0072] The specific implementation process includes:

[0073] Choose the initial scaling factor K p , integral coefficient K i and the differential coefficient K d ;

[0074] Calculate the current error e(t), which is the difference between the set position and the actual position;

[0075] Calculate the proportional term P = K p e(t), which is adjusted according to the current error and has a faster response speed;

[0076] Calculate the integral term Adjustment based on the accumulated error can eliminate the steady-state error;

[0077] Calculate the differential term By adjusting according to the rate of change of the error, the error change trend can be predicted, thereby reducing overshoot and oscillation;

[0078] The calculated control signal Δh(t) is output to the hydraulic drive lifting component for lifting adjustment.

[0079] Monitor the position change of the camera in real time, update the error e(t) until it converges to the allowable range, and repeat the above steps continuously until the error e(t) converges to the allowable range to achieve the purpose of precise control.

[0080] Furthermore, the camera position is predicted based on the sampled data combined with the Kalman filter to adjust the hydraulic drive in advance and reduce the lag and overshoot of the system;

[0081] Specifically, state variables and measurement variables are defined, where the state variable x includes the position and velocity of the camera, and the measurement variable z is the distance between the current camera and the scanning platform obtained from the laser rangefinder;

[0082] Determine the state transfer matrix F, which describes how the state evolves within the time step. When the change in the camera position is uniform motion, the state transfer matrix is ​​expressed as: Where Δt is the sampling period;

[0083] Establish an observation model, determine the observation matrix H, and map the state vector to the measurement space. When the camera position is measured, H is expressed as: H = [1, 0];

[0084] Initialize the Kalman filter and set the initial state estimate and the initial covariance matrix P 0 , determine the process noise covariance Q and the measurement noise covariance R;

[0085] The distance between the camera and the scanning platform is sampled from the laser rangefinder at fixed time intervals. The state at the next moment is predicted through the state transfer matrix F using the current control input and the estimated state at the previous moment, which is expressed as: Update the covariance matrix of the predicted state, denoted as P k∣k-1 =FP k-1 F T +Q;

[0086] The state estimate is updated using the newly sampled data, and based on the predictions of the Kalman filter, the required adjustment is calculated and the camera position is adjusted via hydraulic drive.

[0087] Furthermore, an adjustment device for the printer-based visual camera level adjustment method includes a visual camera mechanism, wherein the visual camera mechanism includes a bottom plate 1, a camera fixing slot 2 is provided in the middle of the bottom plate 1, and laser ranging and hydraulically driven lifting components 3 are installed at the four corners of the bottom plate 1.

[0088] The laser rangefinder and hydraulically driven lifting assembly 3 includes a laser rangefinder 4 and a hydraulically driven lifting assembly 5, and the hydraulically driven lifting assembly 5 is connected to the laser rangefinder 4 through a movable hardware frame 6, a fixed hardware frame 7 is arranged on the top of the hydraulically driven lifting assembly 5, and an industrial camera 8 is arranged between the two groups of laser rangefinders 4.

[0089] Furthermore, the visual camera mechanism also includes a printer control mainboard and a printer printing tool. The printer printing tool communicates with the printer control mainboard and the industrial visual camera 8 in real time through the network. When the visual scanning is working, the printer control mainboard exchanges information with the P1 driver board through the 485 protocol. The printer control mainboard controls the trolley motor group in real time to scan. Before the visual scanning, the camera focal length parameters are set through the human-computer interaction interface, and the hydraulic drive is adjusted to make the four corners reach a fixed focal length.

[0090] Through a series of precise control steps, the precise alignment of the camera and the scanning platform before printing is ensured, which significantly improves the printing quality and efficiency. The method first scans and collects distance data through a laser rangefinder, and then uses a sliding average filter to smooth the data to reduce noise interference. Next, a PID control algorithm is used to accurately control the lifting and lowering of the camera, and the camera position is monitored and adjusted in real time to meet the accuracy requirements. In addition, the Kalman filter is further integrated for position prediction, and the hydraulic drive is adjusted in advance, which effectively reduces the lag and overshoot of the system. Ultimately, not only the accuracy of the environmental capacity calculation results is improved, but also the efficiency of early warning management is enhanced, providing strong technical support for the precise operation of the printer. Through this comprehensive technical solution, the present invention successfully solves the problems of difficult adjustment, long time consumption and high learning cost in traditional visual scanning systems, realizes an automated and intelligent adjustment process, and provides a solid guarantee for high-precision printing tasks.

[0091] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A printer-based visual camera level adjustment method, characterized in that: The steps include: S1. Initial scanning and data sampling. Before visual scanning, remove debris and printing consumables on the scanning plane, use a laser rangefinder to scan, and sample distance data every 20 milliseconds. S2. The laser distance measuring instrument will monitor the distance between the camera and the scanning platform in real time. When the distance is detected to be offset, the corresponding hydraulic drive will be activated to adjust the lifting and lowering to keep the camera and the scanning platform level. During the adjustment process, the lifting data information is transmitted back to the printer control mainboard, and the current XY axis position information of the trolley and the corresponding lifting information are recorded at the same time; S3, data application before formal scanning, after the printing consumables are formally stacked, a scan is performed, the printer control mainboard drives the XY axis motor to move, and the carriage is moved to the correct position according to the previously recorded position information; The control main board will send the previously recorded hydraulic drive lifting information to the hydraulic drive boards at the four corners for synchronous lifting and lowering adjustments; S4, synchronous lifting and lowering adjustment. After receiving the command from the control main board, the hydraulic drive boards at the four corners will perform lifting and lowering adjustments synchronously. After completing the synchronous lifting and lowering adjustments, the final confirmation and fine-tuning will be performed. In the process of distance data sampling, a sliding average filter is used to smooth the collected distance data. The specific formula is expressed as: Where D f is the distance data after smoothing at the i-th moment, D i represents the distance data collected at the i-th moment, and N is the size of the sliding window.

2. The method for adjusting the level of a visual camera based on a printer according to claim 1, characterized in that: In step S1, the data collected by the laser rangefinder is used to determine the initial reference distance between the camera and the scanning platform, and a deviation threshold ε is set. When the difference between the monitored distance and the reference distance exceeds this threshold, it is considered that a deviation occurs. The collected distance data is analyzed in real time, and the difference between the current distance and the reference distance is compared. When the distance data collected continuously for multiple times indicates the distance between the camera and the scanning platform, when it exceeds the preset offset threshold, an offset detection signal is triggered; When the deviation is detected, the hydraulic drive is automatically started to adjust the position of the camera and calculate the required adjustment amount to return the distance between the camera and the scanning platform to the reference distance. The specific calculation process is: Δh = d 基准 -d 当前 , where d 基准 is the reference distance, d 当前 It is the currently measured distance. According to the calculated adjustment amount, the camera is raised and lowered by hydraulic drive.

3. The method for adjusting the level of a visual camera based on a printer according to claim 1, characterized in that: Choose a suitable sliding window size N. The selection of the window size requires a balance between smoothing effect and real-time performance. If the window is too large, the response will be slow, and if the window is too small, the smoothing effect will not be obvious. Create an array of size N to store the latest N sampling points. Initially, the array is empty. Real-time sampling and storage, sampling the distance data every 20 milliseconds, adding the latest sampled data to the array, and when the array has stored N data, removing the earliest data to keep the array size N; Calculate the sliding average value. After each sampling, calculate the average value of all data in the current window to obtain the smoothed distance data. The calculated smoothed data is used as the input data for hydraulic drive adjustment.

4. The method for adjusting the level of a visual camera based on a printer according to claim 3, characterized in that: During the hydraulic drive adjustment process, the PID control algorithm is used to accurately control the lifting of the camera, which is specifically expressed as follows: Among them, e(t) is the current error, K p , K i , K d are the proportional, integral and differential coefficients respectively; The specific implementation process includes: Choose the initial scaling factor K p , integral coefficient K i and the differential coefficient K d ; Calculate the current error e(t), which is the difference between the set position and the actual position; Calculate the proportional term P = K p e(t), adjusted according to the current error, with a faster response speed; Calculate the integral term Adjust according to the accumulated error to eliminate the steady-state error; Calculate the differential term Adjust according to the error change rate, foresee the error change trend, and reduce overshoot and oscillation; The calculated control signal Δh(t) is output to the hydraulic drive lifting component to perform lifting adjustment; Monitor the position change of the camera in real time, update the error e(t) until it converges to the allowable range, and repeat the above steps continuously until the error e(t) converges to the allowable range.

5. The method for adjusting the level of a visual camera based on a printer according to claim 1, characterized in that: The camera position is predicted based on the sampled data combined with the Kalman filter, and the hydraulic drive is adjusted in advance; Specifically, state variables and measurement variables are defined, where the state variable x includes the position and velocity of the camera, and the measurement variable z is the distance between the current camera and the scanning platform obtained from the laser rangefinder; Determine the state transfer matrix F, which describes how the state evolves within the time step. When the change in the camera position is uniform motion, the state transfer matrix is ​​expressed as: Where Δt is the sampling period; Establish an observation model, determine the observation matrix H, and map the state vector to the measurement space. When the camera position is measured, H is expressed as: H = [1, 0]; Initialize the Kalman filter and set the initial state estimate And the initial covariance matrix P0, determine the process noise covariance Q and the measurement noise covariance R; The distance between the camera and the scanning platform is sampled from the laser rangefinder at fixed time intervals. The state at the next moment is predicted through the state transfer matrix F using the current control input and the estimated state at the previous moment, which is expressed as: Update the covariance matrix of the predicted state, denoted as P k|k-1 =FP k-1 F T +Q; The state estimate is updated using the newly sampled data, and based on the predictions of the Kalman filter, the required adjustment is calculated and the camera position is adjusted via hydraulic drive.

6. An adjusting device for the printer-based visual camera level adjustment method according to any one of claims 1 to 5, characterized in that: It includes a visual camera mechanism, which includes a bottom plate, a camera fixing slot is arranged in the middle of the bottom plate, and laser ranging and hydraulic driving lifting components are installed at the four corners of the bottom plate. The laser rangefinder and hydraulically driven lifting assembly comprises a laser rangefinder and a hydraulically driven lifting assembly, and the hydraulically driven lifting assembly is connected to the laser rangefinder via a movable hardware frame, a fixed hardware frame is arranged on the top of the hydraulically driven lifting assembly, and an industrial camera is arranged between the two groups of laser rangefinders.

7. The adjusting device of the printer-based visual camera level adjustment method according to claim 6, characterized in that: The visual camera mechanism also includes a printer control mainboard and a printer printing tool. The printer printing tool communicates with the printer control mainboard and the industrial visual camera in real time through the network. When the visual scanning is working, the printer control mainboard exchanges information with the P1 driver board through the 485 protocol. The printer control mainboard controls the trolley motor group in real time to scan. Before the visual scanning work, the camera focal length parameters are set through the human-computer interaction interface, and the hydraulic drive is adjusted to make the four corners reach a fixed focal length.