A method, apparatus, system and medium for controlling a locomotive based on a barcode

By setting positioning markers on reference points and using barcode recognition technology, the problem of inaccurate positioning of rail locomotives in obstructed areas was solved, enabling precise control of locomotive operation and improving the accuracy and efficiency of positioning and control.

CN115759153BActive Publication Date: 2026-05-08CHONGQING SAIDIQIZHI ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING SAIDIQIZHI ARTIFICIAL INTELLIGENCE TECH CO LTD
Filing Date
2022-11-17
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The positioning of rail locomotives mainly relies on satellite positioning systems with inertial navigation. This system is greatly affected by the surrounding buildings and environment, making it impossible to accurately locate the locomotive in obstructed areas and thus making it impossible to precisely control the locomotive's operating status.

Method used

By setting positioning markers on reference objects and using cameras to identify barcodes, the locomotive's position relative to the reference objects is obtained, and instructions to control the locomotive's operating status are generated. The OpenCV image recognition algorithm is used for edge detection and binarization to extract position information.

Benefits of technology

Even when communication signals are blocked, the locomotive's position relative to a reference object can be accurately identified, improving the accuracy of locomotive positioning and the efficiency of operation control, and solving the problem of inaccurate positioning when satellite positioning is unavailable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115759153B_ABST
    Figure CN115759153B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method, device, system and medium for controlling a locomotive based on a barcode, the method comprising: obtaining a to-be-recognized image, wherein the to-be-recognized image is obtained by photographing a positioning mark, the positioning mark is arranged on a reference object, and the locomotive is movable inside the reference object; recognizing a barcode displayed on the positioning mark to obtain a position of the locomotive relative to the reference object; and generating an instruction for controlling a running state of the locomotive based on the position. Through some embodiments of the present application, the accurate position of the locomotive inside the reference object can be obtained in real time through the barcode arranged on the reference object, so that the running state of the locomotive can be accurately controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control, specifically to a method, apparatus, system, and medium for controlling locomotives based on barcodes. Background Technology

[0002] In related technologies, the positioning of rail locomotives mainly relies on satellite positioning systems with inertial navigation. These systems are significantly affected by the surrounding environment, such as buildings. For example, they cannot accurately locate locomotives in areas obstructed by steel-framed walkways, pipelines, factory buildings, or high walls. Under blast furnaces, the system is completely blocked, rendering satellite positioning unusable. This results in the inability to accurately locate the locomotive and, consequently, to precisely control its operation.

[0003] Therefore, how to accurately control the locomotive's operating status has become a problem that needs to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, system, and medium for controlling locomotives based on barcodes. Through some embodiments of this application, at least the precise position of the locomotive within a reference object can be obtained in real time by using a barcode set on a reference object, thereby enabling accurate control of the locomotive's operating status.

[0005] In a first aspect, this application provides a method for controlling a locomotive based on a barcode, applied to a processor. The method includes: acquiring an image to be identified, wherein the image to be identified is obtained by photographing a positioning marker, the positioning marker being set on a reference object, and the locomotive being movable within the reference object; identifying a barcode displayed on the positioning marker to obtain the position of the locomotive relative to the reference object; and generating instructions to control the operating state of the locomotive based on the position.

[0006] Therefore, by identifying the positioning marks on the reference object, this embodiment of the application can identify the position of the locomotive relative to the reference object even when the communication signal is blocked, thereby enabling precise control of the locomotive's operating status and improving the locomotive's operating efficiency.

[0007] In conjunction with the first aspect, in one embodiment of this application, identifying the barcode displayed on the positioning mark to obtain the position of the vehicle relative to the reference object includes: performing edge detection on multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, wherein the RGB values ​​of the multiple black bars are all 0; confirming that the included angle between the horizontal edge and the vertical edge corresponding to each of the multiple black bars is 90°, then extracting the position information from the barcode to obtain the position of the vehicle relative to the reference object.

