Head position detection method, device and digital photography equipment

Through the combination of photoelectric sensors and code disks, combined with metal sensors and PID control algorithms, the problem of poor head position control accuracy in digital photography equipment is solved, precise detection and control of generator position is achieved, and imaging quality and equipment stability are improved.

CN118490266BActive Publication Date: 2025-09-02BEIJING WANDONG MEDICAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410695340.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-09-02
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

The existing digital photography equipment has poor control accuracy at the head position, resulting in poor exposure and image acquisition effects. The traditional limit switch detection method can only detect designated positions, while the encoder detection has design difficulties, high cost and accuracy problems.

Method used

The photoelectric sensor and code disk are used to generate pulse signals through the photoelectric sensor to receive light in the light-transmitting hole. Combined with the metal sensor to detect the limit, the precise detection and control of the generator position is achieved, and the current position of the generator is determined by the change in the pulse number of the photoelectric sensor, and the motion speed is optimized by combining the PID control algorithm.

Benefits of technology

Accurate detection and control of the generator position is realized, imaging quality is improved, and shooting accuracy of multi-angle images and equipment stability is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118490266B_ABST
    Figure CN118490266B_ABST
Patent Text Reader

Abstract

The present application discloses a head position detection method, device and digital photography equipment. In the digital photography equipment, the head rotation assembly can move the generator, and emit radiation from various angles to the flat-panel detector assembly for exposure and image acquisition; and when the generator moves, the photoelectric sensor on it can receive light passing through the light-transmitting holes on the code disk of the head rotation assembly. In response to the shooting instruction; the head rotation assembly is controlled to make the generator move from the initial position toward the designated shooting position corresponding to the shooting instruction; the number of pulses of the photoelectric sensor is counted once when the high-level signal returned by the photoelectric sensor becomes a low-level signal, then by monitoring the change in the number of pulses of the photoelectric sensor, the position change of the generator relative to each light-transmitting hole can be determined, and then the current angle and position of the generator can be obtained; when the generator reaches the designated shooting position, the generator is controlled to perform exposure to shoot the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital photography technology, and in particular to a head position detection method, device and digital photography equipment. Background Art

[0002] Currently, medical devices equipped with digital photography systems are primarily used in diagnostic centers and hospitals, playing a particularly important role in disease detection and screening. With the rapid development of automation technology, automated medical equipment in my country has also experienced rapid growth. The intelligentization of medical equipment not only alleviates the heavy workload of hospitals in clinical diagnosis and treatment but also helps solve many medical problems. As a primary aid for doctors in identifying difficult patient conditions, stable and accurate imaging capabilities are paramount. Summary of the Invention

[0003] The present application provides a head position detection method, device and digital photography equipment, which can solve the technical problem of poor head position control accuracy in related technologies.

[0004] In a first aspect, an embodiment of the present application provides a head position detection method, which is applied to a digital photography device, the digital photography device comprising: a head rotation assembly, a generator, and a photoelectric sensor; the generator is connected to the head rotation assembly, and the generator can move on the head rotation assembly to adjust the emission position and emission angle; the photoelectric sensor is mounted on the generator, the head rotation assembly comprises a code disk and a light source emitter, the code disk is provided with at least one light-transmitting hole, and the light emitted by the light source emitter can be received by the photoelectric sensor and output a low-level signal when passing through the light-transmitting hole; the method comprises:

[0005] In response to a received shooting instruction, the shooting instruction is used to instruct the digital photography device to shoot an angle and a number of images;

[0006] Determining the initial position of the generator based on the initial pulse count of the photoelectric sensor, and controlling the handpiece rotation assembly to move the generator from the initial position toward the designated shooting position corresponding to the shooting instruction, wherein the pulse count is counted once when the high-level signal returned by the photoelectric sensor changes to a low-level signal;

[0007] monitoring changes in the number of pulses of the photoelectric sensor, and determining the current position of the generator based on the initial number of pulses and the current number of pulses of the photoelectric sensor;

[0008] When the generator reaches the designated shooting position, the generator is controlled to emit radiation for exposure based on the shooting instruction, so that the digital photography device shoots the target image corresponding to the shooting instruction under exposure.

[0009] In a second aspect, an embodiment of the present application provides a head position detection device, which is applied to a digital photographic device, the digital photographic device comprising: a head rotating assembly, a generator, and a photoelectric sensor; the generator is connected to the head rotating assembly, and the generator can move on the head rotating assembly to adjust the emission position and emission angle; the photoelectric sensor is mounted on the generator, the head rotating assembly comprises a code disk and a light source emitter, the code disk is provided with at least one light-transmitting hole, and the light emitted by the light source emitter can be received by the photoelectric sensor and output a low-level signal when passing through the light-transmitting hole; the device comprises:

[0010] An instruction response module, configured to respond to a received shooting instruction, wherein the shooting instruction is used to instruct the digital photography device to shoot an image at an angle and a number of times;

[0011] a generator control module, configured to determine an initial position of the generator based on an initial number of pulses from the photoelectric sensor, and control the handpiece rotation assembly to move the generator from the initial position toward a designated shooting position corresponding to the shooting instruction, wherein the number of pulses is counted once when a high-level signal returned by the photoelectric sensor changes to a low-level signal;

[0012] a position detection module, configured to monitor changes in the number of pulses of the photoelectric sensor and determine the current position of the generator based on the initial number of pulses and the current number of pulses of the photoelectric sensor;

[0013] The shooting control module is used to control the generator to emit radiation for exposure based on the shooting instruction when the generator reaches the designated shooting position, so that the digital photography device shoots the target image corresponding to the shooting instruction under exposure.

[0014] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the above method.

[0015] In a fourth aspect, an embodiment of the present application provides a digital photography device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the method; the digital photography device comprises: a head rotating assembly, a generator, and a photoelectric sensor; the generator is connected to the head rotating assembly, and the generator can be moved on the head rotating assembly to adjust the emission position and emission angle; the photoelectric sensor is installed on the generator, and the head rotating assembly comprises a code disk and a light source emitter, and the code disk is provided with at least one light-transmitting hole, and the light emitted by the light source emitter can be received by the photoelectric sensor and output a low-level signal when passing through the light-transmitting hole.

[0016] The beneficial effects of the technical solutions provided by some embodiments of the present application include at least:

[0017] The present application provides a head position detection method for digital photography equipment, wherein a head rotation assembly can move a generator, emitting radiation from various angles to a flat-panel detector assembly for exposure, thereby achieving multi-angle image capture; and when the generator moves, a photoelectric sensor on it can receive light passing through a light-transmitting hole on a code disk of the head rotation assembly, so that the device can obtain the current position of the generator based on the level information returned by the photoelectric sensor, thereby achieving generator position detection. In response to a shooting instruction, the head rotation assembly is controlled to move the generator from an initial position toward a designated shooting position corresponding to the shooting instruction; the number of pulses of the photoelectric sensor is counted once when the high-level signal returned by the photoelectric sensor changes to a low-level signal, and then the change in the number of pulses of the photoelectric sensor is monitored, and the current position of the generator can be determined based on the number of pulses before and after the change; when the generator reaches the designated shooting position, the generator is controlled to emit radiation for exposure to capture the target image corresponding to the shooting instruction. Since the photoelectric sensor can generate a pulse signal through the light transmitted through the light hole every time the generator passes through the light hole, the change in the number of pulses can be used to determine the position change of the generator relative to each light hole, and then the angle and position of the generator on the head rotating assembly can be obtained, thereby accurately detecting and controlling the generator position, thereby improving the imaging quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1A schematic diagram of the component structure of a digital photography device provided in an embodiment of the present application;

