Microscopy imaging measurement automation test method, system, apparatus, storage medium, and program product
By using an automated testing method that combines log-driven and geometry-dependent approaches, the problems of low efficiency and poor consistency in manual verification during microscopic imaging measurements are solved, enabling objective verification and traceability of automated measurement results.
Patent Information
- Application Number
- CN202610543879.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-03
AI Technical Summary
Current microscopic imaging measurements rely on manual verification, which is inefficient and inconsistent. It is difficult to reproduce the results stably in multiple rounds of regression, and the measurement results are prone to distortion and lack traceability. Traditional retrieval methods are prone to misjudgment of results.
An automated testing method based on log-driven and geometric dependency linkage is adopted. By recording timestamps, parsing logs, calculating reference values, and setting error thresholds, automated measurement result verification and geometric dependency linkage verification are achieved, thus building a traceable verification link.
It enables objective verification of microscopic imaging measurement results, solves the problems of correctness verification in dynamic scenarios and integrated verification of multiple types of measurements, and forms a traceable operation record.
Smart Images

Figure CN122335826A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of microscopic imaging measurement, and specifically relates to an automated testing technology for microscopic imaging measurement. Background Technology
[0002] In microscopic imaging measurement software, the industry generally adopts a manual verification method for measuring geometric distances such as between two points, diameter / radius, perpendicular baseline, parallel lines, between straight lines, and center distance. The tester manually measures the distance on the canvas or screenshot and then compares it with the measurement value output by the software to give the test conclusion.
[0003] Traditional manual review methods have obvious drawbacks: Existing measurement and testing methods rely on manual readings and comparisons, which are inefficient and inconsistent, and difficult to reproduce stably in multiple rounds of regression. When there are geometric dependencies such as reference points, reference circles, intersections, and midpoints, the derived graphics and measurement values are easily distorted and difficult to detect in a timely manner after the referenced graphic (base graphic) is dragged or edited. Continuous operations generate a large number of historical logs, and traditional retrieval methods are prone to mixing in irrelevant records, leading to misjudgments of results; Rules for different measurement types are scattered, difficult to reuse, and lack traceable evidence when test anomalies occur. Summary of the Invention
[0004] To address the technical problems mentioned in the background section, this invention proposes an automated testing method, system, device, storage medium, and program product for microscopic imaging measurement.
[0005] To achieve the above-mentioned technical objectives, the technical solution of the present invention is as follows: An automated testing method for microscopic imaging measurements based on log-driven and geometry-dependent linkage includes the following steps: (1) Before each test step, record the current timestamp cur_timestamp, parse only the logs after the timestamp cur_timestamp, and extract the measurement value V output by the software under test; (2) Collect the pixel coordinates of the measurement point, the canvas scaling ratio and resolution, and calculate the reference value R corresponding to the measured value V; (3) Set an error threshold and calculate the error between the measured value V and the reference value R. If the absolute value of the error exceeds the set error threshold, the test step is deemed to have failed; otherwise, the test step is deemed to have passed. (4) Using the timestamp cur_timestamp as a unified anchor point, save the "test operation → log → reference value → judgment result" record corresponding to the timestamp cur_timestamp; If the basic graphic is dragged or the geometric relationship between the measurement point and the basic graphic changes at any point in time during steps (1)-(4) above, the process will be refreshed immediately and return to step (1).
[0006] Further, in step (1), by parsing the log after the timestamp cur_timestamp, the layer identifier, measurement sequence number, measurement value and its unit in the log are obtained. The layer identifier is used to indicate the base graphic on which the measurement point depends, the measurement sequence number is used to indicate the measurement item under the base graphic, and the measurement value and its unit are combined to form the measurement value V.
[0007] Furthermore, the underlying geometric figures upon which the measurement points depend include points, lines, and circles, and the measurement items include the distance between two points, the distance between parallel lines, the distance from a point to a line, the radius, the diameter, and the distance from the center of the circle.
[0008] Furthermore, if the measured value V is not a pixel value, then in step (2), the reference value R needs to be converted to a value in the same physical unit as the measured value V.
[0009] Secondly, this invention also designs an automated testing system for microscopic imaging measurement based on log-driven and geometrically dependent linkage, including the following modules: Log parsing module: used to slice logs based on timestamp cur_timestamp and extract the measurement value V output by the software under test from the logs; The geometric calculation module is used to calculate the reference value R corresponding to the measured value V based on the pixel coordinates of the measurement point, the canvas scaling ratio, and the resolution. Result determination module: used to configure error threshold, calculate the error between the measured value V and the reference value R, and determine whether the test step is passed based on the error and the error threshold; Operation execution module: Used to execute a certain test step operation and monitor whether the basic graphic is dragged or the geometric relationship between the measurement point and the basic graphic changes to trigger process refresh; Log persistence module: Used to save the record of "test operation → log → reference value → judgment result" corresponding to the timestamp cur_timestamp.
[0010] Furthermore, the present invention also provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described automated testing method for microscopic imaging measurement based on log-driven and geometrically dependent linkage.
[0011] Furthermore, the present invention also designs a computer storage medium storing a computer program, which, when executed on a processor, implements the above-mentioned automated testing method for microscopic imaging measurement based on log-driven and geometrically dependent linkage.
[0012] Finally, the present invention also designs a computer program product, including a computer program or instructions, which, when executed by a processor, implement the above-mentioned automated testing method for microscopic imaging measurement based on log-driven and geometrically dependent linkage.
[0013] The beneficial effects of adopting the above technical solution are as follows: This invention addresses the problem of objective verification of measurement results through a log-driven automatic extraction and judgment mechanism; it establishes a geometrically dependent linkage verification link to solve the problem of correctness verification in dynamic linkage scenarios; it uses the start timestamp of the test step as a filtering anchor point for pattern grouping and matching to solve the problem of accurate location of effective logs; and it constructs a unified "log parsing - geometric calculation - threshold judgment" process to solve the problem of integrated verification in multiple types of measurement scenarios, forming a traceable link of "operation action - log fragment - geometric reference value - judgment result" to solve the problem of difficulty in tracing back the cause of failure. Attached Figure Description
[0014] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0015] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0016] This embodiment relates to an automated testing method for microscopic imaging measurements based on log-driven and geometry-dependent linkage, such as... Figure 1 As shown, the steps are as follows: Step 1: Before each test step, record the current timestamp cur_timestamp. Only parse the logs after this timestamp cur_timestamp to extract the measurement value V output by the software under test. Specifically, by parsing the logs after the timestamp cur_timestamp, obtain the layer identifier, measurement sequence number, measurement value, and its unit. The layer identifier indicates the underlying graphic on which the measurement point depends, the measurement sequence number indicates the measurement item under the underlying graphic, and the measurement value and its unit combine to form the measurement value V. Further explanation: the underlying graphic on which the measurement point depends includes, but is not limited to, points, lines, and circles; the measurement items include, but are not limited to, the distance between two points, the distance between parallel lines, the distance from a point to a line, radius, diameter, and distance from the center of a circle.
[0017] Step 2: Collect the pixel coordinates of the measurement point, the canvas scaling ratio, and the resolution, and calculate the reference value R corresponding to the measured value V. If the measured value V obtained in Step 1 is a pixel value, then the reference value R is also a pixel value. If the measured value V has physical units, then the reference value R must also be converted to the corresponding physical units. Specifically, the reference value R is calculated using geometric knowledge, including but not limited to: (1) The distance between two points d = √((x2-x1)^2 + (y2-y1)^2), where (x1,y1) and (x2,y2) are the coordinates of the two points respectively; (2) Radius r = √((x-xc)^2 + (y-yc)^2), (xc,yc) are the coordinates of the center of the circle, and (x,y) are the measurement points on the circle; (3) Diameter D = 2r; (4) The distance between the centers L = √((xc2-xc1)^2 + (yc2-yc1)^2), where (xc1,yc1) and (xc2,yc2) are the centers of the two circles, respectively; (5) The distance from the point to the line d0 = |A*x0 + B*y0 + C| / √(A^2 + B^2), (x0,y0) are the coordinates of the point, and Ax+By+C=0 is the equation of the line.
[0018] Step 3: Set an error threshold and calculate the error between the measured value V and the reference value R. If the absolute value of the error exceeds the set error threshold, the test step is deemed to have failed; otherwise, the test step is deemed to have passed. Example 1: Distance between two points: Let point A be (10,10) and point B be (13,14). The distance between the two points d = √((13-10)^2 + (14-10)^2) = √(9+16) = 5. If the software measured value V = 5.2 and the set threshold is 0.5, the allowed range is [4.5, 5.5], and the test is deemed to have passed. Example 2: Diameter: If the center of the circle is O (10,10) and point P is (13,14), the diameter D = 10. If the software measured value is 9.3 and the set threshold is 1, the allowed range is [9.0, 11.0], and the test is deemed to have passed.
[0019] Step 4: Using the timestamp cur_timestamp as a unified anchor, save the complete chain record of "test operation → log → reference value → judgment result" corresponding to the timestamp cur_timestamp to achieve traceable reproducibility. At any point in steps 1-4 above, if the basic graphic is dragged or the geometric relationship between the measurement point and the basic graphic changes, the process is immediately refreshed, returning to step 1. Example 3: First, draw a circle with a diameter, then have the measurement point or measurement line (the measurement line can also be represented by a measurement point) reference this circle. In this way, the circle is the basic graphic, and the intersection point or measurement line is the graphic that depends on it. Subsequently, once the circle is dragged, the software will automatically update the circle's own parameters and further update the positions and measurement values of the related measurement points / measurement lines. The new log after the drag is read, the updated measurement value V is obtained, and the reference value R is recalculated according to the new position after the drag. Then, a threshold judgment is performed to determine whether the result after the linkage refresh is correct.
[0020] This embodiment also relates to an automated testing system for microscopic imaging measurement based on log-driven and geometry-dependent linkage, including the following modules: Log parsing module: used to slice logs based on timestamp cur_timestamp and extract the measurement value V output by the software under test from the logs; The geometric calculation module is used to calculate the reference value R corresponding to the measured value V based on the pixel coordinates of the measurement point, the canvas scaling ratio, and the resolution. Result determination module: used to configure error threshold, calculate the error between the measured value V and the reference value R, and determine whether the test step is passed based on the error and the error threshold; Operation execution module: Used to execute a certain test step operation and monitor whether the basic graphic is dragged or the geometric relationship between the measurement point and the basic graphic changes to trigger process refresh; Log persistence module: Used to save the record of "test operation → log → reference value → judgment result" corresponding to the timestamp cur_timestamp.
[0021] This embodiment also relates to a computer device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the above-described contents. This embodiment also relates to a computer storage medium storing a computer program, which, when executed on a processor, implements the above-described contents. This embodiment also relates to a computer program product, including a computer program or instructions, which, when executed by a processor, implements the above-described contents.
[0022] The embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.
Claims
1. A method for automated testing of microscopy imaging measurements based on log-driven and geometry-dependent linkages, characterized in that, Includes the following steps: (1) Before each test step, record the current timestamp cur_timestamp, parse only the logs after the timestamp cur_timestamp, and extract the measurement value V output by the software under test; (2) Collect the pixel coordinates of the measurement point, the canvas scaling ratio and resolution, and calculate the reference value R corresponding to the measured value V; (3) Set an error threshold and calculate the error between the measured value V and the reference value R. If the absolute value of the error exceeds the set error threshold, the test step is deemed to have failed; otherwise, the test step is deemed to have passed. (4) Using the timestamp cur_timestamp as a unified anchor point, save the "test operation → log → reference value → judgment result" record corresponding to the timestamp cur_timestamp; If the basic graphic is dragged or the geometric relationship between the measurement point and the basic graphic changes at any point in time during steps (1)-(4) above, the process will be refreshed immediately and return to step (1).
2. The method of claim 1, wherein, In step (1), by parsing the log after the timestamp cur_timestamp, the layer identifier, measurement sequence number, measurement value and its unit in the log are obtained. The layer identifier is used to indicate the base graphic on which the measurement point depends, the measurement sequence number is used to indicate the measurement item under the base graphic, and the measurement value and its unit are combined to form the measurement value V.
3. The method of claim 2, wherein, The underlying geometric figures upon which the measurement points are based include points, lines, and circles, and the measurement items include the distance between two points, the distance between parallel lines, the distance from a point to a line, the radius, the diameter, and the distance from the center of the circle.
4. The method of claim 1, wherein, If the measured value V is not a pixel value, then in step (2), the reference value R needs to be converted to a value in the same physical unit as the measured value V.
5. A log-driven and geometry-dependent linkage-based automated test system for microscopy imaging measurements, characterized in that, Includes the following modules: Log parsing module: used to slice logs based on timestamp cur_timestamp and extract the measurement value V output by the software under test from the logs; The geometric calculation module is used to calculate the reference value R corresponding to the measured value V based on the pixel coordinates of the measurement point, the canvas scaling ratio, and the resolution. Result determination module: used to configure error threshold, calculate the error between the measured value V and the reference value R, and determine whether the test step is passed based on the error and the error threshold; Operation execution module: Used to execute a certain test step operation and monitor whether the basic graphic is dragged or the geometric relationship between the measurement point and the basic graphic changes to trigger process refresh; Log persistence module: Used to save the "Test Operation → Log → Reference Value → Judgment Result" record corresponding to the timestamp cur_timestamp. 6.A computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer device is characterized in that: The processor is used to execute the computer program to implement the automated testing method for microscopic imaging measurement based on log-driven and geometrically dependent linkage as described in any one of claims 1-4.
7. A computer storage medium storing a computer program, characterized in that: When the computer program is executed on the processor, it implements the automated testing method for microscopic imaging measurement based on log-driven and geometrically dependent linkage as described in any one of claims 1-4.
8. A computer program product comprising computer programs or instructions, characterized in that: The computer program or instructions, when executed by the processor, implement the log-driven and geometry-dependent linkage-based automated test method for microscopic imaging measurement according to any one of claims 1-4.
