Scanner control method, scanner, storage medium and computer device

By using a crystal oscillator as a clock source in a single-camera 3D scanner to control the image acquisition time, the image matching algorithm is simplified, the high cost of single-camera 3D scanners is solved, and rapid 3D model reconstruction under low-cost hardware is achieved.

CN116255928BActive Publication Date: 2026-02-06SHENZHEN JIMUYIDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111514171.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2026-02-06
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

Single-camera 3D scanners are expensive, and existing technologies require complex data processing and high-performance processors to synchronize object structure information and surface texture information.

Method used

A crystal oscillator is used as the clock source, and the image acquisition time is controlled by a stable clock signal, which simplifies the image matching algorithm and reduces hardware requirements.

Benefits of technology

It enables rapid reconstruction of object structure and surface texture information under low-cost hardware, reducing algorithm complexity and hardware cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116255928B_ABST
    Figure CN116255928B_ABST
Patent Text Reader

Abstract

The application discloses a scanner control method, a scanner, a storage medium and a computer device. The scanner control method acquires a first oscillation time signal of a crystal oscillation source. The acquisition time of a first image is determined according to the first oscillation time signal, and the first image is acquired. A second oscillation time signal of the crystal oscillation source is acquired, the acquisition time of a second image is determined according to the second oscillation time signal, and the second image is acquired. The first image and the second image are reconstructed into a 3D model. The application solves the technical problem of high cost of a single-camera scanner in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of scanners, in particular to a scanner control method, a scanner, a storage medium and a computer device. BACKGROUND

[0002] A 3D scanner system generally comprises a camera and a light source, wherein the light source refers to projecting a one-dimensional or two-dimensional image onto a measured object, and the camera scans the object at the same interval time to determine the surface shape of the measured object according to the deformation of the image projected on the measured object.

[0003] Under the above background, a 3D scanner generally uses two cameras to collect object structure information and surface texture information, but the structure of such a 3D scanner is generally large. It is not suitable for daily use, but if one camera is used to collect object structure information and surface texture information, the spatial positions of the object structure information and the surface texture information will be out of synchronization. In the prior art, time information of the image is obtained by using a similarity processing algorithm to match images with similar features, so a large amount of data needs to be analyzed and processed to restore the 3D model of the object, which requires high hardware performance of the processor, thereby resulting in high cost of the single-camera scanner. SUMMARY

[0004] The present application aims to provide a scanner control method, device, computer-readable storage medium and computer device to solve the technical problem of high cost of a single-camera scanner.

[0005] To achieve the above-mentioned purpose, the present application provides a scanner control method, which comprises the following steps:

[0006] According to the first oscillation time signal, the acquisition time of the first image is determined and the first image is acquired.

[0007] The second oscillation time signal of the crystal oscillation source is acquired.

[0008] According to the second oscillation time signal, the acquisition time of the second image is determined and the second image is acquired.

[0009] The first image and the second image are reconstructed into a 3D model.

[0010] Optionally, the step of determining the acquisition time of the first image according to the first oscillation time signal and acquiring the first image comprises:

[0011] The cycle start time of the previous cycle is acquired.

[0012] if a time difference between the first oscillation time signal and a cycle start time of a last cycle is greater than or equal to a first preset time difference, updating the first oscillation time signal as the cycle start time of the last cycle, and determining a time of the first oscillation time signal as a collection time of the first image;

[0013] controlling the first light source to be turned on for collection of the first image.

[0014] Optionally, the step of controlling the first light source to be turned on for collection of the first image comprises:

[0015] controlling the first light source to be turned on;

[0016] acquiring a state signal of the first light source;

[0017] determining whether the brightness of the first light source reaches a peak value according to the state signal;

[0018] when the brightness of the first light source reaches the peak value, controlling a camera of the scanner to take a photo to acquire the first image.

[0019] Optionally, the step of acquiring the state signal of the first light source comprises:

[0020] acquiring a third oscillation time signal of the crystal oscillation source, and taking a time difference between the third oscillation time signal and a cycle start time of a last cycle as the state signal.