[0008] Therefore, by judging the angle information of the edges corresponding to each black bar of the barcode, the embodiments of this application can use corresponding methods to extract the position information according to the different angle information, thereby improving the efficiency of position recognition.

[0009] In conjunction with the first aspect, in one embodiment of this application, the step of extracting the position information from the barcode to obtain the position of the locomotive relative to the reference object includes: extracting the position information from the barcode and searching for a target distance value corresponding to the position information in a data conversion rule table, wherein the data conversion rule table is used to store the correspondence between position information and distance value; and using the target distance value as the position of the locomotive relative to the reference object.

[0010] Therefore, the embodiments of this application can store the correspondence between location information and distance values ​​through a data conversion rule table, thereby enabling the rapid acquisition of accurate reference object locations.

[0011] In conjunction with the first aspect, in one embodiment of this application, after performing edge detection on the multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, the method further includes: confirming that there is a target black bar among the multiple black bars whose included angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°; then identifying all black bars within a preset range centered on the target black bar to obtain the position of the vehicle relative to the reference object.

[0012] Therefore, by identifying all black bars within a preset range of the skewed black bars in this application embodiment, it is possible to prevent position information identification errors that could lead to inaccurate locomotive positioning, thereby improving the accuracy of locomotive positioning.

[0013] In conjunction with the first aspect, in one embodiment of this application, after acquiring the image to be identified, the method further includes: performing binarization processing on the image to be identified to obtain a binarized image, and segmenting the binarized image into multiple sub-regions; the step of identifying the barcode displayed on the positioning mark to obtain the position of the vehicle relative to the reference object includes: identifying the barcode displayed in each sub-region of the multiple sub-regions to obtain the position of the vehicle relative to the reference object.

[0014] Therefore, by segmenting the positioning markers and identifying multiple sub-regions, the implementation of this application can improve the processor's response speed and thus increase the efficiency of obtaining the locomotive's position.

[0015] In conjunction with the first aspect, in one embodiment of this application, the barcode is uniformly distributed on the inner wall, ground, or top surface of the reference object.

[0016] Secondly, this application provides a system for controlling a locomotive, the system comprising: a camera configured to capture an image of a reference object to obtain an image to be identified; a processor configured to acquire the image to be identified and execute the method described in any embodiment of the first aspect based on the image to obtain instructions for controlling the locomotive's operating state; and a task execution unit configured to acquire and execute the instructions.

[0017] Thirdly, this application provides a device for controlling a locomotive based on a barcode, applied to a processor. The device includes: an image acquisition module configured to acquire an image to be identified, wherein the image to be identified is obtained by photographing a positioning marker, the positioning marker being set on a reference object, and the locomotive being movable within the reference object; a position recognition module configured to recognize the barcode displayed on the positioning marker to obtain the position of the locomotive relative to the reference object; and an instruction generation module configured to generate instructions for controlling the locomotive's operating state based on the position.

[0018] In conjunction with the third aspect, in one embodiment of this application, the position recognition module is further configured to: perform edge detection on multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, wherein the RGB values ​​of the multiple black bars are all 0; confirm that the included angle between the horizontal edge and the vertical edge corresponding to each of the multiple black bars is 90°, then extract the position information in the barcode to obtain the position of the vehicle relative to the reference object.

[0019] In conjunction with the third aspect, in one embodiment of this application, the location identification module is further configured to: extract location information from the barcode, and search for a target distance value corresponding to the location information in a data conversion rule table, wherein the data conversion rule table is used to store the correspondence between location information and distance value; and use the target distance value as the position of the locomotive relative to the reference object.

[0020] In conjunction with the third aspect, in one embodiment of this application, the position recognition module is further configured to: confirm that among the plurality of black bars there is a target black bar whose included angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°; then identify all black bars within a preset range centered on the target black bar to obtain the position of the locomotive relative to the reference object.