[0020] Figure 2 A flow chart of a method for detecting the position of a machine head provided in an embodiment of the present application;

[0021] Figure 3 A flow chart of a method for detecting the position of a machine head provided in an embodiment of the present application;

[0022] Figure 4 A schematic diagram of a flow chart for initializing the position of a machine head provided in an embodiment of the present application;

[0023] Figure 5 A flow chart of a pulse count correction function provided in an embodiment of the present application;

[0024] Figure 6 A logic flow chart of an exception handling function provided in an embodiment of the present application;

[0025] Figure 7 A structural block diagram of a head position detection device provided in an embodiment of the present application;

[0026] Figure 8 A schematic structural diagram of a digital photography device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] To make the features and advantages of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.

[0028] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0029] In the medical system, the application scenarios of digital photography equipment are wide and diverse, among which digital X-ray photography systems are an important representative. The main application scenarios of medical equipment equipped with digital photography systems include diagnostic centers, hospitals and other fields, especially playing an important role in disease inspection and screening. Currently, with the rapid development of automation technology, the intelligentization of medical equipment has not only alleviated the problem of excessive workload in clinical diagnosis and treatment in hospitals, but also helped solve many medical problems. Medical equipment is the main auxiliary tool for doctors to find patients' difficult diseases. The control precision of the equipment during shooting determines the accuracy of the captured image. Accurate images are crucial for medical diagnosis, so the stable and accurate shooting function of the equipment is the most important.

[0030] Adjusting the shooting angle with traditional digital imaging equipment typically requires the generator and flat-panel detector components to rotate simultaneously relative to each other around the center of the line segment connecting them. However, with advancements in scientific research and medical technology, and with the increasing demands of new clinical needs, such as tomography and biopsy, the exposure positioning functions of traditional equipment are no longer sufficient.

[0031] If the generator of the machine head is to be moved independently, the position of the generator needs to be accurately detected, otherwise the position of the generator cannot be accurately controlled, which affects the exposure and image acquisition effect. When currently detecting the position of the machine head generator independently, most digital photography equipment uses limit switch detection or encoder detection to determine the movement position of the generator. The limit switch detection method can detect when the motion module reaches the specified position, but it cannot detect other positions other than the specified position reached by the generator during the movement of the generator. This means that the device can only be exposed and photographed at some specified positions, and cannot control the generator to move to various angles for shooting. The encoder position detection method is to determine the real-time position of the motion module during the movement based on its feedback information, but its design is difficult and expensive, and different encoders have detection errors due to accuracy issues.

[0032] Therefore, an embodiment of the present application provides a method for detecting the position of an engine head to solve the above-mentioned technical problem of poor accuracy in controlling the position of the engine head.

[0033] See also Figure 1 , Figure 1 A schematic diagram of the component structure of a digital photography device provided in an embodiment of the present application.

[0034] In order to facilitate the description of the specific connection method of each component in the digital photographic device 100, the structural diagram of each component in the digital photographic device 100 is used as an example to introduce the embodiment of the present application. However, when the digital photographic device 100 is specifically applied, there may be other specific connection methods that can be implemented between the components. Figure 1The component structure diagram in FIG. 1 should not be understood as the only structural method of the digital photographing device 100 .

[0035] like Figure 1 As shown, digital photography device 100 includes at least a head rotation assembly 110, a generator 120, and a photoelectric sensor 130. Furthermore, digital photography device 100 also includes a flat-panel detector assembly 140. The exposure and imaging principle is that the generator 120 emits radiation that passes through an object and is received by the flat-panel detector assembly 140, thereby achieving exposure and image acquisition. Therefore, in the embodiment of the present application, the generator 120 remains relative to the flat-panel detector assembly 140 during the imaging process, so that the flat-panel detector assembly 140 can receive radiation for exposure and image acquisition regardless of the angle at which the generator 120 is positioned. Furthermore, a window is provided on the flat-panel detector assembly 140. When exposure is required, the generator 120 emits radiation, and the window on the flat-panel detector assembly 140 opens to receive the radiation from the generator 120, thereby achieving exposure and imaging. When not capturing, the window on the flat-panel detector assembly 140 remains closed. In practical scenarios, the generator 120 can be specifically an X-ray tube assembly, and the flat-panel detector assembly 140 can be specifically an amorphous silicon flat-panel detector.

[0036] Optionally, the digital photography device 100 further includes: a C-arm 150 and a C-arm rotation assembly 160 , the head rotation assembly 110 is mounted on one end of the C-arm 150 , and the flat panel detector assembly 140 is mounted on the other end of the C-arm 150 . Figure 1 (A) is a front view of the digital photographing device 100. Figure 1 (B) is a side view of the digital photographic device 100, combined with Figure 1 (A) and Figure 1 As shown in (B), C-arm 150 is a C-shaped frame with various components mounted at each end. When the digital imaging device 100 is not activated, the end housing the flat panel detector assembly 140 is at the bottom, while the end housing the handpiece rotation assembly 110 is at the top. Furthermore, C-arm rotation assembly 160 is connected to the center of the outer side of C-arm 150. Rotation of C-arm 150 by C-arm rotation assembly 160 allows simultaneous rotation of handpiece rotation assembly 110, generator 120, and flat panel detector assembly 140 around C-arm rotation assembly 160.

[0037] Furthermore, if Figure 1As shown, the generator 120 is connected to the handpiece rotating assembly 110, and the generator 120 can move on the handpiece rotating assembly 110 to adjust the emission position and emission angle. Specifically, the handpiece rotating assembly 110 also includes: an arcuate guide rail, and the center of the arcuate guide rail is the center of the flat panel detector assembly 110. There is a groove track on the arcuate guide rail for the generator 120 to slide. There is also a set of rotating components on the handpiece rotating assembly 110, which includes a guide device, a transmission device and a motor drive device. The rotating component is connected to the generator 120 and drives the generator 120 to move on the arcuate guide rail, thereby changing the angle and position of the rays emitted by the generator 120. In addition, at least one position sensor can be installed on the arcuate guide rail. The position sensor is used to detect the position of the generator 120 on the arcuate guide rail to achieve accurate control of its position.

[0038] Optionally, the working modes of the digital photography device 100 in the embodiment of the present application include at least normal photography and tomographic photography. Normal photography is to use the generator 120 to shoot a single image in a fixed state, and the image obtained is a two-dimensional plane image that can show the overall structure of a certain part of the patient's body. Therefore, when performing normal photography, the generator 120 can be moved by the head rotation assembly 110, and the generator 120 can also be moved with the flat-panel detector assembly 140 through the C-arm 150. When the generator 120 and the flat-panel detector assembly 140 move to the designated shooting position where shooting is required, the two stop moving and perform shooting. During the shooting process, the generator 120 emits rays and the flat-panel detector assembly 140 opens a window to achieve exposure.

