Search

CN-115759153-B - Method, device, system and medium for controlling locomotive based on bar code

CN115759153BCN 115759153 BCN115759153 BCN 115759153BCN-115759153-B

Abstract

The embodiment of the application provides a method, a device, a system and a medium for controlling a locomotive based on a bar code, wherein the method comprises the steps of obtaining an image to be identified, wherein the image to be identified is obtained by shooting a positioning mark, the positioning mark is arranged on a reference object, and the locomotive can move in the reference object; identifying a bar code displayed on the positioning mark to obtain the position of the locomotive relative to the reference object; generating an instruction for controlling the locomotive operating state based on the location. According to the method and the device, the accurate position of the locomotive in the reference object can be obtained in real time through the bar code arranged on the reference object, so that the running state of the locomotive can be accurately controlled.

Inventors

  • ZHANG ZHIYONG
  • ZHU SIXUE
  • YUAN CHAO
  • ZHANG SIPING

Assignees

  • 重庆赛迪奇智人工智能科技有限公司

Dates

Publication Date
20260508
Application Date
20221117

Claims (8)

  1. 1. A method of controlling a locomotive based on a bar code, the method comprising, applied to a processor: the method comprises the steps of obtaining an image to be identified, wherein the image to be identified is obtained by shooting a positioning mark, the positioning mark is arranged on a reference object, a locomotive can move in the reference object, the image to be identified is obtained by brushing bar codes which are regularly arranged on two sides of a wall surface under a blast furnace, obtaining a bar code image of the wall surface by utilizing a high-speed camera or a bar code scanner arranged at the running front end of a rail locomotive, identifying RGB values of the current rail locomotive position by using an OpenCV image identification algorithm, performing gray conversion, and performing binarization processing on the image to be identified after the image to be identified is obtained, wherein the binarization processing is specifically realized by the following formula: ; Wherein, the The RGB value after binarization of any pixel point in the image to be identified is represented, and the binarization threshold value is larger than (200,200,200); identifying a bar code displayed on the positioning mark to obtain the position of the locomotive relative to the reference object; Generating an instruction for controlling the locomotive operating state based on the location; the step of identifying the bar code displayed on the positioning mark to obtain the position of the locomotive relative to the reference object comprises the following steps: Performing edge detection on a plurality of black bars in the bar code to obtain a plurality of transverse edge and a plurality of vertical edge, wherein the RGB values of the black bars are 0; Confirming that the included angle between the horizontal edge and the vertical edge corresponding to each black bar in the plurality of black bars is 90 degrees, and extracting the position information in the bar code to obtain the position of the locomotive relative to the reference object; after the edge detection is performed on the plurality of black bars in the bar code to obtain a plurality of horizontal edge and a plurality of vertical edge, the method further comprises: Confirming that target black strips with the included angle between the horizontal edge and the vertical edge being more than 90 degrees or less than 90 degrees exist in the plurality of black strips; and identifying all black bars within a preset range with the target black bar as the center to obtain the position of the locomotive relative to the reference object.
  2. 2. The method of claim 1, wherein the extracting the positional information in the bar code to obtain the position of the locomotive relative to the reference comprises: Extracting position information in the bar code, and searching a target distance value corresponding to the position information in a data conversion rule table, wherein the data conversion rule table is used for storing the corresponding relation between the position information and the distance value; And taking the target distance value as the position of the locomotive relative to the reference object.
  3. 3. The method according to any one of claims 1-2, wherein after the acquiring of the image to be identified, the method further comprises: performing binarization processing on the image to be identified to obtain a binarized image, and dividing the binarized image into a plurality of subareas; the step of identifying the bar code displayed on the positioning mark to obtain the position of the locomotive relative to the reference object comprises the following steps: And respectively identifying bar codes displayed in each of the plurality of sub-areas to obtain the position of the locomotive relative to the reference object.
  4. 4. The method of any one of claims 1-2, wherein the bar codes are uniformly distributed on an inner wall, floor or ceiling of the reference.
  5. 5. A system for controlling a locomotive, the system comprising: the camera is configured to shoot a reference object to obtain an image to be identified; A processor configured to obtain the image to be identified and to perform the method of any one of claims 1-4 in accordance with the image to be identified, obtaining instructions to control the operating state of the locomotive; and the task execution unit is configured to acquire and execute the instruction.
  6. 6. An apparatus for controlling a locomotive based on a bar code, the apparatus being adapted to be used in a processor, the apparatus comprising: The system comprises an image acquisition module, a display module and a display module, wherein the image acquisition module is configured to acquire an image to be identified, the image to be identified is obtained by shooting a positioning mark, the positioning mark is arranged on a reference object, the locomotive can move in the reference object, the image to be identified is obtained by brushing bar codes which are regularly arranged on two sides of a wall surface under a blast furnace, acquiring the bar code image of the wall surface by utilizing a high-speed camera or a bar code scanner which is arranged at the running front end of a rail locomotive, identifying the RGB value of the current rail locomotive position by utilizing an OpenCV image identification algorithm, performing gray conversion to obtain the image to be identified, and performing binarization processing on the image to be identified after the image to be identified is obtained, wherein the binarization processing is specifically realized by the following formula: ; Wherein, the The RGB value after binarization of any pixel point in the image to be identified is represented, and the binarization threshold value is larger than (200,200,200); the position identification module is configured to identify the bar code displayed on the positioning mark to obtain the position of the locomotive relative to the reference object; an instruction generation module configured to generate instructions for controlling the locomotive operating state based on the location; The position identification module is further configured to perform edge detection on a plurality of black bars in the bar code to obtain a plurality of horizontal edge edges and a plurality of vertical edge edges, wherein RGB values of the black bars are 0; confirming that the included angle between the horizontal edge and the vertical edge corresponding to each black bar in the plurality of black bars is 90 degrees, and extracting the position information in the bar code to obtain the position of the locomotive relative to the reference object; the position identification module is further configured to confirm that target black strips with the included angle between the horizontal edge and the vertical edge being more than 90 degrees or less than 90 degrees exist in the plurality of black strips, and identify all black strips within a preset range with the target black strips as the center, so that the position of the locomotive relative to the reference object is obtained.
  7. 7. An electronic device is characterized by comprising a processor, a memory and a bus; The processor is connected to the memory via the bus, the memory storing a computer program which, when executed by the processor, performs the method according to any of claims 1-4.
  8. 8. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed, implements the method according to any of claims 1-4.

Description

Method, device, system and medium for controlling locomotive based on bar code Technical Field The embodiment of the application relates to the field of vehicle control, in particular to a method, a device, a system and a medium for controlling a locomotive based on a bar code. Background In the related art, positioning of an orbital locomotive mainly depends on a satellite positioning system with inertial navigation. The satellite positioning system with inertial navigation is greatly influenced by the environment of buildings around the track, for example, the locomotive cannot be accurately positioned in the area shielded by a steel frame corridor bridge, a pipeline, a factory building, a high wall and the like, the locomotive is completely shielded under a blast furnace, the satellite positioning is completely unusable, and the locomotive cannot be accurately positioned, so that the running state of the locomotive cannot be accurately controlled. Therefore, how to accurately control the operation state of the locomotive becomes a problem to be solved. Disclosure of Invention Embodiments of the present application provide a method, apparatus, system, and medium for controlling a locomotive based on a bar code, by which some embodiments of the present application are capable of controlling the locomotive based at least on the bar code disposed on a reference, the accurate position of the locomotive in the reference object is obtained in real time, so that the running state of the locomotive can be accurately controlled. In a first aspect, the application provides a method for controlling a locomotive based on a bar code, which is applied to a processor, wherein the method comprises the steps of obtaining an image to be identified, wherein the image to be identified is obtained by shooting a positioning mark, the positioning mark is arranged on a reference object, and the locomotive can move in the reference object; identifying a bar code displayed on the positioning mark to obtain the position of the locomotive relative to the reference object; generating an instruction for controlling the locomotive operating state based on the location. Therefore, the embodiment of the application can recognize the position of the locomotive relative to the reference object under the condition that the communication signal is blocked by recognizing the positioning mark on the reference object, thereby being capable of precisely controlling the running state of the locomotive and improving the working efficiency of the locomotive. In combination with the first aspect, in an embodiment of the present application, the identifying the barcode displayed on the positioning identifier to obtain the position of the locomotive relative to the reference object includes performing edge detection on a plurality of black bars in the barcode to obtain a plurality of horizontal edges and a plurality of vertical edges, where RGB values of the plurality of black bars are all 0, and determining that an included angle between the horizontal edges and the vertical edges corresponding to each black bar in the plurality of black bars is 90 °, and extracting position information in the barcode to obtain the position of the locomotive relative to the reference object. Therefore, according to the embodiment of the application, the angle information of the edges corresponding to the black bars of the bar code is judged, so that the position information can be extracted by using a corresponding method according to different angle information, and the efficiency of position identification is improved. In combination with the first aspect, in one embodiment of the present application, the extracting the position information in the barcode to obtain the position of the locomotive relative to the reference object includes extracting the position information in the barcode, and searching a target distance value corresponding to the position information in a data conversion rule table, where the data conversion rule table is used to store a correspondence between the position information and the distance value, and taking the target distance value as the position of the locomotive relative to the reference object. Therefore, the embodiment of the application can store the corresponding relation between the position information and the distance value through the data conversion rule table, thereby being capable of rapidly acquiring the accurate reference object position. In combination with the first aspect, in one embodiment of the present application, after the edge detection is performed on the plurality of black bars in the barcode to obtain a plurality of horizontal edges and a plurality of vertical edges, the method further includes confirming that a target black bar with an included angle between the horizontal edges and the vertical edges being greater than 90 ° or less than 90 ° exists in the plurality of black bars, and identifying all black b