A label modeling method, device, storage medium and electronic device

By annotating the tag documents and converting their RGB space into HSV space, determining the location information of the annotated area, the problem of modeling different types of tags is solved, and the rapid, simple and universal tag digital modeling effect is achieved.

CN114648644BActive Publication Date: 2025-05-06LCFC HEFEI ELECTRONICS TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210234210.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2025-05-06
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

The prior art is difficult to quickly, simply and universally model different types of tags, especially label modeling for non-literal or non-bill documents, with limitations.

Method used

By annotating the key information on the tag document, converting it into a picture and converting its RGB space into HSV space, using the H space to determine the location information of the annotated area, extracting the key information and modeling.

Benefits of technology

It realizes fast, simple and universal digital modeling of tags, can effectively extract text, images and barcode information, and is suitable for tags in different formats, and is highly robust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114648644B_ABST
    Figure CN114648644B_ABST
Patent Text Reader

Abstract

The present invention discloses a label modeling method, device, storage medium and electronic device, which relates to the technical field of information processing. The method includes: obtaining a label document, marking key information on the label document to obtain at least one marked area, and converting the label document into a picture to obtain a picture to be extracted; converting the RGB space of the picture to be extracted into an HSV space, and extracting the H space in the HSV space; determining the position information of the marked area according to the H space; extracting the key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode; modeling the label according to the position information of the marked area and the extraction result. The label modeling method provided by this scheme is fast, simple, easy to implement and highly versatile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information processing, and in particular to a label modeling method, device, storage medium and electronic device. Background Art

[0002] In digital factories, an indispensable part of the task of label attachment and detection is the digital modeling of labels. The digital modeling of labels refers to associating the key information of the label with the position of the key information on the label, that is, according to the label model, we can know which key information is set at which position of the label. However, different products, different models, and different attachment positions will cause the labels to change. Even the same labels of the same type have different PN / SN serial numbers, which brings great challenges to the digital modeling of labels. In order to promote the rapid and orderly development of digital intelligent factories, a fast, simple, easy and universal digital modeling method for labels is imperative.

[0003] At present, the label modeling scheme can only extract information from documents in specific formats such as text documents or bills, obtain text information and store it. If it is a non-text or non-bill document, the existing scheme has limitations. Summary of the invention

[0004] The present invention provides a label modeling method, device, storage medium and electronic device to at least solve the above technical problems existing in the prior art.

[0005] One aspect of the present invention provides a label modeling method, the method comprising:

[0006] Acquire a label document, annotate key information on the label document to obtain at least one annotated area, and convert the label document into a picture to obtain a picture to be extracted;

[0007] Convert the RGB space of the image to be extracted into the HSV space, and extract the H space in the HSV space;

[0008] Determine the position information of the marked area according to the H space;

[0009] Extracting key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode;

[0010] The label is modeled according to the position information of the marked area and the extraction result.

[0011] In one possible implementation manner, the marking of key information on the label document includes:

[0012] A layer is added to the label document, and key information of the text area, key information of the image area and key information of the barcode area of ​​the label document are marked respectively.

[0013] In one possible implementation manner, the key information of the text area, image area and barcode area are respectively marked with rectangular boxes of different colors, and each rectangular box is a marked area.

[0014] In one possible implementation manner, determining the position information of the marked area according to the H space includes:

[0015] The H space is screened according to the color threshold to determine the position information of the marked areas of the text area, the image area and the barcode area.

[0016] In one possible implementation manner, determining the location information of the marked area includes:

[0017] Determine first coordinate data of the marked area in the image to be extracted, the coordinate data including the coordinates of one of the vertices of the rectangular frame, and the length and width of the rectangular frame;

[0018] The first coordinate data is mapped to the label document to obtain second coordinate data.

[0019] In one possible implementation manner, extracting key information of the marked area according to the position information of the marked area to obtain an extraction result includes:

[0020] Performing text recognition on the text area to obtain text information; and / or

[0021] Extracting features from the image area to obtain feature point information; and / or

[0022] The barcode area is subjected to barcode recognition to obtain barcode-related information.

[0023] Another aspect of the present invention provides a label modeling device, the device comprising:

[0024] An acquisition module is used to acquire a label document, mark key information on the label document to obtain at least one marked area, and convert the label document into a picture to obtain a picture to be extracted;

[0025] A conversion module, used to convert the RGB space of the image to be extracted into the HSV space, and extract the H space in the HSV space;

[0026] A determination module, used to determine the position information of the marked area according to the H space;