[0039] On the other hand, the working principle of Computed Axial Tomography (CT) is that the generator 120 continuously moves, and during this movement, it works together with the flat-panel detector assembly 140 to continuously perform exposure and image acquisition. Computer algorithms then process the image data from multiple angles to reconstruct a three-dimensional tomographic image of the patient's internal body. Therefore, when performing CT imaging, the generator 120 must first move from an initial position to the designated imaging position where imaging is to begin. During this process, the generator 120 can be moved by the head rotation assembly 110. At the same time, the generator 120 and the flat-panel detector assembly 140 can also move together via the C-arm 150. When the generator 120 and the flat panel detector assembly 140 move to the designated shooting position where shooting is required, the generator 120 starts to emit rays and the flat panel detector assembly 140 remains in an open window state. Then, the generator 120 moves around the flat panel detector assembly 140 according to the movement route indicated in the shooting instruction. During this movement process, the generator 120 and the flat panel detector assembly 140 achieve continuous exposure to collect image data from multiple angles during the movement process and complete the tomographic shooting.

[0040] Optionally, the photoelectric sensor 130 is mounted on the generator 120 and rotates with the generator 120. The operating principle of the photoelectric sensor 130 is that the level signal generated when it receives light is different from that when it does not receive light. Therefore, based on the level signal output by the photoelectric sensor 130, it is possible to determine whether the photoelectric sensor 130 has received light. In the embodiment of the present application, the photoelectric sensor 130 outputs a low-level signal when it receives light and a high-level signal when it does not receive light.

[0041] At the same time, in the embodiment of the present application, the head rotation assembly 110 includes a code disk and a light source emitter, wherein the light source emitter is installed inside the device; the code disk is located on the arc guide rail, and numbers are used to visually indicate different positions on the arc guide rail. Figure 1 It is not shown separately with a number. There is at least one light-transmitting hole distributed on the code disk. The light emitted by the light source emitter can be irradiated when passing through the light-transmitting hole. In this case, if the generator 120 passes through the light-transmitting hole with the photoelectric sensor 130, the light in the light-transmitting hole can be received by the photoelectric sensor 130 and output a low-level signal. Every time the photoelectric sensor 130 passes through a light-transmitting hole, a change in the level signal occurs; a change in the level signal is a pulse. Then, the pulse signal transmitted back by the photoelectric sensor 130 can determine the position of the generator 120 on the arc guide rail, thereby realizing accurate detection and control of the position of the generator 120. In a preferred embodiment, the light-transmitting holes on the code disk are evenly distributed.

[0042] Optionally, in order to facilitate the determination of the specific light-transmitting hole position of the generator 120 through the pulse signal of the photoelectric sensor 130, there are also left limit, right limit and middle limit on the code disk. Among them, the leftmost light-transmitting hole position is the left limit position, the rightmost light-transmitting hole position is the right limit position, and the light-transmitting hole position in the center of the code disk is the middle limit position. A metal sensor is installed at each limit position, and a metal part is installed on the generator 120 so that the metal sensor can detect the approach of the generator. When the generator 120 reaches any limit position, the metal sensor at its position can detect the arrival of the metal part and thus send back a signal, so that the digital photography device 100 determines the current position of the generator 120. Then, based on the number of pulses of the generator 120 at each limit position, combined with the change in the number of pulses when the generator 120 moves from each limit position to other positions, the number of light-transmitting holes passed by the generator 120 can be known, thereby obtaining the position of the generator 120 at the end of the movement.

[0043] In an embodiment of the present application, a digital photography device is provided. A head rotating assembly is capable of moving a generator, emitting radiation from various angles to a flat-panel detector assembly for exposure, thereby enabling the capture of multi-angle images. Furthermore, as the generator moves, a photoelectric sensor on the generator receives light passing through a light-transmitting aperture on a code disk of the head rotating assembly. Based on the level information transmitted back by the photoelectric sensor, the device can determine the current position of the generator, thereby detecting the generator's position. Specifically, when detecting the generator's position, a photoelectric sensor is installed on the generator. The pulse signal generated by the photoelectric sensor after receiving light emitted from the light-transmitting aperture on the head rotating assembly is used to locate the generator. Furthermore, a metal sensor is provided on the generator, and metal component detection is performed on the generator at multiple limit points, thereby accurately detecting whether the generator has reached each limit point. By detecting the generator's fixed position and travel distance, the generator's real-time position is detected and controlled.

[0044] See also Figure 2 , Figure 2 This is a flowchart of a method for detecting the camera head position provided in an embodiment of the present application. The execution subject of this embodiment of the present application can be a digital camera device that performs camera head position detection, a processor within the digital camera device that performs the camera head position detection method, or a camera head position detection service within the digital camera device that performs the camera head position detection method. For ease of description, the specific execution process of the camera head position detection method is described below using the example of a processor within a digital camera device as the execution subject.

[0045] like Figure 2 As shown, the head position detection method may at least include:

[0046] S202: Respond to the received shooting instruction, where the shooting instruction is used to instruct the digital photography device to shoot an angle and a number of images.

[0047] Optionally, when a control person needs to use a digital photography device to capture digital images, they can issue a capture instruction from the control console that meets their capture requirements. The capture instruction specifies the image angle and number of images required for this capture. After receiving the capture instruction, the digital photography device responds to the capture instruction, determines the angle and number of images required for this capture, and controls the various exposure and image acquisition components of the device accordingly.

[0048] S204. Determine the initial position of the generator based on the initial number of pulses of the photoelectric sensor, control the head rotation assembly to make the generator move from the initial position toward the specified shooting position corresponding to the shooting instruction, and count the number of pulses once when the high-level signal returned by the photoelectric sensor becomes a low-level signal.

[0049] Alternatively, based on the aforementioned digital photography device, when the generator carries the photoelectric sensor through the light-transmitting holes on the code disk, the light in the light-transmitting holes is received by the photoelectric sensor and outputs a low-level signal. When the photoelectric sensor does not receive light, it outputs a high-level signal. Each time the photoelectric sensor passes through a light-transmitting hole, the level of the signal changes; each level change is a pulse. The number of pulses in the photoelectric sensor is counted when the high-level signal transmitted back by the photoelectric sensor changes to a low-level signal.

[0050] Furthermore, the movement of the generator on the head rotating assembly has a direction, and can move left or right. In order to reflect the direction of the generator's movement, the pulse number counting mode can be set to a bidirectional counting mode. When the generator moves to the left, the pulse number is counted in reverse, that is, when the generator moves to the left, each time it passes a light-transmitting hole, the pulse count of the photoelectric sensor is -1; when the generator moves to the right, the pulse number is counted in the forward direction, that is, when the generator moves to the right, each time it passes a light-transmitting hole, the pulse count of the photoelectric sensor is +1. In this way, the movement direction and distance of the generator can be determined by the change in the number of pulses.

[0051] Furthermore, when the digital photographic device does not receive a shooting instruction, the generator will be in a default position. The shooting instruction will specify a certain position as the position where the generator starts exposing, and specify the position where the generator continues exposing until the end. Then, after receiving the shooting instruction, the digital photographic device first needs to move the generator from the default initial position to the specified shooting position of the exposure and image acquisition starting point corresponding to the shooting instruction. When the generator moves to the specified shooting position, the flat-panel detector component is controlled to open the window and the generator is controlled to start, and the exposure is achieved at the specified shooting position, and then the target image is captured according to the shooting instruction. Based on this, the initial position of the generator before it starts moving based on the shooting instruction can be determined according to the initial number of pulses of the photoelectric sensor, and then the head rotation component is controlled to make the generator move from the initial position toward the specified shooting position corresponding to the shooting instruction. During this movement, the position change of the generator can be determined based on the change in the number of pulses.

