[go: up one dir, main page]

CN119937880A - Control method and device of scanning equipment - Google Patents

Control method and device of scanning equipment Download PDF

Info

Publication number
CN119937880A
CN119937880A CN202510428006.7A CN202510428006A CN119937880A CN 119937880 A CN119937880 A CN 119937880A CN 202510428006 A CN202510428006 A CN 202510428006A CN 119937880 A CN119937880 A CN 119937880A
Authority
CN
China
Prior art keywords
control
scanning
determining
sub
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510428006.7A
Other languages
Chinese (zh)
Inventor
陈尚俭
邬烈瀚
王江峰
郑俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Scantech Hangzhou Co Ltd
Original Assignee
Scantech Hangzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Scantech Hangzhou Co Ltd filed Critical Scantech Hangzhou Co Ltd
Priority to CN202510428006.7A priority Critical patent/CN119937880A/en
Publication of CN119937880A publication Critical patent/CN119937880A/en
Pending legal-status Critical Current

Links

Landscapes

  • Feedback Control In General (AREA)

Abstract

本申请公开了一种扫描设备的控制方法及装置,涉及扫描技术领域,该方法包括:创建独立工作线程,使独立工作线程进入循环调用过程,在每次循环中执行以下步骤:获取扫描控制界面中各个控件的状态属性,基于各个状态属性确定处于选中状态的目标控件,根据目标控件的属性确定扫描设备的工作参数,基于扫描设备的工作参数生成控制指令,将控制指令输出至扫描设备。本申请能够解决扫描控制界面卡顿的问题以及扫描设备的指令阻塞的问题,提升了用户的体验。

The present application discloses a control method and device for a scanning device, and relates to the field of scanning technology. The method includes: creating an independent working thread, making the independent working thread enter a loop calling process, and performing the following steps in each loop: obtaining the state attributes of each control in the scanning control interface, determining the target control in the selected state based on each state attribute, determining the working parameters of the scanning device according to the attributes of the target control, generating a control instruction based on the working parameters of the scanning device, and outputting the control instruction to the scanning device. The present application can solve the problem of freezing of the scanning control interface and the problem of instruction blocking of the scanning device, and improve the user experience.

Description