[0027] An extraction module, used to extract key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode;

[0028] A modeling module is used to model the label according to the position information of the marked area and the extraction result.

[0029] In one possible implementation, the extraction module includes:

[0030] a text extraction unit, used to perform text recognition on the text area to obtain text information; and / or

[0031] An image extraction unit, used to extract features from the image area to obtain feature point information; and / or

[0032] The barcode extraction unit is used to perform barcode recognition on the barcode area to obtain barcode-related information.

[0033] Another aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the label modeling method described in the present invention.

[0034] Another aspect of the present invention provides an electronic device, comprising:

[0035] processor;

[0036] a memory for storing instructions executable by the processor;

[0037] The processor is used to read the executable instructions from the memory and execute the instructions to implement the label modeling method of the present invention.

[0038] In the above scheme of the present invention, by annotating the key information on the label document in advance, on the one hand, the annotated key information is concise and effective, and on the other hand, there is no formatting requirement for the label, and it is not affected by formatted texts such as tables and images; the image to be extracted corresponding to the label document is converted from RGB space to HSV space, and the H space in the HSV space is extracted, and the position information of the annotated area is determined according to the H space. This scheme determines the position information of the annotated area through the H space, which is very simple and effective for image segmentation, and has extremely high robustness. Further extract the key information of the annotated area to obtain the extraction result, and finally model the label according to the position information of the annotated area and the extraction result. Therefore, the label modeling method provided by this scheme is fast, simple, easy to use and highly versatile. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1A schematic diagram showing a flow chart of a label modeling method provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram showing a label document provided by an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of labeling a label document provided by an embodiment of the present invention is shown;

[0042] Figure 4 A schematic diagram of a label modeling device provided by an embodiment of the present invention is shown;

[0043] Figure 5 A schematic diagram of a label modeling device provided by yet another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0044] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] like Figure 1 A schematic flow chart of a label modeling method provided by an embodiment of the present invention is shown, and the method includes:

[0046] Step S101: obtain a label document, annotate key information on the label document to obtain at least one annotated area, and convert the label document into a picture to obtain a picture to be extracted.

[0047] After the label is designed, it is generally saved in a format that is not easy to modify, such as a PDF file. The format of the label document is not limited to PDF. The key information on the label document refers to the information that can clearly know which information in the label document can be used to uniquely identify the label, and the information that can be used to uniquely identify the label is taken as the key information. There can be one or more key information on a label document. If there is only one key information on the label document, a marking area can be obtained; if there are multiple key information on the label document, multiple marking areas can be obtained. The label document can be marked manually by the designer or by a machine. The present invention does not impose any restrictions on this, as long as the key information on the label document can be marked. For labels with inconsistent information arrangement, manual marking is preferred; for labels with uniform information arrangement and certain established rules, a machine is preferred, and the same marking template is used for marking, thereby improving marking efficiency.

[0048] Convert the label document to a picture format according to a certain dpi (dots per inch), such as PNG, JPG, TIF, etc., to obtain the picture to be extracted. Figure 2 The following is a schematic diagram of a label document. Figure 3 This is a schematic diagram after marking on the label drawing, where "P / N: SL10Z36133" is the key information in the text area, so the text area is marked with a rectangular frame.

[0049] Step S102: convert the RGB space of the image to be extracted into the HSV space, and extract the H space in the HSV space.

[0050] HSV space is a color space created based on the intuitive characteristics of color, where H is hue, S is saturation, and V is lightness. The hue space H is measured by angle, and its value range is 0° to 360°. Starting from red and counting in a counterclockwise direction, red is 0°, green is 120°, and blue is 240°. Their complementary colors are: yellow is 60°, cyan is 180°, and magenta is 300°. Convert from RGB to HSV space according to the following method:

[0051] R'=R / 255

[0052] G'=G / 255

[0053] B'=B / 255