[0021] Optionally, the step of determining whether the brightness of the first light source reaches a peak value according to the state signal comprises:

[0022] when the state signal is greater than or equal to a second preset time difference, determining that the brightness of the light source reaches the peak value;

[0023] when the state signal is less than the second preset time difference, determining that the brightness of the light source does not reach the peak value.

[0024] Optionally, the step of determining the collection time of the second image according to the second oscillation time signal and collecting the second image further comprises:

[0025] if a time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to a third preset time difference, controlling the second light source to be turned on.

[0026] Optionally, the step of controlling the second light source to be turned on if the time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to the third preset time difference further comprises:

[0027] acquiring a scanning work signal;

[0028] If the scanning signal is a continue signal, then return to obtain the first oscillation time signal of the crystal oscillator.

[0029] If the scanning signal is a stop signal, then the scanning ends.

[0030] To achieve the above objectives, the present invention also provides a storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the scanner control method described above.

[0031] To achieve the above objectives, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the scanner control method as described above.

[0032] To achieve the above objectives, the present invention also provides a scanner, the scanner comprising:

[0033] camera;

[0034] First light source;

[0035] Crystal oscillator;

[0036] Second light source;

[0037] A control module is electrically connected to the camera, the first light source, the second light source, and the crystal oscillator, respectively, and the control module performs the steps of the scanner control method as described in any one of claims 1 to 7.

[0038] In the technical solution, the first oscillation time signal of the crystal oscillation source is acquired; the acquisition time of the first image is determined according to the first oscillation time signal, and the first image is acquired; the second oscillation time signal of the crystal oscillation source is acquired; the acquisition time of the second image is determined according to the second oscillation time signal, and the second image is acquired; and the first image and the second image are reconstructed into a 3D model. In the technical solution, the crystal oscillation source is introduced as a clock source to obtain a frequency-stable clock signal, so that the time reference accuracy is very high, and the clock reference of the scanner is obtained. Since the acquisition time of the first image and the second image is determined by the first oscillation time signal and the second oscillation time signal, and the signal frequency is stable, the acquisition time difference of the first image and the second image can be reduced to a very small value by setting the time length of the first oscillation time signal and the second oscillation time signal. At this time, the first image and the second image with nearly coinciding time can be obtained without complex similarity processing algorithm, so that the first image and the second image are quickly reconstructed into a 3D model. The control method of the scanner is improved, the algorithm complexity is reduced, the requirement for hardware is reduced, and the hardware with low cost can be used to solve the technical problem of high cost of the single-camera scanner. BRIEF DESCRIPTION OF DRAWINGS

[0039] The application will be further described below with reference to the drawings and embodiments.

[0040] Figure 1 It is a flowchart of the scanner control method in one embodiment.

[0041] Figure 2 It is a flowchart of the scanner control method in one embodiment.

[0042] Figure 3 It is a flowchart of the scanner control method in one embodiment.

[0043] Figure 4 It is a flowchart of the scanner control method in one embodiment.

[0044] Figure 5 It is a flowchart of the scanner control method in one embodiment.

[0045] Figure 6 It is a module diagram of the scanner in one embodiment. DETAILED DESCRIPTION

[0046] The present section will describe the specific embodiments of the present application in detail, the preferred embodiments of the present application are shown in the drawings, the role of the drawings is to supplement the description of the text part of the description, so that people can intuitively and visually understand each technical feature and the overall technical solution of the present application, but it cannot be understood as a limitation on the protection scope of the present application.

[0047] The present application provides a scanner control method, which is used to solve the technical problem of high cost of single-camera scanner.

[0048] In an embodiment, as shown in Figure 1 The scanner control method comprises the following steps:

[0049] S1, acquiring a first oscillation time signal of the crystal oscillation source;

[0050] The first oscillation time signal of the crystal oscillation source is used as the system standard time of the scanner, the period in the last cycle refers to the complete cycle of scanning an object and reconstructing the 3D model of the object, and the start time of the period in the last cycle refers to the time of the crystal oscillation source when the light source is turned on in the last cycle.

[0051] S2, determining the acquisition time of the first image according to the first oscillation time signal and acquiring the first image;

