Computational heuristic encoder enhanced relay system
The trigger signal of the rotary encoder is filtered through the signal filtering controller, which solves the problem of image quality degradation caused by traditional rotary encoders, and achieves efficient image capture quality and reduces maintenance costs.
Patent Information
- Application Number
- CN202380081360.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-12-06
- Filing Date
- 2023-10-18
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional rotary encoders in locomotive machine vision systems have caused excessive unnecessary trigger signals due to mechanical gaps and vibrations, resulting in a degradation of image capture quality. The existing solutions require mechanical devices and are costly to maintain.
The signal filtering controller is used to filter the trigger signal of the rotary encoder, and the PWM signal is generated by sampling the average frequency and applying frequency limits to ensure that the image capture device receives evenly spaced trigger signals.
Effectively filter out unnecessary trigger signals, improve image capture quality, reduce mechanical device maintenance needs, and reduce operating costs.
Smart Images

Figure CN120265525A_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to signal filtering, and more particularly to encoder output filtering techniques for triggering an image capture device. Background Art
[0002] Currently, locomotive machine vision systems for capturing images of railway assets and / or objects for object detection and / or inspection employ an image capture device (e.g., a camera) that is triggered using a rotary encoder synchronized with the rotation of a locomotive wheel. The rotary encoder can be mounted on a shaft to which the wheel is attachable such that when the wheel rotates on the railway track, the rotary encoder can detect the rotational movement of the wheel and can trigger the image capture device to capture an image (e.g., an image of the railway track). The rotary encoder can trigger the image capture device by providing a trigger signal that includes a square wave, where each pulse of the square wave represents an encoder trigger signal. Each encoder trigger signal can cause the image capture device to capture an image. Since the rotary encoder is synchronized with the rotational movement of the wheel, each encoder trigger represents the capture of a section of railway track. At high speeds, the image capture device may be triggered at a high frequency. For example, when the wheel rotates at high speed, the rotary encoder can output a high-frequency trigger signal (e.g., a high-frequency square wave) based on the high-speed rotation of the wheel.
[0003] However, due to the mechanical connection of the various components, traditional shaft-mounted rotary encoders may have some free mechanical play or movement. For example, the axle box and the interface of the encoder to the shaft typically have some mechanical play. When the wheel rotates on the railway track, unnecessary vibrations and wobbles may cause the mechanical play, adversely resulting in the encoder sensing unnecessary movement and erroneously generating trigger pulses due to shocks and vibrations. These excessive and / or random encoder triggers can cause significant problems with the quality of the captured images, especially the images captured when passing through railway track gaps, turnouts, or diamond crossings, etc. For example, excessive triggers may cause the camera to capture an image at the "wrong" time (e.g., the trigger may overlap with the previous trigger), which may result in image distortion. In fact, excessive encoder triggers may cause the trigger signal to generate trigger pulses with a non-uniform sampling rate rather than a trigger signal that generates uniformly spaced pulses with the desired sampling rate.
[0004] Several solutions have been proposed to address the issue of excessive triggering of rotary encoders. For example, some solutions provide mechanical devices that minimize the free motion of the rotary encoder. However, these solutions do not completely eliminate the free motion of the rotary encoder. In addition, these solutions require the installation of mechanical devices, which may require a repair shop, which may result in additional maintenance costs as well as regular inspections. These additional maintenance costs can be quite high because the locomotive or rail car with the computer vision system installed may need to be sent to a repair shop, which can be expensive and waste the time of operators who require a repair shop environment. The operator incurs an opportunity cost due to the wasted time. Summary of the invention
[0005] The present disclosure achieves technical advantages as a system, method, and computer-readable storage medium that provide functionality for filtering a trigger signal from an encoder to trigger an image capture device. The present disclosure provides a system integrated into a practical application that has meaningful constraints that can minimize or eliminate image artifacts that cause distortion in an image captured based on a trigger from an encoder. The system can include a signal filter controller that receives a trigger signal from an encoder as an input signal, the encoder including a pulse train for triggering the image capture device, can determine an average pulse frequency of the trigger signal over a period of time based on sampling the number of pulses in the trigger signal over a period of time, can apply a frequency limit to the average pulse frequency to generate a trigger frequency, can determine an output frequency based on the trigger frequency, and can output a pulse width modulation (PWM) signal for triggering the image capture device, wherein the PWM signal can have a frequency based on the output frequency. In this way, the system is able to filter a "noisy" trigger signal from a rotary encoder, which may contain a series of pulses that are unevenly spaced, and generate a "clean" trigger signal, which may contain evenly spaced pulses, that can be used to trigger the image capture device without being affected by additional movement of the rotary encoder (or the rotary encoder mounting box) due to excessive vibration, motion, or shaking during operation. In addition, in some embodiments, the frequency limit imposed on the average pulse frequency by the signal filtering controller can include limiting the trigger frequency based on the configuration of the image capture device, which can enable the system to deal with limitations of the image capture device.
[0006] Accordingly, the present disclosure discloses concepts that are inseparable from computer technology, such that the present disclosure provides technical advantages for a mechanism to filter the output of a rotary encoder to trigger an image capture device. The present disclosure is not merely implementing a manual process into a computer, but also provides a technical mechanism rooted in synchronizing an image capture device with a rotary encoder. The present disclosure can address current challenges in synchronizing a rotary encoder and an image capture device, such as issues caused by unnecessary or unwanted free movement, by providing a mechanism to ensure that the trigger signal fed to the image capture device is a clean pulse trigger signal that takes into account the free movement of the encoder, which may result in an excessive number of triggers in the direct output of the encoder. By addressing the redundant triggers in the direct output of the encoder, the accuracy and operation of a computer vision system can be enhanced and improved.
[0007] The present disclosure addresses the technical problem of the lack of a technical function for filtering a trigger signal from an encoder for triggering an image capture device. The technical solution provided herein is not merely simply applying a manual process to a computerized environment, but includes functions to implement a technical process to complement the existing implementation of a computer vision system that currently uses a rotary encoder to trigger an image capture device. Accordingly, the present disclosure goes far beyond simply applying a manual process to a computer.
[0008] An object of the present invention is to provide a system for filtering a trigger signal from an encoder for triggering an image capture device. Another object of the present invention is to provide a method for filtering a trigger signal from an encoder for triggering an image capture device. Another object of the present invention is to provide a computer-based tool for filtering a trigger signal from an encoder for triggering an image capture device. The present disclosure provides the above and other objects, including at least the following embodiments.
[0009] In one particular embodiment, a method for filtering a trigger signal from an encoder for triggering an image capture device is provided. The method includes receiving an input trigger signal from the encoder, the input trigger signal including a series of pulses for triggering the image capture device; determining an average pulse frequency of the input trigger signal over a period of time based on the number of pulses detected in the input signal during the period; imposing a limit on the average pulse frequency to generate a trigger output frequency; determining an output frequency based on the trigger output frequency; and outputting a PWM signal for triggering the image capture device, the frequency of the PWM signal being based on the output frequency.
[0010] In another embodiment, a computer-based tool is provided for filtering a trigger signal from an encoder to trigger an image capture device. The computer-based tool may include a non-volatile computer-readable medium storing computer code that, when executed by a processor, causes a computing device to perform related operations. These operations include receiving an input trigger signal from the encoder, the input trigger signal comprising a series of pulses for triggering the image capture device; determining an average pulse frequency of the input trigger signal over a period of time based on the number of pulses detected in the input signal over that period of time; imposing a limit on the average pulse frequency to generate a trigger output frequency; determining an output frequency based on the trigger output frequency; and outputting a PWM signal for triggering the image capture device, the frequency of the PWM signal being based on the output frequency.
[0011] In yet another embodiment, a system for filtering a trigger signal from an encoder for triggering an image capture device is provided. The system includes at least one processor and a memory operatively connected to the at least one processor, the memory storing processor-readable code that, when executed by the at least one processor, is configured to perform related operations. The operations include receiving an input trigger signal from the encoder, the input trigger signal including a sequence of pulses for triggering the image capture device; determining an average pulse frequency of the input trigger signal over a period of time based on the number of pulses detected in the input signal over that period of time; imposing a limit on the average pulse frequency to produce a trigger output frequency; determining an output frequency based on the trigger output frequency; and outputting a PWM signal for triggering the image capture device, the PWM signal having a frequency based on the output frequency.
[0012] The features and technical advantages of the present invention have been outlined above rather broadly in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter, which form the subject matter of the claims of the invention. Those skilled in the art should understand that the disclosed concepts and specific embodiments may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. Those skilled in the art should also recognize that such equivalent constructions do not depart from the spirit and scope of the present invention as set forth in the appended claims. The novel features believed characteristic of the organization and method of operation of the invention, together with further objects and advantages thereof, will be better understood from the following description taken in conjunction with the accompanying drawings. It should be expressly understood, however, that each of the drawings is for the purpose of illustration and description only and is not intended to limit the scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] To understand the present invention more completely, reference is now made to the following description taken in conjunction with the accompanying drawings:
[0014] Figure 1An example system for image capture implemented according to an embodiment of the present disclosure is shown.
[0015] Figure 2 An example image capture device implemented according to an embodiment of the present disclosure is shown.
[0016] Figure 3 An example block diagram of a schematic diagram of a trigger signal filter controller implemented according to an embodiment of the present disclosure is shown.
[0017] Figure 4 An example of the operation flow of a trigger signal filtering controller implemented according to an embodiment of the present disclosure is shown.
[0018] It should be understood that the drawings are not necessarily drawn to scale, and the disclosed embodiments are sometimes shown in diagrammatic form and partial view form. In some cases, details unnecessary for understanding the disclosed methods and apparatuses may be omitted, or details that make other details difficult to understand may be omitted. Of course, it should be understood that the present disclosure is not limited to the specific embodiments shown herein. Detailed Description
[0019] The disclosure presented in the following written description and its various features and advantageous details will be more fully explained with reference to the non-limiting examples included in the drawings and the content detailed in the specification. Descriptions of well-known components are omitted herein to avoid unnecessarily obscuring the main features described herein. The following examples are intended to facilitate understanding of the implementation and practice of the present disclosure. Those of ordinary skill in the art will understand the present disclosure, meaning that any suitable combination of the following functions or exemplary embodiments can be combined to implement the claimed subject matter. The present disclosure includes the representative number of species within the genus, or the structural features common to the members of the genus, so that those of ordinary skill in the art can identify the members of the genus. Therefore, these examples should not be construed as limiting the scope of the claims.
[0020] Those of ordinary skill in the art will understand that any system claim presented herein covers all elements and limitations disclosed therein, and thus each system claim is to be regarded as a whole. Any reasonably foreseeable item having a functional relationship with the claim also falls within the relevant scope. After thoroughly understanding the disclosure and claims in the application presented, the examiner searched for prior art disclosed in patents and other published documents (i.e., non-patent literature). Therefore, as evidenced by the issuance of this patent, the prior art failed to disclose or teach the elements and limitations set forth in the claims supported by the specification and drawings, and thus the claimed claims are patentable under the applicable laws and rules of this jurisdiction.
[0021] Various embodiments of the present disclosure are directed to systems and techniques for filtering trigger signals from an encoder to trigger the functionality of an image capture device. In certain embodiments, a trigger signal can be received from an encoder as an input signal, the trigger signal including a pulse sequence for triggering an image capture device. In some embodiments, an average pulse frequency of the trigger signal over a period of time can be determined based on sampling the number of pulses in the trigger signal over that period of time, and a frequency limit can be applied to the average pulse frequency to generate a trigger frequency. In some embodiments, an output frequency can be determined based on the trigger frequency, and a pulse width modulation (PWM) signal having a frequency based on the output frequency can be determined for triggering the image capture device.
[0022] In some embodiments, the techniques disclosed herein can also include position tracking based on the output of a rotary encoder. In some embodiments, an orthogonal mode can be provided, in which the image capture device can be triggered only when the vehicle on which the system is installed is traveling on a railroad track segment that has not been sampled during the current operating session. For example, a PWM for triggering an image can be output to the image capture device only when traveling on a railroad track segment for which an image has not been captured during the current operating session. When traveling to a railroad track segment for which an image has already been taken in the current operating segment, the image capture device may not be triggered (e.g., the PWM for triggering the image capture device may not be output to the image capture device, or the PWM for triggering the image capture device may be output with a zero output frequency). In some embodiments, the orthogonal mode can detect the direction of travel and can determine whether a particular segment of the railroad track has been sampled during the current operating session. In some embodiments, a basic mode can be provided, in which the image capture device can be triggered as long as the vehicle is moving, regardless of the direction or segment of the track that has been sampled.
[0023] It should be noted that although the following disclosure focuses on an example application of filtering trigger signals from a rotary encoder for triggering an image capture device, this is for illustrative purposes only and is not intended to be limiting in any way. In fact, in some embodiments, the techniques described herein can be applicable to filtering other types of signals for other types of controls that may be affected by excessive motion, vibration, etc. or other types of environmental factors.
[0024] Figure 1 An example system 100 for image capture implemented in accordance with embodiments of the present disclosure is shown. In some embodiments, system 100 can be configured to capture images of railroad track 170 and / or its components (e.g., using image capture device 140) when vehicle 110 is traveling on railroad track 170. In some embodiments, the captured images can be used for object detection, object inspection, etc.
[0025] In some embodiments, system 100 or portions thereof may be associated with an entity, which may include any entity that can capture images, such as an enterprise, a company (e.g., a railroad company, a transportation company, etc.) or a government agency (e.g., a transportation department, a public safety department, etc.). The elements of system 100 may be implemented using any suitable combination of hardware, firmware, and software.
[0026] As Figure 1 shown, system 100 may include vehicle 110, rotary encoder 120, beam 130, one or more image capture modules 140, computer 150, network 160, and trigger signal filtering controller 180.
[0027] In some embodiments, vehicle 110 may include any machine capable of automatic and / or controlled movement. Vehicle 110 may include an automobile, a locomotive, a railroad car, a truck, a bus, an airplane, or any other machine suitable for movement. Vehicle 110 may operate or travel at any speed to allow one or more components of beam 130 (e.g., sensors, cameras, etc.) to capture images while vehicle 110 is in motion. For example, vehicle 110 may be a rail vehicle traveling at high speed (e.g., 40 - 75 miles per hour (mph)) on rail tracks 170.
[0028] In some embodiments, railroad tracks 170 may include any path that can accommodate vehicle 110. For example, vehicle 110 may travel along railroad tracks 170. Railroad tracks 170 may include roads, highways, railroad tracks, waterways, etc.
[0029] In an embodiment, beam 130 may include a structure that may contain and may be oriented to capture components for images (e.g., image capture device 140). In some embodiments, beam 130 may operate similar to a flatbed document scanner, but beam 130 may be in motion when capturing images of stationary physical objects (e.g., rail tracks 170 and / or their components). Beam 130 may be engaged with vehicle 110. For example, beam 130 may be bolted to a subframe attached to vehicle 110. In Figure 1 the embodiment shown, beam 130 has three parts, which may include two end parts and a central part. Beam 130 may have a gull - wing structure such that the central part may bend inward towards the center of beam 130. The gull - wing configuration may allow the image capture components (e.g., sensors, cameras, etc.) of the image capture device 140 within beam 130 to be properly oriented relative to the physical object being captured. In some embodiments, the central part of beam 130 may be omitted, and each end part may be operatively coupled to vehicle 110. Beam 130 may be made of metal (e.g., steel or aluminum), plastic, or any other material suitable for housing the components of beam 130 and attaching beam 130 to vehicle 110.
[0030] The beam 130 may include one or more openings. The openings can be used to place one or more image capture devices 140 within the beam 130. The openings can allow for the installation, adjustment, and maintenance of one or more image capture devices 140. Although Figure 1 the beam 130 is depicted in the figures as having a specific size and shape, the beam 130 can have any size and shape suitable for accommodating and positioning one or more image capture devices 140. Other factors that may contribute to the design of the beam 130 may include shock resistance, vibration resistance, weatherproofing considerations, durability, ease of maintenance, calibration considerations, and ease of installation.
[0031] In another embodiment, the beam 130 can include a plurality of sub-beams. For example, the beam 130 can include two separate sub-beams, each sub-beam including a plurality of cameras. In one embodiment, the system 100 having a plurality of sub-beams can reduce the complexity of maintenance and simplify the construction of each sub-beam. In another embodiment, the system 100 having a plurality of sub-beams can reduce the complexity of maintenance by reducing the number of personnel required, thereby maintaining control over construction tolerances. For example, welding and cutting of sub-beams can be reduced by 33% compared to a monolithic beam.
[0032] In certain embodiments, one or more image capture devices 140 of the system 100 can be used to capture images while the vehicle 110 is in motion. Each of the one or more image capture devices 140 can include one or more sensors, one or more cameras, etc. The one or more image capture devices 140 can be attached to any location on the vehicle 110 that allows the one or more image capture devices 140 to capture images of the surrounding environment of the vehicle 110. In Figure 1 the illustrated embodiment, the one or more image capture devices 140 can be located within the beam 130.
[0033] In certain embodiments, each end portion of the beam 130 can accommodate one or more image capture devices 140. For example, the first end of the beam 130 can accommodate an image capture module 140 that can include two downward-facing cameras that can capture images of the ties and ballast areas of the railroad track. The first end of the beam 130 can accommodate two downward-facing cameras in a portion thereof that is substantially horizontal with respect to the track. The second end of the beam 130 opposite the first end can accommodate two image capture modules 140, each image capture module including two angled cameras that can capture images of both sides of the track and the track fastening system. The second end of the beam 130 can accommodate four angled cameras that are located in a portion of the second end that is angled (e.g., at a 45-degree angle) with respect to the track.
[0034] In an embodiment, the image capture device 140 may include various types of sensors according to sensing and / or measurement requirements. The sensors housed in the image capture device 140 may include optical sensors (e.g., cameras for visible light (monochrome and color), infrared, ultraviolet, and / or thermal), motion sensors (e.g., gyroscopes and accelerometers), light detection and ranging (LIDAR) sensors, hyperspectral sensors, global positioning system (GPS) sensors, etc. The optical sensors and lasers can be used together for laser triangulation to measure deflection or profile. The LIDAR sensor can be used to generate three-dimensional (3D) point cloud data. The hyperspectral sensor can be used for specific wavelength response. Figure 2 An example of the image capture module 140 is described.
[0035] Figure 2 An example of an image capture device 140 is shown, which can be used for Figure 1 the system 100 in. The image capture module 140 may include a camera 210, a lens 220, a top plate 230, a bottom plate 240, a cover plate 250, bolts 260, and an opening 270. In some embodiments, the camera 210 can be any device configured to capture images. For example, the camera 210 can capture images of railway components (e.g., rail joints, switches, frogs, fasteners, ballast, rail heads, and / or ties). In some embodiments, the camera 210 may include one or more sensors. In some embodiments, the camera 210 can communicate with a memory that is used to store at least one image in response to the camera receiving a trigger signal, and communicate with a processor that can be configured to control the operation of the camera and transmit at least one image by executing program steps.
[0036] In some embodiments, the camera 210 may include a line scan camera. The line scan camera may contain a row of pixels. In some embodiments, the camera 210 can be a dual line scan camera. The dual line scan camera may include two rows of pixels that can be captured and / or processed simultaneously. In some embodiments, when the camera 210 moves above a physical object, the camera 210 can capture images such that a complete image of the physical object can be reconstructed row by row in software. The capture rate of the camera 210 can be up to 140 kHz. The camera 210 can have a certain resolution and optical system to detect physical objects at least 1 / 16 inch in size. In some embodiments, the camera 210 may include a lens 220, which can be configured to focus and direct incident light to the sensor of the camera 210. The lens 220 can be a piece of glass or other transparent material. The lens 220 can be made of any suitable material (e.g., steel, aluminum, glass, plastic, or a combination thereof).
[0037] Although Figure 2shows a particular arrangement of the camera 210, the lens 220, the top plate 230, the bottom plate 240, the cover plate 250, the bolt 260, and the opening 270. The present disclosure contemplates any suitable arrangement of the camera 210, the lens 220, the top plate 230, the bottom plate 240, the cover plate 250, the bolt 260, and the opening 270. Although Figure 2 shows a particular number of the camera 210, the lens 220, the top plate 230, the bottom plate 240, the cover plate 250, the bolt 260, and the opening 270, the present disclosure contemplates any appropriate number of the camera 210, the lens 220, the top plate 230, the bottom plate 240, the cover plate 250, the bolt 260, and the opening 270. For example, the image capture device 140 may include a plurality of cameras 210. As another example, in some embodiments, the image capture device 140 may not include Figure 2 certain components (e.g., the substrate 240) shown in
[0038] Referring again to Figure 1 , the rotary encoder 120 may include a rotary encoder or other timing device for measuring the rotation of an axle or a wheel. The rotary encoder 120 can be used to measure the number of rotations of a wheel (or the axle to which the wheel is attached). The rotary encoder 120 may be operatively coupled to a wheel or an axle of the vehicle 110. For example, in some embodiments, the rotary encoder 120 may be mounted or positioned on the axle of the vehicle 110 in such a way that it remains attached to the vehicle 110 during operation to measure the number of rotations of the wheel or axle on which the rotary encoder 120 is mounted.
[0039] The rotary encoder 120 may be physically and / or logically connected to one or more components of the system 100. For example, the rotary encoder 120 may be physically and / or logically connected to the trigger signal filter controller 180. In additional or alternative embodiments, the rotary encoder 120 may be physically and / or logically connected to one or more cameras and / or sensors of the image capture device 140 or the computer 150.
[0040] In some embodiments, the rotary encoder 120 may be configured to communicate with the image capture device 140 (e.g., via the trigger signal filter controller 180) to ensure that the cameras capture images of the same perspective and scale regardless of the speed of travel of the vehicle 110. For example, the rotary encoder 120 may synchronize with a plurality of cameras of the image capture device 140 to ensure that all cameras capture images simultaneously. As another example, the rotary encoder 120 may synchronize with the cameras of the image capture device 140 to ensure that images captured by a camera traveling with the vehicle 110 at a first speed (e.g., 10 miles per hour) have the same perspective and scale as images captured by a camera traveling with the vehicle 110 at a second speed (e.g., 65 miles per hour).
[0041] In an embodiment, the rotary encoder 120 can be mechanically coupled to the vehicle 110 to reduce or eliminate lost or unnecessary motion that causes undesirable artifacts to appear in the images generated by the image capture device 140. For example, lost or unnecessary motion may include mechanical coupling slack, which can result in image distortion. In another embodiment, the mechanical means can use components specifically machined for the rotary encoder to reduce lost or unnecessary motion. For example, components specifically machined for the rotary encoder can ensure a flexible and rigid fit to minimize vibrations and other mechanical disturbances that cause lost or unnecessary motion.
[0042] In some embodiments, the rotary encoder 120 can be communicatively coupled to the image capture device 140 electrically (including via the trigger signal filter controller 180). For example, as described in more detail below, the trigger signal filter controller 180 can be configured to filter the trigger signal generated by the rotary encoder 120 and can send the filtered trigger signal to one or more cameras of the image capture device 140. In some embodiments, the trigger signal generated by the rotary encoder 120 may be "dirty", which may mean that the trigger signal includes a square wave with non-uniform frequencies, such as pulses with non-uniform intervals. In some embodiments, the trigger signal filter controller 180 can be configured to clean the dirty trigger signal generated by the rotary encoder 120 by smoothing the trigger filter signal generated by the rotary encoder 120 to generate a clean trigger signal, which can refer to a trigger signal that includes a square wave with pulses having uniform intervals and a uniform frequency. Additionally, the trigger signal filter controller 180 can be configured to apply minimum and / or maximum frequency limits to the trigger signal such that the clean trigger signal output by the trigger signal filter controller 180 can have hard limits on the minimum and / or maximum frequency.
[0043] In an embodiment, computer 150 may be implemented as a mobile device, a smartphone, a tablet computing device, a personal computing device, a notebook computing device, a desktop computing device, a computer system of a vehicle, a personal digital assistant (PDA), a smartwatch, other types of wired and / or wireless computing devices or any part thereof, or as a part of any of them. Computer 150 may be configured to coordinate one or more components of system 100 and receive data from trigger signal filter controller 180, image capture device 140, and / or rotary encoder 120. In certain embodiments, computer 150 may monitor the inputs and / or outputs of trigger signal filter controller 180, image capture device 140, and / or rotary encoder 120. In some embodiments, computer 150 may include a communication function that may allow a user (e.g., a technician) to directly participate in system 100. For example, the user may access computer 150 through an interface (e.g., a screen, a graphical user interface (GUI), or a panel) of computer 150. Computer 150 may be located inside or outside vehicle 110. Computer 150 may communicate with one or more components of system 100 via network 160.
[0044] Network 160 may include any type of network that facilitates communication between components of system 100. One or more portions of network 160 may include an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless local area network (WLAN), a wide area network (WAN), a wireless wide area network (WWAN), a metropolitan area network (MAN), a portion of the Internet, a portion of the public switched telephone network (PSTN), a cellular telephone network, a 3G network, a 4G network, a 5G network, a long term evolution (LTE) cellular network, a combination of two or more of these, or other suitable types of networks. One or more portions of network 160 may include one or more access (e.g., mobile access), core, and / or edge networks. Network 160 may include any communication network, such as a private network, a public network, a connection through the Internet, a mobile network, a Wi-Fi network, a Bluetooth network, etc. One or more components of system 100 may communicate via network 160. For example, computer 150 may communicate via network 160, including receiving information from trigger signal filter controller 180, image capture device 140, and / or rotary encoder 120.
[0045] During operation of system 100, vehicle 110 may travel on rail 170 at a certain speed. The rotation of the wheels, and more specifically in some embodiments the rotation of the shafts to which the wheels are attached, may cause rotation encoder 120 to generate a trigger signal. In certain embodiments, the trigger signal generated by rotation encoder 120 may include a square wave composed of a plurality of pulses. In certain embodiments, the trigger signal generated by rotation encoder 120 may be used to trigger image capture device 140 to capture an image of railroad track 170 and / or its components. For example, each pulse of the trigger signal may trigger the image capture device to capture an image.
[0046] In certain embodiments, the number of pulses in the square wave generated by rotation encoder 120 may have a frequency indicative of the number of pulses per second generated by rotation encoder 120 (or in some cases measured as the number of pulses per wheel revolution). Ideally, the pulse frequency generated by rotation encoder 120 at a particular speed may be evenly distributed and have a constant frequency. Such evenly spaced trigger signals from rotation encoder 120 will ensure that image capture device 140 can be triggered "evenly", such that the captured images are not distorted. However, as described above, mechanical clearances in the components of system 100, particularly in the components used to attach rotation encoder 120 to the shaft of vehicle 110, may cause the trigger signal generated by rotation encoder 120 to include random and / or excessive pulses, which means that, generally, the trigger signal generated by rotation encoder 120 at a particular speed includes pulses that are not evenly distributed but have a varying frequency or rate.
[0047] During operation, the trigger signal generated by rotation encoder 120 may be input into trigger signal filtering controller 180, which may be configured to filter the signal generated by encoder 120 into a clean trigger signal including evenly spaced pulses. The clean trigger signal may then be provided to image capture device 140, and this signal may be used to trigger image capture device 140 to capture an image of railroad track 170 and / or its components. Since the clean trigger signal includes a square wave with evenly spaced pulses, the images captured by image capture device 140 may not be distorted and are not affected by the mechanical clearances of the attachment components of system 100.
[0048] In some embodiments, the position tracking function of the trigger signal filter controller 180 can be used to provide an orthogonal mode and a basic operation mode. In some embodiments, during operation in the basic mode, as long as the vehicle 110 moves in any direction, the system 100 can sample the rail 170 and / or its components (e.g., capture images of the rail 170 and / or its components). In the basic mode, when the vehicle 110 moves in any direction, the rotary encoder 120 can generate pulses (e.g., square wave trigger signals), which can be filtered and / or cleaned by the trigger signal filter controller 180 and then provided to the image capture device 140 for triggering the image capture device 140 to capture images of the rail 170 and / or its components, regardless of the position of the system 100 relative to the rail 170 or the direction in which the vehicle 110 moves.
[0049] In some embodiments, during operation in the orthogonal mode, the system 100 can operate to sample portions of the railway track 170 and / or its components that have not been sampled during the current operation session, without sampling portions of the railway track 170 and / or its components that have already been sampled during the current operation session. In the orthogonal mode, the system 100 can utilize the function of the trigger signal filter controller 180 to track the position and orientation of the system 100 within the railway track 170 to track the portions of the railway track 170 and / or its components that have been sampled. In this way, when it is determined that the image capture device 140 is passing over a sampled section of the rail 170 and / or its components, the trigger signal filter controller 180 can pause triggering the image capture device 140 (e.g., can refrain from outputting a trigger signal to the image capture device 140, or can output a trigger signal with a frequency of zero to the image capture device 140), and when it is determined that the image capture device 140 is passing over an unsampled section of the rail 170 and / or its components, can resume triggering the image capture device 140 (e.g., can output a trigger signal with a frequency greater than zero to the image capture device 140).
[0050] Although Figure 1 a particular arrangement of the vehicle 110, rotary encoder 120, beam 130, image capture device 140, computer 150, network 160, and trigger signal filter controller 180 is shown, the present disclosure contemplates any suitable arrangement of the vehicle 110, rotary encoder 120, beam 130, image capture device 140, computer 150, network 160, and trigger signal filter controller 180. For example, the computer 150 can be located inside the vehicle 110. The vehicle 110, rotary encoder 120, beam 130, image capture device 140, computer 150, and trigger signal filter controller 180 can be physically or logically located in the same location, either in whole or in part.
[0051] Although Figure 1A specific number of vehicles 110, rotary encoders 120, beams 130, image capture devices 140, computers 150, network 160, and trigger signal filtering controllers 180 are shown, but the present disclosure contemplates any suitable number of vehicles 110, rotary encoders 120, beams 130, image capture devices 140, computers 150, network 160, and trigger signal filtering controllers 180. For example, system 100 may include a first beam at the front end of vehicle 110 and a second beam at the rear end of vehicle 110. As another example, system 100 may include multiple computers 150.
[0052] Figure 3 FIG. shows a block diagram of an example of a schematic diagram of a trigger signal filter controller 180 implemented in accordance with an embodiment of the present disclosure. As Figure 3 shown, the trigger signal filtering controller 180 may include a processor 311, a memory 312, a trigger signal regulator 320, a trigger frequency detector 321, an operation mode manager 322, a limit manager 323, an output frequency manager 324, a PWM generator 325, a Z-channel synthesizer 326, and an output manager 327.
[0053] In certain embodiments, the trigger signal filtering controller 180 may be configured to filter trigger signals generated by a rotary encoder (e.g., Figure 1 the rotary encoder 120 therein) and output a clean or filtered trigger signal to one or more image capture devices (e.g., Figure 1 the image capture device 140 therein). In additional or alternative embodiments, the trigger signal filter controller 180 may be configured to apply minimum and / or maximum frequency limits to the trigger signals such that the clean trigger signals output by the trigger signal filter controller 180 may have hard limits on the minimum and / or maximum frequencies. Additionally, in additional or alternative embodiments, the trigger signal filtering controller 180 may be configured to provide an orthogonal mode and a basic operation mode. In certain embodiments, the basic operating mode may enable a system (e.g., Figure 1 the system 100 therein) to sample a railway track and its components when the vehicle on which the system is installed moves in any direction, regardless of the specific location of the system on the railway track. In certain embodiments, the orthogonal operation mode may enable the system to sample portions of the railway track and / or its components that have not been sampled during the current operation session without sampling portions of the railway track and / or its components that have already been sampled during the current operation session.
[0054] The functions of the trigger signal filtering controller 180 may be provided by the cooperative operation of the various components of the trigger signal filtering controller 180, as will be described in more detail below. Although Figure 3A single trigger signal filtering controller 180 is shown. It can be understood that the trigger signal filtering controller 180 and its respective functional blocks can be implemented as a single device, or can be distributed across multiple devices having their own processing resources, and their aggregated functionality can be configured to perform operations in accordance with embodiments of the present disclosure. Additionally, those skilled in the art will recognize that although Figure 3 the components of the trigger signal filtering controller 180 are shown as single and independent blocks, each of the respective components of the trigger signal filtering controller 180 can be a single component (e.g., a single application, server module, etc.), can be functional components of the same component, or the functionality can be distributed across multiple devices / components. In such an embodiment, the functionality of each respective component can be aggregated from the functionality of multiple modules located in a single or multiple devices. Additionally, the specific functionality described for a particular component of the trigger signal filter controller 180 can actually be part of different components of the trigger signal filter controller 180, and thus, the description of the specific functionality described for a particular component of the trigger signal filter controller 180 is for illustrative purposes only and is not limiting in any way.
[0055] The processor 311 can include a processor, microprocessor, controller, microcontroller, multiple microprocessors, an application specific integrated circuit (ASIC), an application specific standard product (ASSP), or any combination thereof, and can be configured to execute instructions to perform operations in accordance with the disclosure herein. In some embodiments, the implementation of the processor 311 can include code segments (e.g., software, firmware, and / or hardware logic) executable in hardware (e.g., a processor) to perform the tasks and functions described herein. In still other embodiments, the processor 311 can be implemented as a combination of hardware and software. The processor 311 can be communicatively coupled to the memory 312.
[0056] The memory 312 can include one or more semiconductor memory devices, read only memory (ROM) devices, random access memory (RAM) devices, one or more hard disk drives (HDDs), flash memory devices, solid state drives (SSDs), erasable ROM (EROM), compact disc ROM (CD-ROM), optical discs, other devices configured to store data in a persistent or non-persistent state, network memory, cloud memory, local memory, or a combination of different memory devices. The memory 312 can include a processor-readable medium configured to store one or more instruction sets (e.g., software, firmware, etc.) that, when executed by a processor (e.g., one or more processors of the processor 311), perform the tasks and functions described herein.
[0057] In some embodiments, when a vehicle equipped with a rotary encoder 120 travels on a road (e.g., a railway track) at a certain speed, the rotary encoder 120 may output a trigger signal, which may include a square wave with a pulse sequence. As described above, the pulses in the trigger signal generated by the rotary encoder 120 may be unevenly spaced, resulting in an uneven pulse rate or trigger signal square wave frequency. As described above, when the rotary encoder 120 travels on a railway track at a certain speed, the non-uniformity of its trigger signal may cause problems when triggering the image capture device 140. The trigger signal output from the rotary encoder 120 may be input as an input signal to the trigger signal filter controller 180.
[0058] In some embodiments, the trigger signal regulator 320 may be configured to condition the trigger signal received from the rotary encoder 120. Conditioning the trigger signal received from the rotary encoder 120 may include converting the trigger signal received from the rotary encoder 120 into a form that is compatible with other components of the trigger signal filter controller 180. In some embodiments, the trigger signal regulator 320 may convert the trigger signal received from the rotary encoder 120 into a voltage that is compatible with other components of the trigger signal filter controller 180. For example, the trigger signal received from the rotary encoder 120 may include a 5V square wave, and at least some components of the trigger signal filter controller 180 may operate at 3.3V. In this example, the trigger signal regulator 320 may convert the 5V trigger signal received from the rotary encoder 120 into a 3.3V square wave trigger signal that is compatible with the components of the trigger signal filter controller 180.
[0059] In additional or alternative embodiments, the trigger signal regulator 320 may be configured to condition the output of the trigger signal filter controller 180 to be compatible with the image capture device 140. For example, the image capture device 140 may operate at 5V, e.g., using a 5V square wave, to trigger image capture. In this example, the clean trigger signal generated by the trigger signal filter controller 180 may include a square wave with 3.3V pulses. In this example, the trigger signal regulator 320 may convert the 3.3V trigger signal generated by the trigger signal filter controller 180 into a square wave with 5V pulses, which may then be sent to the image capture device 140.
[0060] It should be noted that, in some embodiments, the rotary encoder 120 may include an orthogonal encoder, which may be configured to output a trigger signal that may include more than one sub-signal (e.g., A signal and B signal). Both the A signal and the B signal may be square waves including pulse sequences having the same frequency but having a phase difference (e.g., a phase difference between 25% - 50%). In some embodiments, the trigger signal output by the rotary encoder 120 may include one or both of the A signal and the B signal from the rotary encoder 120. In certain embodiments, the square waves of the A signal and the B signal may each have a duty cycle of approximately 50%.
[0061] In certain embodiments, the trigger frequency detector 321 may be configured to measure or determine the frequency of the trigger signal output by the rotary encoder 120 (e.g., the input frequency). In certain embodiments, the trigger frequency detector 321 may determine the frequency of the trigger signal output by the rotary encoder 120 during a sampling time period. For example, the trigger frequency detector 321 may analyze the trigger signal output by the rotary encoder 120 to determine the number of pulses that occur in the trigger signal during the sampling time period. The trigger frequency detector 321 may determine the frequency of the trigger signal output by the rotary encoder 120 during the sampling time period by dividing the number of pulses detected during the sampling time period. In this way, the trigger frequency detector 321 is operable to average the frequency of the trigger signal during the sampling time period.
[0062] Specifically, the trigger frequency detector 321 can be configured to attach an interrupt that performs a processing function in response to detecting an edge of one of the signals from the rotary encoder 120 (e.g., the A signal or the B signal). The interrupt persists for the duration of the sampling period. At the expiration of the sampling period, the interrupt can be detached, and the processing function can no longer be performed when an edge is detected on one of the signals from the rotary encoder 120. For example, the trigger frequency detector 321 can attach an interrupt that performs a processing function when a falling edge is detected in the B signal from the rotary encoder 120. The processing function can be configured to record the time when the edge of the B signal (e.g., representing a pulse) is detected and the number of pulses in the B signal detected during the period when the interrupt is attached (e.g., the sampling period). At the expiration of the sampling period, the trigger frequency detector 321 can detach the interrupt. At this time, the total number of pulses detected during the interrupt attachment is known, as well as the times when the first and last pulses are detected during the interrupt attachment. The trigger frequency detector 321 can calculate the input frequency of the trigger signal generated by the encoder 120 by dividing the total number of pulses detected during the period when the interrupt occurs by the difference in time between when the first and last pulses are detected. The result may represent the average value of the B signal square wave frequency over the sampling period. Additionally, the resulting average trigger signal can effectively spread the influence of random pulses over the sampling period, thereby resolving any random pulses in the trigger signal from the rotary encoder. As shown in more detail below, the resulting average trigger signal frequency can be used to generate a trigger signal with a constant or uniform frequency that can be output to the image capture device 140.
[0063] It should be noted that the description of performing the processing function when a falling edge is detected in the B signal from the rotary encoder 120 is for illustrative purposes only and should not be construed as limiting in any way. In fact, in some embodiments, the processing function can be performed when a falling edge or a rising edge of the B signal or the A signal is detected.
[0064] The operation mode manager 322 may be configured to implement multiple operation modes and use a limit on the input frequency of the trigger signal output by the rotary encoder 120 calculated by the trigger frequency detector 321 based on the operation mode setting. In some embodiments, the operation modes may include a basic mode and an orthogonal mode. In the basic mode, the trigger signal filter controller 180 may output a filtered trigger signal to the image capture device 140 regardless of the direction of travel or the position of the system within the railroad track. Thus, as long as the vehicle on which the system 100 is installed is moving within the railroad track and as long as the rotary encoder 120 generates a trigger signal, the trigger signal filter controller 180 may filter the trigger signal from the rotary encoder 120 and provide the filtered trigger signal to the image acquisition device 140 for image acquisition. In the orthogonal mode, the trigger signal filter controller 180 may output a filtered trigger signal to the image capture device 140 based on the direction of travel and the position of the system within the railroad track. In a particular implementation of the orthogonal mode trigger signal filter controller 180, when the travel position and direction indicate that the image capture device is traveling on a portion of the railroad track and / or a component thereof that has not been sampled during the current operation session, a filtered trigger signal may be output to the image capture device 140, and when the travel position and direction indicate that the image capture device is traveling on a portion of the railroad track and / or a component thereof that has been previously sampled during the current operation session, a filtered trigger signal may not be output to the image capture device 140, or a filtered trigger signal having a frequency of zero may be output. Particular situations where the orthogonal mode may be used may include when the vehicle on which the image capture device 140 is installed may be traveling in a first direction on the railroad track and sampling the railroad track but may stop at a particular location and may change direction. In such a case, the orthogonal mode may allow for pausing of image capture when the vehicle is backing up on the track (on a portion that has already been sampled). The pause may continue even if the vehicle resumes its original direction until the vehicle returns to the original position where sampling stopped. At this point, the vehicle may cross a portion of the railroad track that was not previously sampled (since the vehicle stopped and reversed direction at this point), and sampling may resume.
[0065] In some embodiments, the operation mode may include a sampling direction mode. The sampling direction mode can be used to control the traveling direction for enabling sampling of a railway track and / or its components. For example, a locomotive is typically configured to be able to travel in any direction. Thus, most rail vehicles can travel with either end leading. Since one end of a rail vehicle can be referred to as the B end (e.g., the end including a handbrake), and the other end of the rail vehicle can be referred to as the A end, the vehicle can travel on the railway tracks with the A end leading or the B end leading. The sampling direction mode can allow selection of the direction in which sampling occurs (e.g., A end leading or B end leading). For example, an operator can indicate that sampling is to occur when the vehicle travels with the A end leading. In this case, when it is determined that the traveling direction of the rail vehicle is A end leading, the trigger signal filtering controller 180 can output a filtered trigger signal to the image capture device 140. At this time, when it is determined that the traveling direction of the rail vehicle is B end leading, the trigger signal filtering controller 180 may not output a filtered trigger signal to the image capture device 140, or may output a filtered trigger signal with a frequency of zero.
[0066] It is noted that in some embodiments, the various possibilities are not mutually exclusive. For example, in some embodiments, the orthogonal mode can be used in conjunction with the sampling direction mode, in which case the railway track can be sampled when the vehicle travels in the appropriate direction and only when traveling to a previously unsampled track section. In another example, the basic mode can be used in conjunction with the sampling direction mode, in which case the railway track can be sampled when the vehicle travels in the appropriate direction, regardless of whether it is traveling on a previously sampled track section.
[0067] In some embodiments, the operation mode manager 322 may implement various operation modes by tracking the direction of travel and the current position. In some embodiments, the operation mode manager 322 may track the direction of travel based on the phase difference between the A signal and the B signal of the trigger signal received from the rotary encoder 120. As described above, there may be a phase difference between the A signal and the B signal (e.g., a phase difference between 25% and 50%). In some embodiments, the configuration of the phase difference may depend on the direction of rotation of the shaft or wheel to which the rotary encoder 120 is attached. For example, when the shaft or wheel to which the rotary encoder 120 is connected rotates in a first direction, the A signal may lead the B signal. Thus, when the A signal rises, the B signal may be low. Only after the phase difference, the B signal will rise, and it is possible for the A signal and the B signal to be high at the same time. Then the A signal may fall, but the B signal may remain high, and after the phase difference, the B signal may fall, at which time both the A signal and the B signal may be low. On the other hand, when the shaft or wheel to which the rotary encoder 120 is connected rotates in a second direction opposite to the first direction, the A signal may lag behind the B signal. Thus, when the A signal rises, the B signal may already be high. After the phase difference, the B signal falls, but the A signal still remains high. Then the A signal may fall, at which time both the A signal and the B signal may be low. After the phase difference, the B signal may rise again, but the A signal still remains low.
[0068] In some embodiments, the operation mode manager 322 may be configured to attach an interrupt that performs a processing function in response to detecting an edge of one of the signals (e.g., the A signal or the B signal) from the rotary encoder 120. For example, the operation mode manager 322 may attach an interrupt that performs a processing function when a rising edge is detected in the A signal from the rotary encoder 120. The processing function may be configured to determine whether the B signal is low or high when it detects that the A signal goes high (e.g., rises). When the processing function detects that the B signal is low, the processing function determines that the wheel or axle to which the rotary encoder is connected is rotating in a first rotational direction, and thus, the vehicle in which the wheel or axle is located is moving in a first direction. In some embodiments, the first rotational direction may be counterclockwise, and based on the mounting configuration of the rotary encoder 120, the first direction of the vehicle may be with the A end in front. On the other hand, when the processing function detects that the B signal is high, the processing function determines that the wheel or axle to which the rotary encoder is connected is rotating in a second rotational direction, and thus, the vehicle in which the wheel or axle is located is moving in a second direction different from the first direction. In some embodiments, the second rotational direction may be clockwise, and based on the mounting configuration of the rotary encoder 120, the second direction of the vehicle may be with the B end in front. In this way, the operation mode manager 322 can operate to determine the direction of travel.
[0069] In some embodiments, the operation mode manager 322 may track the current position based on the number of pulses and the direction of travel. In some embodiments, the additional interrupt handling function of the operation mode manager 322 may be configured to maintain a pulse count. The pulse count may depend on the direction of travel. For example, in some embodiments, a first direction of travel may represent an up-counting direction, while a second direction of travel may represent a down-counting direction. When in the up-counting direction, the handling function may increment the pulse count for each detected pulse (e.g., each time the A signal rises or falls, or each time the B signal rises or falls). However, when in the down-counting direction, the handling function may decrement the pulse count for each detected pulse. In this way, the pulse count can be directly related to the position of the vehicle within the track, as the pulse count increases when the vehicle moves in the first direction (e.g., the up-counting direction), but decreases when it moves in the opposite direction (e.g., the second direction or the down-counting direction). The current pulse count can represent the current "position" of the vehicle within the railway track, at least in terms of the number of pulses.
[0070] In some embodiments, the operation mode manager 322 can implement an orthogonal mode using pulse counting. For example, the operation mode manager 322 can maintain a maximum distance count, which can include the pulse count at the maximum distance reached in a particular direction (e.g., the up-counting or down-counting direction) in a particular direction. Since the maximum distance count also represents the maximum position within the sampled railway track, the maximum distance count can be used to determine whether the current position of the vehicle (e.g., the current pulse count) is within the sampled portion of the railway track. For example, the vehicle can travel in the counting direction in orthogonal mode and is configured to sample in the counting direction (e.g., can be in orthogonal counting mode). The vehicle may stop at the first point of the railway track. The current pulse count may correspond to the position of the first point in the railway track. The operation mode manager 322 can set the maximum distance count to be equal to the current pulse count. In this way, the maximum distance count can correspond to the first point in the railway track. The vehicle may start traveling in the opposite direction (e.g., the down-counting direction). Since the system is in orthogonal mode, the image capture device does not capture an image of the railway track when moving in reverse because the section of the railway track up to the first point has already been sampled. Thus, the sampling of the railway track may be paused. However, when moving in reverse, the operation mode manager 322 can decrease the pulse count for each pulse detected in reverse. In this example, the pulse count may be less than the maximum distance count but can still represent a position within the railway track, although that position has already been sampled. Once the vehicle stops reversing and starts moving in the original direction (e.g., the up-counting direction), the operation mode manager 322 can again increase the pulse count for each pulse detected. However, at this time, the current pulse count may still be less than the maximum distance count because the first position has not been reached and the sampling of the railway track may still be paused. However, when the first position is reached, the pulse count may be equal to the maximum distance count, and once the pulse count exceeds the maximum distance reached, the sampling of the railway track can be resumed, and the operation mode manager 322 can set the maximum distance count to the current pulse count. In some embodiments, the operation in orthogonal mode and the sampling in the down-counting direction (e.g., down-counting orthogonal mode) can be similar to the operation in the up-counting orthogonal mode, except that the sampling is paused until the current pulse count is less than the maximum distance count.
[0071] In some embodiments, the operating mode manager 322 may limit the use of the input frequency of the trigger signal output by the rotary encoder 120 calculated by the trigger frequency detector 321 based on the operating mode. For example, when operating in the quadrature mode, when the current pulse count indicates that the position of the vehicle within the railway track exceeds the sampled railway track section (e.g., when the current pulse count is not less than the maximum distance count in the down-counting quadrature mode, or when the current pulse count is not greater than the maximum distance count in the up-counting quadrature mode), the operating mode manager 322 may limit the use of the input frequency of the trigger signal output by the rotary encoder 120 calculated by the trigger frequency detector 321. The operating mode manager 322 may limit the use of the input frequency of the trigger signal output by the rotary encoder 120 (calculated by the trigger frequency detector 321) by overriding the input frequency to be equal to a value indicating that the quadrature mode is being used but the vehicle has not exceeded the maximum reach distance. For example, when in the quadrature counting mode and the current pulse count is less than the maximum distance count, the operating mode manager 322 may override the input frequency to be equal to a value (e.g., a positive value) indicating that the system is in the quadrature counting mode, but the current position of the vehicle lags behind the previously reached maximum distance (e.g., in the quadrature counting direction). This indication can be used to maintain the suspension of railway track sampling because the current position has been sampled. In the same example, when in the reverse quadrature mode and the current pulse count is greater than the maximum distance count, the operating mode manager 322 may override the input frequency to be equal to a value (e.g., a negative value) indicating that the system is in the reverse quadrature mode, but the current position of the vehicle lags behind the previously reached maximum distance (e.g., in the reverse direction). This indication can be used to maintain the suspension of railway track sampling because the current position has been sampled.
[0072] The limit manager 323 may be configured to impose a frequency limit on the input frequency of the trigger signal output by the rotary encoder 120, which is calculated by the trigger frequency detector 321. In some embodiments, the frequency limit may be related to operational requirements and / or limitations. For example, the limit manager 323 may apply a minimum frequency limit to the input frequency of the trigger signal output by the rotary encoder 120, which is calculated by the trigger frequency detector 321. In such a case, if the input frequency of the trigger signal output by the rotary encoder 120, as calculated by the trigger frequency detector 321, is less than the minimum frequency limit, the limit manager 323 may override the input frequency and set it to zero. In this way, unless the input frequency of the trigger signal output by the rotary encoder 120, as calculated by the trigger frequency detector 321, is higher than the minimum frequency limit, the trigger signal output by the trigger signal filter controller 180 to the image capture device 140 may be zero. This may occur when the vehicle is traveling at a low speed, in which case the frequency of the trigger signal may be less than the minimum frequency limit. In some embodiments, when the total number of pulses detected in the trigger signal output by the rotary encoder 120 during a sampling time period may be less than a minimum number of pulses (e.g., fewer than 5 pulses), the limit manager 323 may override the input frequency and set it to zero.
[0073] In some embodiments, the limit manager 323 may apply a maximum frequency limit to the input frequency of the trigger signal output by the rotary encoder 120, which is calculated by the trigger frequency detector 321. In such a case, if the input frequency of the trigger signal output by the rotary encoder 120, as calculated by the trigger frequency detector 321, is greater than the maximum frequency limit, the limit manager 323 may override the input frequency and set it to the maximum frequency limit. In this way, unless the input frequency of the trigger signal output by the rotary encoder 120, as calculated by the trigger frequency detector 321, is lower than the maximum frequency limit, the trigger signal output by the trigger signal filter controller 180 to the image capture device 140 may be set to the maximum frequency limit. In some embodiments, the maximum frequency limit may correspond to the maximum operating frequency limit of the image capture device 140.
[0074] The output frequency manager 324 can be configured to set the output frequency of the trigger signal output by the trigger signal filter controller 180. In some embodiments, when the input frequency of the trigger signal output by the rotary encoder 120 calculated by the trigger frequency detector 321 is between the minimum frequency limit and the maximum frequency limit, the output frequency manager 324 can set the output frequency to be equal to the trigger signal output by the rotary encoder 120 calculated by the trigger frequency detector 321. In some embodiments, when the input frequency of the trigger signal output by the rotary encoder 120 calculated by the trigger frequency detector 321 exceeds the minimum frequency limit or the maximum frequency limit, the output frequency manager 324 can set the output frequency to be equal to the covered input frequency covered by the limit manager 323.
[0075] The PWM generator 325 can be configured to generate a square wave having a frequency equal to the output frequency set by the output frequency manager 324. In some embodiments, generating the square wave can include generating a PWM having the output frequency and a 50% duty cycle. The square wave generated by the PWM generator 325 can represent a filtered trigger signal having pulses evenly spaced according to the output frequency, and taking into account the operating frequency limits and / or constraints. In some embodiments, the output manager 327 can be configured to ensure that the filtered trigger signal is output to the image capture device 140. In some embodiments, the output manager 327 can also output an operation message indicating an operation event, such as the measured input frequency, pulse count, maximum distance count, travel direction, operation mode, etc.
[0076] Figure 4 An example of an operation flow 400 of a trigger signal filtering controller implemented according to an embodiment of the present disclosure is shown. The operation flow 400 can be implemented as an algorithm running on a trigger signal filtering controller (e.g., Figure 1 the trigger signal filtering controller 180 in), a machine learning module, a client, a database, or other suitable system. Additionally, the operation flow 400 can implement or include one or more features of the trigger signal filter controller 180. The steps of the operation flow 400 can be implemented by software, firmware, hardware, an application programming interface (API), a network connection, a network transport protocol, HTML, DHTML, JavaScript, Dojo, Ruby, Rails, other suitable applications, or a suitable combination thereof.
[0077] In step 402, in some embodiments, it can be from an encoder (e.g., Figure 1The rotation encoder 120) therein receives an input trigger signal. The input trigger signal can include a series of pulses generated by the encoder in response to rotational movement of the shaft to which the encoder is attached. In some embodiments, the pulses in the pulse sequence of the input trigger signal may not all be evenly spaced and may include pulses that are unevenly spaced within the input trigger signal. In some embodiments, the input trigger signal can include an A signal and a B signal.
[0078] In step 404, in one embodiment, the trigger signal filter controller can append a direction / position tracking interrupt that can be configured to perform a processing function when the rising edge of the A signal of the input trigger signal occurs. In some embodiments, the processing function can determine whether the B signal is low or high (e.g., at step 422) when the rising edge of the A signal is detected (e.g., at step 420). In step 424, in one embodiment, when the B signal is high at 422, the trigger signal filter controller can determine that the direction of vehicle travel is the count-down direction. In this case, the down-count direction can be determined based on the judgment that both the A signal and the B signal are high. In this case, in step 426, in response to detecting a pulse in the A signal (e.g., the rising edge in the A signal) and determining that the vehicle is moving in the count direction, the current pulse count can be decreased.
[0079] In step 428, in one embodiment, when the B signal is low at 422, the trigger signal filter controller can determine that the direction of vehicle travel is the count direction. In this case, the up-count direction can be determined based on the judgment that the B signal is low when the A signal is high. In this case, in step 430, in response to detecting a pulse in the A signal (e.g., the rising edge in the A signal) and determining that the vehicle is moving in the count direction, the current pulse count can be increased.
[0080] At block 406, in one embodiment, the trigger signal filter controller may execute logic to measure the input frequency of the input trigger signal during a sampling time period. In certain embodiments, the trigger signal filter controller may append an interrupt that executes a processing function in response to detecting a falling edge in the B signal. In certain embodiments, the interrupt is appended for the duration of the sampling period, and when the sampling period expires, the trigger signal filter controller may detach the interrupt and may no longer execute the processing function when a falling edge of the B signal is detected. For example, after appending the interrupt, the trigger signal filter controller may determine at step 408 whether the sampling time period has expired. In response to determining that the sample of the time period has not expired, the trigger signal filter controller may detect a falling edge of the B signal of the input trigger signal from the encoder at step 410. At step 412, in one embodiment, the trigger signal filter controller may determine whether the current pulse detected in the B signal is the first pulse detected during the sampling time period based on a pulse number counter. Based on determining that the current pulse detected in the B signal is the first pulse detected during the sampling time period, the trigger signal filter controller may obtain the current time at step 414 and may set the first pulse time to the current time. Based on determining that the current pulse detected in the B signal is not the first pulse detected during the sampling time period, the trigger signal filter controller may obtain the current time at step 418 and may set the last pulse time to the current time. At step 416, the trigger signal filter controller may increment the number of the pulse counter and may return in operation to step 408 to determine whether the sampling time period has expired. The operations at steps 408 - 418 may continue until it is determined at step 408 that the sampling time period has expired. Based on determining that the sampling time period has expired, the operation may return to step 406, where the trigger signal filter controller may measure the input frequency of the input trigger signal during the sampling time period.
[0081] Specifically, in step 406, when the sampling time period expires, the trigger signal filter controller can separate the interrupt. At this time, the total number of pulses detected within the time period additional to the interrupt, i.e., the count of the pulse counter, and the times when the first pulse and the last pulse are detected within the time period additional to the interrupt (e.g., within the first pulse time and the last pulse time) are known. The trigger signal filtering controller can calculate the input frequency of the input trigger signal by dividing the total number of pulses detected within the additional interrupt time period by the difference between the times when the first pulse and the last pulse are detected. The result may represent the average value of the B-signal square wave frequency within the sampling time period. Additionally, the resulting average trigger signal can effectively extend the influence of random pulses to the sampling time period, thus resolving any random pulses in the trigger signal from the rotary encoder. As shown in more detail below, the resulting average trigger signal frequency can be used to generate a trigger signal with a constant or uniform frequency that can be output to the image capture device 140.
[0082] In step 432, in one embodiment, the trigger signal filter controller can determine the sampling direction for the image capture device to capture an image of the railway track and / or its components. In some embodiments, the sampling direction can be specified by the operator. Determining the sampling direction may be important at this time because the traveling direction may be known (e.g., from the processing function of the direction / position tracking interrupt additional to step 404), and whether the input frequency measured in step 406 can be used may be based on whether the traveling direction of the vehicle corresponds to the sampling direction. In some embodiments, determining the sampling direction can include reading an input attached to an indicator that the operator can use to indicate the desired sampling direction. In some embodiments, the trigger signal filter controller can maintain the last pulse count, which can be updated to be equal to the current pulse count each time the processing function of the direction / position tracking interrupt detects a pulse. In this way, the last pulse count can indicate the last current pulse count. The trigger signal filtering controller can also maintain a maximum distance count, which can indicate the pulse count when the maximum distance is reached in a specific direction. The maximum distance count is related to the sampling direction because the maximum distance count in the downward counting direction is the lowest pulse count reached, which may correspond to the maximum distance reached in the downward counting direction. On the other hand, the maximum distance count in the upward counting direction is the highest pulse count reached, which can correspond to the maximum distance reached in the upward counting direction.
[0083] When it is determined in step 432 that the sampling direction is the upward counting direction, in one embodiment, the trigger signal filter controller may determine in step 434 whether the last pulse count is greater than the maximum distance count. When the trigger signal filter controller determines in step 434 that the last pulse count is greater than the maximum distance count, the trigger signal filter controller sets the maximum distance count to the last pulse count in step 436, because this may indicate that the distance represented by the maximum distance count before performing step 436 may be shorter than the distance represented by the last pulse count. Then the operation may continue to step 450. However, when the trigger signal filter controller determines in step 434 that the last pulse count is not greater than the maximum distance count, indicating that the vehicle is traveling on a section of railroad track that has already been traveled or sampled, the trigger signal filter controller may determine in step 438 whether the trigger signal filter controller is operating in the basic mode or the quadrature mode. When the trigger signal filter controller determines to operate in the basic mode, the trigger signal filter controller performs the operation of step 436 to set the maximum distance count to the last pulse count. Then the operation may continue to step 450. However, when the trigger signal filter controller determines to operate in the quadrature mode, the trigger signal filter controller overrides the input trigger frequency and sets it to a value (e.g., positive number 42), indicating that the trigger signal filter controller is operating in the quadrature mode but has not reached a "new" section of railroad track (e.g., a previously unsampled section of railroad track). Then the operation may continue to step 450.
[0084] When it is determined in step 432 that the sampling direction is the down-counting direction, in one embodiment, the trigger signal filter controller may determine in step 442 whether the last pulse count is less than the maximum distance count. When the trigger signal filter controller determines in step 442 that the last pulse count is less than the maximum distance count, the trigger signal filter controller sets the maximum distance count to the last pulse count in step 444, because this may indicate that the distance represented by the maximum distance count before performing step 444 may be shorter than the distance represented by the last pulse count. Then the operation can continue to step 450. However, when the trigger signal filter controller determines in step 442 that the last pulse count is not less than the maximum distance count, indicating that the vehicle is traveling on a section of railroad track that has already been traveled or sampled, the trigger signal filter controller may determine in step 446 whether the trigger signal filter controller is operating in the basic mode or the quadrature mode. When the trigger signal filter controller determines that it is operating in the basic mode, the trigger signal filter controller performs the operation of step 444 to set the maximum distance count to the last pulse count. Then the operation can continue to step 450. However, when the trigger signal filter controller determines that it is operating in the quadrature mode, the trigger signal filter controller overrides the input trigger frequency and sets it to a value (e.g., negative 42), indicating that the trigger signal filter controller is operating in the quadrature mode but has not reached a "new" section of railroad track (e.g., a previously unsampled section of railroad track). Then the operation can continue to step 450.
[0085] At step 450, in one embodiment, the trigger signal filter controller may determine whether the input frequency is less than the minimum frequency limit. When the trigger signal filter controller determines in step 450 that the input frequency is less than the minimum frequency limit, the trigger signal filter controller may override the input frequency and set it to zero in step 452. However, when the trigger signal filter controller determines in step 450 that the input frequency is not less than the minimum frequency limit, the trigger signal filter controller may not override the input frequency and set it to zero.
[0086] In step 454, in one embodiment, the trigger signal filter controller may determine whether the input frequency is greater than the maximum frequency limit. When the trigger signal filter controller determines in step 454 that the input frequency is greater than the maximum frequency limit, the trigger signal filter controller may override the input frequency and set it to the maximum frequency limit in step 456. However, when the trigger signal filter controller determines in step 454 that the input frequency is not greater than the minimum frequency limit, the trigger signal filter controller may not override the input frequency and set it to the maximum frequency limit.
[0087] In step 458, in one embodiment, the trigger signal filter controller may set the output frequency to the input frequency, and in step 460, in one embodiment, the trigger signal filter controller may generate a PWM signal, such as a square wave including a pulse sequence, whose frequency is equal to the output frequency. In some embodiments, a PWM signal with a duty cycle of 50% may be generated. In some embodiments, the PWM signal may represent a filtered trigger signal of an input trigger signal from an encoder, where the PWM signal has pulses evenly spaced according to the output frequency and taking into account the operating frequency limitations and / or constraints. In step 462, in one embodiment, the PWM signal may be provided to an image capture device (e.g., Figure 1 the image capture device 140 in
[0088] Those skilled in the art will readily understand that the above advantages and objectives would not be possible without the specific combination of computer hardware and other structural components and mechanisms assembled in the system of the present invention and described herein. Additionally, the algorithms, methods, and processes disclosed herein modify and transform any general-purpose computer or processor disclosed in the specification and drawings into a special-purpose computer programmed to execute the disclosed algorithms, methods, and processes to achieve the above functions, advantages, and objectives. It should also be understood that there are a variety of programming tools available for those proficient in the art to generate and implement the functions and operations described above. Additionally, the selection of a specific programming tool may be determined by the specific goals and constraints for implementing these concepts, which are selected to implement the concepts set forth in this text and the appended claims.
[0089] The description in this patent document should not be construed as implying that any particular element, step, or function is an essential or critical element that must be included within the scope of the claims. Additionally, unless the exact words "means for" or "step for" are expressly used in a particular claim, followed by a participle phrase identifying the function, no claim can be intended to invoke 35 U.S.C. § 112(f) with respect to any additional claim or claim element. Terms used in the claims (such as, but not limited to, "mechanism", "module", "device", "unit", "component", "element", "member", "means", "machine", "system", "processor", "processing device", or "controller") should be understood as and intended to refer to structures known to those of ordinary skill in the relevant art, further modified or enhanced by the features of the claim itself, and not intended to invoke 35 U.S.C. § 112(f). For example, the terms "processor" and "controller" can be a class of structures rather than a specific structure and can be defined in functional terms, but that does not mean it is a means-plus-function. Even under the broadest reasonable interpretation, claims are not intended to invoke 35 U.S.C. § 112(f) in the absence of the above specific language, according to this passage of the specification.
[0090] The present disclosure may be embodied in other specific forms without departing from its spirit or essential characteristics. For example, each new structure described herein can be modified to accommodate particular local variations or requirements while retaining their basic configuration or structural relationships to each other, or while performing the same or similar functions described herein. Accordingly, the present embodiments are to be considered in all respects illustrative rather than restrictive. Thus, the scope of the invention is determined by the appended claims rather than by the foregoing description. Accordingly, all variations within the meaning and scope of the claims are to be included in the claims. Additionally, the individual elements of the claims are not well-known, conventional, or traditional. Rather, the claims are directed to the non-conventional inventive concepts described in the specification
[0091] Those skilled in the art should also understand that the various illustrative logical blocks, modules, circuits, and algorithmic steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, the various illustrative components, blocks, modules, circuits, and steps have been described generally in terms of their functionality above. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be construed as causing a departure from the scope of the present disclosure. Those skilled in the art will also readily recognize that the order or combination of the components, methods, or interactions described herein are merely examples, and that the components, methods, or interactions of the various embodiments of the present disclosure can be combined or performed in ways other than those shown and described herein.
[0092] Figures 1-4 The functional blocks and modules in can include a processor, an electronic device, a hardware device, electronic components, logic circuits, memory, software code, firmware code, etc., or any combination thereof. Consistent with the foregoing, the various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein can be implemented or executed using a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. The general-purpose processor may be a microprocessor, but, alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
[0093] The steps of a method or algorithm described in connection with the disclosure herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of both. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Alternatively, the storage medium may be integrated with the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal, a base station, a sensor, or any other communication device. Alternatively, the processor and the storage medium may reside as discrete components in a user terminal.
[0094] In one or more exemplary designs, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. The computer-readable storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or a general purpose or special purpose processor. Also, a connection may be properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, or digital subscriber line (DSL), then the coaxial cable, fiber optic cable, twisted pair, or DSL are included in the definition of medium. The term "disk" and "disc" may include optical discs such as a CD, laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where a disk typically reproduces data magnetically, while a disc typically reproduces data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0095] Although the invention has been described in detail with respect to its advantages, it is to be understood that various changes, substitutions and alterations can be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Furthermore, the scope of the present application is not limited to the specific embodiments of the processes, machines, manufacture, compositions of matter, means, methods and steps described in the specification. It will be readily apparent to those of ordinary skill in the art that the disclosure of the present invention encompasses these processes, machines, manufacture, compositions of matter, means, methods or steps, whether existing or to be developed in the future, that perform substantially the same function, in substantially the same manner, or achieve substantially the same result as the corresponding embodiments described herein. Accordingly, the appended claims are intended to embrace such processes, machines, manufacture, compositions of matter, means, methods or steps within their scope.
Claims
1. A method for filtering a trigger signal from an encoder to trigger an image capture device, comprising: Receiving an input trigger signal from an encoder, the input trigger signal including a pulse sequence for triggering an image capture device; Determining an average pulse frequency of the input trigger signal over a period of time based on detecting the number of pulses in the input signal over the period of time; Applying a limit to the average pulse frequency to produce a trigger output frequency; Determining an output frequency based on the trigger output frequency; And Outputting a pulse width modulation (PWM) signal to trigger the image capture device, the PWM signal having a frequency based on the output frequency.
2. The method according to claim 1, wherein at least one subset of the pulse sequence in the input trigger signal is unevenly spaced within the input trigger signal.
3. The method according to claim 1, wherein The PWM signal includes a plurality of pulses evenly distributed within the PWM signal according to the output frequency.
4. The method according to claim 1, wherein detecting the number of pulses in the input signal over a period of time includes: Performing a processing function during the period of time, the processing function including: Detecting an edge of a sub-signal of the input trigger signal, the detection of the edge of the sub-signal indicating the detection of a pulse within the sub-signal; Setting a first pulse time to the current time when it is determined that the pulse within the sub-signal is the first pulse detected during the period of time; Setting a last pulse time to the current time when it is determined that the pulse within the sub-signal is not the first pulse detected during the period of time; and Incrementing the number of a pulse counter; When the time limit expires, stopping the execution of the processing function; and Setting the number of pulses in the input signal during the period of time to be equal to the number of pulses of the counter after the end of the period of time.
5. The method according to claim 4, wherein determining the average pulse frequency of the input trigger signal during the period of time includes dividing the number of pulses of the input signal during the period of time by the difference between the last pulse time and the first pulse time.
6. The method according to claim 1, wherein applying a limit to the average pulse frequency to generate a trigger output frequency includes generating the trigger output frequency based on an operation mode, wherein the operation mode includes one or more of the following: sampling direction mode, basic mode, and orthogonal mode.
7. The method according to claim 6, wherein, Generating the trigger output frequency based on the sampling direction mode includes: Determining the driving direction of a vehicle on which the image capture device is installed; Comparing the driving direction of the vehicle with a sampling direction indicated by an operator to capture an image; When the driving direction of the vehicle does not match the sampling direction for capturing an image indicated by the operator, overriding the trigger output frequency to zero; and When the driving direction of the vehicle matches the sampling direction for capturing an image indicated by the operator, overriding the trigger output frequency to zero.
8. The method according to claim 6, wherein generating the trigger output frequency based on the orthogonal mode includes: Maintaining a current pulse count initiated at the start of the current operation session, wherein the current pulse count is configured to track the position of a vehicle on which the image capture device is installed within a railway track; Maintaining a maximum distance pulse count, the maximum distance pulse count indicating the pulse count of the current pulse when a maximum distance is reached in a first direction; Compare the maximum distance pulse count with the current pulse count to determine whether the vehicle is traveling on a previously sampled railway track section; When the comparison of the maximum distance pulse count and the current pulse count indicates that the vehicle is traveling on a previously sampled railway track section, overwrite the trigger output frequency with zero; and When the comparison of the maximum distance pulse count and the current pulse count indicates that the vehicle is traveling on a previously unsampled railway track section, change the trigger output frequency to zero.
9. The method according to claim 8, wherein comparing the maximum distance pulse count with the current pulse count to determine whether the vehicle is traveling on a previously sampled railway track section includes: Determine the sampling direction of the captured image; When the sampling direction includes an upward counting direction and the maximum distance pulse count is greater than or equal to the current pulse count, determine that the vehicle is traveling on a previously sampled railway track section; And When the sampling direction includes a downward counting direction and the maximum distance pulse count is less than or equal to the current pulse count, determine that the vehicle is traveling on a previously sampled railway track section.
10. The method according to claim 8, wherein using the current pulse count to track the position of the vehicle within the railway track includes: When it is determined that the vehicle is moving in a first direction, increase the current pulse count in response to the detection of a pulse in the input trigger signal; And When it is determined that the vehicle is moving in a second direction opposite to the first direction, decrease the current pulse count in response to the detection of a pulse in the input trigger signal, wherein the current pulse count indicates the relative position within the railway track in the form of pulses.
11. A system for filtering a trigger signal from an encoder for triggering an image capture device, the system comprising: At least one processor; And A memory operably coupled to the at least one processor and storing processor-readable code that, when executed by the at least one processor, is configured to perform operations including: Receive an input trigger signal from the encoder, the input trigger signal including a pulse sequence for triggering the image capture device; Determine the average pulse frequency of the input trigger signal over a period of time based on the number of pulses detected in the input signal over the period of time; Apply a limit to the average pulse frequency to produce a trigger output frequency; Determine an output frequency based on the trigger output frequency; and Output a pulse width modulation (PWM) signal to trigger the image capture device, the PWM signal having a frequency based on the output frequency.
12. The system according to claim 11, wherein at least one subset of the pulse sequence in the input trigger signal is unevenly spaced within the input trigger signal.
13. The system according to claim 11, wherein, The PWM signal includes a plurality of pulses evenly distributed within the PWM signal according to the output frequency.
14. The system according to claim 11, wherein detecting the number of pulses in the input signal over a period of time includes: Performing a processing function during the period of time, the processing function including: Detecting the edges of a sub-signal of the input trigger signal, the detection of the edges of the sub-signal indicating the detection of pulses within the sub-signal; When it is determined that the pulse within the sub-signal is the first pulse detected within the time period, set the first pulse time to the current time; When it is determined that the pulse within the sub-signal is not the first pulse detected within the time period, set the last pulse time to the current time; and Increment the number of the pulse counter; When the time limit expires, stop executing the processing function; and Set the number of pulses in the input signal within the time period to be equal to the number of pulses of the counter after the end of the time period.
15. The system according to claim 14, wherein determining the average pulse frequency of the input trigger signal within the time period includes dividing the number of pulses of the input signal within the time period by the difference between the last pulse time and the first pulse time.
16. The system according to claim 11, wherein imposing a limit on the average pulse frequency to generate a trigger output frequency includes generating the trigger output frequency based on an operation mode, wherein the operation mode includes one or more of the following: a sampling direction mode, a basic mode, and an orthogonal mode.
17. The system according to claim 16, wherein generating the trigger output frequency based on the orthogonal mode includes: Maintaining the current pulse count initiated at the start of the current operation session, wherein the current pulse count is configured to track the position of a vehicle with an image capture device installed within a railway track; Maintaining a maximum distance pulse count that indicates the pulse count of the current pulse when the maximum distance is reached in the first direction; Comparing the maximum distance pulse count with the current pulse count to determine whether the vehicle is traveling on a previously sampled railway track section; When the comparison of the maximum distance pulse count with the current pulse count indicates that the vehicle is traveling on a previously sampled railway track section, overwrite the trigger output frequency to zero; and When the comparison of the maximum distance pulse count with the current pulse count indicates that the vehicle is traveling on a previously unsampled railway track section, change the trigger output frequency to zero.
18. The system according to claim 17, wherein comparing the maximum distance pulse count with the current pulse count to determine whether the vehicle is traveling on a previously sampled railway track section includes: Determining the sampling direction of the captured image; When the sampling direction includes an upward counting direction and the maximum distance pulse count is greater than or equal to the current pulse count, determining that the vehicle is traveling on a previously sampled railway track section; And When the sampling direction includes a downward counting direction and the maximum distance pulse count is less than or equal to the current pulse count, determining that the vehicle is traveling on a previously sampled railway track section.