Control method and device of scanning equipment
Technical Field
The present application relates to the field of scanning technologies, and in particular, to a method and an apparatus for controlling a scanning device.
Background
When a user scans a target object by using a scanning device, the scanning device is usually connected with a terminal device installed with scanning software in a communication way, and some parameters in the scanning process are set or control instructions are issued through the scanning software on the terminal device so as to control the scanning device.
The user realizes man-machine interaction through a user interface of scanning software, wherein the user interface comprises interface elements such as icons, windows, controls and the like, the controls can comprise sliders, buttons, check boxes and the like, and the user can set related parameters by clicking the buttons or dragging the sliders and the like. When the user clicks a button or drags a slider, an event command to modify a parameter is triggered in the main thread of the user interface. When a user frequently clicks a button or drags a slider, a large number of event commands are triggered in a main thread, even tens of event commands are issued every second, and if tens of control commands are issued to the scanning device every second, the scanning device is not processed so as to cause obvious clamping of a user interface.
Disclosure of Invention
The application aims to provide a control method of scanning equipment, which can solve the problem of the clamping of a scanning control interface and the problem of the blockage of instructions of the scanning equipment and improves the experience of users.
In a first aspect, the present application provides a method for controlling a scanning apparatus, the method comprising:
creating an independent working thread, enabling the independent working thread to enter a loop calling process, and executing the following steps in each loop:
Acquiring state attributes of all the controls in the scanning control interface, determining a target control in a selected state based on the state attributes, determining working parameters of the scanning equipment according to the attributes of the target control, generating a control instruction based on the working parameters of the scanning equipment, and outputting the control instruction to the scanning equipment, wherein the state attributes are selected or unselected.
Further, the method further comprises:
And responding to response information returned by the scanning equipment, and executing the next cycle after a preset time threshold, wherein the response information is generated by the scanning equipment based on the control instruction.
Further, determining the target control in the selected state based on each state attribute includes:
Acquiring the attribute of the target control;
If the attribute of the target control is a first attribute value, determining that the target control is a low-precision scanning mode control;
And if the attribute of the target control is a second attribute value, determining that the target control is a high-precision scanning mode control.
Further, determining the working parameters of the scanning device according to the target control comprises:
Determining that the scanning mode of the scanning device is a low-precision scanning mode in response to the target control being a low-precision scanning mode control;
determining a corresponding first brightness control based on the low-precision scanning mode control, and acquiring a first brightness value corresponding to a triggering position of the first brightness control;
and determining the working parameters of the imaging module of the scanning equipment based on the low-precision scanning mode and the first brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of the speckle laser.
Further, determining the working parameters of the scanning device according to the target control comprises:
Responding to the target control as a high-precision scanning mode control, and determining that the scanning mode of the scanning equipment is a high-precision scanning mode;
Determining a corresponding second brightness control based on the high-precision scanning mode control, and acquiring a second brightness value corresponding to a triggering position of the second brightness control;
and determining the working parameters of the imaging module of the scanning equipment based on the high-precision scanning mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain.
Further, determining the working parameters of the scanning device according to the target control comprises:
Determining a first sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
if the attribute of the first sub-control is a third attribute value, determining that the scanning mode corresponding to the first sub-control is a small-area speckle sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining the working parameters of the imaging module of the scanning device based on the small-amplitude speckle sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of the speckle laser.
Further, determining the working parameters of the scanning device according to the target control comprises:
Determining a second sub-control in a selected state in each sub-control in the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
if the attribute of the second sub-control is a fourth attribute value, determining that the scanning mode corresponding to the second sub-control is an infrared-like laser sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining the working parameters of the imaging module of the scanning device based on the infrared-like laser sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time of the speckle laser, exposure time of the infrared-like laser, hardware analog gain and hardware digital gain.
Further, determining the working parameters of the scanning device according to the target control comprises:
Determining a third sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
If the attribute of the third sub-control is a fifth attribute value, determining that the scanning mode corresponding to the third sub-control is a blue linear laser sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining the working parameters of the imaging module of the scanning device based on the blue linear laser sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time of the speckle laser, exposure time of the blue linear laser, hardware analog gain and hardware digital gain.
Further, creating an independent working thread, and enabling the independent working thread to enter a cyclic calling process, including:
in the independent working thread, a while loop task is constructed so that the independent working thread enters a loop calling process.
In a second aspect, the present application provides a control apparatus for a scanning device, the apparatus comprising:
The thread module is used for creating an independent working thread and enabling the independent working thread to enter a cyclic calling process;
The circulation execution module is used for acquiring the state attribute of each control in the scanning control interface, determining a target control in a selected state based on each state attribute, determining the working parameters of the scanning equipment according to the attribute of the target control, generating a control instruction based on the working parameters of the scanning equipment, and outputting the control instruction to the scanning equipment, wherein the state attribute is a selected state or an unselected state.
In a third aspect, the application provides a computer device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of the method of controlling a scanning device as described above.
In a third aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of controlling a scanning device as described above.
According to the application, the independent working thread is created, the circulating task is executed in the independent working thread, the state attribute of each control of the scanning control interface is subjected to polling processing, the target control in the selected state is determined according to the state attribute of each control, the working parameters of the scanning equipment are determined according to the attribute of the target control, so that the control instruction is generated and output to the scanning equipment, the problem of the blocking of the scanning control interface and the problem of the instruction blocking of the scanning equipment can be solved, the operation efficiency of the terminal equipment is improved, the scanning efficiency of the scanning equipment is improved, and the user experience is further improved.
Drawings
Fig. 1 is an application scenario diagram of a control method of a scanning device according to an embodiment of the present application;
FIG. 2 is a first flowchart of a control method of a scanning device according to an embodiment of the present application;
FIG. 3 is a second flowchart of a control method of a scanning device according to an embodiment of the present application;
FIG. 4 is a third flowchart of a control method of a scanning device according to an embodiment of the present application;
fig. 5 is a fourth flowchart of a control method of a scanning device according to an embodiment of the present application;
fig. 6 is a fifth flowchart of a control method of a scanning device according to an embodiment of the present application;
fig. 7 is a sixth flowchart of a control method of a scanning device according to an embodiment of the present application;
Fig. 8 is a seventh flowchart of a control method of a scanning device according to an embodiment of the present application;
fig. 9 is an eighth flowchart of a control method of a scanning device according to an embodiment of the present application;
fig. 10 is a system block diagram of a control device of a scanning apparatus according to an embodiment of the present application;
Fig. 11 is a system block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the specific embodiments shown in the drawings, but these embodiments are not limited to the present application, and structural, method, or functional modifications made by those skilled in the art based on these embodiments are included in the scope of the present application.
QT is a cross-platform graphical user interface application development framework that can be used to develop both GUI programs and non-GUI programs, such as console tools and servers. QT is an object-oriented framework that uses special code generation extensions (called meta-object compilers (Meta Object Compiler, moc)) and some macros, which are easy to extend, allowing components to program. The signal and slot mechanism is the core mechanism of QT, applied to communication between objects. In QT, control reading of the user interface is accomplished by binding an event callback function to the control itself, for example, when the user interacts with the interface (e.g., clicks on a box or moves a slider), the box control (QRadioButton) or slider control (QSlider) will emit corresponding cliked signals, binding these signals to specific slots (slots) functions by connection (connect), i.e., binding the cliked signal of the box to a custom member function, or binding the valueChanged signal of the slider to a custom member function. When a radio box is clicked or the value of the slider bar changes, a corresponding slot function is invoked. The event callback mechanism enables the GUI application to run in an event-driven manner, but when the user frequently manipulates controls in the graphical interface, such as by dragging the slider continuously by a mouse to change the value of the slider, the valueChanged signal causing QSlider will be issued tens of times per second, which will result in tens of commands to the scanning device to modify the device parameters, which will be less than the time to process frequent instructions due to the limited processing speed of the scanning device, e.g., 400ms or more required to modify and calculate certain device parameters. The instructions to process these controls are typically in the main thread of the UI process, and thus this situation can cause significant jamming of the user interface, as well as blocking of instructions by the scanning device. Therefore, the application provides a control method of scanning equipment, which comprises the steps of creating an independent working thread, enabling the independent working thread to have a cyclic calling function, acquiring state attributes of all controls in a scanning control interface, determining a target control in a selected state based on the state attributes, determining working parameters of the scanning equipment according to the target control, generating a control instruction based on the working parameters of the scanning equipment, and outputting the control instruction to the scanning equipment, so that the technical problem of the occurrence of clamping of a user interface can be solved.
Fig. 1 is an application scenario diagram of a control method of a scanning apparatus according to an embodiment of the present application. As shown in fig. 1, a terminal device 101 is communicatively connected to a scanning device 102. The terminal equipment 101 creates an independent working thread, the independent working thread enters a loop calling process and is executed in each loop, the state attribute of each control in a scanning control interface in the terminal equipment 101 is acquired, a target control in a selected state is determined based on each state attribute, the working parameters of the scanning equipment 102 are determined according to the attribute of the target control, a control instruction is generated based on the working parameters of the scanning equipment 102, and the control instruction is output to the scanning equipment 102 so that the scanning equipment 102 can execute subsequent operations.
The scanning device 102 may be any optical scanning device for three-dimensional scanning. Such as a hand-held three-dimensional scanner or a tracking three-dimensional scanner. The terminal device 101 is any device having arithmetic capability and communication capability, and has a display interface. The terminal device 101 executes various functions and data processing by running a stored computer program. The communication connection between the terminal device 101 and the scanning device 102 may be wireless communication or wired communication.
The terminal device 101 includes, but is not limited to, a mobile terminal including, but not limited to, a smart phone, a tablet computer, a notebook computer, etc., and a fixed terminal including, but not limited to, a desktop computer, etc. The terminal device 101 may be a server, which may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms, but is not limited thereto.
It should be noted that fig. 1 is only a schematic diagram of an application scenario diagram provided by the embodiment of the present application, and the architecture and application scenario of the system described in the embodiment of the present application are for more clearly describing the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. As can be known to those skilled in the art, with the evolution of the system architecture and the appearance of new application scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.
Referring to fig. 2, an embodiment of the present application provides a method for controlling a scanning device, including step S201.
S201, creating an independent working thread, enabling the independent working thread to enter a loop calling process, and executing the steps in each loop, wherein the state attribute of each control in a scanning control interface is obtained, a target control in a selected state is determined based on each state attribute, the working parameters of the scanning equipment are determined according to the attribute of the target control, a control instruction is generated based on the working parameters of the scanning equipment, and the control instruction is output to the scanning equipment, wherein the state attribute is a selected state or an unselected state.
In this embodiment, by creating an independent work thread, the independent work thread is independent of the UI main thread of the application main program. The independent working thread has a loop calling function, and each loop calling operation is executed through the loop function of the independent working thread.
Illustratively, in an independent worker thread, a while loop task is built to bring the independent worker thread into a loop call process. The task steps executed by each loop are realized through a while loop task.
Illustratively, the user is enabled to control the scanning device by operation of three-dimensional scanning software deployed at the terminal device. The three-dimensional scanning software displays a scanning control interface on the terminal equipment, so that a user can interact on the scanning control interface, and the interaction mode can be used for executing operations such as clicking a control on the interface, checking a check box and the like on the scanning control interface by the user so as to trigger the change of the state attribute of the control and detect the change by the terminal equipment. Illustratively, the controls in the scan control interface may include list controls, button controls, dialog controls, picture box controls, check box controls, text box controls, and prompt box controls.
In each cycle, the state attribute of each control in the scanning control interface is read, whether the control is selected or not is determined according to the read state attribute, if the state attribute is the selected state, the control is determined to be a target control in the selected state if the control is operated to be selected by a user, and if the state attribute is the unselected state, the control is indicated to be not operated to be selected by the user. Based on the selected target control, acquiring the attribute of the target control, determining the working parameter of the scanning equipment according to the attribute of the target control, generating a control instruction based on the working parameter of the scanning equipment, and outputting the control instruction to the scanning equipment, thereby realizing the control of the scanning equipment.
In one embodiment, QCheckBox the check box control is a commonly used control in the Qt framework that can perform the check/uncheck function, it can be determined whether the check box control is checked by ISCHECKED () function, when the function returns true, indicating that the check box control is checked, and when the function returns false, indicating that the check box control is unchecked.
For example, in the loop call in the independent working thread, a preset duration period may be used for the loop call, where the preset duration period may be reasonably set according to actual service experience. The specific preset duration period can be determined according to actual requirements, and is not limited in any way.
In this embodiment, by creating an independent working thread, executing a loop task in the independent working thread, performing polling processing on the state attribute of each control of the scanning control interface, obtaining the state attribute of each control, further determining a target control in a selected state, determining the working parameter of the scanning device according to the attribute of the target control, and generating and outputting a control instruction to the scanning device, the problem of the clamping of the scanning control interface and the problem of the instruction blocking of the scanning device can be solved, the operation efficiency of the terminal device is improved, the scanning efficiency of the scanning device is improved, and further the user experience is improved.
In one embodiment, as shown in FIG. 3, the method further comprises steps S301-S302.
S301, creating an independent working thread, enabling the independent working thread to enter a loop calling process, and executing the steps in each loop, wherein the state attribute of each control in a scanning control interface is obtained, a target control in a selected state is determined based on each state attribute, the working parameters of the scanning equipment are determined according to the attribute of the target control, a control instruction is generated based on the working parameters of the scanning equipment, and the control instruction is output to the scanning equipment, wherein the state attribute is a selected state or an unselected state;
S302, responding to response information returned by the scanning equipment, and executing the next cycle after a preset time threshold, wherein the response information is generated by the scanning equipment based on the control instruction.
The scanning device receives a control instruction sent by the terminal device, generates response information based on the control instruction, and sends the response information to the terminal device. And the terminal equipment receives the response information and continues to execute the next circulation operation after a preset time threshold. Illustratively, the time threshold may be set to 200ms. The time threshold may be set according to the actual situation.
In this embodiment, after a cycle, a control instruction is sent to the scanning device, and after a certain time delay is passed after response information of the scanning device is received, the next cycle is continuously executed, so that the scanning device does not receive a large number of control instructions, and the instruction is blocked, so that the instruction processing time of the scanning device is further ensured, and the user experience is further improved.
In one embodiment, as shown in FIG. 4, the step of determining the target control in the selected state based on the various state attributes includes S401-S403.
S401, acquiring the attribute of a target control;
S402, if the attribute of the target control is a first attribute value, determining that the target control is a low-precision scanning mode control;
s403, if the attribute of the target control is the second attribute value, determining that the target control is a high-precision scanning mode control.
In this embodiment, the control in the selected state is determined to be the target control, the attribute of the target control is obtained, and based on the attribute, which control the target control is can be determined. For example, the attribute may be a control name, based on which a corresponding control may be determined. And if the attribute of the target control is a first attribute value, determining that the target control is a low-precision scanning mode control, and if the attribute of the target control is a second attribute value, determining that the target control is a high-precision scanning mode control. By means of the attribute values of the target control, whether the target control is a low-precision scanning mode control or a high-precision scanning mode control can be determined.
In one embodiment, as shown in FIG. 5, the step of determining the operating parameters of the scanning device from the target control includes S501-S503.
S501, determining that a scanning mode of the scanning device is a low-precision scanning mode in response to the target control being the low-precision scanning mode control;
s502, determining a corresponding first brightness control based on the low-precision scanning mode control, and acquiring a first brightness value corresponding to a triggering position of the first brightness control;
s503, determining the working parameters of the imaging module of the scanning device based on the low-precision scanning mode and the first brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of the speckle laser.
When the target control is determined to be a low-precision scanning mode control, the scanning mode of the scanning equipment is determined to be a low-precision scanning mode, namely, the scanning mode selected by a user is the low-precision scanning mode, and a corresponding first brightness value is determined according to the triggering position of the first brightness control, so that the working parameters of the imaging module of the scanning equipment are further determined based on the low-precision scanning mode and the first brightness value.
For example, the difference of the scanning modes and the difference of the brightness values have different influences on the working parameters of the imaging module, for example, in the low-precision scanning mode, 0% -75% of the brightness values only affect the exposure time of each frame of the speckle laser, 75% -85% of the brightness values only affect the analog gain of hardware, and 85% -100% of the brightness values only affect the digital gain of hardware, so that the working parameters of the imaging module such as exposure time, analog gain, digital gain and the like can be determined according to the first brightness value and the low-precision scanning mode.
The first brightness control may be a slider control including a slider bar and a slider block movable on the slider bar. The triggering mode of the first brightness control comprises sliding triggering or clicking triggering. The trigger position may be the position information of the sliding end point corresponding to the sliding trigger, or the position information of the click point corresponding to the click trigger. The sliding trigger is that when the fact that the sliding exists in the area where the user acts on the first brightness control is detected, the fact that the first brightness control is triggered by sliding is determined, for example, the user drags the sliding slider of the first brightness control by using the hand is detected. And the click triggering is that when the user is detected to click on the position in the area where the first brightness control is located, the first brightness control is determined to be detected to be triggered by clicking. For example, the user clicks a slider of the first brightness control using the hand.
Illustratively, the mapping relationship between the trigger position of the brightness control and the brightness value is different in the low-precision scanning mode and the high-precision mode, i.e., the low-precision scanning mode corresponds to one brightness control, and the high-precision mode corresponds to one brightness control. Thus, when determining to be a low precision scan mode control, a corresponding brightness control, i.e., a first brightness control, needs to be determined.
Illustratively, the trigger position of the first brightness control has a mapping relationship with the brightness value. When the first brightness control is triggered, the brightness value which the user wants to adjust can be determined by acquiring the first brightness value corresponding to the triggering position of the first brightness control.
By way of example, the imaging module may include a camera, laser or light supplementing device, etc., hardware devices for imaging or assisting in imaging. The operating parameter may be one or a combination of parameters of exposure time of the speckle laser, hardware analog gain, hardware digital gain. After the imaging module is subjected to parameter adjustment based on the working parameters, a follow-up three-dimensional scanning function can be executed on the scanned object based on the adjusted working parameters.
In one embodiment, as shown in FIG. 6, the step of determining the operating parameters of the scanning device from the target control includes S601-S603.
S601, determining that a scanning mode of the scanning equipment is a high-precision scanning mode in response to the target control being the high-precision scanning mode control;
s602, determining a corresponding second brightness control based on the high-precision scanning mode control, and acquiring a second brightness value corresponding to a triggering position of the second brightness control;
S603, determining working parameters of an imaging module of the scanning device based on the high-precision scanning mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain.
When the target control is determined to be a high-precision scanning mode control, the scanning mode of the scanning equipment is determined to be a high-precision scanning mode, namely, the scanning mode selected by the user is the high-precision scanning mode, and the corresponding second brightness value is determined according to the triggering position of the second brightness control, so that the working parameters of the imaging module of the scanning equipment are further determined based on the high-precision scanning mode and the second brightness value.
The second brightness control may be a slider control including a slider bar and a slider block movable on the slider bar. The triggering mode of the second brightness control comprises sliding triggering or clicking triggering. The trigger position may be the position information of the sliding end point corresponding to the sliding trigger, or the position information of the click point corresponding to the click trigger.
As described above, the brightness control in the low-precision scanning mode and the brightness control in the high-precision mode are different, and thus when determining as the high-precision scanning mode control, it is necessary to determine the corresponding brightness control, that is, determine the second brightness control.
Illustratively, the trigger position of the second brightness control has a mapping relationship with the brightness value. When the second brightness control is triggered, the brightness value which the user wants to adjust can be determined by acquiring the second brightness value corresponding to the triggering position of the second brightness control.
The operating parameter may be one or a combination of parameters of exposure time, hardware analog gain, hardware digital gain. After the imaging module is subjected to parameter adjustment based on the working parameters, a follow-up three-dimensional scanning function can be executed on the scanned object based on the adjusted working parameters.
In one embodiment, three sub-modes are supported in the high precision scanning mode, namely a facet speckle sub-mode, an infrared-like laser mode, and a blue-line-like laser mode. As shown in fig. 7, the step of determining the operation parameters of the scanning device according to the target control includes S701 to S704.
S701, determining a first sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
S702, if the attribute of the first sub-control is a third attribute value, determining that the scanning mode corresponding to the first sub-control is a small-area speckle sub-mode;
S703, acquiring a second brightness value corresponding to the triggering position of the second brightness control;
S704, based on the small-amplitude speckle sub-mode and the second brightness value, determining the working parameters of the imaging module of the scanning device, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of the speckle laser.
The high-precision scanning mode control comprises three sub-controls, wherein each sub-control corresponds to one sub-mode, and the brightness controls corresponding to the three sub-modes are the same control. When the target control is a high-precision scanning mode control, that is, the user selects a high-precision scanning mode, it is necessary to further determine which of the modes is the selected high-precision mode. The first sub-control in the selected state can be determined by acquiring the state attribute of each sub-control under the determined high-precision scanning mode control, and then the attribute value of the first sub-control can be determined. And if the attribute of the first sub-control is a third attribute value, determining that the scanning mode corresponding to the first sub-control is a small-area speckle sub-mode. And acquiring a second brightness value corresponding to the triggering position of the second brightness control, and determining the working parameters of the imaging module of the scanning equipment based on the small-area speckle sub-mode and the second brightness value.
Illustratively, in the small-scale speckle sub-mode, 0% -75% of the brightness value only affects the exposure time of each frame of the speckle laser, 75% -85% of the brightness value only affects the analog gain of the hardware, and 85% -100% of the brightness value only affects the digital gain of the hardware, so that the exposure time, the analog gain of the hardware, the digital gain of the hardware and other working parameters of the imaging module of the speckle laser can be determined according to the small-scale speckle sub-mode and the second brightness value.
In one embodiment, as shown in FIG. 8, the step of determining the operating parameters of the scanning device from the target control includes S801-S804.
S801, determining a second sub-control in a selected state in each sub-control under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
S802, if the attribute of the second sub-control is a fourth attribute value, determining that the scanning mode corresponding to the second sub-control is an infrared-like laser sub-mode;
s803, obtaining a second brightness value corresponding to the triggering position of the second brightness control;
S804, based on the infrared-like laser sub-mode and the second brightness value, determining the working parameters of the imaging module of the scanning device, wherein the working parameters are at least one of exposure time of the speckle laser, exposure time of the infrared-like laser, hardware analog gain and hardware digital gain.
When the target control is a high-precision scanning mode control, that is, the user selects a high-precision scanning mode, it is necessary to further determine which of the modes is the selected high-precision mode. The second sub-control in the selected state can be determined by acquiring the state attribute of each sub-control in the high-precision scanning mode control, and then the attribute value of the second sub-control can be determined. And if the attribute of the first sub-control is a fourth attribute value, determining that the scanning mode corresponding to the second sub-control is an infrared-like laser sub-mode. And acquiring a second brightness value corresponding to the triggering position of the second brightness control, and determining the working parameters of the imaging module of the scanning equipment based on the infrared-shaped laser sub-mode and the second brightness value.
Illustratively, in the infrared laser sub-mode, 0% -60% of the brightness value only affects the exposure time of each frame of the infrared laser, 60% -75% of the brightness value only affects the exposure time of each frame of the speckle laser, 75% -85% of the brightness value only affects the analog gain of the hardware, and 85% -100% of the brightness value only affects the digital gain of the hardware, so that the exposure time of the speckle laser, the exposure time of the infrared laser, the analog gain of the hardware, the digital gain of the hardware, and other working parameters of the imaging module can be determined according to the infrared laser sub-mode and the second brightness value.
In one embodiment, as shown in FIG. 9, the step of determining the operating parameters of the scanning device from the target control includes S901-S904.
S901, determining a third sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
s902, if the attribute of the third sub-control is a fifth attribute value, determining that the scanning mode corresponding to the second sub-control is a blue linear laser sub-mode;
s903, obtaining a second brightness value corresponding to the triggering position of the second brightness control;
S904, based on the blue linear laser sub-mode and the second brightness value, determining the working parameters of the imaging module of the scanning device, wherein the working parameters are at least one of exposure time of the speckle laser, exposure time of the blue linear laser, hardware analog gain and hardware digital gain.
When the target control is a high-precision scanning mode control, that is, the user selects a high-precision scanning mode, it is necessary to further determine which of the modes is the selected high-precision mode. By acquiring the state attribute of each sub-control under the high-precision scanning mode control, the third sub-control in the selected state can be determined, and then the attribute value of the third sub-control can be determined. And if the attribute of the third sub-control is a fifth attribute value, determining that the scanning mode corresponding to the third sub-control is a blue linear laser sub-mode. And acquiring a second brightness value corresponding to the triggering position of the second brightness control, and determining the working parameters of the imaging module of the scanning equipment based on the blue linear laser sub-mode and the second brightness value.
Illustratively, in the blue linear laser sub-mode, 0% -60% of the brightness value only affects the exposure time of each frame of the blue linear laser, 60% -75% of the brightness value only affects the exposure time of each frame of the speckle laser, 75% -85% of the brightness value only affects the analog gain of the hardware, and 85% -100% of the brightness value only affects the digital gain of the hardware, so that the exposure time of the speckle laser, the exposure time of the blue linear laser, the hardware analog gain, the hardware digital gain and other working parameters of the imaging module can be determined according to the blue linear laser sub-mode and the second brightness value.
Based on the same inventive concept, the embodiment of the application also provides a control device for realizing the above-mentioned related scanning equipment. The implementation scheme of the device for solving the problem is similar to that described in the above method, so the specific limitation in the embodiment of the control device for the scanning device provided below can be referred to the limitation of the control method for the scanning device hereinabove, and will not be repeated here.
As shown in fig. 10, the present application provides a control device of a scanning apparatus, the device comprising:
a thread module 1001, configured to create an independent working thread, and make the independent working thread enter a loop call process;
The loop execution module 1002 is configured to obtain a state attribute of each control in the scan control interface, determine a target control in a selected state based on each state attribute, determine an operating parameter of the scan device according to the attribute of the target control, generate a control instruction based on the operating parameter of the scan device, and output the control instruction to the scan device, where the state attribute is a selected state or an unselected state.
In this embodiment, the thread module 1001 performs polling processing on the state attribute of each control of the scan control interface by creating an independent working thread in which a loop task is executed, so as to obtain the state attribute of each control, further determine the target control in the selected state, and determine the working parameter of the scan device according to the attribute of the target control, so as to generate and output a control instruction to the scan device, thereby solving the problem of the blocking of the scan control interface and the problem of the blocking of the instruction of the scan device, improving the operation efficiency of the terminal device, improving the scanning efficiency of the scan device, and further improving the experience of the user.
Further, the loop execution module 1002 is specifically configured to:
And responding to response information returned by the scanning equipment, and executing the next cycle after a preset time threshold, wherein the response information is generated by the scanning equipment based on the control instruction.
Further, the loop execution module 1002 is specifically configured to:
Acquiring the attribute of the target control;
If the attribute of the target control is a first attribute value, determining that the target control is a low-precision scanning mode control;
And if the attribute of the target control is a second attribute value, determining that the target control is a high-precision scanning mode control.
Further, the loop execution module 1002 is specifically configured to:
Determining that the scanning mode of the scanning device is a low-precision scanning mode in response to the target control being a low-precision scanning mode control;
determining a corresponding first brightness control based on the low-precision scanning mode control, and acquiring a first brightness value corresponding to a triggering position of the first brightness control;
and determining the working parameters of the imaging module of the scanning equipment based on the low-precision scanning mode and the first brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of the speckle laser.
Further, the loop execution module 1002 is specifically configured to:
Responding to the target control as a high-precision scanning mode control, and determining that the scanning mode of the scanning equipment is a high-precision scanning mode;
Determining a corresponding second brightness control based on the high-precision scanning mode control, and acquiring a second brightness value corresponding to a triggering position of the second brightness control;
and determining the working parameters of the imaging module of the scanning equipment based on the high-precision scanning mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain.
Further, the loop execution module 1002 is specifically configured to:
Determining a first sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
if the attribute of the first sub-control is a third attribute value, determining that the scanning mode corresponding to the first sub-control is a small-area speckle sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining the working parameters of the imaging module of the scanning device based on the small-amplitude speckle sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of the speckle laser.
Further, the loop execution module 1002 is specifically configured to:
Determining a second sub-control in a selected state in each sub-control in the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
if the attribute of the second sub-control is a fourth attribute value, determining that the scanning mode corresponding to the second sub-control is an infrared-like laser sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining the working parameters of the imaging module of the scanning device based on the infrared-like laser sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time of the speckle laser, exposure time of the infrared-like laser, hardware analog gain and hardware digital gain.
Further, the loop execution module 1002 is specifically configured to:
Determining a third sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
If the attribute of the third sub-control is a fifth attribute value, determining that the scanning mode corresponding to the third sub-control is a blue linear laser sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining the working parameters of the imaging module of the scanning device based on the blue linear laser sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time of the speckle laser, exposure time of the blue linear laser, hardware analog gain and hardware digital gain.
Further, the thread module 1001 is specifically configured to:
in the independent working thread, a while loop task is constructed so that the independent working thread enters a loop calling process.
The embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the steps of the control method of any one of the scanning devices are realized.
Fig. 11 is a schematic hardware structure of a computer device according to an embodiment of the present application. The computer device shown in fig. 11 includes a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, the processor 1101, the communication interface 1102 and the memory 1103 completing communication with each other through the communication bus 1104. The connection between the processor 1101, the communication interface 1102, and the memory 1103 shown in fig. 11 is merely exemplary, and in the implementation, the processor 1101, the communication interface 1102, and the memory 1103 may be communicatively connected to each other by other connection manners besides the communication bus 1104.
The memory 1103 may be used to store a computer program, which may include instructions and data to implement the steps of the method of controlling a scanning device, as any of the above. In an embodiment of the present application, the memory 1103 may be various types of storage media, such as random access memory (random access memory, RAM), read Only Memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (erasable PROM, EPROM), electrically erasable PROM (ELECTRICALLY ERASABLE PROM, EEPROM), flash memory, optical memory, registers, and the like. The memory 1103 may include a hard disk and/or memory.
The processor 1101 may be a general-purpose processor, which may be a processor that performs certain steps and/or operations by reading and executing a computer program (e.g., a computer program) stored in a memory (e.g., the memory 1103), which may use data stored in the memory (e.g., the memory 1103) in performing the steps and/or operations, such as, but not limited to, a central processing unit (central processing unit, CPU) furthermore, the processor 1101 may also be a special purpose processor, which may be a specially designed processor for performing certain steps and/or operations, such as, but not limited to, an ASIC, FPGA, etc. furthermore, the processor 1101 may also be a combination of multiple processors, such as a multi-core processor.
Communication interface 1102 may include input/output (I/O) interfaces, physical and logical interfaces, and the like, for implementing device interconnections within a network device, as well as interfaces for implementing network device interconnections with other devices (e.g., network devices). The communication network may be an ethernet, a radio access network (radio access network, RAN), a wireless local area network (wireless local areanetworks, WLAN), or the like. The communication interface 1102 may be a module, circuit, transceiver, or any device capable of communicating.
In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware in the processor 1101 or instructions in software. The method disclosed in connection with the embodiments of the present application may be directly embodied as a hardware processor executing or may be executed by a combination of hardware and software modules in the processor. The software modules may be located in a random access memory flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 1103, and the processor 1101 reads information in the memory 1103, and performs the steps of the above method in combination with hardware thereof. To avoid repetition, a detailed description is not provided herein.
Although the preferred embodiments of the present application have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the application as disclosed in the accompanying claims.

