Locomotive control and positioning method and device based on color recognition, equipment and medium
Through the locomotive control method based on color recognition, the problem that traditional vehicle control systems are difficult to accurately obtain road conditions under complex lighting conditions is solved, and high-precision positioning and safety control of locomotives in weak or GNSS signal environments are realized.
Patent Information
- Application Number
- CN202411970327.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
Traditional vehicle control systems are difficult to accurately obtain road conditions under complex and changeable lighting conditions, especially locomotives in closed areas cannot rely on GNSS satellite signals for precise positioning, which limits the application and safety of autonomous driving technology.
The locomotive control method based on color recognition is adopted. By obtaining the color pattern of the locomotive target section, the proportional coefficient of the color channel is calculated, the initial color value is converted into a standard color value, and the business items are determined to control the locomotive.
In a weak or GNSS signal environment, the driving safety and accuracy of the locomotive are improved, the high accuracy and stability of color recognition are ensured, and the adaptability to different lighting conditions and environmental changes.
Smart Images

Figure CN119888660A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and specifically to a locomotive control method, device, equipment and medium based on color recognition. Background Art
[0002] With the development of intelligent transportation systems and the continuous advancement of autonomous driving technology, the importance of vehicles' real-time perception and response capabilities to environmental information has become increasingly prominent. The modern traffic environment is complex and changeable, including but not limited to weather conditions, road conditions, the behavior of pedestrians and other vehicles, etc., all of which put higher demands on the safe driving of vehicles. In order to adapt to this change and ensure traffic safety, vehicles not only need to have highly accurate positioning capabilities, but also need to be able to quickly and accurately understand the surrounding environment and make timely and correct driving decisions based on this information.
[0003] Traditional vehicle control systems rely heavily on physical signs (such as traffic lights and signs) and sensor data (such as radar, lidar, etc.) to obtain road condition information, and navigate and control accordingly. For example, the color change of traffic lights indicates when to start or stop; road signs provide key information such as speed limits and direction guidance. However, these traditional methods are powerless in the face of complex and changing lighting conditions. Not to mention locomotives working in closed areas. Since GNSS satellite signals in confined areas are significantly weakened, locomotives are usually unable to rely on traditional GPS devices to obtain accurate positioning information and necessary driving instructions and other business data, which greatly limits the application of autonomous driving technology in closed areas and significantly reduces the safety and reliability of autonomous driving. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a locomotive control method, device, equipment and medium based on color recognition to solve the above-mentioned technical problems.
[0005] The present invention provides a locomotive control method based on color recognition, the method comprising: acquiring a color pattern of a locomotive target section to obtain color data of the color pattern, the color data comprising initial color values of multiple color channels; calculating a proportionality coefficient between the initial color value of each color channel and a preset compensation value, and converting the initial color values of the multiple color channels into standard color values based on the proportionality coefficient, encoding the standard color values based on a preset encoding rule to obtain a color code corresponding to the color pattern, determining a business item corresponding to the color pattern based on the color code, and controlling the locomotive according to the business item.
[0006] In one embodiment of the present invention, before obtaining the color pattern of the locomotive target section, the method also includes: obtaining the color code corresponding to each business item according to the color mapping relationship between the business item and the color, and the preset coding rules, the color code is a specific combination of one or more color channels; generating a corresponding identification code based on the color code, the identification code is composed of independent code elements, and each independent code element is a matrix structure composed of monomer code elements arranged horizontally and vertically; drawing the identification code on a designated target area in the locomotive travel path to form a color pattern for locomotive identification.
[0007] In one embodiment of the present invention, after obtaining the color data of the color pattern, the method further includes: identifying check bit information in the color data, including start check bit information and end check bit information; if both the start check bit and the end check bit pass the check, the color data is determined as the target data, and the initial color value of each color channel is determined based on the target data; if any check bit fails, an error log is generated and recorded, and the abnormal situation is reported to the control system.
[0008] In one embodiment of the present invention, the method also includes: determining identification positioning information corresponding to the color data based on check bit information, the check bit information includes a position code for identifying an initial positioning point; identifying different color sequences in an identification code parallel to the track line, and matching the measurement scale of the locomotive on the target section, the identification code consisting of multiple equal-width color bands; parsing the color sequence in the color identification code to determine the current position of the locomotive and the relative position relationship of the check bit; determining the current position of the locomotive based on the relative position relationship and the identification positioning information.
[0009] In one embodiment of the present invention, the method also includes: establishing a sample data set including a variety of lighting conditions and different background environments, the sample data set including all color patterns; training an initial filtering model based on the sample data set to obtain an environmental verification filtering model of the target, the environmental verification filtering model is used to improve the color recognition accuracy of the identification code; inputting the color data into the environmental verification filtering model to obtain color information processed based on the environmental verification filtering model, and obtaining color data for determining the initial color value of each color channel based on the processed color information.
[0010] In one embodiment of the present invention, the method also includes: identifying color identification codes parallel to the track line and color identification codes stacked in multiple layers in the vertical direction, wherein the multi-layer stacked color identification codes are composed of color combinations of different levels; determining the shaking trajectory of the locomotive in the vertical direction based on the identification result and the preset color identification code mapping relationship, so as to identify abnormal shaking and potential derailment of the locomotive based on the shaking trajectory; if abnormal shaking or derailment risk is detected, triggering an early warning mechanism or executing corresponding preset safety measures.
[0011] The present application provides a locomotive positioning method based on color recognition, the method comprising: acquiring a color pattern of a locomotive target section to obtain coding information of the color pattern, the color pattern comprising a plurality of standard color blocks; determining a size standard value of each standard color block and an initial positioning of a standard point of the color pattern based on the coding information; determining the number of color blocks between a current position of the locomotive and the standard point, and determining a relative position relationship between the current position of the locomotive and the initial positioning based on the number of color blocks and the size standard value, so as to obtain the current positioning of the locomotive according to the initial positioning and the relative position relationship.
[0012] In one embodiment of the present application, before obtaining the color pattern of the locomotive target section, it includes: obtaining the color code corresponding to each business item according to the mapping relationship between the business item and the standard color; combining the color code according to a preset stacking rule to generate a corresponding identification code, and the stacking rule is used to characterize the mapping relationship between the stacking method and the standard information; drawing the identification code on the designated target area in the locomotive driving path to form a color pattern for locomotive identification.
[0013] In one embodiment of the present application, after decoding the color identification code to obtain a color sequence, the method further includes: determining a target business corresponding to the color sequence based on a business mapping relationship between the color sequence and the business items, wherein the business mapping relationship is used to characterize the correspondence between the color identification and each business item; generating a task instruction based on the target task, and intelligently controlling the locomotive based on the task instruction.
[0014] The present application provides a locomotive control device based on color recognition, the device comprising: a color sensor module, used to acquire a color pattern of a locomotive target section to obtain color data of the color pattern, the color data comprising initial color values of multiple color channels; a data processing module, used to calculate a proportional coefficient between the initial color value of each color channel and a preset compensation value, and convert the initial color values of the multiple color channels into standard color values based on the proportional coefficient; encoding the standard color value based on a preset coding rule to obtain a color code corresponding to the color pattern, so as to determine a business item corresponding to the color pattern based on the color code; a locomotive control module, used to generate a control instruction corresponding to the business item, and control the locomotive based on the control instruction.
[0015] In one embodiment of the present invention, the color sensor module includes at least two color sensors, and multiple color sensors are installed at different positions at the same height of the locomotive to respectively obtain different color patterns, wherein different color patterns are used for mutual verification to verify and screen the obtained initial color image.
[0016] The present application provides an electronic device, comprising a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the locomotive control method based on color recognition as described above.
[0017] The present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to enable a computer to execute the locomotive control method based on color recognition as described above.
[0018] Beneficial effects of the present invention: The locomotive control method based on color recognition proposed in the present invention determines business items through color recognition, provides effective driving decision data for the locomotive, and ensures the driving safety and accuracy of the locomotive in special environments where the satellite signal is weak or there is no accurate positioning information; in addition, by obtaining the color pattern of the locomotive target section and converting it into an initial color value containing multiple color channels, and then calculating the proportional coefficient in combination with the preset compensation value, each initial color value is converted into a standard color value, ensuring that even under complex and changeable lighting conditions, the system can maintain high-precision color recognition capabilities, avoiding color distortion or insufficient contrast caused by changes in ambient light; a preset compensation mechanism is introduced to enable the system to better adapt to different lighting conditions and environmental changes, thereby improving the stability and consistency of color recognition.
[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0021] Figure 1 is a schematic diagram of an implementation environment of a locomotive control method based on color recognition shown in an exemplary embodiment of the present application;
[0022] Figure 2 is an implementation flow chart of a locomotive control method based on color recognition shown in an exemplary embodiment of the present application;
[0023] Figure 3 is a color coding schematic diagram shown in an exemplary embodiment of the present application;
[0024] Figure 4 is a schematic diagram of color-coded symbols shown in another exemplary embodiment of the present application;
[0025] Figure 5 is a block diagram of a locomotive control device based on color recognition according to an exemplary embodiment of the present application;
[0026] Figure 6 This is a structural intention of a color sensor module shown in an exemplary embodiment of the present application;
[0027] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0029] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0030] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0031] First of all, it should be noted that RGB is a color model, which is the acronym of the three English words for red, green and blue. It is an additive color mixing model used to represent colors on electronic display devices such as televisions, computer monitors, tablets, etc. The RGB model is based on the perception characteristics of the human visual system to the three colors of red, green and blue. In the RGB color model, a wide range of other colors can be produced by superimposing the three primary colors of red, green and blue at different intensity levels.
[0032] Figure 1 It is a schematic diagram of an implementation environment of a locomotive control method based on color recognition shown in an exemplary embodiment of the present application.
[0033] like Figure 1 As shown, the implementation environment of the locomotive control method based on color recognition includes a data acquisition module 101 and a computer module 102 .
[0034] The data acquisition module 101 is installed in front of or around the locomotive, and the specific location is determined according to actual needs to ensure that the key areas on the locomotive are fully covered. This module is equipped with a high-resolution camera or other type of image sensor to capture color patterns on the locomotive's travel path. And these patterns are converted into initial color values containing multiple color channels (such as red, green, and blue RGB channels). The module also needs to have good light adaptability and be able to work stably under different light conditions to ensure that the collected color data is accurate.
[0035] The computer module 102 is usually located in a safe position inside the locomotive and is connected to the data acquisition module through a high-speed interface to ensure the real-time and reliability of data transmission. The module has a built-in high-performance processor and sufficient storage space to support complex computing tasks and algorithm processing. After receiving the color data from the data acquisition module, the proportional coefficient between the initial color value of each color channel and the preset compensation value is calculated, so as to convert each initial color value into a standard color value. Based on the converted standard color value, the color coding of the color pattern is determined, and the color coding is parsed according to the preset coding rules to obtain the corresponding business items, such as the color change of traffic lights, road markings, etc. According to the parsed business items, corresponding control instructions are generated, such as adjusting speed, changing direction or executing parking actions, etc., to realize intelligent control of the locomotive.
[0036] It can be understood that, through the coordinated work of the above two modules, the present invention realizes a locomotive control method based on color recognition, which improves the responsiveness and safety of the locomotive in complex environments where the satellite signal is weak or there is no accurate positioning information, such as in tunnels, city centers with high-rise buildings, or underground parking lots, and provides strong support for the development of autonomous driving technology.
[0037] Figure 2 It is an implementation flow chart of a locomotive control method based on color recognition shown in an exemplary embodiment of the present application.
[0038] like Figure 2 As shown, in an exemplary embodiment, the locomotive control method based on color recognition includes at least steps S210 to S230, which are described in detail as follows:
[0039] Step S210, acquiring a color pattern of a target section of a locomotive to obtain color data of the color pattern, wherein the color data includes initial color values of a plurality of color channels.
[0040] In one embodiment of the present application, before obtaining the color pattern of the locomotive target section, it also includes: according to the color mapping relationship between the business item and the color, and the preset coding rules, obtaining the color code corresponding to each business item, the color code is a specific combination of one or more color channels; generating a corresponding identification code based on the color code, the identification code is composed of independent code elements, and each independent code element is a matrix structure composed of monomer code elements arranged horizontally and vertically; drawing the identification code on the designated target area in the locomotive's travel path to form a color pattern for locomotive identification.
[0041] In a specific embodiment of the present application, in order to obtain the color pattern of the target section of the locomotive, before that, it is necessary to first draw the color pattern in the target area, and the specific steps are as follows: First, a set of color coding rules needs to be designed to convert each business item (such as speed limit requirements, warning requirements, parking requirements, etc.) into a specific color code. As shown in Table 1:
[0042] Table 1
[0043] Color identification Color Coding Business meaning (customizable) Red-Green-Blue R-0-0-0-GO-0-0-B Speed limit 7km / h Red-Blue-Green R-0-0-0-0-B-0-GO Speed limit 5km / h Green-Red-Blue 0-GOR-0-0-0-0-B parking Green-Blue-Red 0-GO-0-0-BR-0-0 Minimum safety distance Blue-Red-Green 0-0-BR-0-0-0-GO Start / end check digit
[0044] It is important to understand that these color codes are carefully designed based on the proportional properties of reflected light, ensuring accurate identification even under changing lighting conditions.
[0045] Then, based on the above color coding rules, the identification code is constructed. The identification code is composed of independent code elements to form a matrix structure. Each code element represents a color combination and is arranged horizontally and vertically to form complete coding information.
[0046] In addition, considering the operating frequency of the color sensor and the speed of the unmanned vehicle, the reference width of each color strip needs to be calculated. The reference width needs to be greater than the maximum positioning accuracy of the color sensor to ensure that the color sensor can accurately read each color change. Taking the operating frequency of the sensor as 1kHz and the speed of the unmanned vehicle as 5km / h as an example, it can be calculated that the maximum positioning accuracy of the color sensor reaches 1.39mm, that is, the width of each color strip must be greater than 1.39mm to be accurately read. Therefore, in this scenario, the reference width of each color strip can be designed to be 2mm.
[0047] Finally, these identification codes are drawn on the designated target area in the locomotive's travel path to form a color pattern for locomotive identification. Specifically, it can be completed on the ground, wall or other appropriate location beside the track line through spray painting or printing technology. Each color identification code is installed parallel to the track line as a standard scale for the positioning section. When the locomotive passes by, its color sensor can continuously read these color identification codes to determine the location of the locomotive and the business items that should be executed at present. In order to ensure the durability and clarity of the color identification code, UV-resistant and wear-resistant ink can also be used to spray or print on the surface of plastic or metal materials. Before formal deployment, the color identification code needs to be calibrated and tested multiple times to ensure that the color sensor can work stably under various conditions. In addition, a regular inspection and maintenance plan should be formulated to ensure that the color identification code always maintains good visibility and accuracy. This application does not limit the spray painting method and maintenance method of its identification code based on the actual environment.
[0048] In one embodiment of the present application, after obtaining the color data of the color pattern, it also includes: identifying the check bit information in the color data, including the start check bit information and the end check bit information; if the start check bit and the end check bit both pass the check, the color data is determined as the target data, and the initial color value of each color channel is determined based on the target data; if any check bit fails, an error log is generated and recorded, and the abnormal situation is reported to the control system.
[0049] In a specific embodiment of the present application, Figure 3 As shown, the color coding based on the color pattern usually includes a start check bit, a color coding information bit, and an end check bit. In the specific implementation process, when the color sensor on the intelligent driving locomotive reads the preset color identification code on the path and converts the color information into a digital signal to form a string of color data streams containing a start check bit, a business information code (such as speed limit requirements, etc.) and an end check bit, it is necessary to further identify and verify the check bit information in this data stream. Specifically, it is first necessary to check whether its start check bit matches a predefined set of specific colors or color sequences, which are used to mark the starting point of the valid data stream. Similarly, the end check bit is also searched and verified to ensure that it conforms to the predefined unique color or color sequence to confirm the end point of the data stream. If both the start check bit and the end check bit correctly match the predefined pattern, this color data stream is considered to be valid and is determined as the target data. Subsequently, the initial color value of each color channel is parsed based on the target data, the specific meaning represented by each color is decoded according to the color coding rules, and the corresponding control parameters are set, such as adjusting the vehicle speed to the specified speed limit.
[0050] However, if any check digit fails to pass the verification, that is, the start or end check digit is not correctly identified, the data segment is considered invalid and will not be processed further, but will be transferred to the error handling process. At this time, a detailed error log is automatically generated to record the time, location and specific error type of the failure, and an alarm message is sent to the main control system to notify the operator of the abnormal situation so that corrective measures can be taken in time.
[0051] In addition, in order to further improve the stability and reliability of the system, in the actual application process, the root cause of the problem can be analyzed based on the collected log information, and necessary adjustments and optimizations can be made to the color coding scheme, sensor sensitivity settings, etc. This application does not impose any specific restrictions on this.
[0052] In one embodiment of the present application, the locomotive control method based on color recognition proposed in the present application also includes establishing a sample data set including multiple lighting conditions and different background environments, the sample data set including all color patterns; training the initial filtering model based on the sample data set to obtain an environmental verification filtering model of the target, the environmental verification filtering model is used to improve the color recognition accuracy of the identification code; inputting the color data into the environmental verification filtering model to obtain color information processed based on the environmental verification filtering model, and obtaining color data for determining the initial color value of each color channel based on the processed color information.
[0053] In a specific implementation of the present application, in order to better identify the patterns on the road section where the locomotive passes, and to further improve the accuracy of color recognition, thereby improving the recognition accuracy of business projects and achieving precise control of the locomotive, the present application also proposes a systematic process. The process first establishes a sample data set in the color detection area that includes different lighting conditions (such as day, night, cloudy days, etc.) and different background environments (such as city streets, inside tunnels, rural roads, etc.). This data set not only covers all expected color patterns, but also includes color samples that are similar to the expected colors to ensure that the model can handle subtle differences between colors, and each sample is labeled to identify its expected color encoding and its performance in a specific environment.
[0054] Then, based on the constructed sample data set, the initial filter model is trained using a machine learning algorithm so that the model can automatically adjust the color recognition results according to different lighting conditions and background environments, thereby improving the color recognition accuracy of the identification code. After a large number of iterative optimizations, until the model can stably output accurate color information under various conditions, the generated target environment verification filter model will be deployed in the unmanned locomotive.
[0055] When the color sensor enters the area covered by the color identification code, the environmental verification filter model automatically completes the color verification by identifying the color of the start verification bit, and automatically corrects the color recognition result according to the current lighting conditions to ensure the accuracy of the color ratio under different lighting conditions and different recognition distances. After obtaining the color data of the color pattern, these data are input into the environmental verification filter model for processing, so as to more accurately determine the initial color value of each color channel based on the processed color information, and then parse the business items represented by the color code to provide reliable control instructions for the locomotive.
[0056] In addition, in actual application, new color data and environmental information can be continuously collected to further optimize the environmental verification filter model, so that it can gradually adapt to more diverse scenarios and maintain long-term high-precision performance. Any recognition errors or abnormalities will be recorded and formed into a log for engineers to analyze and facilitate subsequent improvements.
[0057] It can be understood that the solution proposed based on this embodiment not only improves the accuracy of color recognition, but also enhances the system's adaptability to changes in external conditions, provides a more reliable and intelligent control method for autonomous driving vehicles, and effectively solves the problems that traditional visual recognition systems may encounter in complex and changing environments.
[0058] Step S220 , calculating a proportionality coefficient between the initial color value of each color channel and the preset compensation value, and converting the initial color values of the plurality of color channels into standard color values based on the proportionality coefficient.
[0059] In one embodiment of the present application, in order to avoid the color identification code recognition error caused by different distance changes between the color sensor and the color identification code, different lighting conditions, or dust accumulation on the color identification code, the color sensor is integrated into a hollow cylindrical cavity in the present application. The cavity is sealed and opaque on all sides. A circle of LED lamp beads is added to one side of the column. When the color sensor is used for the first time, the module is restarted, or enters the detection area, it automatically turns on and emits a high-brightness white light. The RGB output value is corrected through a specific calculation method to achieve white balance adjustment. The details are as follows:
[0060] Taking white light as compensation light as an example, when the color sensor is used for the first time, the module is restarted, or it enters the detection area, the system automatically turns on the LED lamp beads to emit high-brightness white light, providing a consistent basic light source condition for subsequent color recognition and reducing the impact of changes in external light sources. Subsequently, the color sensor obtains RGB data in the current environment, which reflects the color information of the object under the current lighting conditions.
[0061] Next, given that in theory, the three primary colors (RGB) corresponding to white should all have a value of 255, the acquired RGB data is divided by 255 to obtain the proportional coefficient of each color channel. However, in actual environments, due to the influence of light sources, RGB values may not all be 255. Therefore, by dividing the data by 255 to standardize it, a proportional coefficient can be obtained for subsequent corrections. For example, if the R value in a certain environment is 200, its proportional coefficient is 200 / 255. Then, when the color sensor outputs color-coded data, each color value (R, G, B) is multiplied by the corresponding proportional coefficient to correct the RGB output value and achieve white balance adjustment, so that the corrected RGB value is closer to the theoretical white, thereby ensuring the consistency of color recognition under different light source environments.
[0062] Then, the color data after white balance adjustment is input into the trained environment verification filter model in the above embodiment for further processing, so as to obtain more accurate initial color values of each color channel based on the model. Then, the ratio coefficient between the initial color value of each color channel and the preset compensation value is calculated. This preset compensation value is set according to the ideal color ratio in the previously constructed sample data set, and is intended to correct any remaining color deviation.
[0063] Finally, based on the above calculated proportional coefficients, the initial color values of each color channel are converted into standard color values. It should be understood that its standard color value is the best color representation after considering all possible environmental factors and light source influences, ensuring that the color recognition results are both stable and reliable. In addition, in actual application, new color data and environmental information can be continuously collected to further optimize the environmental verification filter model, so that it can gradually adapt to more diverse scenarios and maintain long-term high-precision performance. Any recognition errors or abnormalities will be recorded and formed into a log for engineers to analyze for subsequent improvements.
[0064] Therefore, it can be understood that the method proposed in this embodiment ensures that the sensor can provide stable and reliable color recognition results under various lighting conditions by automatically adjusting the white balance, thereby improving the performance of the overall system. In addition, this embodiment uses white light as the compensation light as an example for illustrative explanation. In different actual use environments, different other lights can also be used as compensation lights. This application does not impose any specific restrictions on the type of compensation light. However, the calculation methods of different compensation lights are similar and will not be repeated here.
[0065] Step S230, encoding the standard color value based on a preset encoding rule to obtain a color code corresponding to the color pattern, so as to determine the business item corresponding to the color pattern based on the color code, and control the locomotive according to the business item.
[0066] In one embodiment of the present application, the color sensor on the intelligent driving locomotive first reads the preset color identification code on the path, and converts the color information into a digital signal to form a string of color data streams containing a start check bit, a business information code (such as a speed limit requirement, etc.), and an end check bit. When the color sensor is used for the first time, the module is restarted, or enters the detection area, the system automatically turns on the LED lamp beads to emit a high-brightness white light, providing consistent basic light source conditions and reducing the impact of changes in external light sources. Next, by obtaining the RGB data in the current environment and dividing the value of each color channel by 255 to calculate the proportional coefficient, the data is standardized and the RGB output value is corrected to achieve white balance adjustment and ensure consistency in color recognition under different lighting conditions.
[0067] The color data after white balance adjustment is input into the previously trained environmental verification filter model for further processing. Based on the processed color information, the proportional coefficient between the initial color value of each color channel and the preset compensation value is calculated, and the initial color value of each color channel is converted into a standard color value. These standard color values are the best color representation after considering all possible environmental factors and light source influences, ensuring that the color recognition results are both stable and reliable.
[0068] Then, the color coding of the color pattern is determined based on the standard color value. Each color coding is designed according to the proportional characteristics of the reflected light to ensure that it can be accurately identified even when the lighting conditions change. For example, red-green-blue (R-0-0-0-GO-0-0-B) represents a speed limit of 7km / h, red-blue-green (R-0-0-0-0-B-0-GO) represents a speed limit of 5km / h, etc. Then, the color coding is parsed based on the preset coding rules to obtain the corresponding specific business items, such as speed limit requirements, warning requirements, parking requirements, etc. According to the parsed business items, the system sends corresponding control instructions to the locomotive control system. For example, if the color coding is red-green-blue (R-0-0-0-GO-0-0-B), the business item is a speed limit of 7km / h, and then the locomotive is controlled to adjust the speed to no more than 7km / h; if it is a parking requirement, the locomotive will find a suitable parking position and stop safely.
[0069] It can be understood that the method proposed in this embodiment effectively solves the problems that traditional visual recognition systems may encounter in complex and changing environments, and promotes the progress and development of intelligent transportation systems. At the same time, by automatically adjusting the white balance and using the environmental verification filter model, it ensures that the sensor can provide stable and reliable color recognition results under various lighting conditions, thereby improving the performance of the overall system.
[0070] In one embodiment of the present application, the locomotive control method based on color recognition proposed in the present application also includes: determining the identification positioning information corresponding to the color data based on the check bit information, the check bit information includes a position code for identifying the initial positioning point; identifying different color sequences in the identification code parallel to the track line, and matching the measurement scale of the locomotive on the target section, the identification code is composed of multiple equal-width color bands; parsing the color sequence in the color identification code to determine the current position of the locomotive and the relative position relationship of the check bit; based on the relative position relationship and the identification positioning information, determining the current position of the locomotive.
[0071] In a specific embodiment of the present application, when the color sensor of the intelligent driving locomotive enters the coverage area of the color identification code, the start check bit information in the color data stream is first identified. The check bit is not only used to verify the validity of the data, but also contains the position code and identifies the initial positioning point. By comparing the received data with the predefined check bit pattern, the starting point of the valid data stream is confirmed, and the position code therein is read as a reference starting point for the locomotive on the path.
[0072] Next, identify the identification code installed parallel to the track line, which consists of multiple Figure 3 The code is composed of equal width color bands, each with a width of 2 mm (or adjusted according to actual conditions), to ensure that the color sensor can read accurately. The design of the identification code makes different color sequences correspond to specific business items or measurement scales. For example, the red-green-blue combination may indicate speed limit requirements, while a series of different color arrangements constitute a measurement scale to help the system determine the distance the locomotive has moved along the path.
[0073] As the locomotive continues to move forward, the color sequences in the identification code are continuously read and analyzed to match these sequences with the preset measurement scale. Since each color identification code is installed parallel to the track line and serves as a standard scale for the positioning section, the system can calculate the movement distance of the locomotive relative to the starting point based on the read color sequence, realizing accurate measurement of the locomotive in the target section.
[0074] During the analysis process, the system not only determines the current position of the locomotive, but also clarifies the relative position relationship of the check bits (such as the start check bit and the end check bit). For example, when the system recognizes an end check bit, it will record the color sequence at this time and compare it with the previously recognized start check bit to determine the relative position between the two. This relative position relationship helps to more accurately determine the specific position of the locomotive on the path.
[0075] Finally, combining the relative position relationship obtained above with the identification positioning information (i.e. the position code of the initial positioning point), the system can determine the current position of the locomotive. This means that the system not only knows the exact position of the locomotive at a certain moment, but can also infer the locomotive's travel status along the entire driving path based on the information provided by the color identification code. This process provides a reliable position reference for autonomous driving, ensuring that the locomotive can navigate safely and accurately in complex and changing environments.
[0076] In one embodiment of the present application, the locomotive control method based on color recognition proposed in the present application also includes: identifying identification codes parallel to the track line and identification codes stacked in multiple layers in the vertical direction, the multi-layer stacked identification codes are composed of different levels of color combinations; determining the shaking trajectory of the locomotive in the vertical direction based on the recognition result and the preset identification code mapping relationship, so as to identify abnormal shaking and potential derailment of the locomotive based on the shaking trajectory; if abnormal shaking or derailment risk is detected, triggering the early warning mechanism or executing corresponding preset safety measures.
[0077] Figure 4 FIG. 4 is a color coding diagram showing another exemplary embodiment of the present application.
[0078] like Figure 4 As shown, in a specific embodiment of the present application, its color code (401) is not a one-dimensional barcode, but a two-dimensional code composed of multiple independent code elements (402), and its independent code elements are also composed of multiple monomer code elements. Specifically, the color sensor of the unmanned locomotive first reads the color identification code installed in parallel on the path. These identification codes are composed of multiple equal-width color bands, each with a width of 2mm (or adjusted according to actual conditions) to ensure that the color sensor can read accurately. The identification code is designed so that different color sequences correspond to specific business items or measurement scales. For example, a red-green-blue combination may indicate a speed limit requirement, and a series of different color arrangements constitute a measurement scale to help the system determine the distance the locomotive has moved along the path.
[0079] On this basis, the system further identifies the color identification codes that are stacked in multiple layers in the vertical direction on both sides or below the track. These multi-layered color identification codes are composed of different levels of color combinations, and each layer of color coding represents different height information. By continuously reading and parsing these vertical color sequences, the system can construct a three-dimensional spatial coordinate system to monitor the vertical position changes of the locomotive and draw the real-time vertical shaking trajectory of the locomotive. This trajectory reflects the ups and downs that may occur during the locomotive's driving. By analyzing the shaking trajectory, the system can identify the difference between normal small vibrations and abnormal severe shaking.
[0080] Based on the drawn shaking trajectory, the system performs abnormal shaking identification and potential derailment detection. If the shaking trajectory shows that the locomotive has experienced severe shaking that exceeds the preset threshold, or there is a continuous abnormal deviation, the system will determine that there may be abnormal shaking or derailment risks. At this time, the system will further analyze the frequency, amplitude and duration of the shaking to confirm whether there is an actual risk. If abnormal shaking or derailment risk is detected, the system will immediately trigger the early warning mechanism, including but not limited to sending an alarm signal to the control system to alert the operator; at the same time, the system will automatically execute corresponding preset safety measures, such as deceleration, parking, activating the emergency braking system, etc., to prevent potential accidents. In addition, the system will also record all relevant data and form a log for subsequent analysis and improvement.
[0081] It should be noted that the independent code element (such as Figure 4 402 in the figure), is composed of 9 single code elements with 3 in horizontal and vertical directions respectively. Each single code element can be of different colors, thus forming a complex color matrix for representing rich information. In actual use, the specific composition structure and stacking method of independent code elements can be flexibly set according to actual needs. For example, independent code elements can not only be used alone, but also can be stacked in multiple layers. Each layer can be composed of different color combinations to encode more information. For example, in the vertical direction, the first layer may represent basic navigation instructions, and the second layer provides additional safety instructions or environmental information. Depending on the application scenario, the color combination and arrangement of independent code elements can be dynamically adjusted. For example, in an environment where the lighting conditions vary greatly, the system can automatically adjust the color contrast according to the light intensity monitored in real time to ensure the accuracy of color recognition. The present application does not impose any specific restrictions on the composition structure and stacking method of its independent code elements.
[0082] It is understandable that based on the solution proposed in this embodiment, through the carefully designed independent code elements, the system can accurately monitor the abnormal vibration and potential derailment risk of the locomotive, significantly improving the safety and reliability of driving. It not only improves the flexibility and reliability of color recognition, but also enhances the system's adaptability to changes in external conditions, providing a more intelligent and reliable control method for autonomous locomotives, and effectively solving the problems that traditional visual recognition systems may encounter in complex and changing environments.
[0083] In addition, the present application also proposes a locomotive positioning method based on color recognition, the method comprising: obtaining a color pattern of a locomotive target section; performing image recognition on the color pattern to obtain a color identification code of the color pattern, the color identification code being pre-arranged and / or combined in different sequences based on standard colors, and then encoding the sequence; decoding the color identification code to obtain a color sequence, and based on a mapping relationship between a preset color sequence and a measurement scale of the positioning section, obtaining the current position information of the locomotive.
[0084] Among them, before obtaining the color pattern of the locomotive target section, it also includes: obtaining the color code corresponding to each business item according to the mapping relationship between the business item and the standard color; combining the color code according to the preset stacking rule to generate a corresponding identification code, and the stacking rule is used to characterize the mapping relationship between the stacking method and the standard information; drawing the identification code on the designated target area in the locomotive driving path to form a color pattern for locomotive identification.
[0085] In a specific embodiment of the present application, in an underground mine environment, in order to ensure that the locomotive can be accurately positioned in the absence of a GNSS signal. First, a unique color code is assigned to each business item based on the color mapping relationship between the business item (e.g., turning, deceleration, parking, etc.) and the color, and a preset coding rule. The color code is composed of a specific combination of one or more color channels (such as red, green, blue, etc.).
[0086] Next, these color codes are combined according to pre-set stacking rules to generate identification codes. Stacking rules refer to how different colors are arranged in order to form color patterns with specific meanings. These rules not only determine how the colors are arranged, but also contain standard information, such as the size and shape of the color blocks, as well as related information such as the initial positioning of the road section. In this way, it can be ensured that the identification code on each section of the path is unique and easy to identify, even in the complex underground mine environment, and the relevant information of the road section can be obtained through the identification code.
[0087] Then, using robots or manual operations, the generated identification code is drawn in a designated area in the locomotive's travel path to form an actual visible color pattern. The relevant pattern is designed to include multiple standard color blocks, each of which represents a different business item or information for auxiliary positioning.
[0088] When the locomotive approaches the target road section, the color pattern of the road section is obtained through the camera or other sensors installed on it, and the coded information contained in the color pattern is parsed. Next, the specific size standard value of each standard color block is determined based on the parsed coded information, and the initial position of the standard point in the color pattern (such as the center or starting point of the pattern) is calculated.
[0089] Finally, by analyzing the number of color blocks passed between the current position of the locomotive and the standard point in the color pattern, and combining it with the previously determined size standard value, the position offset of the locomotive relative to the initial positioning is accurately calculated, thereby obtaining the current exact position of the locomotive.
[0090] It can be understood that, through the method proposed in this embodiment, even in a closed mine without GNSS signals, the locomotive can achieve high-precision self-positioning and navigation, ensuring the safety and reliability of autonomous driving. It effectively solves the problem of unavailable GNSS signals in underground mine environments and provides a novel and reliable alternative to support the automated operation of locomotives.
[0091] In addition, in one embodiment of the present application, after decoding the color identification code to obtain the color sequence, the method also includes: determining the target business corresponding to the color sequence based on the business mapping relationship between the color sequence and the business items, the business mapping relationship is used to characterize the correspondence between the color identification and each business item; generating a task instruction based on the target task, and intelligently controlling the locomotive based on the task instruction.
[0092] In a specific embodiment of the present application, different color codes represent different business items or operation instructions. For example, red-green-blue (R-0-0-0-GO-0-0-B) indicates a speed limit of 7km / h, while red-blue-green (R-0-0-0-0-B-0-GO) indicates a speed limit of 5km / h. When the locomotive passes through an area marked with a "red-blue-green" color sequence, by querying the internal mapping table, it is confirmed that this color sequence indicates that the current driving speed needs to be reduced to 5km / h; the system automatically issues a deceleration command to the locomotive's control system, and the control system responds to the command, gradually reducing the speed of the locomotive until it reaches 5km / h, and maintains this speed through the section.
[0093] In addition, there are other color codes corresponding to different business items such as parking, acceleration, deceleration, etc. The specific mapping relationship between business items and color codes can be generated or adjusted based on the actual application environment, so this application does not impose any specific restrictions on it.
[0094] Figure 5 is a block diagram of a locomotive control device based on color recognition shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The device may also be applicable to other exemplary implementation environments and specifically configured in other devices, and this embodiment does not limit the implementation environment to which the device is applicable.
[0095] like Figure 5As shown, the exemplary locomotive control device based on color recognition includes: a color sensor module 510 , a data processing module 520 , and a locomotive control module 530 .
[0096] Among them, the color sensor module 510 is used to obtain the color pattern of the locomotive target section to obtain the color data of the color pattern, and the color data includes the initial color values of multiple color channels; the data processing module 520 is used to calculate the proportional coefficient between the initial color value of each color channel and the preset compensation value, and convert the initial color values of multiple color channels into standard color values based on the proportional coefficient; encode the standard color value based on the preset coding rule to obtain the color code corresponding to the color pattern, so as to determine the business item corresponding to the color pattern based on the color code; the locomotive control module 530 is used to generate the control instruction corresponding to the business item, and control the locomotive based on the control instruction.
[0097] Figure 6 This is a structural schematic diagram of a color sensor module shown in an exemplary embodiment of the present application.
[0098] like Figure 6 As shown, in one embodiment of the present application, the color sensor module includes a shell and a color sensor. The shell is an opaque shell. The shell has an inner cavity that runs through its axial direction. The color sensors are arranged in the inner cavity of the shell. At least one LED lamp bead is arranged along the circumferential direction on the inner wall of the shell.
[0099] In addition, the color sensor module has at least two color sensors, and the multiple color sensors are installed at different positions at the same height of the locomotive to obtain different color patterns respectively, wherein the different color patterns are used for mutual verification to verify and screen the obtained initial color image.
[0100] In one embodiment of the present application, in an underground mine environment, a locomotive runs along a predetermined track, and color-coded patterns are set at certain key locations. Three color sensors A, B, and C are installed on the locomotive, all of which are located at the bottom of the vehicle body and maintain the same height, but are distributed at different lateral positions. When the locomotive approaches an area with a color-coded pattern:
[0101] Sensors A, B, and C started working at the same time, and each obtained a part of the color pattern. After receiving the data from the three sensors, the data processing unit found that the data from sensors A and B were very similar, while the data from C was different. After a deeper analysis, it was confirmed that the data from sensor C might be due to errors caused by local occlusion, so this part of the abnormal data was ignored. Finally, based on the reliable information provided by sensors A and B, the system successfully parsed the position code contained in the color pattern and updated the locomotive's position information accordingly.
[0102] It can be understood that in this way, even in a complex and changeable underground environment, the locomotive can rely on this set of color sensor modules to achieve high-precision self-positioning and ensure safe and efficient operation.
[0103] It should be noted that the locomotive control device based on color recognition provided in the above embodiment and the locomotive control method based on color recognition provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In actual application, the locomotive control device based on color recognition provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0104] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the locomotive control method based on color recognition provided in the above-mentioned embodiments.
[0105] Figure 7 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 7 The computer system 700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0106] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703, such as executing the method described in the above embodiment. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, ROM 702 and RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0107] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.
[0108] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 709, and / or installed from a removable medium 711. When the computer program is executed by a central processing unit (CPU) 701, various functions defined in the system of the present application are executed.
[0109] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0110] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0112] Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the locomotive control method based on color recognition as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0113] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the color recognition-based locomotive control method provided in each of the above embodiments.
[0114] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A locomotive control method based on color recognition, characterized in that: The method comprises: Acquire a color pattern of a target section of a locomotive to obtain color data of the color pattern, wherein the color data includes initial color values of a plurality of color channels; Calculating a proportionality coefficient between an initial color value of each color channel and a preset compensation value, and converting the initial color values of the plurality of color channels into standard color values based on the proportionality coefficient; The standard color value is encoded based on a preset encoding rule to obtain a color code corresponding to the color pattern, so as to determine the business item corresponding to the color pattern based on the color code, and control the locomotive according to the business item.
2. The locomotive control method based on color recognition according to claim 1, characterized in that: Before obtaining the color pattern of the target locomotive section, the method further includes: According to the color mapping relationship between the business items and the colors, and the preset coding rules, the color coding corresponding to each business item is obtained, and the color coding is a specific combination of one or more color channels; Generate a corresponding identification code based on the color code, wherein the identification code is composed of independent code elements, and each independent code element is a matrix structure composed of monomer code elements arranged horizontally and vertically; The identification code is drawn on a designated target area in the locomotive's travel path to form a color pattern for locomotive identification.
3. The locomotive control method based on color recognition according to claim 1, characterized in that: After obtaining the color data of the color pattern, the method further includes: Identifying check bit information in the color data, including start check bit information and end check bit information; If both the start check bit and the end check bit pass the check, the color data is determined as the target data, and the initial color value of each color channel is determined based on the target data; If any check bit fails, an error log is generated and recorded, and the abnormal situation is reported to the control system.
4. The locomotive control method based on color recognition according to claim 3, characterized in that: The method further comprises: Determining identification positioning information corresponding to the color data based on the check bit information, wherein the check bit information includes a position code for identifying an initial positioning point; Identifying different color sequences in an identification code parallel to the track line and matching the measurement scale of the locomotive on the target section, the identification code consisting of a plurality of equal-width color bands; Parsing the color sequence in the identification code to determine the current position of the locomotive and the relative position relationship of the check bit; Based on the relative position relationship and the identification positioning information, the current position of the locomotive is determined.
5. The locomotive control method based on color recognition according to claim 1, characterized in that: The method further comprises: Create a sample dataset that includes a variety of lighting conditions and different background environments; Training the initial filter model based on the sample data set to obtain an environmental verification filter model of the target, wherein the environmental verification filter model is used to improve the color recognition accuracy of the identification code; The color data is input into the environment verification filter model to obtain color information processed based on the environment verification filter model, and color data for determining an initial color value of each color channel is obtained based on the processed color information.
6. The locomotive control method based on color recognition according to any one of claims 1 to 5, characterized in that: The method further comprises: Identify identification codes parallel to the track line and identification codes stacked in multiple layers in the vertical direction, wherein the multi-layer identification codes are composed of different levels of color combinations; According to the mapping relationship between the recognition result and the preset identification code, the shaking trajectory of the locomotive in the vertical direction is determined, so as to perform abnormal shaking recognition and potential derailment detection on the locomotive based on the shaking trajectory; If abnormal shaking or derailment risk is detected, the early warning mechanism will be triggered or corresponding preset safety measures will be implemented.
7. A locomotive positioning method based on color recognition, characterized in that: The method comprises: Obtain the color pattern of the target section of the locomotive; Performing image recognition on the color pattern to obtain a color identification code of the color pattern, wherein the color identification code is obtained by encoding the sequence after pre-arranging and / or combining standard colors in different sequences; The color identification code is decoded to obtain a color sequence, and based on a mapping relationship between a preset color sequence and a measurement scale of the positioning section, the current position information of the locomotive is obtained.
8. The locomotive positioning method based on color recognition according to claim 7, characterized in that: Before obtaining the color pattern of the locomotive target section, include: According to the mapping relationship between business items and standard colors, the color code corresponding to each business item is obtained; The color codes are combined according to a preset stacking rule to generate a corresponding identification code, wherein the stacking rule is used to characterize a mapping relationship between a stacking method and standard information; The identification code is drawn on a designated target area in the locomotive's travel path to form a color pattern for locomotive identification.
9. The locomotive positioning method based on color recognition according to claim 7, characterized in that: After decoding the color identification code to obtain a color sequence, the method further includes: Determine the target business corresponding to the color sequence based on the business mapping relationship between the color sequence and the business items, wherein the business mapping relationship is used to characterize the corresponding relationship between the color identifier and each business item; A task instruction is generated based on the target task, and the locomotive is intelligently controlled based on the task instruction.
10. A locomotive control device based on color recognition, characterized in that: The device comprises: A color sensor module, used to acquire a color pattern of a target section of the locomotive to obtain color data of the color pattern, wherein the color data includes initial color values of multiple color channels; A data processing module, used to calculate a proportionality coefficient between an initial color value of each color channel and a preset compensation value, and convert the initial color values of the multiple color channels into standard color values based on the proportionality coefficient; encode the standard color values based on a preset encoding rule to obtain a color code corresponding to the color pattern, so as to determine a business item corresponding to the color pattern based on the color code; The locomotive control module is used to generate control instructions corresponding to the business items and control the locomotive based on the control instructions.
11. The locomotive control device based on color recognition according to claim 10, characterized in that: The color sensor module has at least two color sensors, and the multiple color sensors are installed at different positions at the same height of the locomotive to obtain different color patterns respectively, wherein the different color patterns are used for mutual verification to verify and screen the obtained initial color image.
12. An electronic device, characterized in that: It comprises a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the locomotive control method based on color recognition as described in any one of claims 1-6.
13. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to enable a computer to execute the locomotive control method based on color recognition as described in any one of claims 1-6.