[0052] S3, acquiring a second oscillation time signal of the crystal oscillation source;

[0053] S4, determining the acquisition time of the second image according to the second oscillation time signal and acquiring the second image;

[0054] S5, reconstructing the first image and the second image into a 3D model.

[0055] In the above scheme, the crystal oscillation source is introduced as a clock source to obtain a clock signal with stable frequency, so that the time reference accuracy is very high, and the clock reference of the scanner is obtained. Since the acquisition time of the first image and the second image is determined by the first oscillation time signal and the second oscillation time signal, and the signal frequency is stable, the acquisition time difference of the first image and the second image can be reduced to a very small value by setting the time length of the first oscillation time signal and the second oscillation time signal. At this time, without complex similarity processing algorithm, the first image and the second image with nearly coinciding time can be obtained, so that the first image and the second image can be quickly reconstructed into a 3D model. By improving the control method of the scanner, the algorithm complexity is reduced, the requirement for hardware is reduced, and the hardware with low cost can be used, so as to solve the technical problem of high cost of single-camera scanner.

[0056] Optionally, reconstructing the first image and the second image into a 3D model actually carries out algorithmic calculation splicing of the object structure information and the surface texture information collected by the industrial camera in high speed time-sharing mode, so as to realize reconstruction of the object 3D model. This can be realized by an algorithm in the prior art, and will not be described here.

[0057] In an embodiment, as shown in Figure 2 the step of determining the acquisition time of the first image according to the first oscillation time signal and acquiring the first image comprises:

[0058] S21, acquiring a cycle start time of a previous cycle;

[0059] S22, if a time difference between the first oscillation time signal and the cycle start time of the previous cycle is greater than or equal to a first preset time difference, updating the first oscillation time signal to the cycle start time of the previous cycle, and determining a time of the first oscillation time signal as the acquisition time of the first image;

[0060] S23, controlling the first light source to be turned on to acquire the first image.

[0061] When the time difference between the first oscillation time signal and the cycle start time of the previous cycle is greater than or equal to the first preset time difference, it indicates that the previous cycle has been completed, at this time, the first oscillation time signal is updated to the cycle start time of the previous cycle to ensure accurate start of the next scanning process. The step of controlling the light source of the scanner to be turned on can be performed simultaneously or delayed with the step of updating the first oscillation time signal to the cycle start time of the previous cycle. When performed simultaneously, the scanning process can be controlled to be relatively short. When performed delayed, the requirements for the controller or the processor can be slightly reduced, further reducing the hardware cost of the scanner carrying the scheme of the application.

[0062] Optionally, the first preset time difference is set to a time interval of each scanning cycle, which can be set to 100-150uS.

[0063] In an embodiment, as shown in Figure 3 the step of controlling the first light source to be turned on to acquire the first image comprises:

[0064] S231, controlling the first light source to be turned on;

[0065] S232, acquiring a state signal of the first light source;

[0066] The state signal is used to reflect the working state of the light source of the scanner, and changes with the change of the working state. The state signal can be a high or low level or other types of control signals.

[0067] S233, judging whether the brightness of the first light source reaches a peak value according to the state signal;

[0068] At this time, in a pre-experimental environment or a test process, data of each stage of the light source is stored by sampling, so as to establish a one-to-one correspondence between the state signal and the working state, so that whether the brightness of the light source reaches the peak value can be judged through the state signal.

[0069] S234, when the brightness of the first light source reaches the peak value, controlling the camera of the scanner to take a picture to obtain a first image.

[0070] First of all, it needs to be pointed out that the scanner generally includes two light sources and a camera, in the present application, the first light source is used to irradiate the object to be detected, and the camera is used to take a picture of the object, when the first light source selects a structured light source, a one-dimensional or two-dimensional image can be projected onto the measured object, and finally the image of the object taken by the camera will change according to the shape of the measured object, so that the surface shape of the measured object can be more accurately judged according to the image taken by the camera.