[0021] In conjunction with the third aspect, in one embodiment of this application, the position recognition module is further configured to: perform binarization processing on the image to be recognized to obtain a binarized image, and segment the binarized image into multiple sub-regions; and recognize the barcode displayed in each sub-region of the multiple sub-regions to obtain the position of the locomotive relative to the reference object.

[0022] In conjunction with the third aspect, in one embodiment of this application, the barcode is evenly distributed on the inner wall, ground, or top surface of the reference object.

[0023] Fourthly, this application provides an electronic device, including: a processor, a memory, and a bus; the processor is connected to the memory via the bus, the memory stores a computer program, and the computer program, when executed by the processor, can implement the method as described in any embodiment of the first aspect.

[0024] Fifthly, this application provides a computer-readable storage medium storing a computer program that, when executed, can perform the methods described in any embodiment of the first aspect. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the system composition of a barcode-controlled locomotive as shown in an embodiment of this application;

[0026] Figure 2 This is one of the flowcharts illustrating a method for controlling a locomotive using barcodes, as shown in an embodiment of this application.

[0027] Figure 3 This is a schematic diagram of the image to be identified shown in an embodiment of this application;

[0028] Figure 4 This is a schematic diagram of edge detection for the black bar shown in an embodiment of this application;

[0029] Figure 5 This is a schematic diagram illustrating the edge detection of another black bar in an embodiment of this application;

[0030] Figure 6 This is a second flowchart illustrating the method for controlling a locomotive using barcodes, as shown in an embodiment of this application.

[0031] Figure 7 This is a schematic diagram illustrating the components of a barcode-controlled locomotive device according to an embodiment of this application;

[0032] Figure 8 This is a schematic diagram illustrating the composition of an electronic device according to an embodiment of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the protection scope of this application.

[0034] This application can be applied to scenarios where the locomotive's movement range is limited by a reference object (e.g., when a blast furnace obstructs the locomotive), for positioning and controlling the locomotive's operating status. To address the problems in the prior art, some embodiments of this application accurately position the locomotive by setting a positioning marker within the reference object. For example, in some embodiments of this application, the accurate position of the locomotive relative to the reference object is obtained by identifying the barcode on the positioning marker, thereby generating instructions to control the locomotive's operating status based on that position.

[0035] The method steps in the embodiments of this application are described in detail below with reference to the accompanying drawings.

[0036] Figure 1 This application provides schematic diagrams of a system composition for controlling a locomotive based on barcodes, as illustrated in some embodiments. The system includes a camera 110, a processor 120, and a task execution unit 130. Specifically, the camera 110 captures an image of a positioning marker within a reference object to obtain a target image, and sends this image to the processor 120. Upon receiving the target image, the processor 120 identifies the barcode displayed in the image to determine the locomotive's position relative to the reference object. Based on this relative position, it generates a command to control the locomotive's operating state and then sends this command to the task execution unit 130. Upon receiving the command, the task execution unit 130 controls the locomotive's operating state according to the command content.

[0037] Unlike the embodiments of this application, in related technologies, the positioning of railcars mainly relies on satellite positioning systems with inertial navigation. These systems are significantly affected by the surrounding environment, such as buildings, resulting in inaccurate locomotive positioning and consequently, inability to precisely control the locomotive's operation. In contrast, the embodiments of this application locate the locomotive by identifying positioning markers in reference objects. Therefore, unlike related technologies, the embodiments of this application do not require satellite positioning to obtain the locomotive's position relative to reference objects.

[0038] The following uses a processor as an example to illustrate some embodiments of the scheme for controlling locomotives based on barcodes provided in this application.

[0039] At least in order to solve the problems in the background technology, such as Figure 2 As shown, some embodiments of this application provide a method for controlling a locomotive based on a barcode, the method comprising:

[0040] S210, acquire the image to be recognized.

