Focus adjustment method for piezoelectric actuator driven platform
The focus adjustment method of the piezoelectric brake drive platform controlled by FPGA chip solves the imaging blur problem caused by inertial displacement of liquid observation samples, and achieves high-precision image acquisition and reliability of detection results.
Patent Information
- Application Number
- CN202510960002.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-11
AI Technical Summary
The traditional piezoelectric brake drive platform causes shaking of the liquid observation sample and inertial displacement of the cells when moving, resulting in blurred imaging, affecting the stability of image frame acquisition and detection accuracy.
The camera image signal is received through the FPGA chip, and the control signal is determined and sent to the piezoelectric brake drive platform for focus adjustment. The camera is controlled to collect image signals after the inertial shaking stabilizes for a certain period of time. The focus movement distance and shaking duration are calculated based on the mapping relationship table, and the feature score is iteratively optimized to generate a qualified image signal.
The clarity and color reproduction of liquid observation sample images are improved, and the accuracy and reliability of the detection results of the visual inspection system are improved.
Smart Images

Figure CN120475257B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the general field of image data processing or generation technology, or to the technical field of testing material properties by optical means in the field of testing or analyzing materials by means of measuring the chemical or physical properties of the materials, and in particular to a focus adjustment method for a piezoelectric brake drive platform. Background Art
[0002] In visual inspection systems, accurate focus is crucial for obtaining high-quality images and ensuring inspection accuracy. This is especially true in scenarios such as microscopic cell inspection, where liquid samples are often placed on a piezoelectric actuator drive platform. The drive platform adjusts the relative distance between the liquid sample and the camera through its own movement to achieve focus.
[0003] However, in traditional focusing solutions, when the piezoelectric actuator drives the platform to move, it causes the solution placed on it to shake and the cells to inertial displacement, which has a significant impact on the stability of the system's image frame acquisition data processing of liquid observation samples. Summary of the Invention
[0004] The present application provides a focus adjustment method for a piezoelectric brake driving platform, in order to solve the imaging blur problem of liquid observation samples caused by inertial displacement caused by the focusing movement of the driving platform, which is beneficial to improving the clarity and color reproduction of image frames of liquid observation samples collected by the visual inspection system, and improving the accuracy and reliability of the visual inspection system in processing inspection results.
[0005] In a first aspect, the present application provides a focus adjustment method for a piezoelectric brake drive platform, which is applied to an FPGA chip in a visual inspection system. The visual inspection system includes a camera connected to the FPGA chip, a main control chip, and the piezoelectric brake drive platform. The piezoelectric brake drive platform is used to place a liquid observation sample. The method includes:
[0006] receiving a first image signal acquired by a camera for the liquid observation sample;
[0007] determining a first control signal based on the first image signal, and sending the first control signal to the piezoelectric actuator driving platform, wherein the first control signal is used to control the piezoelectric actuator driving platform to perform a first focus adjustment operation, wherein the adjustment end time node of the first focus movement distance indicated by the first focus adjustment operation is a first time node;
[0008] Controlling the camera to collect a second image signal at a second time node after the first focus adjustment operation, where the interval between the first time node and the second time node is a first inertial sway stabilization time duration corresponding to the first focus movement distance of the liquid observation sample;
[0009] A second control signal is determined according to the second image signal, and the second image signal is sent to the main control chip according to the second control signal.
[0010] In a second aspect, an embodiment of the present application provides a focus adjustment system for a piezoelectric brake drive platform, comprising a camera connected to the FPGA chip, a main control chip, and the piezoelectric brake drive platform, wherein the piezoelectric brake drive platform is used to place a liquid observation sample, wherein:
[0011] The FPGA chip is used to execute the steps of the method described in the first aspect above.
[0012] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the first aspect of the embodiment of the present application.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program / instruction stored thereon, which is executed by a processor to implement the steps of the method described in the first aspect above.
[0014] It can be seen that in the embodiment of the present application, a first image signal collected by a camera for a liquid observation sample is received; a first control signal is determined based on the first image signal, and a first control signal is sent to the piezoelectric brake drive platform, the first control signal is used to control the piezoelectric brake drive platform to perform a first focus adjustment operation, and the adjustment end time node of the first focus movement distance indicated by the first focus adjustment operation is the first time node; the camera is controlled to collect a second image signal at a second time node after the first focus adjustment operation, and the interval between the first time node and the second time node is the first inertial sway stabilization time corresponding to the first focus movement distance of the liquid observation sample; a second control signal is determined based on the second image signal, and a second image signal is sent to the main control chip based on the second control signal. In this way, the present application effectively solves the imaging blur problem of the liquid observation sample caused by the inertial displacement caused by the focus movement of the drive platform, which is beneficial to improving the clarity and color reproduction of the image frame of the liquid observation sample collected by the visual detection system, and improving the accuracy and reliability of the visual detection system in processing the detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] Figure 1 This is a system architecture diagram of a visual inspection system provided by an embodiment of the present application;
[0017] Figure 2 This is a structural block diagram of an electronic device provided in an embodiment of the present application;
[0018] Figure 3 This is a flowchart of the steps of a focus adjustment method of a piezoelectric brake driving platform provided in an embodiment of the present application;
[0019] Figure 4 This is a diagram of an application scenario of a focus adjustment method for a piezoelectric brake driving platform provided in an embodiment of the present application;
[0020] Figure 5 This is a schematic diagram of the process of stabilizing the inertial sway of a state observation sample provided by an embodiment of the present application;
[0021] Figure 6 This is a flow chart of a feature extraction operation provided by an embodiment of the present application;
[0022] Figure 7 This is an overall flow chart of a focus adjustment method for a piezoelectric brake driving platform provided in an embodiment of the present application;
[0023] Figure 8 This is a functional unit block diagram of a focus adjustment system for a piezoelectric brake drive platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0026] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] In the embodiments of this application, "and / or" describes the relationship between associated objects and indicates that three relationships can exist. For example, "A and / or B" can represent the following three situations: A exists alone; A and B exist simultaneously; and B exists alone. A and B can be singular or plural.
[0028] In the embodiments of the present application, the symbol " / " can indicate that the preceding and following objects are in an "or" relationship. In addition, the symbol " / " can also represent a division sign, that is, performing a division operation. For example, A / B can mean A divided by B.
[0029] In the embodiments of the present application, "at least one item" or similar expressions refers to any combination of these items, including any combination of single items or plural items, and refers to one or more, and multiple refers to two or more. For example, at least one item (item) of a, b, or c can represent the following seven situations: a, b, c, a and b, a and c, b and c, a, b, and c. Among them, each of a, b, and c can be an element or a set containing one or more elements.
[0030] In the embodiments of this application, "equal to" can be used in conjunction with "greater than" and is applicable to the technical solution adopted when "greater than" is used, and can also be used in conjunction with "less than" and is applicable to the technical solution adopted when "less than" is used. When "equal to" is used in conjunction with "greater than", it should not be used in conjunction with "less than"; when "equal to" is used in conjunction with "less than", it should not be used in conjunction with "greater than".
[0031] Existing technologies present numerous problems. For one thing, traditional focusing methods often rely on a single dimension, significantly reducing detection accuracy. Furthermore, when the piezoelectric actuator drives the platform, it causes the solution on it to slosh and the cells to shift inertia, significantly impacting sample stability. Existing technologies often employ fixed delays to address inertial displacement, making it impossible to dynamically adjust based on actual displacement.
[0032] In response to the above problems, an embodiment of the present application provides a focus adjustment method for a piezoelectric brake driving platform. The embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0033] See also Figure 1 , Figure 1 This is a system architecture diagram of a visual inspection system provided in an embodiment of the present application. Figure 1 As shown, the visual inspection system includes an FPGA chip 110 , a main control chip 120 , a camera 130 and a piezoelectric actuator driving platform 140 .
[0034] Among them, the FPGA chip 110 is used to receive image signals from the camera 130, process and analyze the image data; and execute related calculations such as focusing algorithms; and send processing results or related control signals to the main control chip 120 and the piezoelectric brake drive platform 140.
[0035] The main control chip 120 performs bidirectional communication with the FPGA chip 110 to receive processed image data information and other status information from the FPGA chip 110 , and can also send control instructions or configuration parameters to the FPGA chip 110 .
[0036] Among them, the camera 130 serves as an image acquisition device, responsible for capturing image information of the target scene and converting optical signals into electrical signals or digital signals; and transmitting the collected image data to the FPGA chip 110 to provide raw data for subsequent image analysis and processing.
[0037] The piezoelectric actuator drive platform 140 utilizes the piezoelectric effect to achieve precise displacement control. In the system, based on control signals sent by the FPGA chip 110, it drives related components, such as the observation platform, to precisely adjust their positions to achieve functions such as focusing. Furthermore, the piezoelectric actuator drive platform 140 may also include a feedback mechanism to transmit actual displacement or status information to the FPGA chip 110 for further adjustment and optimization.
[0038] It can be seen that in the embodiment of the present application, the visual inspection system collects images through the camera and transmits them to the FPGA chip for processing. The FPGA chip judges and controls the piezoelectric brake driving platform based on the algorithm to accurately adjust the displacement to achieve focusing. At the same time, it interacts with the main control chip to achieve accurate image acquisition and precise control of the equipment. It can be applied to scenarios such as microscope imaging and industrial visual inspection to improve imaging clarity and detection accuracy.
[0039] See also Figure 2 , Figure 2 This is a block diagram of an electronic device provided in an embodiment of the present application, for executing Figure 1 Visual inspection systems in Figure 2 As shown, the electronic device 20 may include one or more of the following components: a memory 23, a processor 21, a communication bus 30, a communication interface 22, and one or more programs 231. The one or more programs 231 are stored on the memory 23 and are configured to be executed by the processor 21. The one or more programs 231 include instructions for executing any step in the following method embodiments. In a specific implementation, the processor 21 is used to execute any step in the following method embodiments, and when performing data transmission such as sending, the communication interface 22 may be selectively called to complete the corresponding operation. The electronic device 20 may be a mobile phone terminal, a tablet computer, a laptop computer, or a wearable smart device.
[0040] The processor 21 may include one or more processing cores. The processor 21 utilizes various interfaces and circuits to connect the various components within the electronic device 20. It executes instructions, programs, code sets, or instruction sets stored in the memory 23, as well as accesses data stored in the memory 23, to perform various functions and process data within the electronic device 20. Optionally, the processor 21 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 21 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 21 and may be implemented separately via a communication chip.
[0041] The memory 23 may include a random access memory (RAM) or a read-only memory (ROM). The memory 23 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 23 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 20 during use.
[0042] It is understandable that the electronic device 20 may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, a Wi-Fi module, a speaker, a Bluetooth module, a sensor, etc., which are not limited here.
[0043] See also Figure 3 , Figure 3 This is a flowchart of the steps of a focus adjustment method of a piezoelectric brake driving platform provided in an embodiment of the present application. Figure 3 As shown, the method includes the following steps:
[0044] Step S310: receiving a first image signal acquired by a camera from the liquid observation sample.
[0045] Among them, the image signal collected by the camera for the liquid observation sample contains various information such as the appearance, color, texture, etc. of the liquid observation sample, and is presented in a specific encoding format (such as RGB format, etc.).
[0046] Among them, the FPGA chip can adapt to the connection between cameras and main control chips with different communication protocols.
[0047] Specifically, FPGAs (field-programmable gate arrays) feature a reconfigurable array of logic cells. This means that their pin functions and internal logic circuitry can be flexibly defined through programming. For cameras using different communication protocols (such as USB and CameraLink), the FPGA's internal logic can be configured to adjust the pins' electrical characteristics and signal timing, thereby achieving physical connection and signal adaptation with the camera interface. For example, when connecting a USB camera, interface logic circuitry compliant with the USB protocol can be constructed within the FPGA to handle data transmission and handshake signals. When connecting a CameraLink camera, the logic is reconfigured to accommodate differential signaling, specific clock and data format requirements, and other requirements.
[0048] Specifically, the communication protocols of different cameras differ in data formats, transmission rates, control signals, and other aspects. FPGA chips can parse and convert signals from these different protocols. For example, they can convert image data output by a camera using a specific protocol (e.g., the format of the original RGB data stream may vary depending on the protocol) into a unified data format (such as common parallel or serial data format requirements) that the main control chip can recognize and process. Furthermore, the FPGA can convert control commands issued by the main control chip into control signals that can be understood by the corresponding camera protocol, enabling two-way communication between the two.
[0049] Furthermore, the main control chip may also adhere to different interface standards and communication protocols. The FPGA chip can serve as an intermediate adaptation layer, adjusting the format of its output signals according to the main control chip's protocol requirements (such as SPI, I2C, etc.). For example, if the main control chip receives data using the SPI protocol, the FPGA can package and transmit processed camera image data or status information according to the timing and format requirements of the SPI protocol. If the main control chip sends control commands via the I2C protocol, the FPGA configures its internal logic to correctly parse the I2C protocol commands and then perform corresponding camera operations accordingly.
[0050] It can be seen that in this embodiment, through the adaptation of the FPGA chip, the system can be compatible with a variety of cameras and main control chips of different brands and models, which greatly improves the compatibility of the system and facilitates hardware selection and upgrades in different application scenarios.
[0051] Step S320: determining a first control signal according to the first image signal, and sending the first control signal to the piezoelectric actuator driving platform.
[0052] The first control signal is used to control the piezoelectric brake driving platform to perform a first focus adjustment operation, and the adjustment end time node of the first focus movement distance indicated by the first focus adjustment operation is the first time node.
[0053] In a possible embodiment, determining the first control signal based on the first image signal includes: performing a feature extraction operation on the first image signal to obtain a first target feature set and a second target feature set, the first target feature set including multiple first target features under the image clarity dimension, and the second target feature set including multiple second target features under the image color dimension; performing a feature scoring operation based on the first target feature set and the second target feature set to obtain a first comprehensive feature score; determining a first comparison result between the first comprehensive feature score and a preset score threshold; determining that the first comparison result is that the first comprehensive feature score is less than the preset score threshold; and generating the first control signal based on the first comparison result.
[0054] The focusing movement distance refers to the linear displacement performed by the piezoelectric brake driving platform in the vertical direction (usually along the optical axis) to adjust the focusing distance between the camera and the liquid observation sample.
[0055] The focus adjustment operation includes the piezoelectric brake driving the platform to move in a vertical direction according to the first focus movement distance to adjust the distance between the camera and the liquid observation sample.
[0056] In a possible embodiment, controlling the piezoelectric brake driving platform to perform a first focus adjustment operation includes: the piezoelectric brake driving platform receiving a first control signal, where the first control signal carries a first focus movement distance; and the piezoelectric brake driving platform controlling the platform to move in a vertical direction according to the first focus movement distance based on the first control signal.
[0057] The first focusing movement distance carried by the first control signal is calculated by the FPGA chip.
[0058] Furthermore, the method of controlling the piezoelectric brake driving platform to perform a first focus adjustment operation also includes: the piezoelectric brake driving platform receives the first control signal; the piezoelectric brake driving platform obtains a preset first mapping relationship table, the first mapping relationship table including a correspondence between the control signal and the focusing movement distance; the piezoelectric brake driving platform queries the first mapping relationship table according to the first control signal to obtain a first focusing movement distance corresponding to the first control signal; the piezoelectric brake driving platform controls the platform to move in a vertical direction according to the first focusing movement distance according to the first control signal.
[0059] The first focusing movement distance carried by the first control signal is calculated by the piezoelectric brake driving platform.
[0060] As can be seen, in this application, the FPGA chip can calculate the first focusing distance, generate a first control signal carrying the first focusing distance, and send the first control signal to the piezoelectric brake driving platform to achieve focusing. Alternatively, the piezoelectric brake driving platform can calculate the first focusing distance based on the first control signal to achieve focusing. This application does not limit the execution entity of calculating the first focusing distance based on the first control signal.
[0061] In a possible embodiment, the four corner bases of the piezoelectric brake drive platform are respectively connected to four drivers to form a four-point support structure, and the four drivers are used to synchronously drive according to the first control signal to control the piezoelectric brake drive platform to move in the vertical direction according to the first focusing movement distance.
[0062] For example, the actuators must be pre-calibrated (e.g., using a laser interferometer to determine position and displacement accuracy), and then synchronized according to the first control signal sent by the FPGA chip. Synchronous drive can be achieved through differential signals or bus protocols (e.g., SPI), ensuring a four-axis displacement error of ≤ 0.1μm and improving focus accuracy.
[0063] It can be seen that in this embodiment, by receiving the image signal of the liquid observation sample captured by the camera, the target feature set of clarity and color dimensions is synchronously extracted, and after determining that the first comprehensive feature score is less than the preset score threshold, a first control signal carrying the first focusing movement distance is generated, and the first control signal is sent to the piezoelectric brake drive platform to control the piezoelectric brake drive platform to perform the focus adjustment operation, thereby improving the accuracy of imaging and the degree of automation of the system, and helping to improve work efficiency and the quality of tasks such as detection and shooting.
[0064] Step S330: Control the camera to collect a second image signal at a second time point after the first focus adjustment operation.
[0065] The interval between the first time node and the second time node is the first inertial oscillation stabilization time corresponding to the first focusing movement distance of the liquid observation sample.
[0066] The focusing movement distance refers to the linear displacement performed by the piezoelectric brake driving platform in the vertical direction (usually along the optical axis) to adjust the focusing distance between the camera and the liquid observation sample, usually in micrometers (μm).
[0067] Among them, the inertial shake stabilization time refers to the time interval required for the liquid observation sample to shake due to mechanical inertia and become completely stable after the piezoelectric brake drives the platform to complete the focusing movement, usually in milliseconds (ms).
[0068] In a possible embodiment, controlling the camera to collect a second image signal at a second time node after the first focus adjustment operation includes: obtaining a preset first mapping relationship table and a second mapping relationship table, the first mapping relationship table including a correspondence between the control signal and the focusing movement distance, and the second mapping relationship table including a correspondence between the focusing movement distance and the inertial shake stabilization time; querying the first mapping relationship table according to the first control signal to obtain the first focusing movement distance corresponding to the first control signal; querying the second mapping relationship table according to the first focusing movement distance to obtain the first inertial shake stabilization time corresponding to the first focusing movement distance; determining the second time node according to the first time node and the first inertial shake stabilization time; controlling the camera to collect the second image signal at the second time node.
[0069] The first mapping table represents the correspondence between the control signal and the focus movement distance. For example, in linear mapping, displacement = calibration coefficient × voltage value (applicable to the linear range of the piezoelectric material); in nonlinear mapping, polynomial fitting or piecewise function is used to compensate for nonlinear characteristics such as hysteresis and creep of the piezoelectric material.
[0070] In a possible embodiment, the viscosity of the liquid observation sample is a target viscosity, and the second mapping relationship table corresponds to a statistical analysis result of the liquid observation sample of the target viscosity.
[0071] Understandably, in a precision focusing system, the rapid movement of the piezoelectric actuator-driven platform causes mechanical vibration (inertial displacement) in the sample. Capturing images before this vibration has fully decayed can result in blur. Using a pre-set second mapping table, the required stabilization time can be accurately calculated, ensuring image acquisition quality.
[0072] In a possible embodiment, the method also includes: obtaining multiple video observation records of the liquid observation sample under multiple different focusing movement distances of the piezoelectric brake driving platform; analyzing each video observation record to obtain the inertial shake stabilization time; and creating the second mapping relationship table based on the analyzed correspondence between the inertial shake stabilization time and the focusing movement distance.
[0073] Among them, a single observation is recorded as a continuous image frame with a time stamp (such as 100fps, with a time interval of 10ms between each frame), and the shaking state is judged by analyzing the image changes of the liquid observation sample (such as solution) between frames (such as edge blur, particle displacement).
[0074] In a possible embodiment, the analysis of each video observation record to obtain the inertial shake stabilization duration includes: calculating the pixel difference value between two adjacent frames of the continuous image frame sequence in each video observation record; when at least N image frames appear continuously, and the pixel difference value between each image frame and the previous frame is less than a preset difference threshold, recording the starting frame of the N image frames as the stabilization starting frame, and recording the ending frame as the stabilization completion frame; and obtaining the inertial shake stabilization duration according to the product of the frame number difference N between the stabilization starting frame and the stabilization completion frame and the image frame interval duration.
[0075] The pixel difference value can be calculated using at least one of the mean squared error (MSE) and the sum of optical flow vectors. MSE reflects overall pixel changes, while the sum of optical flow vectors captures local motion. Combining the two can improve detection robustness.
[0076] The preset difference threshold is pre-calibrated based on the target viscosity of the liquid observation sample and the optical system characteristics, and N is an integer greater than or equal to 3.
[0077] The following combination Figure 4 、 Figure 5 A specific analysis is conducted on the inertial shaking stabilization process of the liquid observation sample during the focusing process.
[0078] See also Figure 4 , Figure 4 This is an application scenario diagram of a focus adjustment method for a piezoelectric brake driving platform provided in an embodiment of the present application, such as Figure 4 As shown, the camera is installed on the suspension, which can flexibly adjust the position and angle of the camera so as to aim at the liquid observation sample for shooting. The camera is responsible for collecting the image signal of the liquid observation sample; the liquid observation sample is located in the culture dish and the culture dish is placed on the piezoelectric brake drive platform. The piezoelectric brake drive platform can accurately adjust its position in the vertical direction (usually parallel to the optical axis direction) according to the control signal received, drive the liquid observation sample to move, and adjust the focusing distance; the FPGA chip receives the image signal from the camera, processes and analyzes it, generates a control signal, and sends the control signal to the piezoelectric brake drive platform or sends the image signal to the main control chip; after receiving the image signal sent by the FPGA chip, the main control chip can store, further analyze, display and other subsequent processing operations on the image.
[0079] As can be seen, in this embodiment, the coordinated operation of the suspension, camera, FPGA chip, piezoelectric actuator drive platform, and main control chip achieves full automation of the entire process, from sample image acquisition and feature analysis to focus adjustment and result processing. The FPGA chip's in-depth processing of image signals allows precise control of the piezoelectric actuator drive platform to adjust the focus distance, effectively improving image clarity and color accuracy. This ensures image quality and facilitates precise observation and inspection in scenarios such as microscopic cell detection and industrial product appearance inspection.
[0080] Further, see Figure 5 , Figure 5 This is a schematic diagram of the process of inertial swaying and stabilization of a liquid observation sample provided in an embodiment of the present application. Figure 5 As shown, the piezoelectric actuator driving platform is performing a first focus adjustment operation by moving a first focus moving distance in a vertical direction to reduce the distance between the liquid observation sample and the camera.
[0081] Among them, Figure 5 In (a), the piezoelectric brake-driven platform is in an initial stationary state, and a culture dish is placed on it. The solution in the culture dish is in a calm state, the liquid surface is level, and the cells are evenly suspended in the solution without any displacement tendency.
[0082] Among them, Figure 5In (b), the piezoelectric actuator drives the platform in a transient state. The platform begins to accelerate upward, and due to inertia, the upper portion of the solution tends to move downward relative to the lower portion. The lower portion of the solution moves upward with the platform, while the upper portion attempts to remain stationary, causing the liquid surface to concave. This movement of the solution generates shear forces, causing cells to drift from the center of the culture dish toward the lower edge, in the opposite direction of the platform's motion (downward).
[0083] Among them, Figure 5 In (c), the piezoelectric actuator drives the platform at a constant speed. The solution gradually adapts to the platform's motion due to viscous resistance, but slight convection still exists within it. During this process, the solution's concave shape gradually recovers, but it is not completely flat, and a slight depression persists. The cell undergoes an oblique displacement with the flow field, moving from the lower edge to the side and upward, with a displacement speed of approximately 0.1 μm / ms (dependent on the solution viscosity; at the target viscosity, greater resistance results in slower displacement).
[0084] Among them, Figure 5 In (d), the piezoelectric brake drives the platform in the focus stop state. The platform stops moving, but the solution continues to move upward due to inertia, hitting the upper edge of the culture dish, causing the liquid surface to convex. The cells are driven by the solution and drift rapidly from the upper side to the upper edge. The displacement direction is the same as the original movement direction of the platform (upward).
[0085] Among them, Figure 5 In (e), the piezoelectric actuator drives the platform to maintain a focused stop. The platform stops moving, and the solution impacts upward and then falls back, beginning to oscillate up and down, with the displacement direction changing periodically (up → down → up). The liquid surface then alternates between convex and concave. The cells follow the oscillations of the solution, and driven by the solution, they also move up and down within the culture dish.
[0086] Among them, Figure 5 In (f), the piezoelectric actuator drives the platform to maintain its focus and stop, halting its movement. After a period of oscillation, the amplitude of the solution's oscillation gradually decreases due to the combined effects of viscous drag, gravity, and energy dissipation, ultimately restoring the liquid surface to a flat surface. The cells stabilize as the solution settles, ceasing their reciprocating motion and ultimately coming to rest near the center of the dish due to viscous drag.
[0087] It can be seen that in this embodiment, the entire process of inertial shaking and stabilization of the liquid observation sample during the movement of the piezoelectric brake-driven platform clearly demonstrates the dynamic changes of the sample affected by the platform movement, provides a visual reference for understanding and compensating for the influence of the sample's inertial displacement on imaging, and helps to accurately grasp the characteristics of each stage to optimize the imaging quality.
[0088] Step S340 , determining a second control signal according to the second image signal, and sending the second image signal to the main control chip according to the second control signal.
[0089] The second image signal is sent to the main control chip. After receiving the second image signal, the main control chip can perform subsequent processing such as storage, further analysis, and display. For example, in a surveillance system, images that meet quality requirements are sent to the main control chip for storage and subsequent review; in a photography device, qualified photo image signals are transmitted to the main control chip for display and sharing.
[0090] In a possible embodiment, determining the second control signal based on the second image signal includes: repeatedly performing the feature extraction operation and the feature scoring operation on the second image signal to obtain a second comprehensive feature score; determining a second comparison result between the second comprehensive feature score and a preset scoring threshold; determining that the second comparison result is that the second comprehensive feature score is not less than the preset scoring threshold; and generating the second control signal based on the second comparison result, the second control signal being used to instruct the sending of the second image signal to the main control chip.
[0091] Among them, when the second comparison result is that the second comprehensive feature score is not less than the preset score threshold, there is no need to calculate the second focus movement distance corresponding to the second control signal, and there is no need to send the second control signal carrying the second focus movement distance to the piezoelectric brake drive platform, that is, there is no need to perform focus adjustment operation.
[0092] In a possible embodiment, the method further includes: determining that the second comparison result is that the second comprehensive feature score is less than the preset score threshold; generating a second control signal based on the second comparison result, the second control signal carrying a second control signal, and the second control signal is used to control the piezoelectric brake drive platform to perform a second focus adjustment operation.
[0093] The second focus movement distance carried by the second control signal is obtained by the FPGA chip by querying the preset first mapping relationship table based on the second control signal. Alternatively, the second focus movement distance may also be obtained by the piezoelectric brake drive platform by querying the preset first mapping relationship table based on the received second control signal.
[0094] It can be understood that by iteratively adjusting the displacement of the piezoelectric platform, the feature score of the current image approaches the standard of the reference image, that is, the second comprehensive feature score ≥ the preset score threshold, and finally a qualified second image signal is generated and transmitted to the main control chip.
[0095] It can be seen that in this embodiment, the FPGA chip accurately calculates the focusing movement distance and inertial shaking stabilization time of the piezoelectric brake driving platform based on the preset mapping relationship. After the control platform completes the focus adjustment, it waits for the vibration to decay, and then collects the reference image and iteratively optimizes the feature score. Finally, the qualified image signal is transmitted to the main control chip for storage, analysis and other subsequent operations, thereby achieving high-precision automatic focus and ensuring that the image is free of vibration blur.
[0096] See also Figure 6 , Figure 6 is a flowchart of the steps of a feature extraction operation provided by an embodiment of the present application, wherein, in performing the feature extraction operation on the first image signal to obtain the first target feature set and the second target feature set, the above method may further include the following steps:
[0097] Step S600: receiving a first image signal.
[0098] Among them, the first image signal generated by the camera when shooting the liquid observation sample contains various information such as the appearance, color, texture, etc. of the liquid observation sample, and is presented in a specific encoding format (such as RGB format, etc.).
[0099] Among them, the FPGA chip can adapt to the connection between cameras and main control chips with different communication protocols.
[0100] Step S610: constructing a grayscale gradient co-occurrence matrix according to the first image signal.
[0101] The Gray Level-Gradient Co-occurrence Matrix (GLGCM) is a two-dimensional statistical matrix that integrates image grayscale information and gradient features. It is used to analyze the local texture characteristics of an image. It combines the grayscale values (reflecting brightness) and gradient values (reflecting edge strength) of an image to capture their spatial correlation. The matrix element (i, j) represents the probability of occurrence of a pixel pair with grayscale value i and gradient value j. By calculating characteristic parameters such as contrast, energy, and correlation, it can quantify image texture properties such as smoothness, roughness, and directionality.
[0102] Step S611: extract multiple first target features from the grayscale gradient co-occurrence matrix.
[0103] The multiple first target features include at least an image contrast feature and an image energy feature. Specifically, the image contrast feature measures the difference between grayscale and gradient values, reflecting image clarity and texture depth; the image energy feature reflects texture uniformity and regularity (also known as the "second-order angular moment").
[0104] In a possible embodiment, constructing a grayscale gradient co-occurrence matrix according to the first image signal includes: constructing the grayscale gradient co-occurrence matrix using the following formula:
[0105] ;
[0106] in, represents the number of pixel pairs with grayscale value i and gradient value j in the grayscale gradient co-occurrence matrix G, Indicates that the coordinates in the image are The gray value of the pixel, Indicates that the coordinates in the image are The gradient value of the pixel point;
[0107] The extracting the plurality of first target features from the grayscale gradient co-occurrence matrix includes:
[0108] According to the grayscale gradient co-occurrence matrix, at least the following multiple first target features are obtained using the following formula:
[0109] ;
[0110] ;
[0111] in, represents the image contrast feature, represents the image energy characteristics, is the total number of pixels in the image, is the total number of gray levels, is the maximum value of the gradient.
[0112] In one possible embodiment, the total number of gray levels L ranges from 16 <L<64。
[0113] Among them, high contrast ( Large: Indicates that the grayscale changes dramatically (such as edge areas), and the image is clear; low contrast ( Small: indicates that the grayscale changes slowly (such as smooth areas) and the image is blurred; high energy ( Large: indicates that the pixel distribution is concentrated (such as smooth area) and the texture is regular; low energy ( Small): Indicates that the pixel distribution is scattered (such as complex texture) and the texture is irregular.
[0114] Furthermore, it can be understood that the characteristics of a clear image are High (sharp edges) and Low (rich texture), blurred images are characterized by Low (smooth edges) and High (single texture).
[0115] Step S612: Generate a first target feature set based on multiple first target features.
[0116] Step S620: Perform an HSV conversion operation according to the first image signal.
[0117] Among them, the HSV conversion operation is used to map the RGB color space to the HSV space.
[0118] RGB (Red / Green / Blue) is an additive model based on the three primary colors of optical image processing, representing color by mixing red, green, and blue channels in varying proportions. This is essentially a color representation driven by hardware displays (e.g., screens and camera sensors). The channel values (r, g, b) lack a direct correspondence with human-perceived color characteristics (e.g., "red / blue" and "bright / dull") and are sensitive to lighting changes (brightness fluctuations affect all three channels simultaneously). HSV (Hue / Saturation / Value) decomposes color into three dimensions consistent with human subjective perception: Hue (indicates the type of color (e.g., red, green, blue) with a range of 0° to 360°; Saturation (indicates the vividness of the color (from gray to pure color) with a range of 0° to 1); and Value (indicates the brightness of the color with a range of 0° to 1).
[0119] In a possible embodiment, performing an HSV conversion operation according to the first image signal to map the RGB color space to the HSV space includes: performing the HSV conversion operation using the following formula:
[0120] V max(r,g,b);
[0121] ;
[0122] ;
[0123] Among them, V represents color brightness, S represents color saturation, H represents hue, r represents the normalized red channel value, g represents the normalized green channel value, and b represents the normalized blue channel value.
[0124] For example, if the RGB channel values are mapped to the [0,1] interval, then , , .
[0125] Understandably, in RGB, changes in lighting simultaneously alter the r / g / b values, making color feature extraction difficult. In HSV, lightness (V) is independent of hue (H) and saturation (S). Even with changes in lighting, hue and saturation remain stable, facilitating color feature extraction. Furthermore, the hue dimension of HSV directly corresponds to color categories, enabling rapid segmentation of objects (e.g., extracting blue license plates or identifying green vegetation) by setting the H / S range. RGB, on the other hand, requires complex threshold combinations, resulting in lower robustness.
[0126] It can be seen that in this embodiment, the RGB color space is mapped to the HSV space, realizing the transition from "hardware-driven color mixing" to "human-perceived color description", and improving the robustness and convenience of image processing by decoupling color attributes and brightness.
[0127] Step S621: Perform color gamut recognition in the HSV space to obtain a color gamut recognition result.
[0128] In a possible embodiment, performing color gamut recognition in the HSV space to obtain a color gamut recognition result includes: calculating a color gamut pixel ratio using the following formula, wherein the color gamut recognition result includes the color gamut pixel ratio:
[0129] InRange(H,S,V)= ;
[0130] ;
[0131] Among them, InRange(H,S,V) is a function to determine whether the pixels in the image are within the target color range. 、 、 represent the hue range, saturation range and lightness range of the target color gamut respectively, Indicates the color gamut pixel ratio, is the total number of pixels in the image, 、 、 Respectively represent the coordinates in the image The hue, saturation, and lightness values of the pixels.
[0132] The color gamut pixel ratio refers to the ratio of the number of pixels that meet the target color gamut conditions to the total number of pixels in the image.
[0133] The reason for performing color gamut judgment in the HSV space is that HSV decomposes color into hue (H), saturation (S), and lightness (V), which is more in line with people's subjective perception of color (for example, "red" is determined by H, and "brightness" is determined by S); the V channel independently represents lightness. When the lighting changes, H and S are relatively stable, avoiding the color shift problem caused by brightness changes in the RGB space; the target color gamut can be represented by clear H, S, and V intervals. For example, the H of "red" is usually around 0°, and S and V are above a certain threshold, which is easier to set and adjust than the three-dimensional interval of RGB.
[0134] Step S622: Perform saturation analysis on the pixel points according to the color gamut recognition result to obtain a saturation analysis result.
[0135] In a possible embodiment, performing saturation analysis on the pixel points according to the color gamut recognition result to obtain a saturation analysis result includes calculating a saturation mean and a saturation variance using the following formula, wherein the saturation analysis result includes the saturation mean and the saturation variance:
[0136] ;
[0137] ;
[0138] in, represents the mean saturation value, represents the saturation variance.
[0139] Among them, by statistically analyzing the saturation (S) distribution of pixels in the target color gamut, the color purity uniformity and boundary clarity can be quantified, providing multi-dimensional features for image quality assessment.
[0140] Step S623 , determining a plurality of second target features according to the color gamut recognition result and the saturation analysis result.
[0141] In a possible embodiment, determining the plurality of second target features based on the color gamut recognition result and the saturation analysis result includes: obtaining at least the plurality of second target features shown below using the following formula based on the color gamut pixel ratio, the saturation mean, and the saturation variance:
[0142] ;
[0143] ;
[0144] ;
[0145] ;
[0146] ;
[0147] in, Indicates the color gamut consistency feature, Indicates the saturation uniformity characteristic, Indicates the color purity characteristics, Indicates the color boundary clarity feature, Indicates the color concentration characteristics, Indicates that the coordinates in the image are The saturation gradient value of the pixel point, represents the total number of pixels within the target color gamut, is the average hue within the target color gamut.
[0148] Among them, the color gamut consistency feature is used to quantify the coverage of the target color in the image, and is used to judge "whether the target exists" or "whether the area is complete"; the saturation uniformity feature is used to characterize whether the color purity is uniform; the color purity feature is used to reflect the vividness of the color; the color boundary clarity feature is used to reflect the sharpness of the color boundary; the color concentration feature indicates whether the color is concentrated in the center of the target color gamut.
[0149] It should be noted that the embodiments of the present application only provide examples of calculating some second target features based on the color gamut recognition results and saturation analysis results, and do not limit the extraction of other second target features from the color gamut recognition results and saturation analysis results through other algorithms and methods.
[0150] Step S624: Generate a second target feature set based on the multiple second target features.
[0151] Furthermore, after generating the first target feature set and the second target feature set, the feature scoring operation is performed to obtain a comprehensive feature score, including: determining the clarity feature scores corresponding to the multiple first target features; and, determining the color feature scores corresponding to the multiple second target features; and, weighted summing the clarity feature scores and the color feature scores to obtain the first comprehensive feature score.
[0152] In a possible embodiment, determining the clarity feature scores corresponding to the multiple first target features includes: calculating the clarity feature scores using the following formula: ;in, represents the clarity feature score, represents the total number of the first target features, represents the normalized result of the kth first target feature, represents the weight of the k-th first target feature.
[0153] In a possible embodiment, determining the color feature scores corresponding to the plurality of second target features includes: calculating the color feature scores using the following formula: ;in, represents the color feature score, represents the total number of second target features, represents the kth second target feature, represents the weight of the k-th second target feature.
[0154] It can be seen that in this embodiment, the grayscale gradient co-occurrence matrix is constructed through the FPGA chip to extract image clarity features, and the RGB image is converted to the HSV space for color gamut recognition and saturation analysis, generating color dimension features such as color gamut consistency and saturation uniformity, thereby achieving accurate extraction of multi-dimensional image features, providing data support for autofocus closed-loop control, and being able to accurately judge image clarity and color quality, thereby improving imaging accuracy and detection reliability.
[0155] See also Figure 7 , Figure 7 This is an overall flow chart of a focus adjustment method for a piezoelectric brake driving platform provided in an embodiment of the present application, such as Figure 7 As shown, the method includes the following steps: S710, receiving an image signal; S720, performing an image feature extraction operation on the image signal to obtain a first target feature set and a second target feature set; S730, performing a feature scoring operation on the first target feature set and the second target feature set to obtain a comprehensive feature score; S740, whether the comprehensive feature score is less than a preset score threshold; specifically, if so, executing step S750, if not, executing step S760; S750, generating a first control signal, and sending the first control signal to the piezoelectric brake drive platform; S751, controlling the piezoelectric brake drive platform to perform a first focus adjustment operation according to the first control signal, and completing the focus adjustment operation at a first time node; S752, controlling the camera to collect image signals at a second time node; further, continuing to execute step S710 to repeat the above operation for the latest received image signal; S760, generating a second control signal; S761, sending the image signal to the main control chip; S762, ending.
[0156] It can be seen that in this embodiment, the multi-dimensional feature extraction and scoring of the image signal are realized by the FPGA chip, and the precise displacement control of the piezoelectric brake driving platform and the dynamic calculation of the inertial shaking stabilization time of the liquid observation sample are combined to form a closed-loop focusing mechanism of "acquisition-analysis-adjustment-reacquisition". It can effectively solve the imaging blur problem of liquid observation samples caused by the inertial displacement caused by the focusing movement of the driving platform in scenarios such as microscope cell detection and industrial liquid coating detection. It is beneficial to improve the clarity and color reproduction of the image frames of liquid observation samples collected by the visual inspection system, and improve the accuracy and reliability of the visual inspection system in processing the detection results.
[0157] See also Figure 8 , Figure 8 This is a functional unit block diagram of a focus adjustment system for a piezoelectric brake driving platform provided in an embodiment of the present application, such as Figure 8 As shown, the focus adjustment system 800 of the piezoelectric actuator driven platform includes the following units:
[0158] A receiving unit 810 is configured to receive a first image signal captured by a camera for the liquid observation sample;
[0159] The processing unit 820 is configured to determine a first control signal based on the first image signal and send the first control signal to the piezoelectric brake drive platform, wherein the first control signal is used to control the piezoelectric brake drive platform to perform a first focus adjustment operation, where the adjustment end time node of the first focus movement distance indicated by the first focus adjustment operation is the first time node; control the camera to collect a second image signal at a second time node after the first focus adjustment operation, where the interval between the first time node and the second time node is the first inertial oscillation stabilization time length corresponding to the first focus movement distance of the liquid observation sample; determine a second control signal based on the second image signal, and send the second image signal to the main control chip based on the second control signal;
[0160] In one embodiment, the piezoelectric brake driving platform performs a focus adjustment operation, including: controlling the camera to collect a second image signal at a second time node after the first focus adjustment operation, including: obtaining a preset first mapping relationship table and a second mapping relationship table, the first mapping relationship table including a correspondence between the control signal and the focus movement distance, and the second mapping relationship table including a correspondence between the focus movement distance and the inertial shake stabilization time; querying the first mapping relationship table according to the first control signal to obtain the first focus movement distance corresponding to the first control signal; querying the second mapping relationship table according to the first focus movement distance to obtain the first inertial shake stabilization time corresponding to the first focus movement distance; determining the second time node according to the first time node and the first inertial shake stabilization time; controlling the camera to collect the second image signal at the second time node.
[0161] In one embodiment, the method further includes: obtaining multiple video observation records of the liquid observation sample under multiple different focusing movement distances of the piezoelectric brake driving platform; analyzing each video observation record to obtain the inertial shake stabilization time; and creating the second mapping relationship table based on the analyzed correspondence between the inertial shake stabilization time and the focusing movement distance.
[0162] In one embodiment, the viscosity of the liquid observation sample is a target viscosity, and the second mapping relationship table corresponds to the statistical analysis results of the liquid observation sample with the target viscosity.
[0163] In one embodiment, determining the first control signal based on the first image signal includes: performing a feature extraction operation on the first image signal to obtain a first target feature set and a second target feature set, the first target feature set including multiple first target features under the image clarity dimension, and the second target feature set including multiple second target features under the image color dimension; performing a feature scoring operation based on the first target feature set and the second target feature set to obtain a first comprehensive feature score; determining a first comparison result between the first comprehensive feature score and a preset score threshold; determining that the first comparison result is that the first comprehensive feature score is less than the preset score threshold; and generating the first control signal based on the first comparison result.
[0164] In one embodiment, determining the second control signal based on the second image signal includes: repeatedly performing the feature extraction operation and the feature scoring operation on the second image signal to obtain a second comprehensive feature score; determining a second comparison result between the second comprehensive feature score and a preset score threshold; determining that the second comparison result is that the second comprehensive feature score is not less than the preset score threshold; and generating the second control signal based on the second comparison result, the second control signal being used to instruct the sending of the second image signal to the main control chip.
[0165] In one embodiment, the feature extraction operation is performed on the first image signal to obtain a first target feature set and a second target feature set, including: constructing a grayscale gradient co-occurrence matrix based on the first image signal; and extracting the multiple first target features from the grayscale gradient co-occurrence matrix; and generating the first target feature set based on the multiple first target features; performing an HSV conversion operation based on the first image signal to map the RGB color space to the HSV space; and performing color gamut recognition in the HSV space to obtain a color gamut recognition result; and performing saturation analysis of pixel points based on the color gamut recognition result to obtain a saturation analysis result; determining the multiple second target features based on the color gamut recognition result and the saturation analysis result; and generating the second target feature set based on the multiple second target features.
[0166] In one embodiment, constructing a grayscale gradient co-occurrence matrix according to the first image signal includes: constructing the grayscale gradient co-occurrence matrix using the following formula: ;
[0167] in, represents the number of pixel pairs with grayscale value i and gradient value j in the grayscale gradient co-occurrence matrix G, Indicates that the coordinates in the image are The gray value of the pixel, Indicates that the coordinates in the image are The step of extracting the plurality of first target features from the grayscale gradient co-occurrence matrix comprises: obtaining at least the plurality of first target features shown below using the following formula according to the grayscale gradient co-occurrence matrix: ; ;
[0168] in, represents the image contrast feature, represents the image energy characteristics, is the total number of pixels in the image, is the total number of gray levels, is the maximum value of the gradient.
[0169] In one embodiment, performing an HSV conversion operation according to the first image signal to map the RGB color space to the HSV space includes: performing the HSV conversion operation using the following formula:
[0170] V max(r,g,b);
[0171] ;
[0172] ;
[0173] Where V represents color brightness, S represents color saturation, H represents hue, r represents the normalized red channel value, g represents the normalized green channel value, and b represents the normalized blue channel value.
[0174] The performing color gamut recognition in the HSV space to obtain a color gamut recognition result includes:
[0175] The color gamut pixel ratio is calculated using the following formula, and the color gamut recognition result includes the color gamut pixel ratio:
[0176] InRange(H,S,V)= ;
[0177] ;
[0178] Among them, InRange(H,S,V) is a function to determine whether the pixels in the image are within the target color range. 、 、 represent the hue range, saturation range and lightness range of the target color gamut respectively, Indicates the color gamut pixel ratio, is the total number of pixels in the image, 、 、 Respectively represent the coordinates in the image The hue value, saturation value and lightness value of the pixel point;
[0179] The performing saturation analysis of the pixel points according to the color gamut recognition result to obtain the saturation analysis result includes:
[0180] The saturation mean and saturation variance are calculated using the following formula, and the saturation analysis result includes the saturation mean and the saturation variance:
[0181] ;
[0182] ;
[0183] in, represents the mean saturation value, represents the saturation variance.
[0184] In one embodiment, determining the plurality of second target features based on the color gamut recognition result and the saturation analysis result includes: obtaining at least the plurality of second target features shown below using the following formula based on the color gamut pixel ratio, the saturation mean, and the saturation variance:
[0185] ;
[0186] ;
[0187] ;
[0188] ;
[0189] ;
[0190] in, Indicates the color gamut consistency feature, Indicates the saturation uniformity characteristic, Indicates the color purity characteristics, Indicates the color boundary clarity feature, Indicates the color concentration characteristics, Indicates that the coordinates in the image are The saturation gradient value of the pixel point, represents the total number of pixels within the target color gamut, is the average hue within the target color gamut.
[0191] It can be seen that in this embodiment, the FPGA chip is used to drive the four-point supported piezoelectric brake platform to achieve precise focusing. The preset mapping table and visual algorithm are combined to quantify the inertial shaking and stabilization time of the liquid observation sample, ensuring that the image is collected after the sample is stabilized after the platform moves. At the same time, closed-loop control is achieved through multi-dimensional feature extraction and scoring of the grayscale gradient co-occurrence matrix and the HSV color space, which effectively solves the shaking and blurring problem when focusing on the liquid observation sample, improves imaging clarity and detection accuracy, and is suitable for scenarios such as biomedical microscopy observation and industrial liquid coating detection.
[0192] In addition, an embodiment of the present application also provides a computer storage medium, which stores a computer program that can be loaded by a processor and executes a focus adjustment method for the piezoelectric brake drive platform as described above. The computer-readable storage medium includes, for example: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0193] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0194] In the several embodiments provided in this application, it should be understood that the disclosed methods, devices, and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is merely a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical, or other forms.
[0195] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, the functional units in the various embodiments of the present invention may be integrated into a processing unit, or each unit may be physically included separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0196] The above-mentioned integrated unit implemented as a software functional unit can be stored in a computer-readable storage medium. The software functional unit is stored in a storage medium and includes instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to perform some of the steps of the method described in various embodiments of the present invention. The aforementioned storage medium includes a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a volatile memory, or a non-volatile memory. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM), among other media that can store program code.
[0197] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0198] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0199] Although the present application discloses the above, the present application is not limited thereto. Any person skilled in the art may readily conceive of variations or substitutions, and may make various changes and modifications, including combinations of the above-mentioned functions and implementation steps, including software and hardware implementations, without departing from the spirit and scope of the present application, and all are within the scope of protection of the present application.
Claims
1. A focus adjustment method for a piezoelectric brake driving platform, characterized in that: An FPGA chip is used in a visual inspection system, wherein the visual inspection system includes a camera connected to the FPGA chip, a main control chip, and the piezoelectric brake drive platform, wherein the piezoelectric brake drive platform is used to place a liquid observation sample. The method includes: receiving a first image signal acquired by a camera for the liquid observation sample; Performing a feature extraction operation on the first image signal to obtain a first target feature set and a second target feature set, wherein the first target feature set includes a plurality of first target features in an image clarity dimension, and the second target feature set includes a plurality of second target features in an image color dimension; Performing a feature scoring operation based on the first target feature set and the second target feature set to obtain a first comprehensive feature score; Determining a first comparison result between the first comprehensive feature score and a preset score threshold; Determining that the first comparison result is that the first comprehensive feature score is less than the preset score threshold; generating a first control signal according to the first comparison result, and sending the first control signal to the piezoelectric actuator driving platform, wherein the first control signal is used to control the piezoelectric actuator driving platform to perform a first focus adjustment operation, wherein the adjustment end time node of the first focus movement distance indicated by the first focus adjustment operation is a first time node; Obtaining a preset first mapping relationship table and a second mapping relationship table, wherein the first mapping relationship table includes a correspondence between a control signal and a focus movement distance, and the second mapping relationship table includes a correspondence between a focus movement distance and an inertial shake stabilization time; querying the first mapping relationship table according to the first control signal to obtain a first focusing movement distance corresponding to the first control signal; querying the second mapping relationship table according to the first focus adjustment movement distance to obtain a first inertial shake stabilization time corresponding to the first focus adjustment movement distance; Determining a second time node according to the first time node and the first inertial sway stabilization time; Controlling the camera to collect a second image signal at the second time node, wherein the interval between the first time node and the second time node is the first inertial oscillation stabilization time corresponding to the first focusing movement distance of the liquid observation sample; A second control signal is determined according to the second image signal, and the second image signal is sent to the main control chip according to the second control signal.
2. The method according to claim 1, characterized in that The method further comprises: Acquiring multiple video observation records of the liquid observation sample under multiple different focusing movement distances of the piezoelectric brake driving platform; Analyze each video observation record to obtain the inertial sway stabilization time; The second mapping relationship table is created according to the analyzed correspondence between the inertial shake stabilization time and the focus movement distance.
3. The method according to claim 2, characterized in that The viscosity of the liquid observation sample is the target viscosity, and the second mapping relationship table corresponds to the statistical analysis results of the liquid observation sample of the target viscosity.
4. The method according to claim 3, characterized in that The determining the second control signal according to the second image signal includes: Repeating the feature extraction operation and the feature scoring operation on the second image signal to obtain a second comprehensive feature score; Determining a second comparison result between the second comprehensive feature score and a preset score threshold; Determining that the second comparison result is that the second comprehensive feature score is not less than the preset score threshold; The second control signal is generated according to the second comparison result, and the second control signal is used to instruct the second image signal to be sent to the main control chip.
5. The method according to claim 4, characterized in that The performing a feature extraction operation on the first image signal to obtain a first target feature set and a second target feature set includes: Constructing a grayscale gradient co-occurrence matrix based on the first image signal; extracting the plurality of first target features from the grayscale gradient co-occurrence matrix; and generating the first target feature set based on the plurality of first target features; An HSV conversion operation is performed according to the first image signal to map the RGB color space to the HSV space; and color gamut recognition is performed in the HSV space to obtain a color gamut recognition result; and saturation analysis of the pixel points is performed according to the color gamut recognition result to obtain a saturation analysis result; the multiple second target features are determined according to the color gamut recognition result and the saturation analysis result; and the second target feature set is generated according to the multiple second target features.
6. The method according to claim 5, characterized in that The constructing a grayscale gradient co-occurrence matrix according to the first image signal includes: The grayscale gradient co-occurrence matrix is constructed using the following formula: Among them, G(i,j) represents the number of pixel pairs with gray value i and gradient value j in the gray gradient co-occurrence matrix G, f(x,y) represents the gray value of the pixel point with coordinates (x, y) in the image, Represents the gradient value of the pixel with coordinates (x, y) in the image; The extracting the plurality of first target features from the grayscale gradient co-occurrence matrix includes: According to the grayscale gradient co-occurrence matrix, at least the following multiple first target features are obtained using the following formula: Among them, M1 represents the image contrast feature, M2 represents the image energy feature, N is the total number of image pixels, L is the total number of gray levels, G max is the maximum value of the gradient.
7. The method according to claim 6, characterized in that The performing an HSV conversion operation according to the first image signal to map the RGB color space to the HSV space includes: Use the following formula to perform HSV conversion: V = max(r,g,b); Where V represents color brightness, S represents color saturation, H represents hue, r represents the normalized red channel value, g represents the normalized green channel value, and b represents the normalized blue channel value. The performing color gamut recognition in the HSV space to obtain a color gamut recognition result includes: The color gamut pixel ratio is calculated using the following formula, and the color gamut recognition result includes the color gamut pixel ratio: Among them, InRange(H,S,V) is a function to determine whether the pixel in the image is within the target color range, [H min , H max ]、[S min , S max ]、[V min , V max ] respectively represent the hue range, saturation range and brightness range of the target color gamut, P 色域 Indicates the color gamut pixel ratio, N is the total number of pixels in the image, H(x, y), S(x, y), and V(x, y) respectively represent the hue, saturation, and lightness values of the pixel at coordinate (x, y) in the image; The performing saturation analysis of the pixel points according to the color gamut recognition result to obtain the saturation analysis result includes: The saturation mean and saturation variance are calculated using the following formula, and the saturation analysis result includes the saturation mean and the saturation variance: in, represents the mean saturation value, and Var(S) represents the variance of saturation.
8. The method according to claim 7, characterized in that The determining the plurality of second target features according to the color gamut recognition result and the saturation analysis result includes: According to the color gamut pixel ratio, the saturation mean, and the saturation variance, at least the following multiple second target features are obtained using the following formula: F1=P 色域 ; F2=1-Var(S); Among them, F1 represents the color gamut consistency feature, F2 represents the saturation uniformity feature, F3 represents the color purity feature, F4 represents the color boundary clarity feature, and F5 represents the color concentration feature. Represents the saturation gradient value of the pixel with coordinates (x, y) in the image, N gamut represents the total number of pixels within the target color gamut, is the average hue within the target color gamut.
Citation Information
Patent Citations
Projection focusing control method, device and equipment and readable storage medium
CN114675483A
Liquid lens intelligent focusing method and system based on deep reinforcement learning
CN118075611A