Claims (12)

1. A method of controlling a scanning apparatus, the method comprising:
creating an independent working thread, enabling the independent working thread to enter a loop calling process, and executing the following steps in each loop:
Acquiring state attributes of all controls in a scanning control interface, determining a target control in a selected state based on the state attributes, determining working parameters of the scanning equipment according to the attributes of the target control, generating control instructions based on the working parameters of the scanning equipment, and outputting the control instructions to the scanning equipment, wherein the state attributes are selected or unselected.
2. The method of controlling a scanning apparatus according to claim 1, characterized in that the method further comprises:
And responding to response information returned by the scanning equipment, and executing the next cycle after a preset time threshold, wherein the response information is information generated by the scanning equipment based on the control instruction.
3. The method of claim 1, wherein determining the target control in the selected state based on the respective state attributes comprises:
Acquiring the attribute of the target control;
If the attribute of the target control is a first attribute value, determining that the target control is a low-precision scanning mode control;
and if the attribute of the target control is a second attribute value, determining that the target control is a high-precision scanning mode control.
4. A method of controlling a scanning device according to claim 3, wherein said determining an operating parameter of the scanning device according to the target control comprises:
determining that the scanning mode of the scanning device is a low-precision scanning mode in response to the target control being a low-precision scanning mode control;
determining a corresponding first brightness control based on a low-precision scanning mode control, and acquiring a first brightness value corresponding to a triggering position of the first brightness control;
and determining working parameters of an imaging module of the scanning equipment based on the low-precision scanning mode and the first brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of a speckle laser.
5. A method of controlling a scanning device according to claim 3, wherein said determining an operating parameter of the scanning device according to the target control comprises:
Determining that the scanning mode of the scanning device is a high-precision scanning mode in response to the target control being a high-precision scanning mode control;
determining a corresponding second brightness control based on the high-precision scanning mode control, and acquiring a second brightness value corresponding to a triggering position of the second brightness control;
and determining working parameters of an imaging module of the scanning equipment based on the high-precision scanning mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain.
6. The method for controlling a scanning device according to claim 5, wherein determining the operation parameter of the scanning device according to the target control comprises:
Determining a first sub-control in a selected state in each sub-control in the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
if the attribute of the first sub-control is a third attribute value, determining that the scanning mode corresponding to the first sub-control is a small-area speckle sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
and determining working parameters of an imaging module of the scanning device based on the small-amplitude speckle sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time, hardware analog gain and hardware digital gain of a speckle laser.
7. The method for controlling a scanning device according to claim 5, wherein determining the operation parameter of the scanning device according to the target control comprises:
Determining a second sub-control in a selected state in each sub-control in the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
If the attribute of the second sub-control is a fourth attribute value, determining that the scanning mode corresponding to the second sub-control is an infrared-like laser sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining working parameters of an imaging module of the scanning device based on the infrared-like laser sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time of a speckle laser, exposure time of the infrared-like laser, hardware analog gain and hardware digital gain.
8. The method for controlling a scanning device according to claim 5, wherein determining the operation parameter of the scanning device according to the target control comprises:
determining a third sub-control in a selected state in all sub-controls under the high-precision scanning mode control in response to the target control being the high-precision scanning mode control;
If the attribute of the third sub-control is a fifth attribute value, determining that the scanning mode corresponding to the third sub-control is a blue linear laser sub-mode;
Acquiring a second brightness value corresponding to a triggering position of a second brightness control;
And determining working parameters of an imaging module of the scanning device based on the blue linear laser sub-mode and the second brightness value, wherein the working parameters are at least one of exposure time of a speckle laser, exposure time of the blue linear laser, hardware analog gain and hardware digital gain.
9. The method of controlling a scanning device according to claim 1, wherein creating an independent work thread, causing the independent work thread to enter a loop call process, comprises:
and constructing a while loop task in the independent working thread so that the independent working thread enters a loop calling process.
10. A control apparatus for a scanning device, the apparatus comprising:
The thread module is used for creating an independent working thread and enabling the independent working thread to enter a cyclic calling process;
The circulation execution module is used for acquiring the state attribute of each control in the scanning control interface, determining a target control in a selected state based on each state attribute, determining the working parameters of the scanning equipment according to the attribute of the target control, generating a control instruction based on the working parameters of the scanning equipment, and outputting the control instruction to the scanning equipment, wherein the state attribute is a selected state or an unselected state.
11. A computer device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the steps of the method of controlling a scanning device according to any of claims 1 to 9.
12. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, realizes the steps of the control method of a scanning device according to any one of claims 1 to 9.
CN202510428006.7A 2025-04-07 2025-04-07 Control method and device of scanning equipment Pending CN119937880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510428006.7A CN119937880A (en) 2025-04-07 2025-04-07 Control method and device of scanning equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510428006.7A CN119937880A (en) 2025-04-07 2025-04-07 Control method and device of scanning equipment