[0041] It should be noted that the image to be identified must include at least a positioning marker. The image is obtained by photographing the positioning marker, which is placed on a reference object, and the locomotive can move inside the reference object. A high-speed camera is installed on the side of the locomotive in the direction of travel, and the camera's wide-angle is adjusted to ensure that a complete barcode image in the direction of travel can be acquired in real time.

[0042] In one embodiment of this application, positioning markers are placed on the inner wall, ground, or top surface of a reference object, which may be a steel frame bridge, pipeline, factory building, high wall, blast furnace, etc. The locomotive needs to enter the reference object to carry out operations.

[0043] In one specific embodiment of this application, a blast furnace is used as a reference object. A locomotive enters the reference object to perform operations; for example, the locomotive stops at a designated location on the reference object to load goods, and then starts moving out of the blast furnace. Workers place positioning markers on the walls of the blast furnace, allowing them to obtain the locomotive's position relative to the blast furnace through the image to be identified, and accurately control the locomotive to stop or start at a fixed position. It is understood that this embodiment is merely an example, and the embodiments of this application are not limited thereto.

[0044] In another specific embodiment of this application, the reference object is a subway fence, and the locomotive is a subway train. Workers place positioning markers within the subway fence. As the subway runs, cameras installed on the carriages corresponding to the direction of travel capture images of the positioning markers, obtaining the location information. The processor then identifies the image to determine the subway's position relative to the subway fence. It is understood that this embodiment is merely an example, and the embodiments of this application are not limited thereto.

[0045] In one embodiment of this application, the camera capturing the image to be identified can be installed on the first and last carriages of the locomotive, or on the inner wall or top surface of a reference object. The time interval for the camera to capture images can be set according to actual production needs; it can be capturing one image every 0.01 seconds or every 0.001 seconds, and this embodiment of the application is not limited to this.

[0046] In the specific scenario of this application, continuous barcodes can be arranged on the side wall of the blast furnace according to the length of the blast furnace track. Alternatively, barcodes can be printed at one-meter intervals, corresponding to the current position. It is understood that the above barcode arrangement is only for distance and can be adjusted according to actual production needs; this application is not limited to this.

[0047] S220 identifies the barcode displayed on the positioning marker to obtain the locomotive's position relative to the reference object.

[0048] In one embodiment of this application, the specific steps for obtaining the position of the locomotive relative to a reference object are as follows:

[0049] S2201: Perform edge detection on multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges. It is understood that the RGB values ​​of the multiple black bars are all 0.

[0050] Understandably, workers need to paint regularly arranged barcodes on both sides of the wall under the blast furnace. A high-speed camera (or barcode scanner) installed at the front of the moving railcar captures images of the barcodes on the wall. The OpenCV image recognition algorithm is then used to identify the RGB values ​​of the current railcar position and perform grayscale conversion (binarization), thus preprocessing the image.

[0051] In other words, after obtaining the image to be recognized, the image is first binarized. Specifically, OpenCV is used to process the barcode images (i.e., the images to be recognized) on both sides of the track acquired by the high-speed camera. It can be understood that OpenCV is a cross-platform computer vision library that obtains the RGB values ​​of the image through its C++ interface. In the RGB color space, the barcode color generally satisfies the following expression (1).

[0052] 0≤I R (x,y)≤T;

[0053] 0≤I G (x,y)≤T; (1)

[0054] 0≤I B (x,y)≤T;

[0055] Where T is the threshold value for the RGB values; for example, T can be 255, I R I represents the value of the R channel in the image to be recognized. G I represents the value of the G channel in the image to be identified. B This represents the value of the B channel in the image to be identified.

[0056] Next, the image to be recognized is binarized using a pre-set binarization threshold, as shown in expression (2) below.

[0057]

[0058] Wherein, BW(x, y) represents the RGB value of any pixel in the image to be identified after binarization, and the binarization threshold is greater than (200, 200, 200). It is understood that the binarization threshold can be set according to the actual production environment, and this application is not limited to this.