[0052] S206 , monitoring the change in the number of pulses of the photoelectric sensor, and determining the current position of the generator according to the initial number of pulses and the current number of pulses of the photoelectric sensor.

[0053] Optionally, as the generator moves, the number of pulses from the photoelectric sensor is continuously monitored. Each change in the number of pulses indicates that the generator has passed through a new light-transmitting aperture. In other words, as the number of pulses continuously changes, the generator can be located based on the initial and current number of pulses from the photoelectric sensor, thereby achieving accurate detection of the generator's position.

[0054] S208. When the generator reaches the designated shooting position, the generator is controlled to emit radiation for exposure based on the shooting instruction to shoot the target image corresponding to the shooting instruction.

[0055] Optionally, the generator position is monitored based on the change in the number of pulses. When it is determined that the generator has reached the specified shooting position through the number of pulses before and after the change, it means that exposure and image acquisition can be started at this time. Then, a generator trigger instruction is automatically generated, and the generator is automatically triggered to emit rays for exposure based on the generator trigger instruction, so that the digital photography equipment can shoot the target image corresponding to the shooting instruction under exposure, thereby realizing fully automatic control of the equipment exposure based on the detection of the number of pulses.

[0056] Optionally, the flat-panel detector assembly can be controlled by automatically triggering the flat-panel detector assembly to open its window when the generator reaches the designated shooting position. After the flat-panel detector assembly window is fully opened, the generator is automatically triggered to emit radiation to achieve exposure. However, considering that it takes a certain amount of time for the flat-panel detector assembly to fully open its window, and the time the flat-panel detector assembly window is fully open must completely cover the generator's radiation emission time to ensure the integrity of the exposure image, in order to promptly and accurately open the flat-panel detector assembly window, the timer timing can be calculated based on the generator's movement speed, movement distance, and the flat-panel detector assembly's own window opening time when the generator begins to move. The flat-panel detector assembly is controlled to open the window after the timer timing expires, so that the flat-panel detector assembly has completed window opening when the generator is about to reach the designated shooting position. In this way, the flat-panel detector and the generator of the head are directly controlled separately during the exposure process, so that the generator and the flat panel operate independently and do not affect each other, reducing unnecessary delays in the control process and thus improving the shooting efficiency of the device.

[0057] When monitoring the position information of the generator based on the initial pulse number and the current pulse number of the photoelectric sensor

[0058] The window of the flat panel detector assembly has been opened to receive the radiation emitted by the generator and penetrate the object being photographed.

[0059] In an embodiment of the present application, a method for detecting the position of a handpiece is provided. In response to a shooting instruction, the handpiece rotation assembly is controlled so that the generator moves from an initial position toward a designated shooting position corresponding to the shooting instruction. The number of pulses of the photoelectric sensor is counted once when the high-level signal returned by the photoelectric sensor changes to a low-level signal. By monitoring the change in the number of pulses of the photoelectric sensor, the current position of the generator can be determined based on the number of pulses before and after the change. When the current position is detected to be the designated shooting position based on the number of pulses before and after the change, a generator trigger instruction is generated, and based on the generator trigger instruction, the generator is automatically triggered to emit radiation for exposure to capture the target image corresponding to the shooting instruction. Since each time the generator passes through a light-transmitting hole, the photoelectric sensor can generate a pulse signal through the light transmitted through the light-transmitting hole. Therefore, the change in the number of pulses can be used to determine the position change of the generator relative to each light-transmitting hole, and then the angle and position to which the generator moves on the handpiece rotation assembly can be obtained, thereby accurately detecting and controlling the generator position, thereby improving the imaging quality.

[0060] From the above introduction to digital photography equipment, we can know that during the movement of the generator, the pulse signal sent back by the photoelectric sensor installed on it when passing through the light-transmitting hole on the code disk is used to determine whether the generator has passed through the light-transmitting hole. The number of initial pulses of the photoelectric sensor before the generator starts to move and the change in the number of pulses during the movement are used to determine the total number of light-transmitting holes the generator has passed through. Combined with the position of the light-transmitting hole on the code disk, the position of the generator can be accurately located. It is easy to understand that the premise of monitoring the movement position of the generator is to clearly know where the generator is when it starts to move. The correctness of the initial position also affects the accuracy of the generator position detection results during subsequent movement.

[0061] In a feasible embodiment, based on the digital photography equipment in the embodiment of the present application, there are limits on the left, middle and right sides of the code disk, and there is a metal sensor on each limit to detect the approach and arrival of the generator with metal parts. Then, based on the clear positions of these limits, the generator can be initialized to the default position before responding to the shooting instruction, so that it stays in an accurate and correct initial position, awaiting the instructions of subsequent shooting instructions.

[0062] See also Figure 3 , Figure 3 A flow chart of a method for detecting the position of a machine head provided in an embodiment of the present application.

[0063] like Figure 3 As shown, before the digital photographic device responds to the received shooting instruction, the head position detection method may at least include:

[0064] S302. In response to the power-on command, the digital photographic device is started, and the head rotation assembly is controlled to make the generator move to the left until the metal sensor at the left limit detects that the generator reaches the left limit, then the movement of the generator is stopped and the number of pulses of the photoelectric sensor is cleared.

[0065] Optionally, the position of the generator is initialized when the digital photographic device is powered on, that is, the digital photographic device is powered on in response to a power-on instruction, and then the generator is controlled to perform position initialization based on several limit positions.

[0066] In one feasible implementation, to minimize the distance the generator must travel from its initial position to various possible designated shooting positions, the initial position of the generator can be set to the center limit. The center limit metal sensor will detect that the generator is in the center limit when the generator is to the left or right of the metal sensor. Therefore, moving the generator directly from any position to the center limit is prone to errors. Therefore, the generator can only be accurately initialized to the center limit when it moves from the left or right limit to the center limit.

[0067] Optionally, see Figure 4 , Figure 4 This is a flow chart of the initialization of the head position provided in the embodiment of the present application. Figure 4 As shown, after the digital photography equipment is turned on, the head rotation assembly is controlled to make the generator move to the left first until the metal sensor at the left limit detects that the generator has reached the left limit. The generator stops moving and the number of pulses of the photoelectric sensor is cleared to facilitate the subsequent calculation of the number of pulses.

[0068] S304: Control the handpiece rotation assembly to move the generator to the right, and monitor the change in the number of pulses of the photoelectric sensor.

[0069] Alternatively, as Figure 4 As shown, after the generator is moved to the left limit at the far left, the head rotation assembly is controlled to make the generator move to the right, and the change in the number of pulses of the photoelectric sensor is detected so as to timely determine whether the generator has reached the middle limit based on the number of pulses.

[0070] S306. Determine that the generator moves to a middle limit position according to the number of pulses, use the middle limit position as the initial position before the generator receives a shooting instruction, and stop the movement of the generator.

[0071] Alternatively, as Figure 4 As shown, since the number of light-transmitting holes between the left limit and the middle limit is known in advance, the number of pulses between the left limit and the middle limit can also be known in advance. Then, according to the number of pulses, it can be determined that the generator moves to the middle limit. At this time, the position positioning of the middle limit determined based on the number of pulses is accurate, so using the middle limit as the initial position before the generator receives the shooting instruction can also ensure its accuracy. At this time, the initialization is completed and the generator movement can be stopped.