[0071] Based on the above structure, in the above embodiment, the first light source of the scanner is controlled so that the camera is controlled to take a picture when the first light source reaches the peak value, at this time, the definition and brightness of the object to be scanned irradiated by the first light source reach the highest, so as to improve the accuracy and definition of the first image, compared with the traditional scanner, through the above embodiment, the first light source and the camera of the scanner can be triggered in order, so as to solve the technical problem that the data accuracy of the measured object is low due to the asynchronization of triggering and exposure. In addition, the present application does not use the synchronous opening mode of the first light source and the camera, so as to further avoid the error caused by the synchronous opening of the first light source and the camera.

[0072] It needs to be pointed out that the embodiment of the present application is applied to a 3D scanner, due to the particularity of the 3D scanner, it greatly depends on the structured light source to project a one-dimensional or two-dimensional image onto the measured object, therefore, by taking a picture at the peak period of the first light source, the definition provided to the first image can be improved, and the error caused by the unclarity of the first image can be reduced.

[0073] In an embodiment, the step of obtaining the state signal of the first light source comprises:

[0074] obtaining a third oscillation time signal of the crystal oscillation source, and taking the time difference between the third oscillation time signal and the start time of the last cycle as the state signal.

[0075] The above embodiment obtains the time difference between the third oscillation time signal and the cycle start time of the last cycle. In the scheme of the present application, the light source of the scanner is controlled to be turned on when the time difference between the first oscillation time signal and the cycle start time of the last cycle is greater than or equal to the first preset time difference. Therefore, the actual significance of the step of taking the time difference between the third oscillation time signal and the cycle start time of the last cycle as the state signal is to monitor the turn-on time of the light source. At this time, the monitoring does not need to be performed by setting a sensor and a feedback loop, thereby simplifying the machine connection line from the device.

[0076] In an embodiment, the step of determining whether the brightness of the first light source reaches a peak value according to the state signal comprises:

[0077] When the state signal is greater than or equal to the second preset time difference, it is determined that the brightness of the light source reaches a peak value.

[0078] When the state signal is less than the second preset time difference, it is determined that the brightness of the light source does not reach a peak value.

[0079] In the exemplary technology, the determination of whether the brightness of the first light source, i.e., the structured light source, reaches a peak value is generally rare. According to the constant current driving and PWM driving principles of the light source, the skilled person in the art believes that the values of the driving signals are directly fed back to determine whether the brightness of the light source meets the actual demand. However, this needs to additionally set a feedback loop and increase the determination of current, voltage and other data, and also needs to set parameters for comparison, thereby causing the diversification and complication of data.

[0080] In the above scheme of the present application, when the object to be detected is scanned, in order to accurately determine the peak value without changing the product circuit and structure, the method of detecting time is proposed to determine whether the brightness of the light source reaches a peak value. That is, when the time meets the preset condition, i.e., the state signal is greater than or equal to the second preset time difference, it can be directly confirmed that the first light source reaches a peak value, without increasing the determination of current, voltage and other data from the process, thereby simplifying the control factor and reducing the difficulty of determination.

[0081] Optionally, after the step of determining that the brightness of the light source does not reach a peak value when the state signal is less than the second preset time difference, the method further comprises:

[0082] Returning to the step of obtaining the third oscillation time signal of the crystal oscillation source.

[0083] At this time, the step of obtaining the third oscillation time signal of the crystal oscillation source can continuously confirm whether the brightness of the light source reaches a peak value, thereby confirming in time when the peak value is reached without waiting.

[0084] Optionally, the first preset time difference is generally 20-50 microseconds, preferably 30 microseconds.

[0085] Optionally, the second preset time difference is generally 50-80 microseconds, preferably 50 microseconds. That is, the time difference between the third oscillation time signal and the first oscillation time signal is 20 microseconds.

[0086] Optionally, the time difference between the third oscillation time signal and the first oscillation time signal can be set to 6 milliseconds-50 microseconds.

[0087] In an embodiment, when the brightness of the first light source reaches a peak, the step of controlling the camera of the scanner to take a picture to obtain a first image further comprises:

[0088] Obtaining a fourth oscillation time signal, and if the time difference between the fourth oscillation time signal and the third oscillation time signal is greater than or equal to a fourth preset time difference, controlling the first light source to turn off.