[0059] Next, edge detection is performed on the multiple black bars using the binarized image to be recognized, obtaining multiple horizontal edges and multiple vertical edges. As is well known, barcodes consist of alternating black and white barcode images, with the black bars being barcodes of type BW(x,y) = (0,0,0). Specifically, this application uses the discontinuity of brightness values ​​to perform edge detection on the multiple black bars.

[0060] For example, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the image to be identified. Figure 3 The multiple black bars include: first black bar 301, second black bar 304, third black bar 305, fourth black bar 306, fifth black bar 307, sixth black bar 308, and seventh black bar 309. Among them, the first black bar 301 includes a first horizontal side 302 and a first vertical side 303.

[0061] S2202: Based on the angle information of the horizontal and vertical edges of each black bar in multiple black bars, extract the position information in the barcode to obtain the position of the locomotive relative to the reference object.

[0062] In other words, the image after edge detection is a binary image, where edge points are represented by "1" (black dots) and non-edge points are represented by "0" (white dots). A one-dimensional barcode consists of parallel black and white bars, so the result after edge detection is parallel lines. If it can be calculated that the angles within certain bar regions of the edge image are approximately the same value, then bars with approximately equal angles can be considered to potentially form a barcode region.

[0063] For example, such as Figure 4 As shown, Figure 4 This is a schematic diagram obtained after edge detection of the first black bar 301. The angle between the first horizontal edge 302 and the first vertical edge 303 is 90°. Therefore, the black bar formed by the first horizontal edge 302 and the first vertical edge 303 is the barcode area.

[0064] In one embodiment of S2202, firstly, it is confirmed that the included angle between the horizontal and vertical edges of each black bar is 90°. Then, the position information in the barcode is extracted to obtain the position of the locomotive relative to the reference object.

[0065] Specifically, the location information in the barcode is extracted, and the target distance value corresponding to the location information is found in the data conversion rule table. The target distance value is then used as the position of the locomotive relative to the reference object.

[0066] In other words, if the angle between the horizontal and vertical edges is 90°, it means the barcode area can be accurately identified, and the barcode can be directly recognized. The identified position information is then looked up in the data conversion rule table, and the corresponding distance value is obtained. This can be understood as using the starting barcode as a reference to obtain the distance between the current position and the starting barcode as the distance value.

[0067] Understandably, the data conversion rule table is used to store the correspondence between location information and distance values. If there is a curve within the reference point, relevant personnel will mark it according to the actual location and then save it in the data conversion rule table.

[0068] In another implementation of S2202, firstly, it is confirmed that among the multiple black bars, there is a target black bar whose included angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°.

[0069] Then, all black bars within a preset range centered on the target black bar are identified to obtain the position of the locomotive relative to the reference object.

[0070] Specifically, the location information in the barcode is extracted, and the target distance value corresponding to the location information is found in the data conversion rule table. The target distance value is then used as the position of the locomotive relative to the reference object.

[0071] Understandably, the data transformation rule table is used to store the correspondence between location information and distance values.

[0072] In other words, if the angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°, it means that the barcode area may not be able to be recognized accurately. It is necessary to recognize all black bars within a preset range centered on the current black bar, or recognize all black bars within a preset range including the current black bar.

[0073] For example, such as Figure 5 As shown, Figure 5This is a schematic diagram obtained after edge detection of the first black bar 301. The angle between the first horizontal edge 302 and the first vertical edge 303 is greater than 90°. Therefore, it is necessary to identify all black bars within a preset range, including the first black bar 301. Specifically, if the preset range includes five black bars, including the first black bar 301, then the current identification range is the first black bar 301, the second black bar 304, the third black bar 305, the fourth black bar 306, and the fifth black bar 307. In other words, the first black bar 301, the second black bar 304, the third black bar 305, the fourth black bar 306, and the fifth black bar 307 need to be identified together to obtain the locomotive's position relative to the reference object.