[0072] Furthermore, after the position of the generator is initialized to the middle limit, it can receive and respond to the shooting instruction. Figure 4 As shown, in response to a shooting instruction, the generator is moved toward the specified shooting position, and the position of the generator is determined according to the initial number of pulses of the generator at the middle limit and the change in the number of pulses during the movement; when the generator moves to the specified shooting position, exposure and image acquisition of each component including the generator are performed; after all target images are acquired, the generator is moved to the middle limit and stops moving according to the number of pulses at this time, thereby ending the shooting process corresponding to this shooting instruction.

[0073] It should be noted that when initializing the generator position of the head, you can also move the generator to the right limit first, and then move it from the right limit to the middle limit. The initialization control process is similar to the initialization from the left limit mentioned above, so I will not repeat it here.

[0074] In an embodiment of the present application, a method for detecting the position of a machine head is provided. Before responding to a shooting instruction, the digital photographic device first initializes the position of the machine head generator after being turned on, controls the generator to move to the left until the metal sensor at the left limit detects that the generator has reached the left limit, stops the generator movement, and clears the number of pulses of the photoelectric sensor; then controls the machine head rotation assembly to move the generator to the right; determines the movement of the generator to the middle limit based on the number of pulses, uses the middle limit as the initial position before the generator receives the shooting instruction, and stops the generator movement. In this way, the position positioning of the middle limit determined based on the number of pulses is accurate, so using the middle limit as the initial position before the generator receives the shooting instruction can also ensure its accuracy.

[0075] When controlling the movement of the generator, the generator may need to turn. For example, the generator may first move a certain distance to the right to reach the designated shooting position, and then move to the left during the shooting process to complete the image acquisition. This change in direction may cause the generator to pass through the same light hole continuously. For example, the generator first passes through the light hole with a pulse number of 10 from left to right and then moves between the 10-pulse position and the 11-pulse position. At this time, if the generator has not passed through the 11-pulse light hole, the pulse number is still 10. At this time, the generator turns to the left and passes through the 10-pulse light hole. Since the generator has moved to the left and passed through a light hole, the pulse number will be -1. As a result, the pulse count of the 10-pulse light hole will be recorded as 9, and a pulse count error will occur.

[0076] Based on this, when the head generator turns, it is necessary to promptly determine whether there is a counting error and make corrections in time if a counting error occurs. Figure 5 , Figure 5 A flow chart of a pulse count correction function provided in an embodiment of the present application.

[0077] like Figure 5 As shown, the head position detection method may at least include:

[0078] S502: When the generator stops moving, determine whether the level signal sent back by the photoelectric sensor is a high-level signal.

[0079] Alternatively, the generator may only erroneously count pulses due to repeated passage through the same aperture when it turns while stationary between the two apertures. Therefore, when the generator stops moving, we first need to determine whether it is currently between the two apertures. As mentioned above, the photoelectric sensor outputs a high-level signal when it receives no light. This means that a high-level signal from the photoelectric sensor indicates that the generator is currently stationary between the two apertures. Therefore, we only need to determine whether the signal from the photoelectric sensor is high.

[0080] S504: If yes, when the generator starts to move again, determine whether the current movement direction of the generator is consistent with the movement direction before stopping the movement.

[0081] Alternatively, if the level signal returned by the photoelectric sensor is a high level signal, the generator is currently located between two light-transmitting holes. If the generator subsequently starts moving again, it is necessary to further determine whether it will pass through the same light-transmitting hole that has already been counted. In other words, it is necessary to determine whether the current direction of movement of the generator is consistent with the direction of movement before it stopped moving.

[0082] S506: If they are inconsistent, the number of pulses of the photoelectric sensor is counted one more time according to the original movement direction.

[0083] It's easy to understand that if the generator's current direction of movement is the same as its direction before stopping, for example, if it was moving to the left or right before and after stopping, then there will be no problem of passing through the same light hole again. Instead, when the generator turns, that is, when the running direction before and after stopping is inconsistent, it will pass through the repeated light hole again. At this time, the number of pulses of the photoelectric sensor needs to be counted once according to the original direction of movement. For example, when the generator moves to the left, the number of pulses changes from -3 to -4, then stops between the -4 pulse light hole and the -5 pulse light hole, and then turns to the right. At this time, the number of pulses needs to be counted once to -5 and then counted normally. Next, when the generator passes through the -4 pulse light hole again, it will change from -5 to -4 normally, thus correcting the number of pulses.

[0084] In an embodiment of the present application, a method for detecting the position of a machine head is provided. When the generator stops moving, it is determined whether the level signal transmitted back by the photoelectric sensor is a high-level signal; if so, when the generator starts moving again, it is determined whether the current movement direction of the generator is consistent with the movement direction before stopping; if not, the number of pulses of the photoelectric sensor is counted once according to the original movement direction. By detecting and judging the movement direction and movement state of the generator, corrections can be made in time before errors occur in the pulse count, so that the generator can still accurately locate its position when the movement state changes, such as sudden stops and changes of direction.

[0085] During the movement of the generator, various factors, including the device's drive and the effect of gravity on the movement of the handpiece, can affect the generator's speed. Therefore, to more accurately control the generator's speed, segmented speed control can be implemented based on the generator's real-time position during its movement.

[0086] In the head position detection method provided in the embodiment of the present application, after the generator begins to move, the generator's movement speed can be calculated every preset time, and the generator can be controlled to move according to the calculated movement speed. In this way, the generator speed is continuously and adaptively updated, and the exposure and image acquisition of the device are controlled more accurately and stably. The preset time can be set according to the needs of the actual scenario, for example, it can be set to 50 milliseconds, 80 milliseconds, etc., and the embodiment of the present application does not limit this.

[0087] Specifically, in the embodiment of the present application, a brushed DC motor driver is used to drive a brushed DC motor to realize the motion control of the machine head. Taking into account the influence of gravity on the motion control of the machine head of each component in the device itself, when calculating the position of the generator, the distance difference between the current position information of the generator and the specified shooting position, as well as the current rotation angle of the C-arm, can be used to calculate the current motion speed of the generator based on the PID control algorithm. The PID control algorithm is a control algorithm applied to the dynamic quality correction of continuous systems. It combines three control links: proportional (P), integral (I) and differential (D). Specifically: proportional control: according to the error between the current state of the system and the expected state, the error is multiplied by the proportional coefficient Kp to obtain a correction amount, and then the correction amount is added to the control amount of the system. The size of this correction amount is proportional to the error, that is, the larger the error, the larger the correction amount; integral control: the error is accumulated until the error returns to zero. By multiplying the integral coefficient Ki by the cumulative sum of the errors, a correction amount is obtained, which enables the system to better eliminate the steady-state error existing in the system. The function of integral control is to eliminate the static deviation of the system; differential control: a correction amount is given according to the rate of change of the error. The size of this correction amount is proportional to the rate of change of the error. The correction amount is obtained by multiplying the integral coefficient Kd by the rate of change of the error, which can enable the system to respond to the change of the error more quickly and avoid overshoot and oscillation of the system.