[0089] At this time, when the time difference between the fourth oscillation time signal and the third oscillation time signal is greater than or equal to the fourth preset time difference, the first light source is controlled to turn off, which can ensure sufficient exposure time for the camera. Thus, synchronous and orderly triggering is achieved.

[0090] Optionally, the fourth preset time difference is 70 microseconds-8 milliseconds.

[0091] Optionally, the step of determining the acquisition time of the second image according to the second oscillation time signal and acquiring the second image further comprises:

[0092] If the time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to a third preset time difference, the second light source is controlled to turn on.

[0093] By controlling the third preset time difference, the influence of the second light source on the acquisition of the second image is avoided, and the time difference between the acquisition of the first image and the second image can be reduced to a very small value. At this time, without complex similarity processing algorithms, the first image and the second image with nearly coinciding times can be obtained, so that the first image and the second image can be quickly reconstructed into a 3D model, thereby solving the technical problem of high cost of a single-camera scanner.

[0094] Optionally, the second light source is a flash, and the first light source is an LED projection lamp or a structured light source.

[0095] Optionally, the third preset time difference is 1-3 milliseconds.

[0096] In an embodiment, if the time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to a third preset time difference, the step of controlling the second light source to turn on further comprises:

[0097] obtaining a fifth oscillation time signal of the crystal oscillation source, and if the time difference between the fifth oscillation time signal and the second oscillation time signal is greater than or equal to a fifth preset time difference, controlling the second light source to turn off.

[0098] Optionally, the fifth preset time difference is 50uS-70uS.

[0099] In an embodiment, as shown in the following table, the step of controlling the second light source to turn on if the time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to a third preset time difference further comprises: Figure 4

[0100] S6, obtaining a scanning working signal;

[0101] The scanning working signal can be a trigger signal from the outside or a scanning working signal from the controller of the scanner itself.

[0102] S7, if the scanning working signal is a continue working signal, returning to execute the step of obtaining the first oscillation time signal of the crystal oscillation source;

[0103] S8, if the scanning working signal is a stop working signal, ending the scanning.

[0104] Through the above scheme, the sustainable and reliable triggering of each scanning cycle can be ensured.

[0105] In an embodiment, as shown in the following table, the step of controlling the camera to take a picture when the brightness of the first light source reaches a peak value comprises: Figure 5

[0106] S2341, when the brightness of the first light source reaches a peak value;

[0107] S2342, the control module of the scanner outputs a first start signal to the camera;

[0108] The first start signal at this time can be a high-low level signal format.

[0109] S2343, obtaining a sixth oscillation time signal of the crystal oscillation source, and if the time difference between the sixth oscillation time signal and the third oscillation time signal is greater than or equal to a sixth preset time difference, the control module of the scanner outputs a second start signal to the camera;

[0110] ​​S2344、in the receiving the first start signal and interval of at least the sixth preset time difference after receiving the second start signal, the camera takes a picture.

[0111] In the above embodiment, the control module of the scanner outputs two start signals with a time interval to control the camera to start, and at the camera end, the camera has a controller which stores the first start signal after receiving it, and triggers the picture taking procedure after receiving the second start signal after a preset time, so that the control signal is divided into multiple segments, and the camera starts after meeting certain conditions, thereby avoiding false triggering.

[0112] Optionally, the sixth preset time difference 6mS-50uS.

[0113] In the exemplary technology, the subsequent action is generally triggered by the PWM signal or high-low level signal, and other technical solutions are not involved. In the above scheme of the present application, since the control module controls the camera, the shutter of the camera is very fast, and the control scheme using the above WM signal or high-low level signal is easy to cause false triggering, and the image distortion of the camera sampling is very easy to cause when the environmental light source is not clear. If the shutter sampling is triggered only by the PWM signal or high-low level signal, the precision of the sampling data is very low.

[0114] In the embodiment of the present application, based on the high-low level signal control principle, a new triggering method is proposed, that is, when the control module controls the camera to take a picture, the TTL high level signal is used as the first start signal and the second start signal, and the two signals need to be separated by at least the fifth preset time difference, that is, a complete trigger timing, thereby avoiding the false triggering scheme of a single high-low level in the prior art. In addition, the purpose of quickly controlling the camera to take a picture can be achieved to the greatest extent. Since the high-low level triggering is relatively simple, the fifth preset time difference can be reduced as much as possible, and can be close to or even exceed the transmission speed of the PWM signal, but the false triggering of the PWM signal control can be avoided.

[0115] The present application also proposes a storage medium storing a computer program, which is executed by a processor to make the processor execute the steps of the scanner control method as described above.

[0116] It should be noted that since the storage medium of the present application includes all the steps of the above scanner control method, the storage medium can also implement all the schemes of the scanner control method and has the same beneficial effects, which will not be described here.

[0117] The scanner control method in any of the above method embodiments is performed. The apparatus embodiments described above are merely illustrative, wherein units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme. Those skilled in the art can understand that all or some of the steps in the above disclosed method can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, as known to those skilled in the art, communication media generally includes computer readable instructions, data structures, program modules or other data in modulated data signals such as carrier waves or other transmission media, and can include any information delivery medium.

[0118] The application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to enable the processor to perform the steps of the above scanner control method.

[0119] It should be noted that since the computer device of the present application includes all the steps of the above scanner control method, the computer device can also implement all the schemes of the scanner control method and has the same beneficial effects, which will not be described here.

[0120] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the control processor, and these remote memories can be connected via a network to a power transmission circuit crossing the intelligent identification device. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0121] This application also proposes a scanner, such as Figure 6 As shown, the scanner includes:

[0122] Camera 20;

[0123] First light source 30;

[0124] Crystal oscillator 40;

[0125] Second light source 50;

[0126] The control module 10 is electrically connected to the camera 20, the first light source 30, the second light source 50 and the crystal oscillator 40 respectively, and the control module 10 executes the steps of the scanner control method described above.

[0127] It should be noted that since the scanner of this application includes all the steps of the scanner control method described above, the scanner can also implement all the solutions of the scanner control method and have the same beneficial effects, which will not be repeated here.

[0128] Because our 3D scanning equipment requires microsecond-level precision for synchronous control timing, this places high demands on the frequency stability of the MCU's crystal oscillator. Obtaining a stable, high-frequency signal source as the system's clock reference is therefore crucial. Since our hardware uses a low-cost MCU (GD32F103RET6) with limited internal clock precision, a high-frequency, high-stability external crystal oscillator is necessary. However, most crystal oscillators suffer from frequency shifts due to temperature variations. Temperature-controlled crystal oscillators, on the other hand, offer advantages such as high precision, high stability, and low phase noise. Therefore, we have chosen a temperature-controlled crystal oscillator as the high-precision synchronous timing control clock source for the main control MCU (GD32F103RET6) of our 3D scanning equipment.

[0129] The constant temperature crystal oscillator is that high-precision crystal and oscillation circuit are placed in a constant temperature tank, and the constant temperature tank keeps temperature constant under the control of a control circuit, so that the internal crystal is protected from the influence of external temperature changes, the frequency deviation of the quartz crystal is avoided, and the stable output of the clock frequency is achieved.

[0130] The constant temperature frequency deviation control system adopts a thermistor to perform closed-loop compensation control of temperature, so as to realize closed-loop constant temperature control of the constant temperature tank.

[0131] After the constant temperature crystal oscillator with an external 8MHz outputting stable clock frequency to the MCU (GD32F103RET6), the frequency is divided by the internal PLL phase-locked loop of the MCU (GD32F103RET6), and the frequency is multiplied to become a stable 72MHz high-frequency clock source, and one clock cycle time is 1 / 72M = 0.0138uS. That is, the clock cycle accuracy of the MCU can reach 0.0138uS.

[0132] The MCU (GD32F103RET6) counts the clock by using a tick counter to realize the control of the 3D scanning time sequence, and the steps are as follows:

[0133] 1. First, set the clock source in the software.

[0134] 2. Set the reload number and the count period value.

[0135] 3. Start the interrupt.

[0136] Optionally, the control module is a microcontroller.

[0137] In the prior art, in order to realize the synchronous triggering of the light source and the camera, a PCI (Peripheral Component Interconnect, Peripheral Component Interconnect) image acquisition card and an FPGA (Field Programmable Gate Array, Field Programmable Gate Array) are generally used to output the frame clock synchronization signal and the structured light source synchronization signal of the industrial camera. Since the cost of the PCI image acquisition card and the FPGA is generally high, a very complex design and wiring are required, and the cost is relatively high. The microcontroller selected by the high-low level signal not only realizes the synchronous triggering, but also orderly controls the triggering time sequence, realizes better control precision and scanning effect than the prior art, and compared with the expensive PCI image acquisition card and the FPGA, the microcontroller can greatly reduce the cost.

[0138] Optionally, a microcontroller of a model such as GD32F103RCT6 can be selected.

[0139] Optionally, the camera is an industrial camera, and the first light source is a structured light source.

[0140] Any combination of the above-described technical features of the above embodiments can be made, and for the sake of brevity, not all possible combinations are described, however, any combination of the above-described technical features should be considered as within the scope of the present specification, as long as the combination is not contradictory.

Claims

1. A scanner control method characterized by, The scanner control method comprises: acquiring a first oscillation time signal of a crystal oscillation source; determining a first image acquisition time according to the first oscillation time signal and acquiring the first image; acquiring a second oscillation time signal of the crystal oscillation source; determining a second image acquisition time according to the second oscillation time signal and acquiring the second image; reconstructing the first image and the second image into a 3D model; wherein the step of determining the first image acquisition time according to the first oscillation time signal and acquiring the first image comprises: acquiring a cycle start time of a previous cycle; if a time difference between the first oscillation time signal and the cycle start time of the previous cycle is greater than or equal to a first preset time difference, updating the first oscillation time signal as the cycle start time of the previous cycle and determining a time of the first oscillation time signal as the first image acquisition time; controlling a first light source to turn on to acquire the first image; wherein the step of controlling the first light source to turn on to acquire the first image comprises: controlling the first light source to turn on; acquiring a state signal of the first light source; determining whether a brightness of the first light source reaches a peak value according to the state signal; when the brightness of the first light source reaches the peak value, controlling a camera of a scanner to take a photo to acquire the first image.

2. The scanner control method of claim 1, wherein, The step of acquiring the state signal of the first light source comprises: acquiring a third oscillation time signal of the crystal oscillation source, and taking a time difference between the third oscillation time signal and the cycle start time of the previous cycle as the state signal.

3. The scanner control method of claim 2, wherein, The step of determining whether the brightness of the first light source reaches the peak value according to the state signal comprises: when the state signal is greater than or equal to a second preset time difference, determining that the brightness of the light source reaches the peak value; when the state signal is less than the second preset time difference, determining that the brightness of the light source does not reach the peak value.

4. The scanner control method of claim 1, wherein, The step of determining the second image acquisition time according to the second oscillation time signal and acquiring the second image further comprises: if a time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to a third preset time difference, controlling a second light source to turn on.

5. The scanner control method of claim 4, wherein, The step of controlling the second light source to turn on if the time difference between the second oscillation time signal and the first oscillation time signal is greater than or equal to the third preset time difference is followed by further steps comprising: acquiring a scanning work signal; if the scanning work signal is a continue work signal, returning to acquire the first oscillation time signal of the crystal oscillation source; if the scanning work signal is a stop work signal, ending the scanning.

6. A storage medium, characterized by A computer program is stored, and the computer program is executed by a processor to make the processor execute the steps of the scanner control method according to any one of claims 1 to 5.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the scanner control method according to any one of claims 1 to 5.

8. A scanner characterized by, The scanner comprises: a camera; a first light source; a crystal oscillation source; a second light source; a control module electrically connected with the camera, the first light source, the second light source and the crystal oscillation source respectively, the control module performing the steps of the scanner control method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Scanning device for quickly obtaining bra mold cup three-dimensional images

    CN104567717A

  • Light source of slide scanner

    CN110233973A