[0074] In one embodiment of this application, after acquiring the image to be identified, the image is first binarized to obtain a binarized image, and then the binarized image is segmented into multiple sub-regions. Then, the barcode displayed in each of the multiple sub-regions is identified to obtain the position of the vehicle relative to a reference object.

[0075] In other words, to reduce the processor's workload, the entire image to be identified can be divided into multiple sub-regions, each containing at least one barcode representing location information. For computational simplicity, this application can divide the image into equal parts, for example, dividing a 480*640 image into 16 equal parts of 30*640 pixels. The identification method for each sub-region is the same as that described in the above embodiments and will not be repeated here.

[0076] S230 generates instructions to control the locomotive's operating status based on relative position.

[0077] In other words, the locomotive has a fixed position in the reference frame corresponding to a fixed instruction. After confirming the relative position, the locomotive is given the instruction to execute based on the relative position, and corresponding instructions to control the locomotive's operating status are generated.

[0078] For example, if a locomotive is to stop for 2 minutes at a distance of 3cm, then when the processor recognizes the distance as 3cm, it immediately generates and sends a stop instruction to the locomotive for 2 minutes, so that the locomotive can stop after receiving the instruction.

[0079] As a specific embodiment of this application, the rail locomotive barcode identification and positioning method can improve the positioning accuracy of rail locomotives under blast furnaces. It provides a barcode identification and positioning method and principle, achieving precise positioning of locomotives under blast furnaces and solving the problem that satellite positioning is impossible under blast furnaces, leading to the inability of the locomotive's automatic driving system to stop accurately. In summary, the locomotive barcode identification and positioning system provides real-time, high-precision location information for rail locomotives, providing necessary data support for the location display, task scheduling, and unmanned control of rail locomotives in automatic driving.

[0080] The railcar barcode identification and positioning system employs an OpenCV-based image recognition scheme, improving the reliability of railcar positioning under blast furnaces. By fusing data from barcode scanners and utilizing OpenCV image recognition methods, the system achieves accurate positioning of railcars in obscured areas. This data can be used to support precise parking of automatically driven railcars under blast furnaces.

[0081] Specifically, such as Figure 6 As shown, the specific implementation steps of vehicle positioning based on barcodes include: S601 image input, S602 grayscale conversion, S603 edge detection, S604 image segmentation, S605 angle calculation, S606 barcode positioning, S607 barcode recognition. If the recognition is successful, then execute S608 result display; if the recognition fails, then execute S603 edge detection.

[0082] In other words, when the locomotive reaches the blast furnace and identifies the initial barcode image, its location coordinates are recorded as the initial point for barcode recognition. Subsequently, a barcode segment is identified every 1 second, resulting in a new image to be recognized. The processor acquires this image, performs grayscale conversion and binarization, and then performs edge detection to identify multiple black bars. The image is then segmented into multiple sub-regions, and the angles of the horizontal and vertical edges of the black bars in each sub-region are calculated. These angle values ​​are then used for barcode localization and recognition. Finally, if recognition is successful, the locomotive's position relative to the blast furnace is output; if recognition fails, edge detection continues until barcode recognition is successful.

[0083] Therefore, the rail locomotive barcode identification and positioning system is based on the OpenCV image recognition algorithm. It uses a barcode scanner to scan and identify the part of the barcode that contains location information, thus realizing reliable and high-precision positioning of the rail locomotive in obstructed scenarios.

[0084] Therefore, the rail locomotive barcode recognition system proposes to determine the locomotive's position in scenarios with severe obstruction under blast furnaces by using computer vision to identify key bars of the barcode. The positioning accuracy can reach the millimeter level, with higher reliability and accuracy. The rail locomotive barcode recognition system solves the problem of inaccurate positioning of rail locomotives under blast furnaces.

[0085] The above describes a specific embodiment of a method for controlling locomotives based on barcodes. The following describes a device for controlling locomotives based on barcodes.

[0086] like Figure 7As shown, some embodiments of this application provide a device 700 for controlling a locomotive based on a barcode, the device including: an image acquisition module 710, a position recognition module 720 and an instruction generation module 730.

