QT-based 3D imaging parameter real-time monitoring visualization method and system
By constructing a parameter dependency tree and performing incremental calculations using the QT framework, a 2D imaging preview image is generated in real time. This solves the problems of inaccurate parameter settings and real-time visualization in traditional 3D binocular cameras, improving imaging efficiency and visual comfort.
Patent Information
- Application Number
- CN202511024514.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional 3D binocular cameras suffer from problems such as inaccurate parallax control, poor scene adaptability, disconnect between display and shooting, and inability to visualize in real time, resulting in poor stereoscopic imaging effects.
A real-time monitoring and visualization method for 3D imaging parameters based on the QT framework is adopted. Parameters are received through input controls in a graphical user interface, a parameter dependency tree is constructed and hierarchical calculations are performed. Combined with incremental calculation and feedback mechanisms, a 2D imaging effect preview image is generated in real time.
It improves the efficiency and real-time performance of 3D imaging parameter adjustment, enhances visual comfort, and ensures consistency between parameter settings and display effects.
Smart Images

Figure CN120953389A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, specifically to a method and system for real-time monitoring and visualization of 3D imaging parameters based on QT. Background Technology
[0002] In the process of shooting with a 3D stereo camera, the parameter settings of the stereo camera directly affect the stereoscopic imaging effect. However, traditional methods have many shortcomings, mainly in the following aspects:
[0003] 1. Inaccurate parallax control: During the shooting process, it is difficult to quantify the range of parallax that is comfortable for the human eye, which can easily lead to viewer fatigue or insufficient sense of depth.
[0004] 2. Poor scene adaptability: Different shooting scenes often require dynamic adjustment of parameters, but existing technology cannot adapt quickly and is difficult to meet the needs of diverse scenes.
[0005] 3. Disconnect between display and shooting: The lack of a mathematical model for shooting parameters and display devices leads to inconsistencies between the shooting effect and the final display.
[0006] 4. Inability to visualize in real time: Although precise values can be calculated through the model, users cannot intuitively perceive the scene based on the numerical values, resulting in a significant reduction in the final display effect.
[0007] Therefore, a method is needed to calculate relevant parameters and preview imaging effects in real time to solve the above problems. Summary of the Invention
[0008] The technical problem to be solved by this invention is how to visualize the parameters in real time after adjustment in order to improve the efficiency and quality of 3D binocular camera shooting.
[0009] This invention solves the above-mentioned technical problems through the following technical means: a real-time monitoring and visualization method for 3D imaging parameters based on QT (Qt Framework, a cross-platform C++ graphical user interface application framework), the method comprising:
[0010] S1. Receive input parameters through the graphical user interface input controls of the QT framework;
[0011] S2. Calculate 3D imaging-related parameters hierarchically based on input parameters, and construct a parameter dependency tree data structure to store parameters and their dependencies; the parameter dependency tree includes a root node, a top node, a trunk node, a branch node, a child node, and a leaf node, and each node forms a unidirectional dependency relationship; when the root node parameter is updated, locate the associated node according to the parameter dependency tree and trigger the incremental calculation process;
[0012] S3. Using the QGraphicsView graphics rendering control of the QT framework, combined with the layered calculation results of step S2, a 2D imaging effect preview image is generated in real time.
[0013] This invention significantly improves the efficiency and real-time performance of 3D imaging parameter adjustment by constructing a parameter dependency tree and a real-time parameter monitoring and feedback mechanism, combined with incremental and hierarchical calculation methods. The dependency tree clearly defines the dependencies between parameters, enabling incremental calculation to accurately locate affected parameters, reducing unnecessary computation and further improving efficiency. The bidirectional parameter synchronization mechanism automatically optimizes parameter settings, enhancing the visual comfort of 3D imaging. Real-time generation of 2D imaging renderings visually demonstrates the effect of parameter adjustments, assisting users in precisely optimizing 3D imaging parameters.
[0014] Furthermore, the input parameters in S1 include: out-of-screen distance N, in-screen distance F, inter-eye distance E, viewing distance Z, sensor width Ws, focal length FL, distance to distant objects Nc, distance to near objects Fc, and screen width W.
[0015] Furthermore, the hierarchical calculation in S2 includes the following stages:
[0016] Phase 1: Based on the out-of-screen distance N, in-screen distance F, interpupillary distance E, and viewing distance Z in the input parameters, calculate the out-of-screen parallax dN, in-screen parallax dF, and parallax ratio R.
[0017] Second stage: Combine the parallax ratio R with the sensor width Ws, focal length FL, distance to distant object Nc and distance to near object Fc to calculate the field of view angle θ, zero parallax plane distance Zc and zero parallax plane width Wc.
[0018] The third stage: Based on the out-of-screen parallax dN, zero parallax plane distance Zc, and zero parallax plane width Wc, combined with the near object distance Fc, screen width W, out-of-screen distance N, in-screen distance F, and far object distance Nc in the input parameters, the camera spacing A and depth compression ratio Rd are calculated.
[0019] Furthermore, the node structure of the parameter dependency tree is defined as follows:
[0020] Root node parameters: interpupillary distance E, viewing distance Z, out-of-screen distance N, in-screen distance F, sensor width Ws, focal length FL, near object distance Nc, far object distance Fc, screen width W;
[0021] Top node parameters:
[0022] Out-of-screen parallax dN: depends on the out-of-screen distance N, interpupillary distance E, and viewing distance Z of the root node;
[0023] In-screen parallax dF: depends on the in-screen distance F, interpupillary distance E, and viewing distance Z of the root node;
[0024] Field of view θ: depends on the sensor width Ws and focal length FL of the root node;
[0025] The compression ratio Rd depends on the root node's out-of-screen distance N, in-screen distance F, near-object distance Fc, and far-object distance Nc.
[0026] Dry node parameters:
[0027] Parallax ratio R: depends on the out-of-screen parallax dN and in-screen parallax dF of the top node;
[0028] Branch node parameters:
[0029] Zero parallax plane distance Zc: depends on the parallax ratio R of the stem node, and the near distance Nc and far distance Fc of the root node;
[0030] Child node parameters:
[0031] Zero disparity plane width Wc: depends on the field of view angle θ of the top node and the zero disparity plane distance Zc of the branch nodes;
[0032] Leaf node parameters:
[0033] Camera spacing A: depends on the near distance Nc of the root node and the screen width W, the off-screen parallax dN of the top node, the zero parallax plane distance Zc of the branch nodes and the zero parallax plane width Wc of the child nodes.
[0034] Furthermore, the methods for constructing parameter dependency tree data structures in S2 include:
[0035] The QT framework uses the QHash<node parameter name, QList<dependent node parameter name>> data structure to store node dependencies. Before building the parameter dependency tree, a topological sorting algorithm is used to check for loops in the dependencies. If a loop exists, an error message is displayed. The parameter calculation order is executed sequentially from the root node parameter to the leaf node parameter according to the node level.
[0036] Furthermore, the incremental calculation includes:
[0037] When the root node parameters are updated:
[0038] The parameter dependency tree queries the top node parameter that directly depends on the root node parameter; starting from the top node parameter, it recursively traverses the downstream nodes according to the dependency relationship until the leaf node parameter, marking the affected node path; only the node parameters on the affected node path are recalculated; the calculation result is stored in a cache container, which includes the parameter name and the calculation result, and the value of the affected node parameter is synchronized to the data display control of the graphical user interface.
[0039] Furthermore, the incremental calculation also includes:
[0040] When a user interacts with a QScrollBar or a QDoubleSpinBox, the system only records the parameter changes without triggering calculations.
[0041] When the user stops interacting with the QScrollBar and triggers the SliderReleased signal, an asynchronous calculation thread is started to perform incremental calculations.
[0042] Furthermore, the method further includes establishing a bidirectional parameter synchronization mechanism, as detailed below:
[0043] Forward synchronization: When the user modifies the input parameters in the graphical user interface, the system starts an asynchronous thread through QThread, triggers the incremental calculation process, and synchronously updates the graphical user interface data display control with the calculation results;
[0044] Reverse synchronization: When the camera spacing A or depth compression ratio Rd exceeds the human visual comfort threshold, the system performs the following operations:
[0045] The out-of-screen parallax dN is set as the target value within a preset comfort range. Using the target value dN as a known quantity, the input parameter values are solved in reverse based on the reversibility of hierarchical calculation. The solved input parameter values are updated as the new root node, triggering incremental calculation. The recalculated parameter values are automatically written into the corresponding graphical user interface input controls to complete parameter calibration. If there is no solution or multiple solutions in the reverse calculation, the system retains the original input parameter values and displays a calibration failure warning in the graphical user interface.
[0046] Furthermore, the 2D imaging effect preview image includes:
[0047] Spatial relationship between the optical axis angle of the binocular camera and the zero parallax plane; projection markings of near object distance Nc and far object distance Fc on the imaging plane; real-time numerical display of field of view θ and camera spacing A.
[0048] This invention also provides a QT-based real-time monitoring and visualization system for 3D imaging parameters, the system comprising:
[0049] Parameter input module: Used to receive input parameters through the graphical user interface input controls of the QT framework;
[0050] The parameter calculation and dependency management module is used to calculate 3D imaging-related parameters hierarchically based on input parameters and construct a parameter dependency tree data structure to store parameters and their dependencies. The parameter dependency tree includes a root node, a top node, a trunk node, a branch node, a child node, and a leaf node, and each node forms a unidirectional dependency relationship. When the root node parameter is updated, the associated node is located according to the parameter dependency tree and the incremental calculation process is triggered.
[0051] Imaging effect preview module: Used to generate a 2D imaging effect preview image in real time by combining the layered calculation results of the parameter calculation and dependency management module with the QGraphicsView graphics rendering control of the QT framework.
[0052] The advantages of this invention are:
[0053] This invention significantly improves the efficiency and real-time performance of 3D imaging parameter adjustment by constructing a parameter dependency tree and a real-time parameter monitoring and feedback mechanism, combined with incremental and hierarchical calculation methods. The dependency tree clearly defines the dependencies between parameters, enabling incremental calculation to accurately locate affected parameters, reducing unnecessary computation and further improving efficiency. The bidirectional parameter synchronization mechanism automatically optimizes parameter settings, enhancing the visual comfort of 3D imaging. Real-time generation of 2D imaging renderings visually demonstrates the effect of parameter adjustments, assisting users in precisely optimizing 3D imaging parameters. Attached Figure Description
[0054] Figure 1 This is a flowchart of a QT-based real-time monitoring and visualization method for 3D imaging parameters according to Embodiment 1 of the present invention;
[0055] Figure 2 This is a flowchart of the main interface of Embodiment 1 of the present invention;
[0056] Figure 3 This is a diagram of the main interface of Embodiment 1 of the present invention;
[0057] Figure 4 This is a flowchart illustrating the real-time preview dynamic interaction of Embodiment 1 of the present invention;
[0058] Figure 5 This is a schematic diagram of the parameter dependency tree in Embodiment 1 of the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Example 1
[0061] like Figure 1 The diagram shows a flowchart of a QT-based method for real-time monitoring and visualization of 3D imaging parameters. This method includes:
[0062] S1. Receive input parameters through the graphical user interface input controls of the QT framework;
[0063] Specifically, the input parameters include: out-of-screen distance N, in-screen distance F, inter-eye distance E, viewing distance Z, sensor width Ws, focal length FL, distance to distant objects Nc, distance to near objects Fc, and screen width W.
[0064] The interface design was completed using the QT framework. QT is a cross-platform C++ graphical user interface application development framework, typically using C++ and C languages. The UI controls and layout managers of the QT graphics library were used to create the interface display and interaction logic that meet user needs.
[0065] like Figure 2 The flowchart shown is for the main interface, which is divided into four sub-interfaces: scene display interface, shooting scene interface, calculation result interface, and imaging effect preview interface.
[0066] Among them, such as Figure 3 The image shown is a screenshot of the main interface. The scene display interface uses controls such as QDoubleSpinBox and QScrollBar from the QT graphics library to receive input parameter values such as eye spacing E, viewing distance Z, screen width W, out-of-screen distance N, and in-screen distance F, and uses controls such as QLCDNumber to display out-of-screen parallax dN, in-screen parallax dF, and parallax ratio R.
[0067] The shooting scene interface receives input parameter values such as near object distance Fc, far object distance Nc, sensor width Ws, and focal length FL, and displays calculated values such as camera spacing A and depth compression ratio Rd.
[0068] The calculation results interface displays the calculated values of the screen's out-of-screen parallax dN, in-screen parallax dF, parallax ratio R, camera spacing A, depth compression ratio Rd, field of view θ, zero parallax plane width Wc, and zero parallax plane distance Zc.
[0069] The image preview interface uses the QGraphicsView control, which can draw 2D graphics and supports visualization of the optical axis, zero parallax plane, and object projection.
[0070] S2. Calculate 3D imaging-related parameters hierarchically based on input parameters, and construct a parameter dependency tree data structure to store parameters and their dependencies; the parameter dependency tree includes a root node, a top node, a trunk node, a branch node, a child node, and a leaf node, and each node forms a unidirectional dependency relationship; when the root node parameter is updated, locate the associated node according to the parameter dependency tree and trigger the incremental calculation process;
[0071] Specifically, the hierarchical calculation in S2 includes the following stages:
[0072] Phase 1: Based on the out-of-screen distance N, in-screen distance F, interpupillary distance E, and viewing distance Z in the input parameters, calculate the out-of-screen parallax dN, in-screen parallax dF, and parallax ratio R.
[0073] dN=(N * E) / (ZN), dF=(F * E) / (Z+F), R=dN / dF.
[0074] Second stage: Combine the parallax ratio R with the sensor width Ws, focal length FL, distance to distant object Nc and distance to near object Fc to calculate the field of view angle θ, zero parallax plane distance Zc and zero parallax plane width Wc.
[0075]
[0076] The third stage: Based on the out-of-screen parallax dN, zero parallax plane distance Zc, and zero parallax plane width Wc, combined with the near object distance Fc, screen width W, out-of-screen distance N, in-screen distance F, and far object distance Nc in the input parameters, the camera spacing A and depth compression ratio Rd are calculated.
[0077] Zc=(R+1) / ((1 / Nc)+(R / Fc)), Wc=2 * Zc * θ.
[0078] like Figure 5 The diagram shown is a schematic of the parameter dependency tree. Figure 5 The direction of the middle arrow indicates a unidirectional dependency relationship between parameters; the parameter at the end of the arrow depends on the parameter at the beginning of the arrow.
[0079] Specifically, the node structure of the parameter-dependent tree is defined as follows:
[0080] Root node parameters: interpupillary distance E, viewing distance Z, out-of-screen distance N, in-screen distance F, sensor width Ws, focal length FL, near object distance Nc, far object distance Fc, screen width W;
[0081] Top node parameters:
[0082] Out-of-screen parallax dN: depends on the out-of-screen distance N, interpupillary distance E, and viewing distance Z of the root node;
[0083] In-screen parallax dF: depends on the in-screen distance F, interpupillary distance E, and viewing distance Z of the root node;
[0084] Field of view θ: depends on the sensor width Ws and focal length FL of the root node;
[0085] The compression ratio Rd depends on the root node's out-of-screen distance N, in-screen distance F, near-object distance Fc, and far-object distance Nc.
[0086] Dry node parameters:
[0087] Parallax ratio R: depends on the out-of-screen parallax dN and in-screen parallax dF of the top node;
[0088] Branch node parameters:
[0089] Zero parallax plane distance Zc: depends on the parallax ratio R of the stem node, and the near distance Nc and far distance Fc of the root node;
[0090] Child node parameters:
[0091] Zero disparity plane width Wc: depends on the field of view angle θ of the top node and the zero disparity plane distance Zc of the branch nodes;
[0092] Leaf node parameters:
[0093] Camera spacing A: depends on the near distance Nc of the root node and the screen width W, the off-screen parallax dN of the top node, the zero parallax plane distance Zc of the branch nodes and the zero parallax plane width Wc of the child nodes.
[0094] Methods for constructing parameter dependency tree data structures include:
[0095] The dependencies between data nodes are stored in containers of type QHash<node parameter name> and QList<dependent node parameter name>>. Before constructing the parameter dependency tree, a topological sorting algorithm is used to check whether there are loops in the dependencies. If a loop exists, an error message is displayed. The parameter calculation order is executed hierarchically in the order of "root node → top node → trunk node → branch node → child node → leaf node".
[0096] The incremental calculation includes:
[0097] When the root node parameters are updated:
[0098] The parameter dependency tree queries the top node parameter that directly depends on the root node parameter; starting from the top node parameter, it recursively traverses the downstream nodes according to the dependency relationship until the leaf node parameter, marking the affected node path; only the node parameters on the affected node path are recalculated; the calculation result is stored in a cache container, which includes the parameter name and the calculation result, and the value of the affected node parameter is synchronized to the data display control of the graphical user interface.
[0099] In this embodiment, the calculation result is cached using the QMap container class as follows:
[0100] Using QMap<QString,QVariant> Store parameter names and their corresponding calculation results, where the key is the parameter name, which is of string type; and the value is the calculation result of the parameter, which is compatible with multiple data types using QVariant.
[0101] The incremental calculation also includes:
[0102] When a user interacts with a QScrollBar or a QDoubleSpinBox, the system only records the parameter changes without triggering calculations.
[0103] When the user stops interacting with the QScrollBar and triggers the SliderReleased signal, an asynchronous calculation thread is started to perform incremental calculations.
[0104] The method further includes establishing a bidirectional parameter synchronization mechanism, as detailed below:
[0105] Forward synchronization: When the user modifies the input parameters in the graphical user interface, the system starts an asynchronous thread through QThread, triggers the incremental calculation process, and synchronously updates the graphical user interface data display control with the calculation results;
[0106] Reverse synchronization: When the camera spacing A or depth compression ratio Rd exceeds the human visual comfort threshold, the system performs the following operations:
[0107] The out-of-screen parallax dN is set as the target value within a preset comfort range. Using the target value dN as a known quantity, the input parameter values are solved in reverse based on the reversibility of hierarchical calculation. The solved input parameter values are updated as the new root node, triggering incremental calculation. The recalculated parameter values are automatically written into the corresponding graphical user interface input controls to complete parameter calibration. If there is no solution or multiple solutions in the reverse calculation, the system retains the original input parameter values and displays a calibration failure warning in the graphical user interface.
[0108] For example: when the camera spacing A exceeds the human eye's visual comfort threshold...
[0109] Step 1: Set the target value for the out-of-screen parallax.
[0110] Choose the median value dN within the comfortable out-of-screen parallax range.
[0111] Step 2: Calculate the root node parameters (out-of-screen distance N)
[0112] Based on the reversibility of hierarchical computation, Given the target's dN, E, and Z, the distance to the screen can be deduced.
[0113] Step 3: Calculate the new camera spacing A
[0114] Using the out-of-screen distance N obtained through reverse calculation as the new root node, trigger parameter dependency tree calculation, and update the camera spacing A (formula). (and other related parameters) to ensure that all parameters work together to meet the imaging effect optimization goal.
[0115] S3. Using the QGraphicsView graphics rendering control in the QT framework, combined with the layered calculation results, a 2D imaging effect preview image is generated in real time.
[0116] like Figure 4 The flowchart shown illustrates the real-time preview of dynamic interaction. Using QT's QGraphicsView graphics rendering control, combined with layered calculation results, a 2D imaging preview is generated in real time. This includes drawing the object size using straight lines, dashed lines, dots, and ellipses; moving geometric lines within the scene; and adding numerical annotations as needed to ultimately achieve the imaging preview. The preview includes: the spatial relationship between the optical axis angle of the binocular cameras and the zero-parallax plane; the optical axis simulated by straight lines, and the zero-parallax plane marked by dashed lines; the projection position of the photographed object on the imaging plane, marked with dots; and numerical annotations of key parameters (such as the field of view angle θ and camera spacing A). This visual preview solves the problem of "disconnect between parameter settings and the final display effect," dynamically displaying the parameter results of layered calculations using a visual layout. This preview serves as an intuitive feedback interface for parameter adjustments, allowing users to observe real-time changes in parameters and fine-tune input parameters to optimize the visual comfort of 3D imaging and improve its accuracy.
[0117] For example, when a user adjusts the 'out-of-screen distance N' from 0.02m to 0.05m, the dashed line representing the zero parallax plane in the preview image will move towards the distant object, and at the same time, the labeled value of the camera spacing A will be updated from 0.06m to 0.12m, intuitively showing the relationship between the parameters.
[0118] Example 2
[0119] This invention also provides a QT-based real-time monitoring and visualization system for 3D imaging parameters, the system comprising:
[0120] Parameter input module: Used to receive input parameters through the graphical user interface input controls of the QT framework;
[0121] The parameter calculation and dependency management module is used to calculate 3D imaging-related parameters hierarchically based on input parameters, and to construct a parameter dependency tree data structure to store the parameters and their dependencies. The parameter dependency tree includes a root node, a top node, a trunk node, a branch node, a child node, and a leaf node, with each node forming a unidirectional dependency relationship. When the root node parameter is updated, the associated node is located according to the parameter dependency tree and the incremental calculation process is triggered.
[0122] Parameter calculation unit: Used to calculate 3D imaging-related parameters layer by layer based on input parameters. The calculation process consists of three stages:
[0123] The parallax parameter calculation unit is used to calculate the out-of-screen parallax dN, the in-screen parallax dF, and the parallax ratio R based on the out-of-screen distance N, the in-screen distance F, the interpupillary distance E, and the viewing distance Z in the input parameters.
[0124] Field of view and zero parallax plane parameter calculation unit: used to combine the parallax ratio R with the sensor width Ws, focal length FL, distance to distant object Nc and distance to near object Fc to calculate the field of view angle θ, zero parallax plane distance Zc and zero parallax plane width Wc;
[0125] Camera and Depth Parameter Calculation Unit: Based on the out-of-screen parallax dN, zero parallax plane distance Zc, and zero parallax plane width Wc, combined with the near object distance Fc, screen width W, out-of-screen distance N, in-screen distance F, and far object distance Nc in the input parameters, the camera spacing A and depth compression ratio Rd are calculated.
[0126] Parameter dependency management unit: used to construct a parameter dependency tree data structure to store parameters and their dependencies; the parameter dependency tree includes a root node, top node, trunk node, branch node, child node and leaf node, and each node forms a one-way dependency relationship.
[0127] Incremental calculation unit: When the root node parameter is updated, it queries the top node parameter that directly depends on the root node parameter through the parameter dependency tree; starting from the top node parameter, it recursively traverses the downstream nodes according to the dependency relationship until the leaf node, marking the affected node path; it recalculates only the node parameters of the affected node path; the calculation result is stored in a cache container, which includes the parameter name and the calculation result, and the value of the affected node parameter is synchronized to the data display control of the graphical user interface.
[0128] When a user interacts with a QScrollBar or a QDoubleSpinBox, the system only records the parameter changes without triggering calculations.
[0129] When the user stops interacting with the QScrollBar and triggers the SliderReleased signal, an asynchronous calculation thread is started to perform incremental calculations.
[0130] Forward synchronization unit: When the user modifies the input parameters in the graphical user interface, the system starts an asynchronous thread through QThread to trigger the incremental calculation process and synchronously update the graphical user interface data display control with the calculation results;
[0131] Reverse synchronization unit: Used to perform the following operations when the camera spacing A or depth compression ratio Rd exceeds the human eye's visual comfort threshold:
[0132] The out-of-screen parallax dN is set as the target value within a preset comfort range. Using the target value dN as a known quantity, the input parameter values are solved in reverse based on the reversibility of hierarchical calculation. The solved input parameter values are updated as the new root node, triggering incremental calculation. The recalculated parameter values are automatically written into the corresponding graphical user interface input controls to complete parameter calibration. If there is no solution or multiple solutions in the reverse calculation, the system retains the original input parameter values and displays a calibration failure warning in the graphical user interface.
[0133] Imaging effect preview module: Used to generate a 2D imaging effect preview image in real time by combining the layered calculation results of the parameter calculation and dependency management module with the QGraphicsView graphics rendering control of the QT framework.
[0134] The preview image generation unit combines the layered calculation results with the QGraphicsView graphics rendering control to generate a real-time preview image of the 2D imaging effect. This preview image includes the spatial relationship between the optical axis angle of the binocular cameras and the zero-parallax plane; the projection labels of the near object distance Nc and the far object distance Fc onto the imaging plane; and the real-time numerical display of the field of view θ and the camera spacing A. Users can observe the real-time changes in the parameters in the preview image and fine-tune the input parameters to optimize the visual comfort of the 3D imaging.
[0135] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for real-time monitoring and visualization of 3D imaging parameters based on QT, characterized in that, Includes the following steps: S1. Receive input parameters through the graphical user interface input controls of the QT framework; S2. Calculate 3D imaging-related parameters hierarchically based on input parameters, and construct a parameter dependency tree data structure to store the parameters and their dependencies; the parameter dependency tree includes a root node, a top node, a trunk node, a branch node, a child node, and a leaf node, with unidirectional dependencies between each node; When the root node parameters are updated, the associated nodes are located based on the parameter dependency tree and the incremental calculation process is triggered. S3. Using the QGraphicsView graphics rendering control of the QT framework, combined with the layered calculation results of step S2, a 2D imaging effect preview image is generated in real time.
2. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 1, characterized in that, The input parameters in S1 include: screen-out distance N, screen-in distance F, interpupillary distance E, viewing distance Z, sensor width Ws, focal length FL, distance to distant objects Nc, distance to near objects Fc, and screen width W.
3. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 2, characterized in that, The hierarchical calculation in S2 includes the following stages: Phase 1: Based on the out-of-screen distance N, in-screen distance F, interpupillary distance E, and viewing distance Z in the input parameters, calculate the out-of-screen parallax dN, in-screen parallax dF, and parallax ratio R. Second stage: Combine the parallax ratio R with the sensor width Ws, focal length FL, distance to distant object Nc and distance to near object Fc to calculate the field of view angle θ, zero parallax plane distance Zc and zero parallax plane width Wc. The third stage: Based on the out-of-screen parallax dN, zero parallax plane distance Zc, and zero parallax plane width Wc, combined with the near object distance Fc, screen width W, out-of-screen distance N, in-screen distance F, and far object distance Nc in the input parameters, the camera spacing A and depth compression ratio Rd are calculated.
4. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 1, characterized in that, The node structure of the parameter dependency tree is defined as follows: Root node parameters: interpupillary distance E, viewing distance Z, out-of-screen distance N, in-screen distance F, sensor width Ws, focal length FL, near object distance Nc, far object distance Fc, screen width W; Top node parameters: Out-of-screen parallax dN: depends on the out-of-screen distance N, interpupillary distance E, and viewing distance Z of the root node; In-screen parallax dF: depends on the in-screen distance F, interpupillary distance E, and viewing distance Z of the root node; Field of view θ: depends on the sensor width Ws and focal length FL of the root node; The compression ratio Rd depends on the root node's out-of-screen distance N, in-screen distance F, near-object distance Fc, and far-object distance Nc. Dry node parameters: Parallax ratio R: depends on the out-of-screen parallax dN and in-screen parallax dF of the top node; Branch node parameters: Zero parallax plane distance Zc: depends on the parallax ratio R of the stem node, and the near distance Nc and far distance Fc of the root node; Child node parameters: Zero disparity plane width Wc: depends on the field of view angle θ of the top node and the zero disparity plane distance Zc of the branch nodes; Leaf node parameters: Camera spacing A: depends on the near distance Nc of the root node and the screen width W, the off-screen parallax dN of the top node, the zero parallax plane distance Zc of the branch nodes and the zero parallax plane width Wc of the child nodes.
5. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 4, characterized in that, Methods for constructing parameter dependency tree data structures include: The QT framework uses the QHash<node parameter name, QList<dependent node parameter name>> data structure to store node dependencies. Before building the parameter dependency tree, a topological sorting algorithm is used to check for loops in the dependencies. If a loop exists, an error message is displayed. The parameter calculation order is executed sequentially from the root node parameter to the leaf node parameter according to the node level.
6. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 1, characterized in that, The incremental calculation includes: When the root node parameters are updated: The parameter dependency tree queries the top node parameter that directly depends on the root node parameter; starting from the top node parameter, it recursively traverses the downstream nodes according to the dependency relationship until the leaf node parameter, marking the affected node path; only the node parameters on the affected node path are recalculated; the calculation result is stored in a cache container, which includes the parameter name and the calculation result, and the value of the affected node parameter is synchronized to the data display control of the graphical user interface.
7. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 6, characterized in that, The incremental calculation also includes: When a user interacts with a QScrollBar or a QDoubleSpinBox, the system only records the parameter changes without triggering calculations. When the user stops operating and triggers the SliderReleased signal of QScrollBar, an asynchronous calculation thread is started to perform incremental calculation.
8. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 1, characterized in that, The method further includes establishing a bidirectional parameter synchronization mechanism, as detailed below: Forward synchronization: When the user modifies the input parameters in the graphical user interface, the system starts an asynchronous thread through QThread, triggers the incremental calculation process, and synchronously updates the graphical user interface data display control with the calculation results; Reverse synchronization: When the camera spacing A or depth compression ratio Rd exceeds the human eye's visual comfort threshold, the system performs the following operations: Set the out-of-screen parallax dN as the target value within a preset comfort range. Using the target value dN as a known quantity, solve the input parameter values in reverse based on the reversibility of hierarchical calculation. Update the solved input parameter values as the new root node and trigger incremental calculation. Automatically write the recalculated parameter values into the corresponding graphical user interface input controls to complete parameter calibration. If the reverse solution yields no solution or multiple solutions, the system retains the original input parameter values and displays a calibration failure warning in the graphical user interface.
9. The method for real-time monitoring and visualization of 3D imaging parameters based on QT according to claim 1, characterized in that, The 2D imaging effect preview image includes: Spatial relationship between the optical axis angle of the binocular camera and the zero parallax plane; projection markings of near object distance Nc and far object distance Fc on the imaging plane; real-time numerical display of field of view θ and camera spacing A.
10. A QT-based real-time monitoring and visualization system for 3D imaging parameters, characterized in that, The system includes: Parameter input module: Used to receive input parameters through the graphical user interface input controls of the QT framework; The parameter calculation and dependency management module is used to calculate 3D imaging-related parameters hierarchically based on input parameters and construct a parameter dependency tree data structure to store parameters and their dependencies. The parameter dependency tree includes a root node, a top node, a trunk node, a branch node, a child node, and a leaf node, and each node forms a unidirectional dependency relationship. When the root node parameter is updated, the associated node is located according to the parameter dependency tree and the incremental calculation process is triggered. Imaging effect preview module: Used to generate a 2D imaging effect preview image in real time by combining the layered calculation results of the parameter calculation and dependency management module with the QGraphicsView graphics rendering control of the QT framework.