WO2021097830A1 - Method and apparatus for identifying object information, computer device, and storage medium - Google Patents

Method and apparatus for identifying object information, computer device, and storage medium Download PDF

Info

Publication number
WO2021097830A1
WO2021097830A1 PCT/CN2019/120365 CN2019120365W WO2021097830A1 WO 2021097830 A1 WO2021097830 A1 WO 2021097830A1 CN 2019120365 W CN2019120365 W CN 2019120365W WO 2021097830 A1 WO2021097830 A1 WO 2021097830A1
Authority
WO
WIPO (PCT)
Prior art keywords
identification information
information
code
color code
identification
Prior art date
Application number
PCT/CN2019/120365
Other languages
French (fr)
Chinese (zh)
Inventor
吴晓
胡龙耀
耿路
吴靖
范育宸
刘怀国
刘润声
Original Assignee
连云港伍江数码科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 连云港伍江数码科技有限公司 filed Critical 连云港伍江数码科技有限公司
Priority to PCT/CN2019/120365 priority Critical patent/WO2021097830A1/en
Publication of WO2021097830A1 publication Critical patent/WO2021097830A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation

Definitions

  • the present invention relates to the field of information recognition technology, and in particular to a method, device, computer equipment and storage medium for identifying object information.
  • the process of commodity settlement generally requires the identification of commodity information.
  • information codes such as one-dimensional codes and two-dimensional codes on the recognition object are more commonly used.
  • the current identification information code often requires the scanning device to be close to the information code to be identified to be recognized, and in some cases it is often unrecognizable.
  • information codes such as one-dimensional codes and two-dimensional codes are often black and white, and the information contained in them is relatively limited, which makes the identification of one-dimensional codes and other codes inconvenient. Since color is more recognizable than black and white, and color codes can be read quickly and long-distance, color codes have been increasingly used in the identification of object information.
  • the prior art has at least the following problems: under conditions such as light and distance are not good enough, the recognition of the color code is still not accurate enough, resulting in insufficient recognition of the object information.
  • the present invention provides an object information recognition method, device, computer equipment and storage medium, which can effectively improve the accuracy of object information recognition.
  • a method for identifying object information including the following steps: acquiring first identification information of a first color code of an object; when the first identification information meets a preset condition, determining the position of the second color code of the object; The position is determined according to the first color code; the second identification information of the second color code in the position is acquired, and the information identification result of the object is determined according to the second identification information.
  • the method before the step of determining the position of the second color code of the object when the first identification information meets a preset condition, the method further includes: obtaining a predetermined first color code of the object. Color code information; when the first identification information matches the first color code information, it is determined that the first identification information meets a preset condition.
  • the step of determining the information recognition result of the object according to the second identification information includes: obtaining a first correspondence between the second identification information and the object information established in advance; A correspondence relationship determines the object information corresponding to the second identification information, and the information identification result of the object is determined according to the corresponding object information.
  • the step of acquiring the second identification information of the second color code in the position, and determining the information identification result of the object according to the second identification information includes: if the second identification information If the acquisition of identification information fails, acquire partial identification information of the second color code; determine the information identification result of the object according to the first identification information and the partial identification information.
  • the step of determining the information recognition result of the object according to the first identification information and the partial identification information includes: integrating the first identification information and the partial identification information , Obtain the spare identification information; when the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
  • the second color code includes: a start code, an end code, and an RGB center code; the step of obtaining the second identification information of the second color code in the position includes: The position determines the start code and the end code of the second color code; the RGB center code between the start code and the end code is obtained, and the second identification information is determined according to the RGB value of the RGB center code.
  • the step of determining the second identification information according to the RGB value of the RGB center code includes: obtaining a pre-established second correspondence between RGB values and numerical numbers; and according to the second The corresponding relationship determines the numerical serial number of the second color code, and the second identification information is determined according to the numerical serial number.
  • an embodiment of the present invention provides a device for identifying object information, including: a color code acquisition module for acquiring first identification information of a first color code of an object; a position determining module for when the first identification When the information meets the preset conditions, the position of the second color code of the object is determined; the position is determined according to the first color code; and the identification module is configured to obtain the second color code of the second color code in the position 2.
  • Identification information determining the information identification result of the object according to the second identification information.
  • the method and device for identifying the object information described above when the first identification information of the first color code meets the preset condition, determine the position of the second color code; determine the second identification information in the position, and then determine the information identification result of the object . According to the first color code to determine the position of the second color code, the second identification information of the second color code can be determined more easily, and more accurate object recognition results can be obtained.
  • a computer device includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor.
  • the processor implements the following steps when the processor executes the computer program: acquiring a first color code of an object Identification information; when the first identification information meets a preset condition, determine the position of the second color code of the object; the position is determined according to the first color code; the second color code in the position is acquired According to the second identification information, the information identification result of the object is determined according to the second identification information.
  • the above-mentioned computer device determines the position of the second color code according to the first color code, so that the second identification information of the second color code can be determined more easily, and a more accurate object recognition result can be obtained.
  • a computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the following steps are realized: obtaining first identification information of a first color code of an object; When conditions are set, the position of the second color code of the object is determined; the position is determined according to the first color code; the second identification information of the second color code in the position is acquired, and the second identification information is obtained according to the second identification. The information determines the information recognition result of the object.
  • the position of the second color code is determined according to the first color code, so that the second identification information of the second color code can be determined more easily, and more accurate object recognition results can be obtained.
  • Fig. 1 is an application environment diagram of a method for identifying object information in an embodiment
  • FIG. 2 is a schematic flowchart of a method for identifying object information in an embodiment
  • FIG. 3 is a schematic flowchart of a method for determining item information in an embodiment
  • FIG. 4 is a schematic diagram of a flow chart of determining an information recognition result through a backup code in an embodiment
  • Figure 5 is a schematic diagram of a start code and an end code in an embodiment
  • Fig. 6 shows the correspondence between RGB codes and corresponding octal numerical numbers in an embodiment
  • FIG. 7 shows the correspondence between RGB codes and corresponding octal numerical numbers in another embodiment
  • FIG. 8 is a comparison diagram of the outer frame line of the RGB center code and the background in an embodiment
  • Figure 9 is a schematic diagram of an object barcode in an embodiment
  • FIG. 10 is a schematic flowchart of a method for identifying object information in another embodiment
  • Figure 11 is a structural block diagram of a device for identifying object information in an embodiment
  • Fig. 12 shows the internal structure of a computer device in an embodiment.
  • the method for identifying object information provided in this application can be applied to the application environment as shown in FIG. 1.
  • the scanning terminal 101 obtains the corresponding first identification information by scanning the color code, and uploads the first identification information to the processing unit 102.
  • the processing unit 102 determines the position of the second color code when the first identification information meets a preset condition, and obtains The second identification information further determines the information identification result of the object.
  • the scanning terminal 101 may be various terminals with scanning functions, including but not limited to smart phones and scanners.
  • the processing unit 102 may be a server, a personal computer, a notebook computer, a smart phone, a tablet computer, a POS machine, or a portable wearable device.
  • the processing unit 102 may upload the acquired and processed data to a server for data sharing with other devices.
  • the embodiments of the present invention provide a method, a device, a computer device, and a storage medium for identifying object information.
  • the method is applied to the processing unit 102 in FIG. 1 as an example for detailed description.
  • a method for identifying object information includes the following steps:
  • S201 Acquire first identification information of the first color code of the object.
  • the object refers to the thing that can display or display the color code. It can refer to items, commodities, people, pictures displayed on the screen, etc.
  • the first color code can be displayed on the object or pasted on the object.
  • the first color code refers to a bar code expressed in a color format, which can be a color one-dimensional code, a color two-dimensional code, or other formats. At the same time, the first color code can include one barcode (a vertical line or a horizontal line), or two or more barcodes.
  • the first identification information refers to the color (which can be converted into RGB value, etc.), the quantity, the form, and other information contained in the color code obtained after the first color code is recognized.
  • obtaining the first identification information of the first color code can be achieved by scanning the first color code by a terminal with a scanning function, or can be achieved in other ways.
  • These scanning terminals may be provided with a camera (so it can be considered that the first color code is scanned by the camera).
  • the camera CAMERA or WEBCAM
  • the camera also known as computer camera, computer eye, electronic eye, etc.
  • the location of the second color code of the object is determined according to the positioning function of the first color code.
  • the second color code is determined when the first identification information meets the preset condition, and the encryption function of the first color code is used.
  • the first color code may be called a security code.
  • the position of the second color code is determined according to the first color code, and the positioning function of the first color code is used. At this time, the first color code can be called a positioning code.
  • the encryption of the first color code can improve the information security and anti-counterfeiting capabilities of the object. If the first identification information captured by the scanning device does not meet the preset condition, the first color code can be regarded as an invalid code, and the next step of obtaining the second identification information will not be performed. Such a processing method can greatly improve the information security of the object.
  • the developer can choose whether to enable the security code function, and whether to open the security code after use. That is, if the developer chooses not to enable the security code, he can directly determine the corresponding information identification result based on the second identification information when the second identification information is obtained without the judgment of the first identification information.
  • judging whether the first identification information meets the preset conditions can be judging whether the first identification information meets the conditions in terms of size, quantity, etc., or judging whether the first identification information matches a preset threshold, and of course it can also be The other way.
  • the first color code and the second color code can be independent of each other in position or can contain each other.
  • first color code and the second color code can be expressed in multiple forms, for example, they can be expressed directly by numbers, by words, or by graphics.
  • the graphical representation can be achieved by various graphics, for example: it can be represented by a rectangular frame or can be represented by a circular frame.
  • the realization process of determining the position of the second color code may be: the first identification information of the first color code may contain the position information of the second color code, so the second color code can be determined according to the first identification information position. It may also be that there is a certain relationship between the positions of the first color code and the second color code, and the position of the second color code can be determined according to the position of the first color code. In addition, the position determined according to the first color code may be the precise position of the second color code, or may be the approximate position.
  • the information recognition result of the object may be item information (for example, information such as computer size, model, and date of manufacture), product price, product model and other information.
  • item information for example, information such as computer size, model, and date of manufacture
  • product price for example, a product that is a product that is a product that is a product that is a product that is a product that is a product that is a product that is a product that is a product that the corresponding information recognition result can be determined based on the second identification information and the corresponding relationship.
  • acquiring the second identification information of the second color code can also be achieved by scanning the second color code by a terminal with a scanning function, like acquiring the first identification information. Similarly, it can be achieved in other ways.
  • the first color code in this embodiment has both an encryption function and a positioning function.
  • the second identification information of the second color code can be determined more accurately and easily, and more accurate object recognition results can be obtained quickly, so that information can be recognized.
  • the fault tolerance rate is greatly reduced.
  • the method before the step of determining the position of the second color code of the object when the first identification information meets a preset condition, the method further includes: acquiring a predetermined first color of the object Code information; when the first identification information matches the first color code information, it is determined that the first identification information meets a preset condition.
  • the first color code information may be artificially specified or calculated according to a certain algorithm.
  • the corresponding first color code information (as verification information) can be set for the object. If the identified first identification information matches the predetermined first color code information, it can be considered The first identification information meets the preset condition. In this embodiment, in this way, it can be accurately and quickly determined whether the first identification information satisfies the condition, and the information identification efficiency of the object can be improved.
  • the first color code can be represented by four color blocks ABCD (of course, the color blocks contained in the first color code can be more or less, and can also be represented in other ways). You can assign different numerical numbers to the RGB values of these color blocks. When determining the RGB value of the first color code color block, determine its corresponding numerical number, and then determine the first identification information. Table 1 below shows the correspondence between different RGB values and numerical numbers. In order to facilitate the color capture by the camera, the maximum value 255 and the minimum value 0 of the RGB function can be used to define the color. For example, eight colors can be used to correspond to the octal number 0-7, as shown in Table 1 (it can also be set to Binary, decimal, hexadecimal, etc.).
  • the colors defined by the maximum value and the minimum value are all pure colors and have a high degree of recognition, which can effectively improve the accuracy of the identification information acquisition, thereby improving the accuracy of the object's information recognition result.
  • the RGB values corresponding to these numerical numbers can also be other values.
  • the RGB color mode is a color standard in the industry. A variety of colors are obtained by changing the three color channels of red (R), green (G), and blue (B) and superimposing them with each other. colour. This color standard includes almost all colors that human vision can perceive, and is one of the most widely used color systems.
  • RGB function executes successfully, it returns the color determined by the specified component, which is represented by a long integer.
  • the requirements of RGB three channels are as follows:
  • both the first color code information and the first color code information may be information composed of numerical numbers, and the numerical numbers corresponding to the first color code information may be pre-stored in the processing unit. If the numerical number in the first identification information corresponds to the numerical number in the first color code information, it can be considered that the two match, and it is determined that the first identification information satisfies the preset condition; if the numerical number in the first identification information If it does not correspond to the numerical number in the first color code information, it can be determined that the first identification information does not meet the preset condition.
  • each bar code may be used to represent 8 colors, and therefore, when the color code is represented by a first color ABCD four blocks 48 can obtain color combinations. This makes it possible to find a high-contrast first color code for precise positioning no matter how colorful the color of the product packaging is, so that the camera can accurately identify the color code on the product at a longer distance.
  • the step of determining the information recognition result of the object according to the second identification information includes: obtaining a first correspondence between the second identification information and the object information established in advance; The correspondence relationship determines the object information corresponding to the second identification information, and the information identification result of the object is determined according to the corresponding object information.
  • the object information can refer to the number, identification information, etc. of the object.
  • the object information corresponds to the information recognition result, so the information recognition result of the object can be determined based on the determined object information.
  • the object information may also be an information recognition result, that is, if the object information corresponding to the first identification information is determined, the information recognition result of the object is determined.
  • the object information corresponding to the second identification information is determined according to the first corresponding relationship established in advance, and then the information identification result of the object can be determined. In this way, the information recognition result of the object can be accurately and quickly determined.
  • the process of determining the item information may be:
  • S302 The item information is entered into the processing unit and the item information is bound to the identification information of the color code.
  • the scanning terminal obtains the identification information of the color code, and inputs the identification information into the processing unit.
  • the process of inputting the coding rules and item information into the processing unit in FIG. 3 may include: inputting the coding rules of the first color code and the second color code and binding the first identification information and the second identification information with the item information.
  • the identification information corresponding to the two color codes can also be stored as one piece of information.
  • the processing unit may generate identification information for a certain article according to a predefined color code rule, and then generate a color code, and display the color code through devices such as printers and displays.
  • the processing unit receives the entered item information, and binds the item information with the second color code, that is, binds the second identification information of the second color code with the item information.
  • the first identification information can be input to the processing unit; the processing unit finds the corresponding first color code information according to the first identification information, and judges whether the two match. When the two match It is determined that the first identification information meets a preset condition.
  • the scanning terminal scans the second color code to obtain the second identification information, the processing unit determines the corresponding item information through the comparison index, and pushes the corresponding item information.
  • the processing unit when the processing unit generates identification information for the object, it can make the generated identification information unique, that is, ensure that the identification information of each object is different, and prevent information confusion.
  • the first identification information and the second identification information are generated separately, the first identification information can be guaranteed to be unique and the second identification information can be guaranteed to be unique; when the first identification information and the second identification information are combined as the total identification information of the object , Can guarantee the uniqueness of the total identification information.
  • the step of acquiring the second identification information of the second color code in the position and determining the result of the information identification of the object according to the second identification information includes: if the second identification If the information acquisition fails, the partial identification information of the second color code is acquired; the information identification result of the object is determined according to the first identification information and the partial identification information.
  • the step of determining the information recognition result of the object based on the first identification information and the partial identification information includes: integrating the first identification information and the partial identification information, Obtain spare identification information; when the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
  • the backup code is enabled, and when the second identification information cannot be accurately obtained, the information identification result of the object is determined by using part of the identification information and the first identification information. It can obtain accurate object information recognition results when the color code cannot be fully recognized due to reasons such as light.
  • the first color code may be referred to as ABCD code.
  • the second color code can be called an RGB code (which can include a start code, an end code, and an RGB center code).
  • the RGB code can be multiple barcodes. Therefore, when the RGB values of all the barcodes cannot be accurately obtained, if the RGB value of one or part of the barcode can be obtained, the first identification information and part of the identification information can be combined to determine The information recognition result of the object.
  • the backup code "ABCD+X” can be used for backup encoding, where X represents at least one RGB code. For example, if the complete RGB code is converted into a numerical number, it is 443. Due to some recognition abnormalities, only the red “4" or cyan “3" in the bar code can be recognized (it must be able to recognize at least one color, otherwise it cannot be recognized. Work with ABCD code), you can use the combination of "ABCD+4" or "ABCD+3" to match the pre-defined backup code, and the system will pass the recognized "ABCD+4" or "ABCD+3” The internal code is converted into the RGB code "443" to determine the information recognition result of the object, and play the function of accurate identification of the backup code.
  • the backup code is enabled and the first color code is combined with the second color code to ensure the uniqueness of the determined information recognition result, and it can be solved that only the second color code to determine the information recognition result is not enough to meet the growing number of commodities.
  • the problem of quantity effectively improves the scalability of the method for identifying object information of the present invention.
  • the backup code, the location code and the security code in the foregoing embodiment can be selected according to needs. For example, if you choose not to enable the backup code, when the second identification information acquisition is not complete, you can directly prompt the object's identification information acquisition failure.
  • the barcode spacing of ABCD codes can be customized according to the quality of the detection environment to ensure that the camera is in a bad condition.
  • the ABCD code can be accurately captured in the environment.
  • the size of the ABCD code can also be customized. If the camera resolution reaches 1080P, the ABCD code size can be reduced. If the camera resolution is only 720P, then the ABCD code size can be appropriately increased to ensure accurate recognition.
  • the advantage of the adjustable spacing and size of the ABCD code is that the traditional scanning terminal must adopt some high-tech camera technologies in harsh environments, such as backlight photography, darkroom active light supplement technology, etc.
  • the scanning terminal in the embodiment of the present invention does not need to bring any high-tech.
  • the user can choose the appropriate ABCD code spacing and size according to the definition of the terminal and the application environment (for example, the environmental brightness of the vegetable farm is relatively higher than that of the supermarket. Therefore, the size of the color code of the vegetable farm product can be larger than the size of the color code of the supermarket product). Therefore, in practical applications, users do not need to choose expensive cameras, which greatly reduces the dependence on high-definition cameras.
  • the second color code includes: a start code, an end code, and an RGB center code; the step of obtaining the second identification information of the second color code in the position includes: The position determines the start code and the end code of the second color code; obtains the RGB center code between the start code and the end code, and determines the second identification information according to the RGB value of the RGB center code.
  • the second identification information is determined by identifying the RGB center code between the start code and the end code, and the color value in each frame is determined by the camera, and the second identification information can be determined through a predetermined correspondence relationship.
  • the way is simple.
  • the step of determining the second identification information according to the RGB value of the RGB center code includes: obtaining a pre-established second correspondence between RGB values and numerical numbers; and according to the second correspondence The relationship determines the numerical number of the second color code, and the second identification information is determined according to the numerical number.
  • the numerical number of the second color code is determined according to the second correspondence relationship, so that the determination of the second identification information has a higher efficiency.
  • start code and the end code can be implemented as short lines as shown in FIG. 5, the horizontal line represents the start code, and the vertical line represents the end code.
  • start code and end code can also be expressed in other graphics or forms.
  • the corresponding relationship between the RGB code and the corresponding octal numerical number can be shown in Figures 6 and 7 (the corresponding relationship between the numerical number and the RGB value is shown in Table 1).
  • the RGB center code in FIG. 6 is represented by a rectangular box
  • the RGB center code in FIG. 7 is represented by a circular box, and the inside of these rectangular boxes and circular models is filled with colors corresponding to RGB values.
  • the color of the outer frame line of the RGB center code may be different from the color of the attached object to distinguish it from the object and improve the accuracy of recognition. As shown in Figure 8, when the background (object) is white, the border of the RGB center code is black, and when the background is black, the border of the RGB center code is white. At the same time, a proper gap can be left between the barcodes.
  • the positional relationship between the ABCD code and the RGB code may be as shown in FIG. 9, which is a schematic diagram of the target barcode, and the target barcode includes the ABCD code and the RGB code.
  • the ABCD code is set around the RGB code. After the first identification information of the ABCD code meets the preset condition, it is determined that the RGB code is inside the ABCD code. Then the scanning terminal scans the inside of the ABCD code to obtain the corresponding second identification information.
  • a method for identifying object information includes the following steps:
  • S104 Determine the start code and the end code of the second color code according to the position; obtain the RGB center code between the start code and the end code, and determine the first color code according to the RGB value of the RGB center code 2. Identification information.
  • the position of the second color code is determined according to the first color code, so that the second identification information of the second color code can be determined more easily, and a more accurate object recognition result can be obtained.
  • the first color code consisting of four color blocks ABCD
  • the second color code consisting of a start code, an end code, and three color blocks as an example.
  • This application example simultaneously enables the functions of the positioning code and the security code of the ABCD code, and enables the backup code.
  • the processing unit generates a corresponding product code (ie total identification information) for the product G, and converts the product code into an octal number and the corresponding color code.
  • the color code includes ABCD code and RGB code. Since the RGB code contains two numbers 4 and 6, the product code can be determined as 64633124 or 64633126 (to ensure the uniqueness of the data, when determining the last 5 digits of the 8-bit code, set the first 3 digits to 646 to ensure The RGB center code can be uniquely determined based on the last 5 digits).
  • the product information is bound to the product code and stored in the processing unit.
  • the processing unit prints the product number on the product G by controlling the printer.
  • the camera captures the A, B, C, and D codes on the product G in sequence, and inputs the capture result into the processing unit.
  • the processing unit determines the RGB value of the ABCD code, and determines the first identification information corresponding to the ABCD code according to the RGB value and the preset correspondence relationship. If the determined first identification information is 3312, it is considered that the ABCD code meets the preset condition.
  • the determined second identification information is 646, it is determined that the verification of the second identification information is passed, and the product information corresponding to the product code is acquired as the result of the information identification of the product G.
  • the backup code function will be activated. Since the ABCD code has been certified for safety, it is only necessary to correctly read one of the colors of the RGB center code, namely yellow or red. According to the ABCD+X coding rules, the backup code is 33124 or 33126. As long as one of them can be read, the system will automatically convert it into a corresponding product equal to the center code 646 according to the internal coding rules, and determine the corresponding product information.
  • the processing unit pushes the acquired product information to the user, and the user queries the product information through output devices such as displays and printers.
  • this embodiment uses ABCD codes as positioning, security and backup codes, which greatly improves the reading speed, security level and error tolerance rate of color codes.
  • the audience for the camera is wide, that is, the degree of reliance on the clarity of the camera is not high. If the camera's resolution is low, you can use a large-size ABCD code; if it is a high-definition camera, you can use a small-size ABCD code.
  • the camera will capture the color bar code in this area; it can greatly increase the accuracy of the camera to recognize the color bar code, and avoid the inaccurate RGB positioning or misjudgment of the product caused by the color difference of the packaging box Case.
  • the present invention also provides an object information recognition device, which can be used to execute the above object information recognition method.
  • an object information recognition device which can be used to execute the above object information recognition method.
  • the illustrated structure does not constitute a limitation on the device, and may include comparisons. More or fewer parts are shown, or some parts are combined, or different parts are arranged.
  • the device for identifying object information includes a color code acquisition module 111, a position determination module 112, and an identification module 113.
  • the detailed description is as follows:
  • the color code acquisition module 111 is configured to acquire the first identification information of the first color code of the object.
  • the position determining module 112 is configured to determine the position of the second color code of the object when the first identification information meets a preset condition; the position is determined according to the first color code.
  • the identification module 113 is configured to obtain the second identification information of the second color code in the position, and determine the information identification result of the object according to the second identification information.
  • the position of the second color code is determined according to the first color code, so that the second identification information of the second color code can be determined more easily, and a more accurate object recognition result can be obtained.
  • it further includes: a color code information acquisition module, configured to acquire predetermined first color code information of the object; and a determination module, configured to determine whether the first identification information corresponds to the first color code information. When the information matches, it is determined that the first identification information meets a preset condition.
  • the identification module 113 includes: a correspondence determination sub-module, which is used to obtain a pre-established first correspondence relationship between the second identification information and the object information; the first identification sub-module is used to The correspondence relationship determines the object information corresponding to the second identification information, and the information identification result of the object is determined according to the corresponding object information.
  • the identification module 113 includes: an identification information acquisition sub-module, configured to acquire part of the identification information of the second color code if the acquisition of the second identification information fails; and a second identification sub-module for The information recognition result of the object is determined according to the first identification information and the partial identification information.
  • the second identification sub-module includes: a spare information determining unit for integrating the first identification information with the partial identification information to obtain spare identification information; and an identification result determining unit for when When the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
  • the identification module 113 includes: a start and end code determination sub-module for determining the start code and end code of the second color code according to the position; and an identification information acquisition sub-module for acquiring The RGB center code between the start code and the end code determines the second identification information according to the RGB value of the RGB center code.
  • the identification information acquisition sub-module includes: a corresponding relationship determining unit, configured to acquire a pre-established second corresponding relationship between RGB values and numerical numbers; and an identification information determining unit, configured according to the second corresponding relationship The numerical number of the second color code is determined, and the second identification information is determined according to the numerical number.
  • the object information identification device of the present invention corresponds to the object information identification method of the present invention one-to-one, and the technical features and beneficial effects described in the embodiments of the object information identification method described above are all applicable to the object information identification method.
  • the specific content can be referred to the description in the method embodiment of the present invention, which will not be repeated here, and it is hereby declared.
  • the logical division of each program module is only an example. In actual applications, it can be used according to needs, for example, due to the configuration requirements of the corresponding hardware or the convenience of software implementation.
  • the above function allocation is completed by different program modules, that is, the internal structure of the object information identification device is divided into different program modules to complete all or part of the functions described above.
  • the method for identifying object information provided in this application can be applied to a computer device as shown in FIG. 12.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 12.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store data such as the first identification information, the second identification information, the first correspondence relationship, and the second correspondence relationship.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, the following steps are implemented: Obtain the first color of the object The first identification information of the code; when the first identification information meets a preset condition, the position of the second color code of the object is determined; the position is determined according to the first color code; the position in the The second identification information of the second color code determines the information identification result of the object according to the second identification information.
  • the processor further implements the following steps when executing the computer program: acquiring predetermined first color code information of the object; when the first identification information matches the first color code information, It is determined that the first identification information meets a preset condition.
  • the processor further implements the following steps when executing the computer program: acquiring a pre-established first correspondence between the second identification information and the object information; determining the correspondence with the second identification information according to the first correspondence According to the object information of the object, the information recognition result of the object is determined according to the corresponding object information.
  • the processor further implements the following steps when executing the computer program: if the acquisition of the second identification information fails, acquiring part of the identification information of the second color code; according to the first identification information and the part The identification information determines the information identification result of the object.
  • the processor further implements the following steps when executing the computer program: integrating the first identification information with the partial identification information to obtain spare identification information; when the spare identification information is combined with a predetermined candidate spare When the identification information matches, the information identification result of the object is determined according to the candidate spare identification information.
  • the processor further implements the following steps when executing the computer program: determining the start code and the end code of the second color code according to the position; obtaining the RGB center between the start code and the end code Code, the second identification information is determined according to the RGB value of the RGB center code.
  • the processor further implements the following steps when executing the computer program: obtaining a pre-established second correspondence between RGB values and numerical numbers; determining the numerical numbers of the second color codes according to the second correspondence, The second identification information is determined according to the numerical number.
  • a computer-readable storage medium is provided, and a computer program is stored thereon.
  • the computer program is executed by a processor, the following steps are implemented: acquiring first identification information of a first color code of an object; When the first identification information meets a preset condition, determine the position of the second color code of the object; determine the position according to the first color code; acquire the second identification information of the second color code in the position, The information identification result of the object is determined according to the second identification information.
  • the following steps are further implemented: obtaining the predetermined first color code information of the object; when the first identification information matches the first color code information , Determining that the first identification information meets a preset condition.
  • the following steps are further implemented: acquiring a pre-established first corresponding relationship between the second identification information and the object information; determining the relationship with the second identification information according to the first corresponding relationship The corresponding object information determines the information recognition result of the object according to the corresponding object information.
  • the following steps are further implemented: if the acquisition of the second identification information fails, acquiring part of the identification information of the second color code; according to the first identification information and the The partial identification information determines the information identification result of the object.
  • the following steps are further implemented: integrating the first identification information with the partial identification information to obtain spare identification information; when the spare identification information is matched with a predetermined candidate When the spare identification information matches, the information identification result of the object is determined according to the candidate spare identification information.
  • the following steps are further implemented: determine the start code and end code of the second color code according to the position; obtain the RGB between the start code and the end code
  • the center code determines the second identification information according to the RGB value of the RGB center code.
  • the following steps are further implemented: obtaining a pre-established second correspondence between RGB values and numerical numbers; and determining the numerical numbers of the second color codes according to the second correspondences , Determining the second identification information according to the numerical number.
  • the computer-readable medium may even be paper or other suitable medium on which the program can be printed, because it can be used, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable media if necessary.
  • the program is processed in a way to obtain the program electronically and then stored in the computer memory.
  • each part of the present invention can be implemented by hardware, software, firmware or a combination thereof.
  • multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if it is implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: Discrete logic circuits, application-specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

A method and apparatus for identifying object information, a computer device, and a storage medium, which relate to the technical field of information identification. The method comprises: acquiring first identification information of a first color code of an object (S201); when the first identification information satisfies a preset condition, determining the position of a second color code of the object, the position being determined according to the first color code (S202); and acquiring second identification information of the second color code in the position, and determining an information identification result of the object according to the second identification information (S203). The described technical solution solves the problem in which the identification of object information is not accurate enough. By determining the position of a second color code according to a first color code, second identification information of the second color code can be more easily determined, and a more accurate object identification result can be acquired.

Description

对象信息的识别方法、装置、计算机设备和存储介质Object information identification method, device, computer equipment and storage medium 技术领域Technical field
本发明涉及信息识别技术领域,特别是涉及对象信息的识别方法、装置、计算机设备和存储介质。The present invention relates to the field of information recognition technology, and in particular to a method, device, computer equipment and storage medium for identifying object information.
背景技术Background technique
随着市场经济的发展,对象识别已经越来越普遍,例如:商品结算过程一般都需要识别商品信息。目前,较为常用的是识别对象上的一维码、二维码等信息码。但是目前识别信息码往往需要扫描设备靠近所需识别的信息码才能识别,在某些情况下还经常会无法识别。另外,一维码、二维码等信息码往往是黑白的,其中所包含的信息较为有限,这就使得一维码等识别不够便利。由于彩色比黑白的辨识度更好,彩色码可实现快速远距离的读取,因此彩色码已经越来越多地被应用于对象信息的识别中。在实现本发明过程中,发明人发现现有技术中至少存在如下问题:在光线、距离等条件不够好的情况下,彩色码的识别仍然不够准确,导致对象信息的识别不够准确。With the development of the market economy, object recognition has become more and more common. For example, the process of commodity settlement generally requires the identification of commodity information. At present, information codes such as one-dimensional codes and two-dimensional codes on the recognition object are more commonly used. However, the current identification information code often requires the scanning device to be close to the information code to be identified to be recognized, and in some cases it is often unrecognizable. In addition, information codes such as one-dimensional codes and two-dimensional codes are often black and white, and the information contained in them is relatively limited, which makes the identification of one-dimensional codes and other codes inconvenient. Since color is more recognizable than black and white, and color codes can be read quickly and long-distance, color codes have been increasingly used in the identification of object information. In the process of implementing the present invention, the inventor found that the prior art has at least the following problems: under conditions such as light and distance are not good enough, the recognition of the color code is still not accurate enough, resulting in insufficient recognition of the object information.
发明内容Summary of the invention
基于此,本发明提供了对象信息的识别方法、装置、计算机设备和存储介质,能有效提高对象信息识别的准确率。Based on this, the present invention provides an object information recognition method, device, computer equipment and storage medium, which can effectively improve the accuracy of object information recognition.
本发明实施例的内容如下:The content of the embodiment of the present invention is as follows:
一种对象信息的识别方法,包括以下步骤:获取对象的第一彩色码的第一识别信息;当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。A method for identifying object information, including the following steps: acquiring first identification information of a first color code of an object; when the first identification information meets a preset condition, determining the position of the second color code of the object; The position is determined according to the first color code; the second identification information of the second color code in the position is acquired, and the information identification result of the object is determined according to the second identification information.
在其中一个实施例中,所述当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置的步骤之前,还包括:获取预先确定的所述对象的第一彩色码信息;当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。In one of the embodiments, before the step of determining the position of the second color code of the object when the first identification information meets a preset condition, the method further includes: obtaining a predetermined first color code of the object. Color code information; when the first identification information matches the first color code information, it is determined that the first identification information meets a preset condition.
在其中一个实施例中,所述根据所述第二识别信息确定所述对象的信息识别结果的步骤,包括:获取预先建立的第二识别信息与对象信息的第一对应关系;根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别 结果。In one of the embodiments, the step of determining the information recognition result of the object according to the second identification information includes: obtaining a first correspondence between the second identification information and the object information established in advance; A correspondence relationship determines the object information corresponding to the second identification information, and the information identification result of the object is determined according to the corresponding object information.
在其中一个实施例中,所述获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果的步骤,包括:若所述第二识别信息获取失败,获取所述第二彩色码的部分识别信息;根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果。In one of the embodiments, the step of acquiring the second identification information of the second color code in the position, and determining the information identification result of the object according to the second identification information includes: if the second identification information If the acquisition of identification information fails, acquire partial identification information of the second color code; determine the information identification result of the object according to the first identification information and the partial identification information.
在其中一个实施例中,所述根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果的步骤,包括:将所述第一识别信息与所述部分识别信息进行整合,得到备用识别信息;当所述备用识别信息与预先确定的候选备用识别信息相匹配时,根据所述候选备用识别信息确定所述对象的信息识别结果。In one of the embodiments, the step of determining the information recognition result of the object according to the first identification information and the partial identification information includes: integrating the first identification information and the partial identification information , Obtain the spare identification information; when the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
在其中一个实施例中,所述第二彩色码包括:起始码、结束码和RGB中心码;所述获取所述位置中的第二彩色码的第二识别信息的步骤,包括:根据所述位置确定所述第二彩色码的起始码和结束码;获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。In one of the embodiments, the second color code includes: a start code, an end code, and an RGB center code; the step of obtaining the second identification information of the second color code in the position includes: The position determines the start code and the end code of the second color code; the RGB center code between the start code and the end code is obtained, and the second identification information is determined according to the RGB value of the RGB center code.
在其中一个实施例中,所述根据所述RGB中心码的RGB值确定所述第二识别信息的步骤,包括:获取预先建立的RGB值与数值编号的第二对应关系;根据所述第二对应关系确定所述第二彩色码的数值编号,根据所述数值编号确定所述第二识别信息。In one of the embodiments, the step of determining the second identification information according to the RGB value of the RGB center code includes: obtaining a pre-established second correspondence between RGB values and numerical numbers; and according to the second The corresponding relationship determines the numerical serial number of the second color code, and the second identification information is determined according to the numerical serial number.
相应的,本发明实施例提供一种对象信息的识别装置,包括:彩色码获取模块,用于获取对象的第一彩色码的第一识别信息;位置确定模块,用于当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;以及,识别模块,用于获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。Correspondingly, an embodiment of the present invention provides a device for identifying object information, including: a color code acquisition module for acquiring first identification information of a first color code of an object; a position determining module for when the first identification When the information meets the preset conditions, the position of the second color code of the object is determined; the position is determined according to the first color code; and the identification module is configured to obtain the second color code of the second color code in the position 2. Identification information, determining the information identification result of the object according to the second identification information.
上述对象信息的识别方法及装置,在第一彩色码的第一识别信息符合预设条件时,确定第二彩色码的位置;确定该位置中的第二识别信息,进而确定对象的信息识别结果。根据第一彩色码来确定第二彩色码的位置,能更容易地确定出第二彩色码的第二识别信息,进而可以获取到更准确的对象识别结果。The method and device for identifying the object information described above, when the first identification information of the first color code meets the preset condition, determine the position of the second color code; determine the second identification information in the position, and then determine the information identification result of the object . According to the first color code to determine the position of the second color code, the second identification information of the second color code can be determined more easily, and more accurate object recognition results can be obtained.
一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:获取对象的第一彩色码的第一识别信息;当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。A computer device includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor. The processor implements the following steps when the processor executes the computer program: acquiring a first color code of an object Identification information; when the first identification information meets a preset condition, determine the position of the second color code of the object; the position is determined according to the first color code; the second color code in the position is acquired According to the second identification information, the information identification result of the object is determined according to the second identification information.
上述计算机设备,根据第一彩色码来确定第二彩色码的位置,能更容易地确定出第二彩 色码的第二识别信息,进而可以获取到更准确的对象识别结果。The above-mentioned computer device determines the position of the second color code according to the first color code, so that the second identification information of the second color code can be determined more easily, and a more accurate object recognition result can be obtained.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:获取对象的第一彩色码的第一识别信息;当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。A computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the following steps are realized: obtaining first identification information of a first color code of an object; When conditions are set, the position of the second color code of the object is determined; the position is determined according to the first color code; the second identification information of the second color code in the position is acquired, and the second identification information is obtained according to the second identification. The information determines the information recognition result of the object.
上述计算机可读存储介质,根据第一彩色码来确定第二彩色码的位置,能更容易地确定出第二彩色码的第二识别信息,进而可以获取到更准确的对象识别结果。In the above-mentioned computer-readable storage medium, the position of the second color code is determined according to the first color code, so that the second identification information of the second color code can be determined more easily, and more accurate object recognition results can be obtained.
附图说明Description of the drawings
图1为一个实施例中对象信息的识别方法的应用环境图;Fig. 1 is an application environment diagram of a method for identifying object information in an embodiment;
图2为一个实施例中对象信息的识别方法的流程示意图;2 is a schematic flowchart of a method for identifying object information in an embodiment;
图3为一个实施例中物品信息的确定方法的流程示意图;FIG. 3 is a schematic flowchart of a method for determining item information in an embodiment;
图4为一个实施例中通过备用码确定信息识别结果的流程示意图;FIG. 4 is a schematic diagram of a flow chart of determining an information recognition result through a backup code in an embodiment;
图5为一个实施例中起始码和结束码的示意图;Figure 5 is a schematic diagram of a start code and an end code in an embodiment;
图6为一个实施例中RGB码与对应的八进制数值编号的对应关系;Fig. 6 shows the correspondence between RGB codes and corresponding octal numerical numbers in an embodiment;
图7为另一个实施例中RGB码与对应的八进制数值编号的对应关系;FIG. 7 shows the correspondence between RGB codes and corresponding octal numerical numbers in another embodiment;
图8为一个实施例中RGB中心码外框线与背景的对比图;FIG. 8 is a comparison diagram of the outer frame line of the RGB center code and the background in an embodiment;
图9为一个实施例中对象条码的示意图;Figure 9 is a schematic diagram of an object barcode in an embodiment;
图10为另一个实施例中对象信息的识别方法的流程示意图;FIG. 10 is a schematic flowchart of a method for identifying object information in another embodiment;
图11为一个实施例中对象信息的识别装置的结构框图;Figure 11 is a structural block diagram of a device for identifying object information in an embodiment;
图12为一个实施例中计算机设备的内部结构。Fig. 12 shows the internal structure of a computer device in an embodiment.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention.
本申请提供的对象信息的识别方法可以应用于如图1所示的应用环境中。扫描终端101通过扫描彩色码获取对应的第一识别信息,并向处理单元102上传第一识别信息,处理单元102在第一识别信息符合预设条件的情况下确定第二彩色码的位置,获取第二识别信息,进而确定对象的信息识别结果。其中,扫描终端101可以是各种具有扫描功能的终端,包括但不限于智能手机、扫描仪。处理单元102可以是服务器、个人计算机、笔记本电脑、智能手 机、平板电脑、POS机、便携式可穿戴设备。另外,处理单元102可以将所获取和处理得到的数据上传至某一服务器,以便与其他设备进行数据共享。The method for identifying object information provided in this application can be applied to the application environment as shown in FIG. 1. The scanning terminal 101 obtains the corresponding first identification information by scanning the color code, and uploads the first identification information to the processing unit 102. The processing unit 102 determines the position of the second color code when the first identification information meets a preset condition, and obtains The second identification information further determines the information identification result of the object. The scanning terminal 101 may be various terminals with scanning functions, including but not limited to smart phones and scanners. The processing unit 102 may be a server, a personal computer, a notebook computer, a smart phone, a tablet computer, a POS machine, or a portable wearable device. In addition, the processing unit 102 may upload the acquired and processed data to a server for data sharing with other devices.
本发明实施例提供一种对象信息的识别方法、装置、计算机设备和存储介质。以下以该方法应用于图1中的处理单元102为例分别进行详细说明。The embodiments of the present invention provide a method, a device, a computer device, and a storage medium for identifying object information. In the following, the method is applied to the processing unit 102 in FIG. 1 as an example for detailed description.
在一个实施例中,如图2所示,提供了一种对象信息的识别方法,包括以下步骤:In an embodiment, as shown in FIG. 2, a method for identifying object information is provided, which includes the following steps:
S201、获取对象的第一彩色码的第一识别信息。S201: Acquire first identification information of the first color code of the object.
其中,对象指的是能显示或展示彩色码的东西。可以指物品、商品、人、屏幕所显示的画面等。第一彩色码可以显示在对象上,也可以粘贴在对象上。Among them, the object refers to the thing that can display or display the color code. It can refer to items, commodities, people, pictures displayed on the screen, etc. The first color code can be displayed on the object or pasted on the object.
第一彩色码指的是通过彩色形式表示的条码,可以是彩色一维码、彩色二维码,还可以为其他的形式。同时,第一彩色码可以包含一个条码(一条竖线或一条横线),也可以包含两个甚至多个条码。The first color code refers to a bar code expressed in a color format, which can be a color one-dimensional code, a color two-dimensional code, or other formats. At the same time, the first color code can include one barcode (a vertical line or a horizontal line), or two or more barcodes.
第一识别信息指的是识别第一彩色码以后得到的颜色(可以转换为RGB值等)、数量、形态以及彩色码所包含的其他信息。The first identification information refers to the color (which can be converted into RGB value, etc.), the quantity, the form, and other information contained in the color code obtained after the first color code is recognized.
进一步地,可以是对彩色码获取的初始数据进行量化以后得到的数据,方便后续的信息处理。Further, it may be the data obtained after quantizing the initial data obtained by the color code to facilitate subsequent information processing.
另外,获取第一彩色码的第一识别信息可以是通过具有扫描功能的终端扫描第一彩色码实现,也可以通过其他方式实现。这些扫描终端可以设置有摄像头(因此可以认为是通过摄像头来扫描第一彩色码)。其中,摄像头(CAMERA或WEBCAM)又称为电脑相机、电脑眼、电子眼等,是一种视频输入设备,现被广泛运用于视频会议、远程医疗、实时监控等诸多领域。In addition, obtaining the first identification information of the first color code can be achieved by scanning the first color code by a terminal with a scanning function, or can be achieved in other ways. These scanning terminals may be provided with a camera (so it can be considered that the first color code is scanned by the camera). Among them, the camera (CAMERA or WEBCAM), also known as computer camera, computer eye, electronic eye, etc., is a video input device, and is now widely used in many fields such as video conferencing, telemedicine, and real-time monitoring.
S202、当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定。S202: When the first identification information meets a preset condition, determine the position of the second color code of the object; the position is determined according to the first color code.
在本步骤中,第一识别信息符合预设条件时,根据第一彩色码的定位作用确定对象的第二彩色码所在的位置。In this step, when the first identification information meets the preset condition, the location of the second color code of the object is determined according to the positioning function of the first color code.
其中,在第一识别信息符合预设条件时再确定第二彩色码,使用的是第一彩色码的加密作用,此时第一彩色码可以称为安全码。根据第一彩色码来确定第二彩色码的位置,使用的是第一彩色码的定位作用,此时第一彩色码可以称为定位码。Wherein, the second color code is determined when the first identification information meets the preset condition, and the encryption function of the first color code is used. In this case, the first color code may be called a security code. The position of the second color code is determined according to the first color code, and the positioning function of the first color code is used. At this time, the first color code can be called a positioning code.
第一彩色码的加密作用可以提高对象的信息安全以及防伪能力。如果扫描设备捕捉到的第一识别信息不符合预设条件,则第一彩色码可以视为无效码,不会进行下一步获取第二识别信息的操作。这样的处理方式可以大大提高对象的信息安全。当然,开发者可以自行选定是否启用安全码的功能,以及使用后是否开放安全码。即若开发者选择不启用安全码,则可 以不经过第一识别信息的判断,在获取到第二识别信息时直接根据第二识别信息确定对应的信息识别结果。The encryption of the first color code can improve the information security and anti-counterfeiting capabilities of the object. If the first identification information captured by the scanning device does not meet the preset condition, the first color code can be regarded as an invalid code, and the next step of obtaining the second identification information will not be performed. Such a processing method can greatly improve the information security of the object. Of course, the developer can choose whether to enable the security code function, and whether to open the security code after use. That is, if the developer chooses not to enable the security code, he can directly determine the corresponding information identification result based on the second identification information when the second identification information is obtained without the judgment of the first identification information.
此外,判断第一识别信息是否满足预设条件可以是判断第一识别信息在尺寸、数量等上是否满足条件,也可以是判断第一识别信息是否与预设的阈值相匹配,当然还可以为其他的方式。In addition, judging whether the first identification information meets the preset conditions can be judging whether the first identification information meets the conditions in terms of size, quantity, etc., or judging whether the first identification information matches a preset threshold, and of course it can also be The other way.
第一彩色码与第二彩色码在位置上可以相互独立也可以相互包含。The first color code and the second color code can be independent of each other in position or can contain each other.
另外,第一彩色码和第二彩色码可以通过多种形式来表示,例如:可以直接通过数字表示,也可以通过文字表示,还可以通过图形表示。其中,通过图形表示时可以通过各种图形来实现,例如:可以通过矩形框表示,也可以通过圆形框表示。In addition, the first color code and the second color code can be expressed in multiple forms, for example, they can be expressed directly by numbers, by words, or by graphics. Among them, the graphical representation can be achieved by various graphics, for example: it can be represented by a rectangular frame or can be represented by a circular frame.
进一步地,确定第二彩色码的位置的实现过程可以为:第一彩色码的第一识别信息中可以包含第二彩色码的位置信息,因此根据第一识别信息就能确定第二彩色码的位置。也可以是第一彩色码与第二彩色码在位置上存在一定的关系,根据第一彩色码的位置就能确定出第二彩色码的位置。另外,根据第一彩色码确定的位置可以是第二彩色码的精确位置,也可以是大致位置。Further, the realization process of determining the position of the second color code may be: the first identification information of the first color code may contain the position information of the second color code, so the second color code can be determined according to the first identification information position. It may also be that there is a certain relationship between the positions of the first color code and the second color code, and the position of the second color code can be determined according to the position of the first color code. In addition, the position determined according to the first color code may be the precise position of the second color code, or may be the approximate position.
S203、获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。S203. Acquire second identification information of the second color code in the position, and determine an information identification result of the object according to the second identification information.
其中,对象的信息识别结果可以是物品信息(例如:电脑尺寸、机型、出厂日期等信息)、商品价格、商品型号等信息。信息识别结果与第二识别信息之间可以存在对应关系,保证根据第二识别信息和该对应关系就能确定出对应的信息识别结果。Among them, the information recognition result of the object may be item information (for example, information such as computer size, model, and date of manufacture), product price, product model and other information. There may be a corresponding relationship between the information recognition result and the second identification information, which ensures that the corresponding information recognition result can be determined based on the second identification information and the corresponding relationship.
另外,获取第二彩色码的第二识别信息也可以与获取第一识别信息一样,通过具有扫描功能的终端扫描第二彩色码实现。同样,可以通过其他方式实现。In addition, acquiring the second identification information of the second color code can also be achieved by scanning the second color code by a terminal with a scanning function, like acquiring the first identification information. Similarly, it can be achieved in other ways.
目前,识别一维码、二维码等信息码时需要扫描终端的扫描头靠近信息码来捕捉信息。这对于某些行业或在特殊环境下无法快速获取产品信息。本实施例的第一彩色码既有加密作用又有定位作用,能更准确容易地确定出第二彩色码的第二识别信息,进而可以快速地获取到更准确的对象识别结果,使得信息识别的容错率大幅降低。At present, when identifying information codes such as one-dimensional codes and two-dimensional codes, it is necessary to scan the scanning head of the terminal close to the information code to capture the information. For some industries or under special circumstances, product information cannot be obtained quickly. The first color code in this embodiment has both an encryption function and a positioning function. The second identification information of the second color code can be determined more accurately and easily, and more accurate object recognition results can be obtained quickly, so that information can be recognized. The fault tolerance rate is greatly reduced.
在一个实施例中,所述当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置的步骤之前,还包括:获取预先确定的所述对象的第一彩色码信息;当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。In an embodiment, before the step of determining the position of the second color code of the object when the first identification information meets a preset condition, the method further includes: acquiring a predetermined first color of the object Code information; when the first identification information matches the first color code information, it is determined that the first identification information meets a preset condition.
其中,第一彩色码信息可以是人为规定的,也可以是根据一定的算法计算出来的。Among them, the first color code information may be artificially specified or calculated according to a certain algorithm.
在对对象信息进行识别之前,可以为该对象设置对应的第一彩色码信息(作为验证信息),若所识别到的第一识别信息与预先确定的第一彩色码信息相匹配,则可以认为第一识别信息 符合预设的条件。本实施例,通过这样的方式能准确快速地确定出第一识别信息是否满足条件,提高对象的信息识别效率。Before identifying the object information, the corresponding first color code information (as verification information) can be set for the object. If the identified first identification information matches the predetermined first color code information, it can be considered The first identification information meets the preset condition. In this embodiment, in this way, it can be accurately and quickly determined whether the first identification information satisfies the condition, and the information identification efficiency of the object can be improved.
在一个实施例中,第一彩色码可以通过ABCD四个颜色块来表示(当然,第一彩色码所包含的颜色块可以更多也可以更少,还可以通过其他的方式来表示)。可以为这些颜色块的RGB值赋予不同的数值编号。在确定第一彩色码颜色块的RGB值时,确定其对应的数值编号,进而确定第一识别信息。如下表1为不同RGB值与数值编号的对应关系。为便于颜色被摄像头捕捉,可以取RGB函数的最大值255和最小值0来定义颜色,例如,可以通过八种颜色对应八进制数的0~7,如表1(还可以根据摄像头的像素设置成二进制、十进制、十六进制等)。通过最大值和最小值定义的颜色均为纯色,具有较高的辨识度,能有效提高识别信息获取的准确率,进而提高对象的信息识别结果的准确率。当然,与这些数值编号对应的RGB值还可以为其他值。In an embodiment, the first color code can be represented by four color blocks ABCD (of course, the color blocks contained in the first color code can be more or less, and can also be represented in other ways). You can assign different numerical numbers to the RGB values of these color blocks. When determining the RGB value of the first color code color block, determine its corresponding numerical number, and then determine the first identification information. Table 1 below shows the correspondence between different RGB values and numerical numbers. In order to facilitate the color capture by the camera, the maximum value 255 and the minimum value 0 of the RGB function can be used to define the color. For example, eight colors can be used to correspond to the octal number 0-7, as shown in Table 1 (it can also be set to Binary, decimal, hexadecimal, etc.). The colors defined by the maximum value and the minimum value are all pure colors and have a high degree of recognition, which can effectively improve the accuracy of the identification information acquisition, thereby improving the accuracy of the object's information recognition result. Of course, the RGB values corresponding to these numerical numbers can also be other values.
数值编号Numerical code RR GG BB 颜色colour
00 00 00 00 黑色black
11 00 00 255255 蓝色blue
22 00 255255 00 绿色green
33 00 255255 255255 青色blue
44 255255 00 00 红色red
55 255255 00 255255 洋红色Magenta
66 255255 255255 00 黄色yellow
77 255255 255255 255255 白色white
表1 RGB值与八进制数值编号的对应表Table 1 Correspondence table between RGB value and octal number
其中,RGB色彩模式是工业界的一种颜色标准,通过对红(R)、绿(G)、蓝(B)三个颜色通道的变化以及它们相互之间的叠加来得到各式各样的颜色。这个颜色标准几乎包括了人类视力所能感知的所有颜色,是目前运用最广的颜色系统之一。RGB函数执行成功时返回由指定分量确定的颜色,用长整数表示。RGB三通道的要求如下表2:Among them, the RGB color mode is a color standard in the industry. A variety of colors are obtained by changing the three color channels of red (R), green (G), and blue (B) and superimposing them with each other. colour. This color standard includes almost all colors that human vision can perceive, and is one of the most widely used color systems. When the RGB function executes successfully, it returns the color determined by the specified component, which is represented by a long integer. The requirements of RGB three channels are as follows:
部分section 描述description
redred 必要参数;Integer类型;数值范围:0~255;表示颜色的红色成份Necessary parameter; Integer type; value range: 0~255; represents the red component of the color
greengreen 必要参数;Integer类型;数值范围:0~255;表示颜色的绿色成份Necessary parameter; Integer type; value range: 0~255; represents the green component of the color
blueblue 必要参数;Integer类型;数值范围:0~255;表示颜色的蓝色成份Necessary parameter; Integer type; value range: 0~255; represents the blue component of the color
表2 RGB三通道的要求Table 2 Requirements for RGB three channels
在一个实施例中,第一彩色码信息和第一彩色码信息均可以为由数值编号构成的信息,第一彩色码信息对应的数值编号可以预先存储在处理单元中。若第一识别信息中的数值编号与第一彩色码信息中的数值编号相对应,可以认为两者相匹配,则判定第一识别信息满足预设的条件;若第一识别信息中的数值编号与第一彩色码信息中的数值编号不对应,则可以判定第一识别信息不满足预设的条件。In an embodiment, both the first color code information and the first color code information may be information composed of numerical numbers, and the numerical numbers corresponding to the first color code information may be pre-stored in the processing unit. If the numerical number in the first identification information corresponds to the numerical number in the first color code information, it can be considered that the two match, and it is determined that the first identification information satisfies the preset condition; if the numerical number in the first identification information If it does not correspond to the numerical number in the first color code information, it can be determined that the first identification information does not meet the preset condition.
在一个实施例中,根据八进制的RGB编码规则,每一个条码可以用8种颜色来表示,因此,当通过ABCD四个颜色块来表示第一彩色码时,可以得到4 8种颜色组合。这就使得无论商品包装的颜色多么绚丽多彩,也能找到一种高对比度的第一彩色码来进行精准定位,使得摄像头在较远距离就能准确识别出商品上的彩色码。 In one embodiment, the RGB octal coding rule, each bar code may be used to represent 8 colors, and therefore, when the color code is represented by a first color ABCD four blocks 48 can obtain color combinations. This makes it possible to find a high-contrast first color code for precise positioning no matter how colorful the color of the product packaging is, so that the camera can accurately identify the color code on the product at a longer distance.
在一个实施例中,所述根据所述第二识别信息确定所述对象的信息识别结果的步骤,包括:获取预先建立的第二识别信息与对象信息的第一对应关系;根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别结果。In one embodiment, the step of determining the information recognition result of the object according to the second identification information includes: obtaining a first correspondence between the second identification information and the object information established in advance; The correspondence relationship determines the object information corresponding to the second identification information, and the information identification result of the object is determined according to the corresponding object information.
其中,对象信息可以指对象的编号、标识信息等。对象信息与信息识别结果相对应,因此根据所确定的对象信息就能确定出对象的信息识别结果。另外,对象信息也可以为信息识别结果,即确定了与第一识别信息相对应的对象信息就确定了该对象的信息识别结果。Among them, the object information can refer to the number, identification information, etc. of the object. The object information corresponds to the information recognition result, so the information recognition result of the object can be determined based on the determined object information. In addition, the object information may also be an information recognition result, that is, if the object information corresponding to the first identification information is determined, the information recognition result of the object is determined.
本实施例,根据预先建立的第一对应关系来确定与第二识别信息相对应的对象信息,进而可以确定该对象的信息识别结果。通过这样的方式能准确快速地确定出对象的信息识别结果。In this embodiment, the object information corresponding to the second identification information is determined according to the first corresponding relationship established in advance, and then the information identification result of the object can be determined. In this way, the information recognition result of the object can be accurately and quickly determined.
如图3所示,在一个实施例中,以对象为物品、对象的信息识别结果为物品信息为例,确定物品信息的过程可以为:As shown in Fig. 3, in one embodiment, taking the object as an item and the result of the information recognition of the object as the item information as an example, the process of determining the item information may be:
S301、定义彩色码的编码规则并录入处理单元。S301: Define the color code coding rule and enter it into the processing unit.
S302、物品信息录入处理单元并将物品信息与彩色码的识别信息绑定。S302: The item information is entered into the processing unit and the item information is bound to the identification information of the color code.
S303、扫描终端获取彩色码的识别信息,将识别信息输入处理单元。S303. The scanning terminal obtains the identification information of the color code, and inputs the identification information into the processing unit.
S304、推送与识别信息对应的物品信息。S304. Push item information corresponding to the identification information.
图3中向处理单元录入编码规则和物品信息的过程可以包括:录入第一彩色码和第二彩色码的编码规则并将第一识别信息和第二识别信息与物品信息进行绑定。同时,这两种彩色码对应的识别信息也可以作为一个信息进行存储。The process of inputting the coding rules and item information into the processing unit in FIG. 3 may include: inputting the coding rules of the first color code and the second color code and binding the first identification information and the second identification information with the item information. At the same time, the identification information corresponding to the two color codes can also be stored as one piece of information.
进一步地,处理单元可以根据预先定义的彩色码规则为某一物品生成识别信息,进而生成彩色码,并通过打印机、显示器等设备展示彩色码。处理单元接收到录入的物品信息,将物品信息与第二彩色码进行绑定,也即将第二彩色码的第二识别信息与物品信息进行绑定。 通过扫描终端获取到第一识别信息时,可以将第一识别信息输入处理单元;处理单元根据第一识别信息找到对应的第一彩色码信息,判断两者是否相匹配,在两者相匹配时判定所述第一识别信息符合预设条件。当扫描终端扫描第二彩色码得到第二识别信息时,处理单元通过比对索引确定对应的物品信息,并推送对应的物品信息。Further, the processing unit may generate identification information for a certain article according to a predefined color code rule, and then generate a color code, and display the color code through devices such as printers and displays. The processing unit receives the entered item information, and binds the item information with the second color code, that is, binds the second identification information of the second color code with the item information. When the first identification information is obtained by scanning the terminal, the first identification information can be input to the processing unit; the processing unit finds the corresponding first color code information according to the first identification information, and judges whether the two match. When the two match It is determined that the first identification information meets a preset condition. When the scanning terminal scans the second color code to obtain the second identification information, the processing unit determines the corresponding item information through the comparison index, and pushes the corresponding item information.
同时,处理单元为对象生成识别信息时,可以使得所生成的识别信息唯一,即保证每个对象的识别信息都不同,防止造成信息混淆。当第一识别信息和第二识别信息是分开生成时,可以分别保证第一识别信息唯一并保证第二识别信息唯一;当第一识别信息和第二识别信息结合起来作为对象的总识别信息时,可以保证总识别信息的唯一性。At the same time, when the processing unit generates identification information for the object, it can make the generated identification information unique, that is, ensure that the identification information of each object is different, and prevent information confusion. When the first identification information and the second identification information are generated separately, the first identification information can be guaranteed to be unique and the second identification information can be guaranteed to be unique; when the first identification information and the second identification information are combined as the total identification information of the object , Can guarantee the uniqueness of the total identification information.
在一个实施例中,所述获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果的步骤,包括:若所述第二识别信息获取失败,获取所述第二彩色码的部分识别信息;根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果。In one embodiment, the step of acquiring the second identification information of the second color code in the position and determining the result of the information identification of the object according to the second identification information includes: if the second identification If the information acquisition fails, the partial identification information of the second color code is acquired; the information identification result of the object is determined according to the first identification information and the partial identification information.
在一个实施例中,所述根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果的步骤,包括:将所述第一识别信息与所述部分识别信息进行整合,得到备用识别信息;当所述备用识别信息与预先确定的候选备用识别信息相匹配时,根据所述候选备用识别信息确定所述对象的信息识别结果。In one embodiment, the step of determining the information recognition result of the object based on the first identification information and the partial identification information includes: integrating the first identification information and the partial identification information, Obtain spare identification information; when the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
上述两个实施例,启用了备用码,在无法准确获取到第二识别信息时,通过部分识别信息以及第一识别信息来确定对象的信息识别结果。能在光线等原因导致无法完全识别彩色码时得到准确的对象信息识别结果。In the above two embodiments, the backup code is enabled, and when the second identification information cannot be accurately obtained, the information identification result of the object is determined by using part of the identification information and the first identification information. It can obtain accurate object information recognition results when the color code cannot be fully recognized due to reasons such as light.
在一个实施例中,以第一彩色码为ABCD四个彩色块为例,第一彩色码可以称为ABCD码。以第二彩色码也为彩色块为例,可以将第二彩色码称为RGB码(可以包括起始码、结束码和RGB中心码)。RGB码可以为多个条码,因此,在无法准确获取全部的条码的RGB值时,若能获取到其中一个或部分条码的RGB值,则可以将第一识别信息与部分识别信息相结合来确定对象的信息识别结果。In one embodiment, taking the first color code as ABCD four color blocks as an example, the first color code may be referred to as ABCD code. Taking the second color code as a color block as an example, the second color code can be called an RGB code (which can include a start code, an end code, and an RGB center code). The RGB code can be multiple barcodes. Therefore, when the RGB values of all the barcodes cannot be accurately obtained, if the RGB value of one or part of the barcode can be obtained, the first identification information and part of the identification information can be combined to determine The information recognition result of the object.
因此,如图4所示,可以使用备用码“ABCD+X”的方式进行备用编码,其中,X表示至少1个RGB码。比如,若完整的RGB码转换成数值编号以后为443,由于某些识别异常的原因,只能识别条码中的红色“4”或者青色“3”(必须至少能识别出一种颜色,否则无法配合ABCD码工作),则可以通过“ABCD+4”或者“ABCD+3”的组合与事先定义好的备用码进行匹配,系统会将识别到的“ABCD+4”或者“ABCD+3”通过内部编码转化为RGB码“443”,进而确定对象的信息识别结果,起到备用码精准识别的功能。Therefore, as shown in FIG. 4, the backup code "ABCD+X" can be used for backup encoding, where X represents at least one RGB code. For example, if the complete RGB code is converted into a numerical number, it is 443. Due to some recognition abnormalities, only the red "4" or cyan "3" in the bar code can be recognized (it must be able to recognize at least one color, otherwise it cannot be recognized. Work with ABCD code), you can use the combination of "ABCD+4" or "ABCD+3" to match the pre-defined backup code, and the system will pass the recognized "ABCD+4" or "ABCD+3" The internal code is converted into the RGB code "443" to determine the information recognition result of the object, and play the function of accurate identification of the backup code.
本实施例启用备用码,将第一彩色码与第二彩色码结合,可以确保所确定的信息识别结 果的唯一性,可以解决仅通过第二彩色码确定信息识别结果不足以满足日益增长的商品数量的问题,有效提高本发明对象信息的识别方法的扩展性。In this embodiment, the backup code is enabled and the first color code is combined with the second color code to ensure the uniqueness of the determined information recognition result, and it can be solved that only the second color code to determine the information recognition result is not enough to meet the growing number of commodities. The problem of quantity effectively improves the scalability of the method for identifying object information of the present invention.
在一个实施例中,备用码以及前述实施例中的定位码、安全码都可以根据需要选择是否启用。例如,若选择不启用备用码,则在第二识别信息获取不完全时,可以直接提示对象的识别信息获取失败。In one embodiment, the backup code, the location code and the security code in the foregoing embodiment can be selected according to needs. For example, if you choose not to enable the backup code, when the second identification information acquisition is not complete, you can directly prompt the object's identification information acquisition failure.
在一个实施例中,由于各条码之间颜色块的距离太近有可能造成无法识别或者错误识别的情况,可以根据所处侦测环境的好坏自定义ABCD码的条码间距,确保摄像头在恶劣环境下也能准确捕捉ABCD码。此外,ABCD码的大小也可自定义,如摄像头清晰度达到1080P,那么ABCD码尺寸可以减小,如果摄像头清晰度只有720P,那么就可以适当增加ABCD码的尺寸,以确保精准识别。ABCD码的间距和大小可调的优势在于:传统的扫描终端在恶劣环境下必须采取一些高科技摄像技术,比如逆光拍照、暗室主动补光技术等。而本发明实施例中的扫描终端无需自带任何高新技术,用户可以根据自己终端的清晰度和应用环境自行选择适当的ABCD码间距和大小(例如:菜场的环境亮度相对于超市的环境亮度较低,因此,菜场商品的彩色码可以比超市商品的彩色码尺寸更大)。因此在实际应用中用户不需要选择价格高昂的摄像头,极大地降低了对高清摄像头的依赖。In one embodiment, because the distance between the color blocks of the barcodes is too close, it may cause unrecognition or misrecognition. The barcode spacing of ABCD codes can be customized according to the quality of the detection environment to ensure that the camera is in a bad condition. The ABCD code can be accurately captured in the environment. In addition, the size of the ABCD code can also be customized. If the camera resolution reaches 1080P, the ABCD code size can be reduced. If the camera resolution is only 720P, then the ABCD code size can be appropriately increased to ensure accurate recognition. The advantage of the adjustable spacing and size of the ABCD code is that the traditional scanning terminal must adopt some high-tech camera technologies in harsh environments, such as backlight photography, darkroom active light supplement technology, etc. However, the scanning terminal in the embodiment of the present invention does not need to bring any high-tech. The user can choose the appropriate ABCD code spacing and size according to the definition of the terminal and the application environment (for example, the environmental brightness of the vegetable farm is relatively higher than that of the supermarket. Therefore, the size of the color code of the vegetable farm product can be larger than the size of the color code of the supermarket product). Therefore, in practical applications, users do not need to choose expensive cameras, which greatly reduces the dependence on high-definition cameras.
在一个实施例中,所述第二彩色码包括:起始码、结束码和RGB中心码;所述获取所述位置中的第二彩色码的第二识别信息的步骤,包括:根据所述位置确定所述第二彩色码的起始码和结束码;获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。In an embodiment, the second color code includes: a start code, an end code, and an RGB center code; the step of obtaining the second identification information of the second color code in the position includes: The position determines the start code and the end code of the second color code; obtains the RGB center code between the start code and the end code, and determines the second identification information according to the RGB value of the RGB center code.
本实施例,通过识别起始码和结束码之间的RGB中心码来确定第二识别信息,通过摄像头确定各个框内的颜色值,即可通过预先确定的对应关系确定第二识别信息,确定方式简单。In this embodiment, the second identification information is determined by identifying the RGB center code between the start code and the end code, and the color value in each frame is determined by the camera, and the second identification information can be determined through a predetermined correspondence relationship. The way is simple.
在一个实施例中,所述根据所述RGB中心码的RGB值确定所述第二识别信息的步骤,包括:获取预先建立的RGB值与数值编号的第二对应关系;根据所述第二对应关系确定所述第二彩色码的数值编号,根据所述数值编号确定所述第二识别信息。In one embodiment, the step of determining the second identification information according to the RGB value of the RGB center code includes: obtaining a pre-established second correspondence between RGB values and numerical numbers; and according to the second correspondence The relationship determines the numerical number of the second color code, and the second identification information is determined according to the numerical number.
本实施例,根据第二对应关系确定第二彩色码的数值编号,使得第二识别信息的确定具有较高的效率。In this embodiment, the numerical number of the second color code is determined according to the second correspondence relationship, so that the determination of the second identification information has a higher efficiency.
在一个实施例中,起始码和结束码的实现方式可以为如图5所示的短线,横线表示起始码,竖线表示结束码。当然,起始码和结束码也可以通过其他图形或形式表示。In an embodiment, the start code and the end code can be implemented as short lines as shown in FIG. 5, the horizontal line represents the start code, and the vertical line represents the end code. Of course, the start code and end code can also be expressed in other graphics or forms.
RGB码与对应的八进制数值编号的对应关系可以如图6和7所示(数值编号与RGB值的对应关系如表1所示)。其中,图6的RGB中心码通过矩形框表示,图7的RGB中心码通过圆形框表示,这些矩形框和圆形款内部填充有对应RGB值的颜色。The corresponding relationship between the RGB code and the corresponding octal numerical number can be shown in Figures 6 and 7 (the corresponding relationship between the numerical number and the RGB value is shown in Table 1). Among them, the RGB center code in FIG. 6 is represented by a rectangular box, and the RGB center code in FIG. 7 is represented by a circular box, and the inside of these rectangular boxes and circular models is filled with colors corresponding to RGB values.
在一个实施例中,RGB中心码外框线的颜色可以与所贴附的对象颜色不同,以与该对象进行区别,提高识别的准确率。如图8所示,当背景(对象)为白色时,RGB中心码的边框为黑色,当背景为黑色时,RGB中心码的边框为白色。同时,条码之间可以留有适当的间隙。In one embodiment, the color of the outer frame line of the RGB center code may be different from the color of the attached object to distinguish it from the object and improve the accuracy of recognition. As shown in Figure 8, when the background (object) is white, the border of the RGB center code is black, and when the background is black, the border of the RGB center code is white. At the same time, a proper gap can be left between the barcodes.
在一个实施例中,ABCD码与RGB码的位置关系可以如图9所示,图9为对象条码的示意图,该对象条码中包含有ABCD码和RGB码。如图9所示,ABCD码设置在RGB码的周围,在ABCD码的第一识别信息符合预设的条件之后,确定RGB码在ABCD码的内部。则扫描终端扫描ABCD码的内部,就可以获取对应的第二识别信息。In an embodiment, the positional relationship between the ABCD code and the RGB code may be as shown in FIG. 9, which is a schematic diagram of the target barcode, and the target barcode includes the ABCD code and the RGB code. As shown in FIG. 9, the ABCD code is set around the RGB code. After the first identification information of the ABCD code meets the preset condition, it is determined that the RGB code is inside the ABCD code. Then the scanning terminal scans the inside of the ABCD code to obtain the corresponding second identification information.
在一个实施例中,如图10所示,提供一种对象信息的识别方法,包括以下步骤:In an embodiment, as shown in FIG. 10, a method for identifying object information is provided, which includes the following steps:
S101、获取对象的第一彩色码的第一识别信息。S101. Acquire first identification information of the first color code of the object.
S102、获取预先确定的所述对象的第一彩色码信息;当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。S102. Obtain predetermined first color code information of the object; when the first identification information matches the first color code information, determine that the first identification information meets a preset condition.
S103、确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定。S103. Determine the position of the second color code of the object; the position is determined according to the first color code.
S104、根据所述位置确定所述第二彩色码的起始码和结束码;获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。S104. Determine the start code and the end code of the second color code according to the position; obtain the RGB center code between the start code and the end code, and determine the first color code according to the RGB value of the RGB center code 2. Identification information.
S105、获取预先建立的第二识别信息与对象信息的第一对应关系;根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别结果。S105. Obtain a pre-established first correspondence between the second identification information and the object information; determine the object information corresponding to the second identification information according to the first correspondence, and determine the object according to the corresponding object information The result of the information recognition.
本实施例,根据第一彩色码来确定第二彩色码的位置,能更容易地确定出第二彩色码的第二识别信息,进而可以获取到更准确的对象识别结果。In this embodiment, the position of the second color code is determined according to the first color code, so that the second identification information of the second color code can be determined more easily, and a more accurate object recognition result can be obtained.
为了更好地理解上述方法,以第一彩色码由ABCD四个颜色块组成,第二彩色码由起始码、结束码以及3个颜色块组成为例。以下详细阐述一个本发明对象信息的识别方法的应用实例,本应用实例同时启用ABCD码的定位码和安全码作用,并启用备用码。In order to better understand the above method, take the first color code consisting of four color blocks ABCD, and the second color code consisting of a start code, an end code, and three color blocks as an example. The following describes in detail an application example of the object information identification method of the present invention. This application example simultaneously enables the functions of the positioning code and the security code of the ABCD code, and enables the backup code.
假设某商品G的RGB码为“黄红黄”,对应的数值编码为646,ABCD码颜色“青青蓝绿”对应信息为3312。则识别商品G的商品信息的过程可以为:Assuming that the RGB code of a commodity G is "yellow red yellow", the corresponding numerical code is 646, and the corresponding information of the ABCD code color "cyan, blue, green" is 3312. Then the process of identifying the commodity information of commodity G can be:
1)根据预设的编码规则,处理单元为商品G生成对应的商品编码(即总识别信息),将商品编码转换成八进制数以及对应的彩色码。其中该彩色码包含有ABCD码和RGB码。由于RGB码中包含4和6两个数字,因此可以将商品编码确定为64633124或者64633126(为保证数据的唯一性,在确定8位编码的后5位时,将前3位设置为646,保证根据后5位就能唯一确定RGB中心码)。同时,将商品信息与商品编码进行绑定,存储到处理单元中。1) According to a preset coding rule, the processing unit generates a corresponding product code (ie total identification information) for the product G, and converts the product code into an octal number and the corresponding color code. The color code includes ABCD code and RGB code. Since the RGB code contains two numbers 4 and 6, the product code can be determined as 64633124 or 64633126 (to ensure the uniqueness of the data, when determining the last 5 digits of the 8-bit code, set the first 3 digits to 646 to ensure The RGB center code can be uniquely determined based on the last 5 digits). At the same time, the product information is bound to the product code and stored in the processing unit.
2)处理单元通过控制打印机将商品编号打印在商品G上。2) The processing unit prints the product number on the product G by controlling the printer.
3)摄像头依次捕捉商品G上的A、B、C和D码,将捕捉结果输入处理单元。处理单元 确定ABCD码的RGB值,并根据RGB值以及预设的对应关系确定ABCD码对应的第一识别信息,若所确定的第一识别信息为3312,则认为ABCD码符合预设的条件。3) The camera captures the A, B, C, and D codes on the product G in sequence, and inputs the capture result into the processing unit. The processing unit determines the RGB value of the ABCD code, and determines the first identification information corresponding to the ABCD code according to the RGB value and the preset correspondence relationship. If the determined first identification information is 3312, it is considered that the ABCD code meets the preset condition.
4)通过ABCD码进行快速定位,大致确定RGB码的位置在ABCD码的中间位置。4) Quickly locate the ABCD code, and roughly determine that the position of the RGB code is in the middle of the ABCD code.
5)扫描对应位置的RGB码,确定其中的起始码和结束码,进而识别起始码和结束码之间的RGB中心码。根据所确定的RGB中心码以及预设的对应关系确定RGB中心码对应的第二识别信息。5) Scan the RGB code at the corresponding position to determine the start code and end code, and then identify the RGB center code between the start code and the end code. The second identification information corresponding to the RGB center code is determined according to the determined RGB center code and the preset corresponding relationship.
6)若所确定的第二识别信息为646,则判定第二识别信息校验通过,获取与该商品编码对应的商品信息,作为商品G的信息识别结果。6) If the determined second identification information is 646, it is determined that the verification of the second identification information is passed, and the product information corresponding to the product code is acquired as the result of the information identification of the product G.
7)若不能直接正确读取RGB中心码,则启动备用码功能。由于ABCD码已经进行了安全认证,因此只需要正确读取RGB中心码的其中一种颜色即可,即黄色或者红色。根据ABCD+X的编码规则,备用码为33124或者33126。只要能读出其中一种,系统会根据内部编码规则,将其自动转化为与中心码646相等的对应商品,并确定对应的商品信息。7) If the RGB center code cannot be read directly, the backup code function will be activated. Since the ABCD code has been certified for safety, it is only necessary to correctly read one of the colors of the RGB center code, namely yellow or red. According to the ABCD+X coding rules, the backup code is 33124 or 33126. As long as one of them can be read, the system will automatically convert it into a corresponding product equal to the center code 646 according to the internal coding rules, and determine the corresponding product information.
8)处理单元将获取的商品信息推送给用户,用户通过显示器、打印机等输出设备查询该商品信息。8) The processing unit pushes the acquired product information to the user, and the user queries the product information through output devices such as displays and printers.
首先,相比于传统的直接识别RGB码,本实施例通过ABCD码作为定位、安全和备用码,大幅提高了彩色码的读取速度、安全等级以及容错率。其次,对摄像头的受众程度广,即对摄像头的清晰依赖度不高。如果摄像头清晰度低,可以使用大尺寸的ABCD码;如果是高清摄像头,可以使用小尺寸的ABCD码。另外,ABCD码经过预处理定位后,摄像头便会在这个区域内进行彩色条码的捕捉;可大大增加摄像头识别彩色条码的准确性,避免由包装盒颜色差异引起RGB定位不准或者对产品误判的情况。First of all, compared with the traditional direct recognition of RGB codes, this embodiment uses ABCD codes as positioning, security and backup codes, which greatly improves the reading speed, security level and error tolerance rate of color codes. Secondly, the audience for the camera is wide, that is, the degree of reliance on the clarity of the camera is not high. If the camera's resolution is low, you can use a large-size ABCD code; if it is a high-definition camera, you can use a small-size ABCD code. In addition, after the ABCD code is preprocessed and positioned, the camera will capture the color bar code in this area; it can greatly increase the accuracy of the camera to recognize the color bar code, and avoid the inaccurate RGB positioning or misjudgment of the product caused by the color difference of the packaging box Case.
需要说明的是,对于前述的各方法实施例,为了简便描述,将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。It should be noted that for the foregoing method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described sequence of actions, because According to the present invention, certain steps can be performed in other order or simultaneously.
基于与上述实施例中的对象信息的识别方法相同的思想,本发明还提供对象信息的识别装置,该装置可用于执行上述对象信息的识别方法。为了便于说明,对象信息的识别装置实施例的结构示意图中,仅仅示出了与本发明实施例相关的部分,本领域技术人员可以理解,图示结构并不构成对装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Based on the same idea as the object information recognition method in the above embodiment, the present invention also provides an object information recognition device, which can be used to execute the above object information recognition method. For ease of description, in the schematic structural diagram of the embodiment of the device for identifying object information, only the parts related to the embodiment of the present invention are shown. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include comparisons. More or fewer parts are shown, or some parts are combined, or different parts are arranged.
如图11所述,对象信息的识别装置包括彩色码获取模块111、位置确定模块112和识别模块113,详细说明如下:As shown in Fig. 11, the device for identifying object information includes a color code acquisition module 111, a position determination module 112, and an identification module 113. The detailed description is as follows:
彩色码获取模块111,用于获取对象的第一彩色码的第一识别信息。The color code acquisition module 111 is configured to acquire the first identification information of the first color code of the object.
位置确定模块112,用于当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定。The position determining module 112 is configured to determine the position of the second color code of the object when the first identification information meets a preset condition; the position is determined according to the first color code.
以及,识别模块113,用于获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。And, the identification module 113 is configured to obtain the second identification information of the second color code in the position, and determine the information identification result of the object according to the second identification information.
本实施例,根据第一彩色码来确定第二彩色码的位置,能更容易地确定出第二彩色码的第二识别信息,进而可以获取到更准确的对象识别结果。In this embodiment, the position of the second color code is determined according to the first color code, so that the second identification information of the second color code can be determined more easily, and a more accurate object recognition result can be obtained.
在一个实施例中,还包括:彩色码信息获取模块,用于获取预先确定的所述对象的第一彩色码信息;判定模块,用于当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。In one embodiment, it further includes: a color code information acquisition module, configured to acquire predetermined first color code information of the object; and a determination module, configured to determine whether the first identification information corresponds to the first color code information. When the information matches, it is determined that the first identification information meets a preset condition.
在一个实施例中,识别模块113,包括:对应关系确定子模块,用于获取预先建立的第二识别信息与对象信息的第一对应关系;第一识别子模块,用于根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别结果。In one embodiment, the identification module 113 includes: a correspondence determination sub-module, which is used to obtain a pre-established first correspondence relationship between the second identification information and the object information; the first identification sub-module is used to The correspondence relationship determines the object information corresponding to the second identification information, and the information identification result of the object is determined according to the corresponding object information.
在一个实施例中,识别模块113,包括:识别信息获取子模块,用于若所述第二识别信息获取失败,获取所述第二彩色码的部分识别信息;第二识别子模块,用于根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果。In one embodiment, the identification module 113 includes: an identification information acquisition sub-module, configured to acquire part of the identification information of the second color code if the acquisition of the second identification information fails; and a second identification sub-module for The information recognition result of the object is determined according to the first identification information and the partial identification information.
在一个实施例中,第二识别子模块,包括:备用信息确定单元,用于将所述第一识别信息与所述部分识别信息进行整合,得到备用识别信息;识别结果确定单元,用于当所述备用识别信息与预先确定的候选备用识别信息相匹配时,根据所述候选备用识别信息确定所述对象的信息识别结果。In one embodiment, the second identification sub-module includes: a spare information determining unit for integrating the first identification information with the partial identification information to obtain spare identification information; and an identification result determining unit for when When the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
在一个实施例中,识别模块113,包括:起始结束码确定子模块,用于根据所述位置确定所述第二彩色码的起始码和结束码;识别信息获取子模块,用于获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。In one embodiment, the identification module 113 includes: a start and end code determination sub-module for determining the start code and end code of the second color code according to the position; and an identification information acquisition sub-module for acquiring The RGB center code between the start code and the end code determines the second identification information according to the RGB value of the RGB center code.
在一个实施例中,识别信息获取子模块,包括:对应关系确定单元,用于获取预先建立的RGB值与数值编号的第二对应关系;识别信息确定单元,用于根据所述第二对应关系确定所述第二彩色码的数值编号,根据所述数值编号确定所述第二识别信息。In one embodiment, the identification information acquisition sub-module includes: a corresponding relationship determining unit, configured to acquire a pre-established second corresponding relationship between RGB values and numerical numbers; and an identification information determining unit, configured according to the second corresponding relationship The numerical number of the second color code is determined, and the second identification information is determined according to the numerical number.
需要说明的是,本发明的对象信息的识别装置与本发明的对象信息的识别方法一一对应,在上述对象信息的识别方法的实施例阐述的技术特征及其有益效果均适用于对象信息的识别装置的实施例中,具体内容可参见本发明方法实施例中的叙述,此处不再赘述,特此声明。It should be noted that the object information identification device of the present invention corresponds to the object information identification method of the present invention one-to-one, and the technical features and beneficial effects described in the embodiments of the object information identification method described above are all applicable to the object information identification method. In the embodiment of the identification device, the specific content can be referred to the description in the method embodiment of the present invention, which will not be repeated here, and it is hereby declared.
此外,上述示例的对象信息的识别装置的实施方式中,各程序模块的逻辑划分仅是举例说明,实际应用中可以根据需要,例如出于相应硬件的配置要求或者软件的实现的便利考虑, 将上述功能分配由不同的程序模块完成,即将所述对象信息的识别装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分功能。In addition, in the implementation of the device for identifying object information in the above example, the logical division of each program module is only an example. In actual applications, it can be used according to needs, for example, due to the configuration requirements of the corresponding hardware or the convenience of software implementation. The above function allocation is completed by different program modules, that is, the internal structure of the object information identification device is divided into different program modules to complete all or part of the functions described above.
本申请提供的对象信息的识别方法可以应用于如图12所示的计算机设备中。该计算机设备可以是服务器,其内部结构图可以如图12所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储第一识别信息、第二识别信息、第一对应关系、第二对应关系等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时实现一种对象信息的识别方法。The method for identifying object information provided in this application can be applied to a computer device as shown in FIG. 12. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 12. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store data such as the first identification information, the second identification information, the first correspondence relationship, and the second correspondence relationship. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying object information is realized.
本领域技术人员可以理解,图12中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:获取对象的第一彩色码的第一识别信息;当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the following steps are implemented: Obtain the first color of the object The first identification information of the code; when the first identification information meets a preset condition, the position of the second color code of the object is determined; the position is determined according to the first color code; the position in the The second identification information of the second color code determines the information identification result of the object according to the second identification information.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取预先确定的所述对象的第一彩色码信息;当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。In an embodiment, the processor further implements the following steps when executing the computer program: acquiring predetermined first color code information of the object; when the first identification information matches the first color code information, It is determined that the first identification information meets a preset condition.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取预先建立的第二识别信息与对象信息的第一对应关系;根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别结果。In one embodiment, the processor further implements the following steps when executing the computer program: acquiring a pre-established first correspondence between the second identification information and the object information; determining the correspondence with the second identification information according to the first correspondence According to the object information of the object, the information recognition result of the object is determined according to the corresponding object information.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:若所述第二识别信息获取失败,获取所述第二彩色码的部分识别信息;根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果。In one embodiment, the processor further implements the following steps when executing the computer program: if the acquisition of the second identification information fails, acquiring part of the identification information of the second color code; according to the first identification information and the part The identification information determines the information identification result of the object.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:将所述第一识别信息与所述部分识别信息进行整合,得到备用识别信息;当所述备用识别信息与预先确定的候选备用识别信息相匹配时,根据所述候选备用识别信息确定所述对象的信息识别结果。In one embodiment, the processor further implements the following steps when executing the computer program: integrating the first identification information with the partial identification information to obtain spare identification information; when the spare identification information is combined with a predetermined candidate spare When the identification information matches, the information identification result of the object is determined according to the candidate spare identification information.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:根据所述位置确定所述第 二彩色码的起始码和结束码;获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。In an embodiment, the processor further implements the following steps when executing the computer program: determining the start code and the end code of the second color code according to the position; obtaining the RGB center between the start code and the end code Code, the second identification information is determined according to the RGB value of the RGB center code.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取预先建立的RGB值与数值编号的第二对应关系;根据所述第二对应关系确定所述第二彩色码的数值编号,根据所述数值编号确定所述第二识别信息。In one embodiment, the processor further implements the following steps when executing the computer program: obtaining a pre-established second correspondence between RGB values and numerical numbers; determining the numerical numbers of the second color codes according to the second correspondence, The second identification information is determined according to the numerical number.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:获取对象的第一彩色码的第一识别信息;当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。In one embodiment, a computer-readable storage medium is provided, and a computer program is stored thereon. When the computer program is executed by a processor, the following steps are implemented: acquiring first identification information of a first color code of an object; When the first identification information meets a preset condition, determine the position of the second color code of the object; determine the position according to the first color code; acquire the second identification information of the second color code in the position, The information identification result of the object is determined according to the second identification information.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:获取预先确定的所述对象的第一彩色码信息;当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining the predetermined first color code information of the object; when the first identification information matches the first color code information , Determining that the first identification information meets a preset condition.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:获取预先建立的第二识别信息与对象信息的第一对应关系;根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别结果。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: acquiring a pre-established first corresponding relationship between the second identification information and the object information; determining the relationship with the second identification information according to the first corresponding relationship The corresponding object information determines the information recognition result of the object according to the corresponding object information.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若所述第二识别信息获取失败,获取所述第二彩色码的部分识别信息;根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the acquisition of the second identification information fails, acquiring part of the identification information of the second color code; according to the first identification information and the The partial identification information determines the information identification result of the object.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:将所述第一识别信息与所述部分识别信息进行整合,得到备用识别信息;当所述备用识别信息与预先确定的候选备用识别信息相匹配时,根据所述候选备用识别信息确定所述对象的信息识别结果。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: integrating the first identification information with the partial identification information to obtain spare identification information; when the spare identification information is matched with a predetermined candidate When the spare identification information matches, the information identification result of the object is determined according to the candidate spare identification information.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:根据所述位置确定所述第二彩色码的起始码和结束码;获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determine the start code and end code of the second color code according to the position; obtain the RGB between the start code and the end code The center code determines the second identification information according to the RGB value of the RGB center code.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:获取预先建立的RGB值与数值编号的第二对应关系;根据所述第二对应关系确定所述第二彩色码的数值编号,根据所述数值编号确定所述第二识别信息。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining a pre-established second correspondence between RGB values and numerical numbers; and determining the numerical numbers of the second color codes according to the second correspondences , Determining the second identification information according to the numerical number.
本领域普通技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,作为独立的产品销售或使用。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具 有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer readable storage medium, as Independent product sales or use. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) with one or more wiring, portable computer disk cases (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable and editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, because it can be used, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable media if necessary. The program is processed in a way to obtain the program electronically and then stored in the computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if it is implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: Discrete logic circuits, application-specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
本发明实施例的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或(模块)单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "including" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or (module) units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optional The ground also includes other steps or units inherent to these processes, methods, products, or equipment.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered as the scope of this specification.
以上所述实施例仅表达了本发明的几种实施方式,不能理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several embodiments of the present invention, and cannot be understood as a limitation of the patent scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

Claims (10)

  1. 一种对象信息的识别方法,其特征在于,包括以下步骤:A method for identifying object information, which is characterized in that it comprises the following steps:
    获取对象的第一彩色码的第一识别信息;Acquiring the first identification information of the first color code of the object;
    当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;When the first identification information meets a preset condition, determine the position of the second color code of the object; the position is determined according to the first color code;
    获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。The second identification information of the second color code in the position is acquired, and the information identification result of the object is determined according to the second identification information.
  2. 根据权利要求1所述的对象信息的识别方法,其特征在于,所述当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置的步骤之前,还包括:The method for identifying object information according to claim 1, wherein before the step of determining the position of the second color code of the object when the first identification information meets a preset condition, the method further comprises:
    获取预先确定的所述对象的第一彩色码信息;Acquiring predetermined first color code information of the object;
    当所述第一识别信息与所述第一彩色码信息相匹配时,判定所述第一识别信息符合预设条件。When the first identification information matches the first color code information, it is determined that the first identification information meets a preset condition.
  3. 根据权利要求1所述的对象信息的识别方法,其特征在于,所述根据所述第二识别信息确定所述对象的信息识别结果的步骤,包括:The method for identifying object information according to claim 1, wherein the step of determining an information identification result of the object according to the second identification information comprises:
    获取预先建立的第二识别信息与对象信息的第一对应关系;Acquiring the pre-established first correspondence between the second identification information and the object information;
    根据所述第一对应关系确定与所述第二识别信息对应的对象信息,根据所述对应的对象信息确定所述对象的信息识别结果。The object information corresponding to the second identification information is determined according to the first correspondence, and the information identification result of the object is determined according to the corresponding object information.
  4. 根据权利要求1所述的对象信息的识别方法,其特征在于,所述获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果的步骤,包括:The method for identifying object information according to claim 1, wherein the second identification information of the second color code in the position is acquired, and the information identification result of the object is determined according to the second identification information The steps include:
    若所述第二识别信息获取失败,获取所述第二彩色码的部分识别信息;If the acquisition of the second identification information fails, acquiring part of the identification information of the second color code;
    根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果。The information recognition result of the object is determined according to the first identification information and the partial identification information.
  5. 根据权利要求4所述的对象信息的识别方法,其特征在于,所述根据所述第一识别信息和所述部分识别信息确定所述对象的信息识别结果的步骤,包括:The method for identifying object information according to claim 4, wherein the step of determining an information identification result of the object according to the first identification information and the partial identification information comprises:
    将所述第一识别信息与所述部分识别信息进行整合,得到备用识别信息;Integrating the first identification information with the partial identification information to obtain spare identification information;
    当所述备用识别信息与预先确定的候选备用识别信息相匹配时,根据所述候选备用识别信息确定所述对象的信息识别结果。When the spare identification information matches the predetermined candidate spare identification information, the information identification result of the object is determined according to the candidate spare identification information.
  6. 根据权利要求1至5任一项所述的对象信息的识别方法,其特征在于,所述第二彩色码包括:起始码、结束码和RGB中心码;The method for identifying object information according to any one of claims 1 to 5, wherein the second color code includes: a start code, an end code, and an RGB center code;
    所述获取所述位置中的第二彩色码的第二识别信息的步骤,包括:The step of obtaining the second identification information of the second color code in the position includes:
    根据所述位置确定所述第二彩色码的起始码和结束码;Determining the start code and the end code of the second color code according to the position;
    获取所述起始码和结束码之间的RGB中心码,根据所述RGB中心码的RGB值确定所述第二识别信息。The RGB center code between the start code and the end code is acquired, and the second identification information is determined according to the RGB value of the RGB center code.
  7. 根据权利要求6所述的对象信息的识别方法,其特征在于,所述根据所述RGB中心码的RGB值确定所述第二识别信息的步骤,包括:The method for identifying object information according to claim 6, wherein the step of determining the second identification information according to the RGB value of the RGB center code comprises:
    获取预先建立的RGB值与数值编号的第二对应关系;Acquiring a second correspondence relationship between a pre-established RGB value and a numerical number;
    根据所述第二对应关系确定所述第二彩色码的数值编号,根据所述数值编号确定所述第二识别信息。The numerical value of the second color code is determined according to the second correspondence, and the second identification information is determined according to the numerical value.
  8. 一种对象信息的识别装置,其特征在于,包括:A device for identifying object information, characterized in that it comprises:
    彩色码获取模块,用于获取对象的第一彩色码的第一识别信息;The color code acquisition module is used to acquire the first identification information of the first color code of the object;
    位置确定模块,用于当所述第一识别信息符合预设条件时,确定所述对象的第二彩色码的位置;所述位置根据所述第一彩色码确定;A position determining module, configured to determine the position of the second color code of the object when the first identification information meets a preset condition; the position is determined according to the first color code;
    以及,识别模块,用于获取所述位置中的第二彩色码的第二识别信息,根据所述第二识别信息确定所述对象的信息识别结果。And, the identification module is configured to obtain the second identification information of the second color code in the position, and determine the information identification result of the object according to the second identification information.
  9. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7任一项所述的方法的步骤。A computer device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor implements the computer program described in any one of claims 1 to 7 when the processor executes the computer program. The steps of the method described.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7任一项所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by a processor.
PCT/CN2019/120365 2019-11-22 2019-11-22 Method and apparatus for identifying object information, computer device, and storage medium WO2021097830A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/120365 WO2021097830A1 (en) 2019-11-22 2019-11-22 Method and apparatus for identifying object information, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/120365 WO2021097830A1 (en) 2019-11-22 2019-11-22 Method and apparatus for identifying object information, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021097830A1 true WO2021097830A1 (en) 2021-05-27

Family

ID=75981156

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120365 WO2021097830A1 (en) 2019-11-22 2019-11-22 Method and apparatus for identifying object information, computer device, and storage medium

Country Status (1)

Country Link
WO (1) WO2021097830A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5576528A (en) * 1994-12-23 1996-11-19 Symbol Technologies, Inc. Color processing for bar code symbol compaction
CN102999773A (en) * 2012-12-04 2013-03-27 申可佳 Colorful lattice point code picture and three-dimensional bar code coding method thereof
CN104657768A (en) * 2015-03-20 2015-05-27 华中科技大学 Colorful three-dimensional code structure and colorful three-dimensional code reading method
CN109117686A (en) * 2018-08-17 2019-01-01 连云港伍江数码科技有限公司 Recognition methods, device, computer equipment and the storage medium of object information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5576528A (en) * 1994-12-23 1996-11-19 Symbol Technologies, Inc. Color processing for bar code symbol compaction
CN102999773A (en) * 2012-12-04 2013-03-27 申可佳 Colorful lattice point code picture and three-dimensional bar code coding method thereof
CN104657768A (en) * 2015-03-20 2015-05-27 华中科技大学 Colorful three-dimensional code structure and colorful three-dimensional code reading method
CN109117686A (en) * 2018-08-17 2019-01-01 连云港伍江数码科技有限公司 Recognition methods, device, computer equipment and the storage medium of object information

Similar Documents

Publication Publication Date Title
US11630968B2 (en) Matrix barcode having a plurality of colors and a least prevalent color
US11798194B2 (en) System and method using a histogram and colorspaces to generate a matrix barcode having a plurality of colors and an infrared layer
US11799484B2 (en) System and method using a histogram and colorspaces to generate a matrix barcode having a plurality of colors and an ultraviolet layer
US10762371B1 (en) Object detection techniques using colorspace conversions
US10833852B1 (en) Encoded data along tape based on colorspace schemes
CN109117686B (en) Object information identification method and device, computer equipment and storage medium
US20110002535A1 (en) Non-product image identification
US11636779B2 (en) Method, apparatus and terminal device for constructing parts together
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
US9239230B2 (en) Computing device and method for measuring widths of measured parts
WO2021097830A1 (en) Method and apparatus for identifying object information, computer device, and storage medium
CN110719382B (en) Color replacement method and device
US10096128B2 (en) Change degree deriving device, change degree deriving system, and non-transitory computer readable medium
CN113033297A (en) Object programming method, device, equipment and storage medium
WO2020135097A1 (en) Method and apparatus for channel switch detection of display terminal
KR101484003B1 (en) Evaluating system for face analysis
US11449699B2 (en) Information code reading system
US20210378379A1 (en) Scalp monitoring method, smart hair dryer and readable storage medium
US11657187B2 (en) Method for displaying screen information, display device, and storage medium
WO2024062844A1 (en) Information code, code generation method, and code reading method
CN113837017A (en) Cosmetic progress detection method, device, equipment and storage medium
US9380188B1 (en) Apparatus and method for improving color accuracy in a scan
CN114386552A (en) Bar code generating method, bar code reading method, bar code generating device, bar code reading device and computer readable storage medium
CN114419052A (en) Tooth color number identification method, device, equipment and storage medium
CN117636790A (en) Auxiliary correction method and device for display screen, terminal equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19952984

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19952984

Country of ref document: EP

Kind code of ref document: A1