[0087] The image acquisition module 710 is configured to acquire an image to be identified, wherein the image to be identified is obtained by capturing a positioning mark, the positioning mark is set on a reference object, and the locomotive can move inside the reference object.

[0088] The position recognition module 720 is configured to recognize the barcode displayed on the positioning mark to obtain the position of the locomotive relative to the reference object.

[0089] The instruction generation module 730 is configured to generate instructions for controlling the locomotive's operating status based on the location.

[0090] In one embodiment of this application, the position recognition module 720 is further configured to: perform edge detection on multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, wherein the RGB values ​​of the multiple black bars are all 0; confirm that the included angle between the horizontal edge and the vertical edge corresponding to each of the multiple black bars is 90°, then extract the position information in the barcode to obtain the position of the vehicle relative to the reference object.

[0091] In one embodiment of this application, the location identification module 720 is further configured to: extract location information from the barcode, and search for a target distance value corresponding to the location information in a data conversion rule table, wherein the data conversion rule table is used to store the correspondence between location information and distance value; and use the target distance value as the position of the locomotive relative to the reference object.

[0092] In one embodiment of this application, the position recognition module 720 is further configured to: confirm that there is a target black bar among the plurality of black bars whose included angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°; then identify all black bars within a preset range centered on the target black bar to obtain the position of the locomotive relative to the reference object.

[0093] In one embodiment of this application, the position recognition module 720 is further configured to: perform binarization processing on the image to be recognized to obtain a binarized image, and divide the binarized image into multiple sub-regions; and recognize the barcode displayed in each sub-region of the multiple sub-regions to obtain the position of the locomotive relative to the reference object.

[0094] In one embodiment of this application, the barcode is evenly distributed on the inner wall, ground, or top surface of the reference object.

[0095] In the embodiments of this application, Figure 7 The module shown can achieve Figures 1 to 6 Each process in the method embodiment. Figure 7 The operations and / or functions of each module in the document are respectively designed to achieve... Figures 1 to 6 The corresponding processes in the method embodiments are described above. For details, please refer to the descriptions in the above method embodiments; to avoid repetition, detailed descriptions are omitted here.

[0096] like Figure 8 As shown, this application provides an electronic device 800, including: a processor 810, a memory 820 and a bus 830. The processor is connected to the memory via the bus. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the method as described in any one of the above embodiments. For details, please refer to the description in the above method embodiments. To avoid repetition, detailed descriptions are appropriately omitted here.

[0097] The bus is used to enable direct communication between these components. In this embodiment, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), an On-Premises Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in this embodiment. The general-purpose processor can be a microprocessor or any conventional processor.

[0098] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory stores computer-readable instructions, which, when executed by the processor, can perform the methods described in the above embodiments.

[0099] Understandable. Figure 8 The structure shown is for illustrative purposes only and may include structures larger than those shown. Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.

[0100] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a server, it implements any of the methods described in all the above embodiments. For details, please refer to the descriptions in the above method embodiments. To avoid repetition, detailed descriptions are appropriately omitted here.

[0101] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for controlling a locomotive based on barcodes, characterized in that, Applied to a processor, the method includes: The process involves acquiring an image to be identified, wherein the image is obtained by photographing a positioning marker, which is set on a reference object, and the locomotive can move inside the reference object. The image to be identified is obtained by painting regularly arranged barcodes on both sides of the wall under the blast furnace, acquiring the barcode image of the wall using a high-speed camera or barcode scanner installed at the front end of the locomotive, identifying the RGB values ​​of the current locomotive position using the OpenCV image recognition algorithm, and performing grayscale conversion. After obtaining the image to be identified, it is also binarized, and the binarization process is implemented using the following formula: ; in, This represents the RGB value of any pixel in the image to be identified after binarization, with a binarization threshold greater than (200, 200, 200). The position of the locomotive relative to the reference object is obtained by identifying the barcode displayed on the positioning mark; Based on the location, commands are generated to control the locomotive's operating status; The step of identifying the barcode displayed on the positioning marker to obtain the position of the locomotive relative to the reference object includes: Edge detection is performed on multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, wherein the RGB values ​​of the multiple black bars are all 0; If the angle between the horizontal and vertical edges of each of the multiple black bars is confirmed to be 90°, the position information in the barcode is extracted to obtain the position of the vehicle relative to the reference object. After performing edge detection on the multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, the method further includes: Confirm that among the multiple black bars, there are target black bars where the angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°; Then, all black bars within a preset range centered on the target black bar are identified to obtain the position of the locomotive relative to the reference object.

2. The method according to claim 1, characterized in that, The step of extracting the position information from the barcode to obtain the position of the locomotive relative to the reference object includes: The location information in the barcode is extracted, and the target distance value corresponding to the location information is found in the data conversion rule table, wherein the data conversion rule table is used to store the correspondence between location information and distance value; The target distance value is used as the position of the locomotive relative to the reference object.

3. The method according to any one of claims 1-2, characterized in that, After acquiring the image to be identified, the method further includes: The image to be identified is binarized to obtain a binarized image, and the binarized image is segmented into multiple sub-regions; The step of identifying the barcode displayed on the positioning marker to obtain the position of the locomotive relative to the reference object includes: The position of the locomotive relative to the reference object is obtained by identifying the barcodes displayed in each of the multiple sub-regions.

4. The method according to any one of claims 1-2, characterized in that, The barcodes are evenly distributed on the inner wall, ground, or top surface of the reference object.

5. A system for controlling a locomotive, characterized in that, The system includes: The camera is configured to capture an image of a reference object to obtain the image to be identified; The processor is configured to acquire the image to be identified and, based on the image to be identified, execute the method as described in any one of claims 1-4 to obtain instructions for controlling the locomotive's operating state; The task execution unit is configured to acquire and execute the instructions.

6. A device for controlling a locomotive based on barcodes, characterized in that, Applied to a processor, the device includes: The image acquisition module is configured to acquire an image to be identified. This image is obtained by photographing a positioning marker, which is placed on a reference object. The locomotive can move inside the reference object. The image to be identified is obtained by painting regularly arranged barcodes on both sides of the wall under the blast furnace, acquiring the barcode image of the wall using a high-speed camera or barcode scanner installed at the front of the locomotive, identifying the RGB values ​​of the current locomotive position using the OpenCV image recognition algorithm, and performing grayscale conversion. After obtaining the image to be identified, it is also binarized. The binarization process is implemented using the following formula: ; in, This represents the RGB value of any pixel in the image to be identified after binarization, with a binarization threshold greater than (200, 200, 200). The location recognition module is configured to recognize the barcode displayed on the positioning mark to obtain the position of the locomotive relative to the reference object; The instruction generation module is configured to generate instructions for controlling the locomotive's operating status based on the location; The position recognition module is further configured to: perform edge detection on multiple black bars in the barcode to obtain multiple horizontal edges and multiple vertical edges, wherein the RGB values ​​of the multiple black bars are all 0; and confirm that the included angle between the horizontal edge and the vertical edge corresponding to each black bar is 90°, then extract the position information from the barcode to obtain the position of the vehicle relative to the reference object. The position recognition module is further configured to: confirm that among the plurality of black bars there is a target black bar whose included angle between the horizontal edge and the vertical edge is greater than 90° or less than 90°; then identify all black bars within a preset range centered on the target black bar to obtain the position of the locomotive relative to the reference object.

7. An electronic device, characterized in that, include: Processor, memory, and bus; The processor is connected to the memory via the bus, and the memory stores a computer program that, when executed by the processor, can implement the method as described in any one of claims 1-4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Positioning method, device and system for mobile robot

    CN109059922A

  • Automobile parking device

    JP1993002698A