Publications (1)

Publication Number Publication Date
CN119937880A true CN119937880A (en) 2025-05-06

Family

ID=95539726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510428006.7A Pending CN119937880A (en) 2025-04-07 2025-04-07 Control method and device of scanning equipment

Country Status (1)

Country Link
CN (1) CN119937880A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100199215A1 (en) * 2009-02-05 2010-08-05 Eric Taylor Seymour Method of presenting a web page for accessibility browsing

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100199215A1 (en) * 2009-02-05 2010-08-05 Eric Taylor Seymour Method of presenting a web page for accessibility browsing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CSDN: "线程⾥开定时器还是应该定时器⾥调⽤线程", pages 1 - 2, Retrieved from the Internet <URL:https://bbs.csdn.net/topics/390609917> *
SIKANTECH: "KSCAN-Magic Ⅱ", pages 1, Retrieved from the Internet <URL:https://web.archive.org/web/20230412013651/https://www.sikantech.com/701.html> *
吕烜威: "基于光纤传输的阵列雷达多通道回波模拟系统设计", 《中国优秀硕士学位论文全文数据库-信息科技辑》, 15 March 2025 (2025-03-15), pages 136 - 1645 *
李慧;: "基于QT的电台可视化人机交互软件设计与实现", 电子世界, no. 08, 23 April 2019 (2019-04-23) *