[0088] Furthermore, since it is necessary to set the timing duration of the timed start of the flat-panel detector assembly according to the movement time of the generator, and the generator will dynamically adjust the speed in segments during the movement process, in order to more accurately set the timer time of the flat-panel detector assembly, the timer time can be recalculated based on the new movement speed, movement distance and other parameters after each speed adjustment of the generator, so that the flat-panel detector assembly can be controlled more accurately.

[0089] In an embodiment of the present application, a method for detecting the position of a handpiece is provided. By dynamically controlling the speed of a generator and setting the real-time speed of the generator during movement, the generator can accurately reach a specified angle in various situations, and the movement process is short, saving the user waiting time.

[0090] It is inevitable that the equipment will have abnormalities during use. For example, during the operation of the equipment, the head generator moves to the left side of the left limit and then stops abnormally, causing the head generator to be located to the left of the left limit metal sensor when it is turned on. At this time, the generator performs position initialization and moves to the left. Because the equipment cannot detect the level change of the corresponding metal sensor, the motor is continuously enabled, causing the generator to continue to move to the left but cannot move due to the mechanical limit. At this time, the generator is stuck at the far left of the curved guide rail. This state cannot be restored and will cause damage to the motor. Or, during the operation of the equipment, an abnormal situation such as gear jamming occurs, causing the generator to get stuck at a certain position of the curved guide rail. This will also cause the motor to be continuously enabled and unable to move, causing damage to the motor.

[0091] In order to protect the various components of the device, it is necessary to detect abnormalities in a timely manner and automatically take some protective measures. Figure 6 , Figure 6 This is a logic flow chart of an exception handling function provided by an embodiment of the present application. Figure 6 As shown, during the movement of the generator, if the pulse data sent back by the photoelectric sensor is not received within the preset time, it means that the sensor has not detected normal level signal fluctuations for a long time; then it is continued to determine whether the generator is moving in response to the power-on command; if so, it means that the generator is undergoing the initialization process, and then it is further determined whether the generator is moving to the left; if the generator is moving to the left at this time, it means that it may be restricted by the mechanical limit on the leftmost side of the arc guide rail and cannot move, then the generator can be adjusted to move to the right; if the generator is moving to the right at this time, it means that the generator itself is stuck and cannot move, then the generator should be stopped and a preset abnormal prompt message should be issued.

[0092] Alternatively, as Figure 6 As shown, when the pulse data sent back by the photoelectric sensor is not received within the preset time, if the generator is not in the initialization process at this time, the generator is stopped and a preset abnormal prompt message is issued.

[0093] In an embodiment of the present application, a method for detecting the position of a handpiece is provided. A photoelectric sensor and a code disk are used to detect the motion state of a motion module in real time based on the motion time. When the motion state is abnormal, the method can promptly identify the abnormality and make corrections. If a problem cannot be corrected, the motor driving the generator can be stopped and a preset alarm can be issued to protect the equipment and the patient.

[0094] See also Figure 7 , Figure 7 This is a structural block diagram of a head position detection device provided in an embodiment of the present application.

[0095] like Figure 7 As shown, the head position detection device 700 is applied to a digital photography device, which includes: a head rotation assembly, a generator, and a photoelectric sensor. The generator is connected to the head rotation assembly and can move on the head rotation assembly to adjust the emission position and emission angle. The photoelectric sensor is mounted on the generator. The head rotation assembly includes a code disk and a light source emitter. The code disk has at least one light-transmitting hole. The light emitted by the light source emitter can be received by the photoelectric sensor when passing through the light-transmitting hole and outputs a low-level signal. The head position detection device 700 includes:

[0096] The instruction response module 710 is used to respond to the received shooting instruction, where the shooting instruction is used to instruct the digital photography device to shoot an image at an angle and a number of times;

[0097] The generator control module 720 is used to determine the initial position of the generator based on the initial pulse count of the photoelectric sensor and control the head rotation assembly to move the generator from the initial position toward the designated shooting position corresponding to the shooting instruction. The pulse count is counted once when the high-level signal returned by the photoelectric sensor changes to a low-level signal;

[0098] The position detection module 730 is used to monitor the change of the number of pulses of the photoelectric sensor and determine the current position of the generator based on the initial number of pulses and the current number of pulses of the photoelectric sensor;

[0099] The shooting control module 740 is used to control the generator to emit radiation for exposure based on the shooting instruction when the generator reaches the designated shooting position, so as to shoot the target image corresponding to the shooting instruction.

[0100] Optionally, there are left limit, right limit and middle limit on the code disk, wherein the leftmost light-transmitting hole is the position of the left limit, the rightmost light-transmitting hole is the position of the right limit and the light-transmitting hole in the center of the code disk is the position of the middle limit; a metal sensor is installed at each limit, and a metal part is installed on the generator. The head position detection device 700 also includes: an initialization module for starting the digital photographic device in response to a power-on command, controlling the head rotation component to make the generator move to the left until the metal sensor of the left limit detects that the generator has reached the left limit, stopping the generator movement and clearing the number of pulses of the photoelectric sensor; controlling the head rotation component to make the generator move to the right, monitoring the change in the number of pulses of the photoelectric sensor; determining that the generator moves to the middle limit according to the number of pulses, using the middle limit as the initial position before the generator receives the shooting command, and stopping the generator movement.

[0101] Optionally, the counting mode of the number of pulses is a bidirectional counting mode, where the number of pulses is counted in the reverse direction when the generator moves to the left, and the number of pulses is counted in the forward direction when the generator moves to the right.

[0102] Optionally, the head position detection device 700 also includes: a counting correction module, which is used to determine whether the level signal transmitted back by the photoelectric sensor is a high-level signal when the generator stops moving; if so, when the generator starts moving again, it is judged whether the current movement direction of the generator is consistent with the movement direction before stopping; if not, the number of pulses of the photoelectric sensor is counted once according to the original movement direction.

[0103] Optionally, the head position detection device 700 further includes: a real-time speed control module, which is used to calculate the movement speed of the generator every preset time when the generator starts to move, and control the generator to move according to the calculated movement speed.

[0104] Optionally, the digital photography device further includes a C-arm and a C-arm rotation assembly, wherein the handpiece rotation assembly is mounted at one end of the C-arm, and rotation of the C-arm by the C-arm rotation assembly enables simultaneous rotation of the handpiece rotation assembly and the generator about the C-arm rotation assembly. The real-time speed control module is further configured to obtain, at preset intervals, the distance difference between the generator's current position information and a designated shooting position, as well as the current rotation angle of the C-arm, and calculate the current movement speed of the generator based on a PID control algorithm.

[0105] Optionally, the head position detection device 700 also includes: an initialization abnormality protection module, which is used to determine whether the generator is moving in response to a power-on instruction when the pulse data sent back by the photoelectric sensor is not received within a preset time; if so, determine whether the generator is moving to the left; if the generator is moving to the left at this time, adjust the generator to move to the right; if the generator is moving to the right at this time, stop running the generator and issue a preset abnormal prompt message.

[0106] Optionally, the head position detection device 700 also includes: an operation abnormality protection module, which is used to determine whether the generator is moving in response to a power-on instruction when the pulse data sent back by the photoelectric sensor is not received within a preset time; if not, stop running the generator and issue a preset abnormal prompt message.

[0107] In an embodiment of the present application, a head position detection device is provided. The device includes a command response module for responding to a received shooting command, which instructs a digital camera device to capture an image at an angle and a number of times. The device includes a generator control module for determining an initial position of the generator based on an initial number of pulses from a photoelectric sensor and controlling a head rotation assembly to move the generator from the initial position toward a designated shooting position corresponding to the shooting command. The number of pulses is counted when a high-level signal returned by the photoelectric sensor changes to a low-level signal. The device includes a position detection module for monitoring changes in the number of pulses from the photoelectric sensor and determining a current position of the generator based on the initial number of pulses and the current number of pulses from the photoelectric sensor. The device includes a shooting control module for controlling the generator to emit radiation for exposure based on the shooting command when the generator reaches the designated shooting position, so as to capture a target image corresponding to the shooting command. Since the photoelectric sensor generates a pulse signal based on the light emitted from the light-transmitting hole each time the generator passes through the light-transmitting hole, the change in the number of pulses can be used to determine the position change of the generator relative to each light-transmitting hole, thereby obtaining the angle and position to which the generator moves on the head rotation assembly. This allows for accurate detection and control of the generator position, thereby improving imaging quality.

[0108] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.

[0109] See Figure 8 , Figure 8 This is a structural diagram of a digital photography device provided in an embodiment of the present application. Figure 8As shown, the digital photography device 800 may include: at least one digital photography device processor 801, at least one network interface 804, a user interface 803, a memory 805, and at least one communication bus 802. The digital photography device 800 also includes: a head rotating assembly 806, a generator 807, and a photoelectric sensor 808. The generator 807 is connected to the head rotating assembly 806 and can move on the head rotating assembly 806 to adjust the emission position and emission angle. The photoelectric sensor 808 is mounted on the generator 807. The head rotating assembly 806 includes a code disk and a light source emitter. The code disk is distributed with at least one light transmission hole. When light emitted by the light source emitter passes through the light transmission hole, it can be received by the photoelectric sensor 808 and output a low-level signal.

[0110] The communication bus 802 is used to implement the connection and communication between these components.

[0111] The user interface 803 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 803 may also include a standard wired interface and a wireless interface.

[0112] The network interface 804 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0113] The digital photography device processor 801 may include one or more processing cores. The digital photography device processor 801 utilizes various interfaces and circuits to connect various components within the digital photography device 800. It executes instructions, programs, code sets, or instruction sets stored in the memory 805, and accesses data stored in the memory 805 to perform various functions and process data within the digital photography device 800. Optionally, the digital photography device processor 801 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The digital photography device processor 801 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content displayed on the display screen; and the modem handles wireless communications. It is understandable that the above-mentioned modem may not be integrated into the digital photography device processor 801, but may be implemented by a separate chip.

[0114] Among them, the memory 805 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 805 includes a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 805 may also be optionally at least one storage device located away from the aforementioned digital photography device processor 801. As Figure 8 As shown, the memory 805 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a head position detection program.

[0115] exist Figure 8In the digital photography device 800 shown, the user interface 803 is mainly used to provide an input interface for the user and obtain user input data; and the digital photography device processor 801 can be used to call the head position detection program stored in the memory 805 and specifically perform the following operations:

[0116] In response to the received shooting instruction, the shooting instruction is used to instruct the digital photography device to shoot an angle and a number of images;

[0117] The initial position of the generator is determined according to the initial number of pulses of the photoelectric sensor, and the head rotation component is controlled to make the generator move from the initial position toward the specified shooting position corresponding to the shooting instruction. The number of pulses is counted once when the high-level signal returned by the photoelectric sensor changes to a low-level signal;

[0118] Monitor the change in the number of pulses of the photoelectric sensor, and determine the current position of the generator based on the initial number of pulses and the current number of pulses of the photoelectric sensor;

[0119] When the generator reaches the designated shooting position, the generator is controlled to emit radiation for exposure based on the shooting instruction to shoot the target image corresponding to the shooting instruction.

[0120] In some embodiments, there are left limit, right limit and middle limit on the code disk, wherein the leftmost light-transmitting hole position is the left limit position, the rightmost light-transmitting hole position is the right limit position and the light-transmitting hole position in the center of the code disk is the middle limit position; a metal sensor is installed at each limit position, and a metal part is installed on the generator so that the metal sensor can detect the approach of the generator; before executing the response to the received shooting instruction, the digital photography device processor 801 also specifically performs the following steps: starting the digital photography device in response to the power-on instruction, controlling the head rotation assembly to make the generator move to the left until the metal sensor of the left limit detects that the generator reaches the left limit, stopping the generator movement, and clearing the number of pulses of the photoelectric sensor; controlling the head rotation assembly to make the generator move to the right, monitoring the change in the number of pulses of the photoelectric sensor; determining that the generator moves to the middle limit according to the number of pulses, using the middle limit as the initial position before the generator receives the shooting instruction, and stopping the generator movement.

[0121] In some embodiments, the counting mode of the pulse number is a bidirectional counting mode, where the pulse number is counted in the reverse direction when the generator moves to the left, and the pulse number is counted in the forward direction when the generator moves to the right.

[0122] In some embodiments, the digital photography device processor 801 further specifically performs the following steps: when the generator stops moving, determining whether the level signal transmitted back by the photoelectric sensor is a high-level signal; if so, when the generator starts moving again, determining whether the current movement direction of the generator is consistent with the movement direction before stopping; if not, increasing the number of pulses of the photoelectric sensor by one according to the original movement direction.

[0123] In some embodiments, the digital photography device processor 801 further specifically performs the following steps: when the generator starts to move, calculating the movement speed of the generator every preset time, and controlling the generator to move according to the calculated movement speed.

[0124] In some embodiments, the digital photography device further includes: a C-arm and a C-arm rotation assembly, the head rotation assembly is installed at one end of the C-arm, and the C-arm rotates through the C-arm rotation assembly to enable the head rotation assembly and the generator to rotate around the C-arm rotation assembly at the same time; when the digital photography device processor 801 calculates the movement speed of the generator once every preset time, it specifically performs the following steps: every preset time, obtains the distance difference between the current position information of the generator and the specified shooting position and the current rotation angle of the C-arm, and calculates the current movement speed of the generator based on the PID control algorithm.

[0125] In some embodiments, the digital photography device processor 801 further specifically performs the following steps: when no pulse data is received from the photoelectric sensor within a preset time, determining whether the generator is moving in response to a power-on command; if so, determining whether the generator is moving to the left; if the generator is moving to the left at this time, adjusting the generator to move to the right; if the generator is moving to the right at this time, stopping the generator and issuing a preset abnormal prompt message.

[0126] In some embodiments, the digital photography device processor 801 further specifically performs the following steps: when no pulse data is received from the photoelectric sensor within a preset time, it is determined whether the generator is moving in response to a power-on instruction; if not, the generator is stopped and a preset abnormal prompt message is issued.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0128] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the purpose of this embodiment based on actual needs.

[0129] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The above-mentioned computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, the above-mentioned process or function according to the embodiment of this specification is generated in whole or in part. The above-mentioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium or transmitted by the above-mentioned computer-readable storage medium. The above-mentioned computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The above-mentioned computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The above-mentioned available media can be magnetic media (for example, floppy disks, hard disks, tapes), optical media (for example, digital versatile discs (DVDs)), or semiconductor media (for example, solid state disks (SSDs)).

[0130] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0131] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0132] The above is a description of a head position detection method, device and digital photography equipment provided by this application. For technical personnel in this field, based on the ideas of the embodiments of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this application.

Claims

1. A method for detecting the position of a machine head, characterized in that: Applied to digital photography equipment, the digital photography equipment includes: a head rotating assembly, a generator and a photoelectric sensor; the generator is connected to the head rotating assembly, and the generator can move on the head rotating assembly to adjust the emission position and emission angle; the photoelectric sensor is installed on the generator, the head rotating assembly includes a code disk and a light source emitter, the code disk is distributed with at least one light-transmitting hole, and the light emitted by the light source emitter can be received by the photoelectric sensor and output a low-level signal when passing through the light-transmitting hole; there are left limit, right limit and middle limit on the code disk, wherein the leftmost light-transmitting hole position is the position of the left limit, the rightmost light-transmitting hole position is the position of the right limit and the light-transmitting hole position centered on the code disk is the position of the middle limit; a metal sensor is installed at each limit position, and a metal part is installed on the generator so that the metal sensor can detect the approach of the generator; the middle limit is used as the initial position of the generator before receiving the shooting instruction; the method includes: In response to a received shooting instruction, the shooting instruction is used to instruct the digital photography device to shoot an angle and a number of images; Determining the initial position of the generator according to the initial pulse number of the photoelectric sensor, and controlling the head rotation assembly to move the generator from the initial position toward the designated shooting position corresponding to the shooting instruction, wherein the pulse number is counted once when the high-level signal returned by the photoelectric sensor becomes a low-level signal; monitoring a change in the number of pulses of the photoelectric sensor, and determining a current position of the generator based on the initial number of pulses and the current number of pulses of the photoelectric sensor; When the generator reaches the designated shooting position, the generator is controlled to emit radiation for exposure based on the shooting instruction, so as to shoot a target image corresponding to the shooting instruction.

2. The method according to claim 1, characterized in that Before responding to the received shooting instruction, the method further includes: In response to a power-on command, the digital photographic device is started, the head rotating assembly is controlled to move the generator to the left until the metal sensor at the left limit detects that the generator has reached the left limit, the movement of the generator is stopped, and the number of pulses of the photoelectric sensor is reset to zero; Controlling the handpiece rotation assembly to move the generator to the right, and monitoring changes in the number of pulses of the photoelectric sensor; The generator is determined to move to the middle limit position according to the number of pulses, the middle limit position is used as the initial position before the generator receives the shooting instruction, and the movement of the generator is stopped.

3. The method according to claim 1, characterized in that The counting mode of the pulse number is a bidirectional counting mode, that is, when the generator moves to the left, the pulse number is counted in the reverse direction, and when the generator moves to the right, the pulse number is counted in the forward direction.

4. The method according to claim 1, wherein The method further comprises: When the generator stops moving, determining whether the level signal returned by the photoelectric sensor is a high-level signal; If so, when the generator starts moving again, determining whether the current moving direction of the generator is consistent with the moving direction before stopping the movement; If they are inconsistent, the number of pulses of the photoelectric sensor is counted one more time according to the original movement direction.

5. The method according to claim 1, wherein The method further comprises: When the generator starts to move, the movement speed of the generator is calculated every preset time, and the generator is controlled to move according to the calculated movement speed.

6. The method according to claim 5, characterized in that The digital photography device further includes: a C-arm and a C-arm rotating assembly, wherein the head rotating assembly is mounted on one end of the C-arm, and the C-arm rotates through the C-arm rotating assembly so that the head rotating assembly and the generator can simultaneously rotate around the C-arm rotating assembly; and calculating the movement speed of the generator once every preset time includes: The distance difference between the current position information of the generator and the designated shooting position and the current rotation angle of the C-arm are obtained at preset time intervals, and the current movement speed of the generator is calculated based on the PID control algorithm.

7. The method according to claim 2, characterized in that The method further comprises: When no pulse data sent back by the photoelectric sensor is received within a preset time, determining whether the generator is moving in response to a power-on instruction; If so, determining whether the generator moves to the left; If the generator moves to the left at this time, the generator is adjusted to move to the right; if the generator moves to the right at this time, the generator is stopped and a preset abnormal prompt message is issued.

8. The method according to claim 2, characterized in that The method further comprises: When no pulse data sent back by the photoelectric sensor is received within a preset time, determining whether the generator is moving in response to a power-on instruction; If not, the generator is stopped and a preset abnormal prompt message is issued.

9. A head position detection device, characterized in that: Applicable to digital photography equipment, the digital photography equipment includes: a head rotating assembly, a generator and a photoelectric sensor; the generator is connected to the head rotating assembly, and the generator can move on the head rotating assembly to adjust the emission position and emission angle; the photoelectric sensor is installed on the generator, the head rotating assembly includes a code disk and a light source emitter, the code disk is distributed with at least one light-transmitting hole, and the light emitted by the light source emitter can be received by the photoelectric sensor and output a low-level signal when passing through the light-transmitting hole; there are left limit, right limit and middle limit on the code disk, wherein the position of the leftmost light-transmitting hole is the position of the left limit, the position of the rightmost light-transmitting hole is the position of the right limit, and the position of the light-transmitting hole centered on the code disk is the position of the middle limit; a metal sensor is installed at each limit, and a metal part is installed on the generator so that the metal sensor can detect the approach of the generator; the middle limit is used as the initial position before the generator receives a shooting instruction; the device includes: An instruction response module, configured to respond to a received shooting instruction, wherein the shooting instruction is used to instruct the digital photography device to shoot an angle and a number of images; a generator control module, configured to determine an initial position of the generator based on an initial number of pulses from the photoelectric sensor, and control the handpiece rotation assembly to move the generator from the initial position toward a designated shooting position corresponding to the shooting instruction, wherein the number of pulses is counted once when a high-level signal returned by the photoelectric sensor changes to a low-level signal; a position detection module, configured to monitor changes in the number of pulses of the photoelectric sensor and determine the current position of the generator based on the initial number of pulses and the current number of pulses of the photoelectric sensor; A shooting control module is used to control the generator to emit rays for exposure based on the shooting instruction when the generator reaches the designated shooting position, so as to shoot the target image corresponding to the shooting instruction.

10. A digital photography device, characterized in that: comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented; The digital photography device comprises: a head rotating assembly, a generator and a photoelectric sensor; The generator is connected to the head rotating assembly, and the generator can move on the head rotating assembly to adjust the emission position and emission angle; the photoelectric sensor is installed on the generator, and the head rotating assembly includes a code disk and a light source emitter. The code disk is provided with at least one light-transmitting hole, and the light emitted by the light source emitter can be received by the photoelectric sensor and output a low-level signal when passing through the light-transmitting hole; there are left limit, right limit and middle limit on the code disk, wherein the leftmost light-transmitting hole position is the position of the left limit, the rightmost light-transmitting hole position is the position of the right limit, and the center light-transmitting hole position on the code disk is the position of the middle limit; a metal sensor is installed at each limit, and a metal part is installed on the generator so that the metal sensor can detect the approach of the generator; the middle limit is used as the initial position of the generator before receiving the shooting instruction.

Citation Information

Patent Citations

  • Exposure control method and device and digital photographic equipment

    CN118576230A