[0054] Cmax=max(R',G',B')

[0055] Cmin=min(R',G',B')

[0056] △=Cmax-Cmin

[0057]

[0058] After converting the RGB of the image to be extracted into the HSV space according to the above method, the H space in the HSV space is extracted.

[0059] Step S103: determining the position information of the marked area according to the H space.

[0060] The marked area is the area marked on the label document in step S101 , and the position information of the marked area on the label document is determined by the extracted H space.

[0061] Step S104: extract key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode.

[0062] The key information includes one or more of text, image, and barcode. The marked area corresponding to the text is the text area, the marked area corresponding to the image is the image area, and the marked area corresponding to the barcode is the barcode area. The key information of the text area, image area, and barcode area on the label document is extracted to obtain the extraction result.

[0063] Step S105: Modeling the label according to the position information of the marked area and the extraction result.

[0064] Because the position information of the marked area and the extraction result are in a one-to-one correspondence, according to the established label model, we can know which key information is set at which position of the label. The established label model is further used for label detection, such as detecting whether the label is attached correctly, detecting whether the label content is defective, etc.

[0065] In the above scheme of the present invention, by annotating the key information on the label document in advance, on the one hand, the annotated key information is concise and effective, and on the other hand, there is no formatting requirement for the label, and it is not affected by formatted texts such as tables and images; the image to be extracted corresponding to the label document is converted from RGB space to HSV space, and the H space in the HSV space is extracted, and the position information of the annotated area is determined according to the H space. This scheme determines the position information of the annotated area through the H space, which is very simple and effective for image segmentation, and has extremely high robustness. Further extract the key information of the annotated area to obtain the extraction result, and finally model the label according to the position information of the annotated area and the extraction result. Therefore, the label modeling method provided by this scheme is fast, simple, easy to use and highly versatile.

[0066] In one example, marking the key information on the label document includes:

[0067] A layer is added to the label document, and key information of the text area, key information of the image area and key information of the barcode area of ​​the label document are marked respectively.

[0068] By marking the key information on the label document by adding another layer to the label document, the original label document will not be damaged. In addition, since the key information of the text area, image area and barcode area is extracted in different ways, the text area, image area and barcode area are marked separately to distinguish different areas.

[0069] In one example, the key information of the text area, image area and barcode area are marked with rectangular boxes of different colors, respectively, and each rectangular box is a marked area.

[0070] The text area, image area and barcode area on the label document are marked with rectangular frames of different colors, for example, the text area is marked with a red rectangular frame, the image area is marked with a green rectangular frame, and the barcode area is marked with a blue rectangular frame.

[0071] In one example, determining the position information of the marked area according to the H space includes:

[0072] The H space is screened according to the color threshold to determine the position information of the marked areas of the text area, the image area and the barcode area.

[0073] In H space, the text area, image area and barcode area in the marked area are determined according to different thresholds of different colors. For example, red is 0° in H space, and 0° represents pure red, so the red threshold can be set to 350°-10°, that is, floating 10° above and below pure red 0°. According to the above example, because the text area on the label is marked with a red rectangular frame, the image area is marked with a green rectangular frame, and the barcode area is marked with a blue rectangular frame, the red threshold can be used to determine the red rectangular frame on the label, that is, the text area on the label; the green threshold can be used to determine the green rectangular frame on the label, that is, the image area on the label; and the blue threshold can be used to determine the blue rectangular frame on the label, that is, the barcode area on the label.

[0074] In one example, determining the location information of the marked area includes:

[0075] Determine first coordinate data of the marked area in the image to be extracted, the coordinate data including the coordinates of one of the vertices of the rectangular frame, and the length and width of the rectangular frame;

[0076] The first coordinate data is mapped to the label document to obtain second coordinate data.

[0077] After the label document is converted into the image to be extracted in the image format, the first coordinate data of the annotated area is determined as the pixel coordinates according to the pixel points of the image to be extracted. Since the annotated area is annotated by a rectangular frame, the pixel coordinates of the rectangular frame are the pixel coordinates of the annotated area. For example, the first coordinate data of the annotated area can be represented by (x, y, w, h), where (x, y) represents the coordinates of one of the vertices of the rectangular frame, such as the upper left corner vertex, the upper right corner vertex, the lower left corner vertex, and the lower right corner vertex, w represents the length of the rectangular frame, and h represents the width of the rectangular frame. After the red rectangular frame, the green rectangular frame, and the blue rectangular frame on the image to be extracted are determined, the first coordinate data of each rectangular frame can be determined according to the pixel points of the image to be extracted, and the pixel coordinates of the annotated area can be determined.

[0078] The second coordinate data on the label document is the actual coordinate of the marked area, and the second coordinate data is expressed in a specific unit of size, for example, mm. The second coordinate data can be obtained by mapping the first coordinate data of the marked area to the label document. The actual coordinates of the marked area can be determined by unit conversion, and the actual coordinates = pixel coordinates × 304.8 / dpi, where 304.8 is the conversion constant between feet and mm, that is, 1 foot = 304.8mm, and dpi (dots per inch) is the dpi of the image to be extracted. Assuming the dpi is 300, the actual coordinates of the marked area are (x×304.8 / 300, y×304.8 / 300, w×304.8 / 300, h×304.8 / 300), in mm.

[0079] In one example, extracting key information of the marked area according to the position information of the marked area includes:

[0080] Performing text recognition on the text area to obtain text information; and / or

[0081] Extracting features from the image area to obtain feature point information; and / or

[0082] The barcode area is subjected to barcode recognition to obtain barcode-related information.

[0083] The text area is recognized by OCR (Optical Character Recognition) to obtain text information, and the recognized text information is saved, for example, in an Excel file; at the same time, the key information in the text area, i.e. the red rectangular box, is marked as being extracted by OCR recognition.

[0084] Feature extraction is performed on the image area to obtain feature point information. Feature points are relatively prominent points in the image, such as corner points, contour points, bright spots in darker areas, dark spots in brighter areas, etc. Feature extraction methods are SIFT (Scale-invariant feature transform), SURF (Speeded Up Robust Features), ORB (Oriented Fast and Rotated Brief) and other technologies for feature extraction, and the extracted feature point information is saved. For example, the feature point information is saved in a yml file, because the file with yml as the suffix is ​​an intuitive data serialization format that can be recognized by computers, and is easy to read, easy to interact with scripting languages, and can be imported by different programming language programs that support the YAML library. In addition, the key information in the image area marked in the green rectangular box is extracted by feature extraction.

[0085] Perform barcode recognition on the barcode area, obtain the information associated with the barcode and save it, for example, in an Excel file. The information associated with the barcode is product information, product name, product model, etc. Barcodes include barcodes and QR codes, etc. Barcodes are designed to realize automatic scanning of information. It is an effective means to quickly, accurately and reliably collect data. Barcodes are multiple black bars and blanks of varying widths and characters, etc., arranged according to certain coding rules to express a group of information. The key information extraction method marked in the barcode area, i.e. the blue rectangular box, is barcode recognition.

[0086] The extraction results of the text area, image area, and barcode area are summarized to obtain an excel file and a yml file. The excel file stores the location information of the annotated area, the extraction results, the annotated area type, i.e., whether the annotated area is a text area, an image area, or a barcode area, and also includes the extraction method corresponding to the annotated area type. The excel file generates structured data text according to the format parsing, and the parsing generates an xml file. The yml file stores the feature point information and feature point extraction method of each image area, such as the pattern information of the logo on the label is stored in the yml file.

[0087] like Figure 4 FIG. 1 is a label modeling device provided by an embodiment of the present invention, the device comprising:

[0088] The acquisition module 10 is used to acquire a label document, mark key information on the label document to obtain at least one marked area, and convert the label document into a picture to obtain a picture to be extracted;

[0089] A conversion module 20, used to convert the RGB space of the image to be extracted into the HSV space, and extract the H space in the HSV space;

[0090] A determination module 30, configured to determine the position information of the marked area according to the H space;

[0091] An extraction module 40 is used to extract key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode;

[0092] The modeling module 50 is used to model the label according to the position information of the marked area and the extraction result.

[0093] In the above scheme of the present invention, the label document is obtained through the acquisition module and the key information on the label document is annotated in advance. On the one hand, the annotated key information is concise and effective, and on the other hand, there is no formatting requirement for the label, and it is not affected by formatted texts such as tables and images; the picture to be extracted corresponding to the label document; the picture to be extracted is converted from RGB space to HSV space through the conversion module, and the H space in the HSV space is extracted, and the position information of the annotated area is determined according to the H space. This scheme determines the position information of the annotated area according to the H space through the determination module, which is very simple and effective for image segmentation, and has extremely high robustness. The key information of the annotated area is further extracted through the extraction module to obtain the extraction result, and finally the modeling module models the label according to the position information of the annotated area and the extraction result. Therefore, the label modeling method provided by this scheme has the effect of being fast, simple, easy to implement and highly versatile.

[0094] In one example, the acquisition module 10 is further used to add a layer on the label document to mark the key information of the text area, the key information of the image area and the key information of the barcode area of ​​the label document respectively.

[0095] Labeling the label document by adding an additional layer will not damage the original label document. In addition, since the key information of the text area, image area and barcode area is extracted in different ways, the text area, image area and barcode area are marked separately to distinguish different areas.

[0096] In one example, the key information of the text area, image area and barcode area are marked with rectangular boxes of different colors, respectively, and each rectangular box is a marked area.

[0097] For example, the text area is marked with a red rectangle, the image area is marked with a green rectangle, and the barcode area is marked with a blue rectangle.

[0098] In one example, the conversion module 20 converts the image to be extracted from RGB to HSV space according to the following method:

[0099] R'=R / 255

[0100] G'=G / 255

[0101] B'=B / 255

[0102] Cmax=max(R',G',B')

[0103] Cmin=min(R',G',B')

[0104] △=Cmax-Cmin

[0105]

[0106] The conversion module 20 converts the RGB of the image to be extracted into the HSV space, and then extracts the H space in the HSV space.

[0107] In one example, the determination module 30 is used to filter in the H space according to a color threshold to determine the position information of the marked areas of the text area, the image area and the barcode area.

[0108] Figure 5 A schematic diagram of a label modeling device provided by another embodiment of the present invention is shown, wherein the determination module 30 includes:

[0109] A first determining unit 301 is used to determine first coordinate data of the marked area in the image to be extracted, wherein the coordinate data includes the coordinates of one vertex of the rectangular frame, and the length and width of the rectangular frame;

[0110] The second determining unit 302 is configured to map the first coordinate data to the label document to obtain second coordinate data.

[0111] In one example, the extraction module 40 includes:

[0112] A text extraction unit 401 is used to perform text recognition on the text area to obtain text information; and / or

[0113] An image extraction unit 402 is used to extract features from the image area to obtain feature point information; and / or

[0114] The barcode extraction unit 403 is used to perform barcode recognition on the barcode area to obtain barcode associated information.

[0115] The present invention also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the label modeling method described in the present invention.

[0116] Another aspect of the present invention provides an electronic device, comprising:

[0117] processor;

[0118] a memory for storing instructions executable by the processor;

[0119] The processor is used to read the executable instructions from the memory and execute the instructions to implement the label modeling method of the present invention.

[0120] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0121] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0122] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0123] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0124] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0125] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0126] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0127] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0128] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A label modeling method, characterized in that: The method includes: Acquire a label document, annotate key information on the label document to obtain at least one annotated area, and convert the label document into a picture to obtain a picture to be extracted; Convert the RGB space of the image to be extracted into the HSV space, and extract the H space in the HSV space; Determine the position information of the marked area according to the H space; Extracting key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode; Modeling the label according to the position information of the marked area and the extraction result; Among them, determining the position information of the marked area includes: determining the first coordinate data of the marked area in the image to be extracted, the coordinate data including the coordinates of one of the vertices of the rectangular box, the length and width of the rectangular box; mapping the first coordinate data to the label document to obtain the second coordinate data.

2. The method according to claim 1, characterized in that The marking of key information on the label document includes: A layer is added to the label document, and key information of the text area, key information of the image area and key information of the barcode area of ​​the label document are marked respectively.

3. The method according to claim 2, characterized in that The key information of the text area, image area and barcode area are marked with rectangular boxes of different colors, and each rectangular box is a marked area.

4. The method according to claim 1, characterized in that: The step of extracting key information of the marked area according to the position information of the marked area to obtain an extraction result includes: Performing text recognition on the text area to obtain text information; and / or Extract features from the image area to obtain feature point information; and / or Perform barcode recognition on the barcode area to obtain barcode-related information.

5. A label modeling device, characterized in that: The device includes: An acquisition module is used to acquire a label document, mark key information on the label document to obtain at least one marked area, and convert the label document into a picture to obtain a picture to be extracted; A conversion module, used to convert the RGB space of the image to be extracted into the HSV space, and extract the H space in the HSV space; A determination module, used to determine the position information of the marked area according to the H space; An extraction module, used to extract key information of the marked area according to the position information of the marked area to obtain an extraction result, wherein the key information includes one or more of text, image, and barcode; A modeling module, used for modeling the label according to the position information of the marked area and the extraction result; Among them, the determination module includes: a first determination unit, used to determine the first coordinate data of the marked area in the picture to be extracted, and the coordinate data includes the coordinates of one of the vertices of the rectangular box, the length and width of the rectangular box; a second determination unit, used to map the first coordinate data to the label document to obtain second coordinate data.

6. The device according to claim 5, characterized in that The extraction module comprises: A text extraction unit, used to perform text recognition on the text area to obtain text information; and / or An image extraction unit, used to extract features from an image area to obtain feature point information; and / or The barcode extraction unit is used to perform barcode recognition on the barcode area to obtain barcode-related information.

7. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the label modeling method according to any one of claims 1 to 4.

8. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the label modeling method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Asset tracking of communication equipment via mixed reality based labeling

    US20210374406A1