Similar Documents

Publication Publication Date Title
US11934772B2 (en) Providing synchronous and asynchronous general user interface (GUI) input
EP3806041A1 (en) Method and apparatus for jointly calibrating external parameters of multiple cameras, device and medium
US20210365767A1 (en) Method and device for operator registration processing based on deep learning and electronic device
KR20210094003A (en) Data processing methods and devices, devices, servers, systems and storage media
US7974494B2 (en) Image control from composed composite image using HID signal conversion to source image coordinates
US9280451B2 (en) Testing device
JP7350923B2 (en) Deep learning framework operator registration method, equipment, device and storage medium
KR101640377B1 (en) Method for prototyping Graphic User Interface and System thereof
CN110471658A (en) A kind of selection method of figure layer, system and computer storage medium
CN113360116A (en) Method, device and equipment for controlling terminal and storage medium
CN110413161A (en) Arrrangement method, device and electronic equipment
KR101689984B1 (en) Programmable controller, programmable controller system, and execute error information creation method
US11557062B2 (en) Method and apparatus for processing video frame
CN111079059A (en) Page inspection method, apparatus, device, and computer-readable storage medium
WO2023082654A1 (en) Method, apparatus and device for generating service interaction diagram, and storage medium
CN114721643A (en) Construction method of application program, display method, device and equipment of application page
JP2021174531A (en) Target tracking method and device, electronic equipment, storage medium, and computer program
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN119937880A (en) Control method and device of scanning equipment
US20180292975A1 (en) Systems and methods for animated computer generated display
US20240241818A1 (en) System and method for script-less automation for rtp testing or any api testing
US11093264B1 (en) System and method for drawing optimization with pointer input in a remote session
CN113485629A (en) Touch event processing method and device, storage medium and electronic equipment
CN114610200B (en) Intelligent control method and device for engineering mechanical equipment and engineering mechanical equipment
US20130038742A1 (en) Cam-data creation device and cam-data creation program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination