WO2020223929A1 - 木塞编码方法及装置、木塞追溯方法及装置、电子设备 - Google Patents

木塞编码方法及装置、木塞追溯方法及装置、电子设备 Download PDF

Info

Publication number
WO2020223929A1
WO2020223929A1 PCT/CN2019/086034 CN2019086034W WO2020223929A1 WO 2020223929 A1 WO2020223929 A1 WO 2020223929A1 CN 2019086034 W CN2019086034 W CN 2019086034W WO 2020223929 A1 WO2020223929 A1 WO 2020223929A1
Authority
WO
WIPO (PCT)
Prior art keywords
original
cork
character code
database
texture feature
Prior art date
Application number
PCT/CN2019/086034
Other languages
English (en)
French (fr)
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 US15/734,698 priority Critical patent/US20210233264A1/en
Priority to PCT/CN2019/086034 priority patent/WO2020223929A1/zh
Priority to CN201980072027.2A priority patent/CN113016020B/zh
Publication of WO2020223929A1 publication Critical patent/WO2020223929A1/zh

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D39/00Closures arranged within necks or pouring openings or in discharge apertures, e.g. stoppers
    • B65D39/0052Closures arranged within necks or pouring openings or in discharge apertures, e.g. stoppers made in more than one piece
    • B65D39/0058Closures arranged within necks or pouring openings or in discharge apertures, e.g. stoppers made in more than one piece from natural or synthetic cork, e.g. for wine bottles or the like
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/63Scene text, e.g. street names
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/19007Matching; Proximity measures
    • G06V30/19013Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09FDISPLAYING; ADVERTISING; SIGNS; LABELS OR NAME-PLATES; SEALS
    • G09F3/00Labels, tag tickets, or similar identification or indication means; Seals; Postage or like stamps
    • G09F3/02Forms or constructions
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D2203/00Decoration means, markings, information elements, contents indicators
    • B65D2203/12Audible, olfactory or visual signalling means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30128Food products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • This application relates to the technical field of red wine, in particular to a cork coding method and device, a cork traceability method and device, and electronic equipment.
  • the unique verification is usually performed based on the red wine itself and the wine bottle to achieve unique and traceable identity verification.
  • the red wine and the wine bottle are easy to be copied, which leads to uncontrollable.
  • the embodiments of the present application provide a cork coding method and device, a cork tracing method and device, electronic equipment, and a readable storage medium, so as to solve the problem that red wine and wine bottles are easily copied in the prior art.
  • the problem of control is described in detail below.
  • a cork encoding method including: obtaining an original image of the cork to be encoded with an original character code; identifying the original character code in the original image; judging the original character code Whether it matches with the characters that have been entered in the database; when the original character code does not match the characters in the database, extract the original texture feature of the cork to be detected in the original image; compare the original texture feature with The original character codes form a one-to-one correspondence.
  • the method before the step of obtaining the original image of the cork to be encoded with the original character code, the method further includes: obtaining the original character code of the cork to be encoded; forming the original character code in the Coding on the cork.
  • the method further includes: storing the correspondence between texture features and character codes in a database.
  • the method before the step of recognizing the original character code in the original image, the method further includes: performing image preprocessing on the original image.
  • the method according to the present application further includes: when the original character code in the original image is not recognized, or when the original character code matches the characters in the database, controlling the cork to be coded into the warehouse to be recognized .
  • a cork traceability method including: acquiring the current image of the cork to be traced; the cork to be traced adopts the cork code as described in the first aspect of the application Method for encoding; obtain the current texture feature of the cork to be traced according to the current image; compare the current texture feature with the original texture feature pre-stored in the database to generate a comparison result; send the comparison result .
  • the current texture feature is compared with the original texture feature pre-stored in the database, and the step of generating the comparison result includes: determining whether the current texture feature matches the original texture feature pre-stored in the database; When the current texture feature matches the original texture feature, traceability information is generated.
  • the method further includes: acquiring the original texture feature pre-stored in the database.
  • the step of obtaining the original texture feature pre-stored in the database includes: obtaining the current character code in the current image; judging whether the current character code matches the original character code pre-stored in the database; When the character code matches the original character code, the original texture feature corresponding to the original character code is searched in the database according to the original character code.
  • a cork encoding device including: a first acquisition module for acquiring an original image of the cork to be encoded with an original character code; a first processing module for recognizing the original image The original character code in the database; the first judgment module is used to judge whether the original character code matches the characters in the database; the second processing module is used to extract the original image when the original character code does not match the characters in the database
  • the original texture feature of the cork to be detected in the third processing module is used to form a one-to-one correspondence between the original texture feature and the original character code.
  • a cork traceability device including: a second acquisition module for acquiring the current image of the cork to be traced; the cork to be traced is encoded using the above-mentioned cork coding method; fourth processing The module is used to obtain the current texture feature of the cork to be traced according to the current image; the fifth processing module is used to compare the current texture feature with the original texture feature pre-stored in the database to generate a comparison result; the sixth processing module, Used to send the comparison result.
  • an electronic device including: a memory and a processor, the memory and the processor are in communication connection with each other, the memory is stored with computer instructions, and the processor executes the above by executing the computer instructions Cork coding method, or the above-mentioned cork traceability method.
  • a computer-readable storage medium stores computer instructions.
  • the computer instructions are used to make a computer execute the above-mentioned cork coding method or execute the above-mentioned cork traceability method.
  • Figure 1 is a flowchart of the cork coding method of this embodiment
  • Figure 2 is another flowchart of the cork coding method of this embodiment
  • Figure 3 is another flow chart of the cork coding method of this embodiment
  • Figure 4 is another flow chart of the cork coding method of this embodiment.
  • Figure 5 is another flow chart of the cork coding method of this embodiment.
  • Figure 6 is a flow chart of the cork traceability method of this embodiment.
  • FIG. 7 is another flowchart of the cork traceability method of this embodiment.
  • FIG. 8 is another flowchart of the cork traceability method of this embodiment.
  • Figure 9 is another flow chart of the cork traceability method of this embodiment.
  • Figure 10 is a block diagram of the cork coding device of this embodiment.
  • Figure 11 is a block diagram of the cork traceability device of this embodiment.
  • FIG. 12 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the application.
  • the embodiment of the present application provides a cork coding method, as shown in FIG. 1, including steps S11-S15.
  • Step S11 Obtain the original image of the cork to be encoded with the original character code.
  • the cork to be inspected is moved to the inspection station, and the line scan camera is used to take a picture.
  • the number of lines to be collected by the camera is preset, and the number of lines is determined according to the stepping accuracy of the pulse encoder.
  • the side image of the cork can be used as the original image; of course, the original image can also be collected in other ways, such as video.
  • the original character code may be a character string composed of letters, numbers, special characters, etc., or it may be a barcode, etc., and information such as the time and location of the encoding are expressed by the character code.
  • Step S12 Recognize the original character code in the original image.
  • the original character code is recognized by performing OCR on the original image; the original character code can be set in advance through a number protocol according to user needs.
  • Step S13 Determine whether the original character code matches the characters that have been entered in the database. When the two do not match, perform step S14; when it matches, it means that the character already exists in the database, and the cork is controlled to enter the warehouse to be recognized, so that it can be re-screened later or discarded if the character code already exists in the database .
  • Step S14 When the original character code does not match the characters in the database, extract the original texture feature of the cork to be detected in the original image.
  • the degree of matching between the two can be determined by the matching score, for example, when the matching score is less than 80%, it is determined that the two do not match.
  • This embodiment is only illustrative and not limited thereto.
  • the wine bottle cork is made of natural oak, its surface has a lot of texture feature information, and this information is unique, so that the unique identity authentication can be realized through the texture feature, the control of the product is realized, and the source of the red wine is realized Retrospective.
  • the original character code is guaranteed to be unique, and then analyzed by the BLOB algorithm to obtain the original texture characteristics of the cork.
  • the texture characteristics can include the shape and color of the texture, the number of holes or gaps, the size, and the relative position relationship.
  • Step S15 Form a one-to-one correspondence between the original texture feature and the original character code; in order to subsequently find the corresponding original texture feature according to the original character code, so as to trace the authenticity of the red wine.
  • This method corresponds the original character code on the cork with the original texture feature of the cork to ensure the uniqueness of the original character code and the original texture feature, so that the source of red wine can be traced through the texture feature.
  • the method further includes steps S16-S19.
  • step S11 Before step S11, it also includes steps S16 and S17.
  • Step S16 Obtain the original character code of the cork to be encoded.
  • the original character code is the only code that requires a unified character coding format; it can be set through a preset number protocol to be used as the subsequent original image to be photographed to identify the format of the number.
  • Step S17 Form the original character code on the cork to be encoded.
  • the original character code is engraved on the cork by the laser coding machine connected to the vibrating table, and each cork reaches the position of laser coding, and the laser is performed according to the preset pattern and number (the unique number in the world). add mosaic.
  • the laser marking position can be located on the side of the cork, specifically it can be 15-20 degrees from the side of the cork, or the area occupied is less than 10% of the total area of the side.
  • step S12 it also includes step S18: image preprocessing of the original image, specifically, brightness correction and cropping of the image, so that the original character code can be accurately recognized later and the recognition accuracy is improved.
  • step S15 it further includes step S19: storing the corresponding relationship between the texture feature and the character code in the database, and updating the stored information in the database for subsequent query and traceability.
  • the method also includes: when the original character code in the original image is not recognized, controlling the cork to be coded into the to-be-recognized bin, so that it can be subsequently screened again or discarded when the character code already exists in the database.
  • Figures 3 and 4 are another flowchart of the cork coding method.
  • the original character code is generated according to the predetermined number protocol, and the global unique character code is combined with the wine trademark The pre-set LOGO such as, name, etc. form a new template.
  • the transmission device is controlled to drive the cork to rotate, and the laser coding machine will engrave according to the updated template to form the original character code on the cork.
  • the sensor is triggered to control the camera to start collecting images.
  • the graphics are preprocessed, and the graphics are positioned after preprocessing, and OCR recognition
  • the original character code in the original image the recognition process can be to compare the character matching score, and then compare whether it has been entered into the database. If the character code recognized by the character is not entered into the database, perform BLOB analysis on the original image to obtain the original texture feature, and finally the original character
  • the code and the original texture feature form a one-to-one correspondence to realize data coding, and store it in the database after coding.
  • This embodiment also provides a cork traceability method, as shown in FIG. 6, including steps S21-S24.
  • Step S21 Obtain the current image of the cork to be traced; the cork to be traced is encoded using the cork coding method described in any of the above embodiments.
  • the cork to be traced can be photographed through a mobile terminal (such as a mobile phone, etc.) to collect the current image, or it can be another image collection device, such as an industrial camera, a code scanner, etc.
  • a mobile terminal such as a mobile phone, etc.
  • the mobile phone installs the App program to collect pictures of cork.
  • set a frame for shooting characters to locate the character area of the cork the picture data can be compressed (or cropped-according to the size of the positioning frame ) After uploading.
  • Step S22 Obtain the current texture feature of the cork to be traced based on the current image. Specifically, image processing is performed on the current image to identify the current texture feature of the cork.
  • Step S23 Compare the current texture feature with the original texture feature pre-stored in the database to generate a comparison result. Compare whether the current texture feature is consistent with the original texture feature in the database, and generate a comparison result.
  • the comparison result is that the verification is passed, and the corresponding traceability information (such as wine name, model, etc.) is displayed. If the two do not match, the verification fails and it shows that there is no query result. After that, you can manually enter the characters to achieve the data query function; or download the original image of the server to achieve manual comparison.
  • Step S24 Send the comparison result. Specifically, the comparison result is sent to the mobile terminal, so that the user can view the comparison result, and realize the unique and traceable identity verification for the red wine based on the comparison result.
  • This method realizes the verification and traceability of the uniqueness of the cork by comparing the current texture features with the original texture features.
  • step S23 includes steps S231-S233.
  • Step S231 Obtain original texture features pre-stored in the database.
  • step S231 may include steps S2311-S2313.
  • Step S2311 Obtain the current character code in the current image. Specifically, the current character code in the current graphic can be recognized through OCR.
  • Step S2312 Determine whether the current character code matches the original character code pre-stored in the database. Specifically, the matching scores of the two can be used to determine whether they match. For example, if the matching score is greater than 90%, the matching is considered successful.
  • Step S2313 When the current character code matches the original character code, search the database for the original texture feature corresponding to the original character code according to the original character code. When the two match, it means that the character code is stored in the database, and the original texture feature can be found through the correspondence between the original character code and the original texture feature.
  • Step S232 Determine whether the current texture feature matches the original texture feature pre-stored in the database. Specifically, it can be determined whether the texture features match by judging the similarity between the two, for example, when the similarity is greater than 95%, it is determined that the two match.
  • Step S233 When the current texture feature matches the original texture feature, generate traceability information.
  • the generated traceability information may include the name, model, and date of manufacture of the wine; it may also include logistics information.
  • Figure 9 is another flow chart of the cork traceability method.
  • the mobile phone is installed with an App program that can collect cork pictures.
  • a frame for shooting characters is set to locate the character area of the cork; the picture data can be compressed (Or cropping—according to the size of the positioning frame) upload to the server; can manually enter characters to realize the data query function; can download the original pictures of the server to realize manual comparison.
  • the embodiment of the present application provides a cork encoding device, as shown in FIG. 10, including: a first acquisition module 1 for acquiring an original image of a cork to be encoded with an original character code, see step S11; first processing Module 2 is used to identify the original character code in the original image, see step S12; the first judging module 3 is used to judge whether the original character code matches the characters already entered in the database, see step S13; The processing module 4 is used to extract the original texture features of the cork to be detected in the original image when the original character code does not match the characters in the database, see step S14; the third processing module 5 is used to convert the original texture The feature and the original character code form a one-to-one correspondence, see step S15.
  • the device also includes: a seventh processing module, which is used to obtain the original character code of the cork to be encoded; an eighth processing module, which is used to form the original character code on the cork to be encoded; The image is preprocessed; the tenth processing module is used to store the correspondence between texture features and character codes in the database.
  • the device also includes: an eleventh processing module, which is used to control the cork to be coded into the warehouse to be recognized when the original character code in the original image is not recognized, or when the original character code matches the characters in the database.
  • an eleventh processing module which is used to control the cork to be coded into the warehouse to be recognized when the original character code in the original image is not recognized, or when the original character code matches the characters in the database.
  • the embodiment of the present application provides a cork traceability device, as shown in FIG. 11, comprising: a second acquisition module 6 for acquiring the current image of the cork to be traced, and the cork to be traced uses any one of the above-mentioned wood
  • the plug coding method is used to encode, see step S21; the fourth processing module 7 is used to obtain the current texture feature of the cork to be traced according to the current image, see step S22; the fifth processing module 8 is used to compare the current texture feature with the database The pre-stored original texture features are compared to generate a comparison result, see step S23; the sixth processing module 9 is used to send the comparison result, see step S24.
  • the fifth processing module includes: a first judging sub-module for judging whether the current texture feature matches the original texture feature pre-stored in the database; the first processing sub-module for generating a traceback when the current texture feature matches the original texture feature information;
  • the fifth processing module also includes: a second processing sub-module for obtaining original texture features pre-stored in the database.
  • the second processing sub-module includes: a first acquiring unit for acquiring the current character code in the current image; a first judging unit for judging whether the current character code matches the original character code pre-stored in the database; and a first processing unit, It is used to find the original texture feature corresponding to the original character code in the database according to the original character code when the current character code matches the original character code.
  • An embodiment of the present application also provides an electronic device, as shown in FIG. 12, comprising: a processor 101 and a memory 102; the memory and the processor communicate with each other, the memory stores computer instructions, and the processor executes the Computer instructions to execute the cork coding method described in any of the embodiments of this application, or execute the cork traceability method described in any of the embodiments of this application.
  • the processor 101 and the memory 102 may be connected through a bus or in other ways. In FIG. 12, the connection through a bus is taken as an example.
  • the embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored.
  • the computer instructions are used to make a computer execute any of the above-mentioned cork coding methods or execute any of the above-mentioned cork coding methods. Traceability method.
  • Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments and methods can be accomplished by instructing relevant hardware through a computer program.
  • the program can be stored in a computer readable storage medium. At this time, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium may be a magnetic disk, an optical disc, a read-only storage memory, a random storage memory, a flash memory, a hard disk, or a solid state hard disk, etc.; the storage medium may also include a combination of the foregoing types of memories.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mechanical Engineering (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Character Discrimination (AREA)

Abstract

一种木塞编码方法及编码装置、木塞追溯方法及追溯装置、电子设备,其中,木塞编码方法包括:获取带有原始字符码的待编码木塞的原始图像;识别原始图像中的原始字符码;判断原始字符码是否与已经录入数据库中的字符匹配;在原始字符码与数据库中的字符不匹配时,提取原始图像中的待检测木塞的原始纹理特征;将原始纹理特征与原始字符码形成一一对应关系。该方法将木塞上的原始字符码与木塞的原始纹理特征进行对应,保证原始字符码和原始纹理特征的唯一性,以便后续通过纹理特征实现红酒的来源追溯。

Description

木塞编码方法及装置、木塞追溯方法及装置、电子设备 技术领域
本申请涉及红酒技术领域,具体涉及一种木塞编码方法及装置、木塞追溯方法及装置、电子设备。
背景技术
在红酒生产和销售市场上,由于红酒的市场十分巨大,需要对产品、物流进行追溯,以保证正品的权利和对消费者的负责。现有技术中通常根据红酒自身以及酒瓶进行唯一验证从而实现唯一可追溯的身份验证,然而,由于红酒和酒瓶容易被仿制,进而导致不可控制。
发明内容
基于此,本申请实施例提供了一种木塞编码方法及装置、木塞追溯方法及装置、电子设备及可读存储介质,以解决现有技术中由于红酒和酒瓶容易被仿制进而导致不可控制的问题。
根据本申请的一个方面,提供了一种木塞编码方法,包括:获取带有原始字符码的待编码木塞的原始图像;识别所述原始图像中的原始字符码;判断所述原始字符码是否与已经录入数据库中的字符匹配;在所述原始字符码与所述数据库中的字符不匹配时,提取所述原始图像中的待检测木塞的原始纹理特征;将所述原始纹理特征与所述原始字符码形成一一对应关系。
可选地,根据本申请所述的方法,获取带有原始字符码的待编码木塞的原始图像的步骤之前,还包括:获取待编码木塞的原始字符码;将原始字符码形成在待编码木塞上。
可选地,根据本申请所述的方法,将纹理特征与字符码形成一一对应关系 的步骤之后,还包括:将纹理特征和字符码的对应关系存储至数据库。
可选地,根据本申请所述的方法,识别原始图像中的原始字符码的步骤之前,还包括:对原始图像进行图像预处理。
可选地,根据本申请所述的方法,还包括:在未识别出原始图像中的原始字符码时,或者在原始字符码与数据库中的字符匹配时,控制待编码木塞进入待识别仓。
根据本申请的另一方面,提供了一种木塞追溯方法,包括:获取待追溯木塞的当前图像;所述待追溯木塞采用如本申请第一方面中任一所述的木塞编码方法进行编码;根据所述当前图像得到所述待追溯木塞的当前纹理特征;将所述当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果;发送所述比对结果。
可选地,将所述当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果的步骤中,包括:判断所述当前纹理特征是否与数据库中预存的原始纹理特征匹配;在所述当前纹理特征与所述原始纹理特征匹配时,生成追溯信息。
可选地,判断所述当前纹理特征是否与数据库中预存的原始纹理特征匹配的步骤之前,还包括:获取数据库中预存的原始纹理特征。
可选地,获取数据库中预存的原始纹理特征的步骤中,包括:获取所述当前图像中的当前字符码;判断所述当前字符码是否与数据库中预存的原始字符码匹配;在所述当前字符码与所述原始字符码匹配时,根据所述原始字符码在数据库中查找与所述原始字符码对应的原始纹理特征。
根据本申请的又一方面,提供一种木塞编码装置,包括:第一获取模块,用于获取带有原始字符码的待编码木塞的原始图像;第一处理模块,用于识别 原始图像中的原始字符码;第一判断模块,用于判断原始字符码是否与已经录入数据库中的字符匹配;第二处理模块,用于在原始字符码与数据库中的字符不匹配时,提取原始图像中的待检测木塞的原始纹理特征;第三处理模块,用于将原始纹理特征与原始字符码形成一一对应关系。
根据本申请的又一方面,提供一种木塞追溯装置,包括:第二获取模块,用于获取待追溯木塞的当前图像;待追溯木塞采用上述木塞编码方法进行编码;第四处理模块,用于根据当前图像得到待追溯木塞的当前纹理特征;第五处理模块,用于将当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果;第六处理模块,用于发送比对结果。
根据本申请的又一方面,提供一种电子设备,包括:存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行所述计算机指令,从而执行上述木塞编码方法,或者上述木塞追溯方法。
根据本申请的又一方面,提供一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,计算机指令用于使计算机执行上述木塞编码方法,或者执行上述木塞追溯方法。
附图说明
为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本实施例木塞编码方法的一个流程图;
图2为本实施例木塞编码方法的另一个流程图;
图3为本实施例木塞编码方法的另一个流程图;
图4为本实施例木塞编码方法的另一个流程图;
图5为本实施例木塞编码方法的另一个流程图;
图6为本实施例木塞追溯方法的一个流程图;
图7为本实施例木塞追溯方法的另一个流程图;
图8为本实施例木塞追溯方法的另一个流程图;
图9为本实施例木塞追溯方法的另一个流程图;
图10为本实施例木塞编码装置的一个框图;
图11为本实施例木塞追溯装置的一个框图;
图12为本申请实施例的电子设备的硬件结构示意图。
具体实施方式
本申请实施例提供了一种木塞编码方法,如图1所示,包括步骤S11-S15。
步骤S11:获取带有原始字符码的待编码木塞的原始图像。
在一实施例中,将待检测木塞移动至检测工位上,通过线阵相机进行拍照,预先设定好相机的采集行数,行数根据脉冲编码器的步进精度确定,从而采集到木塞的侧面图像,该侧面图像即可作为原始图像;当然,也可通过其它方式采集原始图像,如视频。
在一实施例中,原始字符码可以是有字母、数字、特殊字符等构成的字符串,也可以是条形码等,通过字符码表示编码的时间、地点等信息。
步骤S12:识别原始图像中的原始字符码。具体地,通过对原始图像进行OCR识别原始字符码;原始字符码可根据用户需要预先通过号码协议设定。
步骤S13:判断原始字符码是否与已经录入数据库中的字符匹配。在两者不匹配时,执行步骤S14;匹配时,说明数据库中已经存在该字符,控制木塞进入待识别仓,以便后续对其进行再次进行筛选或者在数据库中已经存在有上述字符码时丢弃。
步骤S14:在原始字符码与数据库中的字符不匹配时,提取原始图像中的待检测木塞的原始纹理特征。
具体地,可通过匹配分数确定两者的匹配程度,例如,匹配分数小于80%时确定两者不匹配,本实施例仅作示意性说明,并不以此为限。
酒瓶木塞由于是天然的橡木制作而成,其表面就有很多纹理特征信息,且这个信息是具有唯一性,从而通过纹理特征实现唯一身份认证,实现对产品的管控,进而实现红酒的来源追溯。
在两者不匹配时,保证原始字符码唯一,之后通过BLOB算法分析,得到木塞的原始纹理特征,纹理特征可包括纹路的形状、颜色,孔或者缝隙数量、大小以及相对位置关系等。
步骤S15:将原始纹理特征与原始字符码形成一一对应关系;以便后续根据原始字符码查找对应的原始纹理特征,从而追溯红酒的真伪。
该方法将木塞上的原始字符码与木塞的原始纹理特征进行对应,保证原始字符码和原始纹理特征的唯一性,以便后续通过纹理特征实现红酒的来源追溯。
在一实施例中,如图2所示,该方法还包括步骤S16-S19。
在步骤S11之前,还包括步骤S16和S17。
步骤S16:获取待编码木塞的原始字符码。
具体地,原始字符码为唯一的打码需要统一文字编码格式;可通过预先设 定的号码协议设定,以便作为后续原始图拍摄,识别号码的格式规约。
步骤S17:将原始字符码形成在待编码木塞上。
具体地,通过与振动台连接的激光打码机将原始字符码雕刻在木塞上,每个木塞到达激光打码的位置,根据预先设定的图案、号码(为全球唯一号码)进行激光打码。激光打码的位置可以位于木塞的侧面上,具体可以是木塞侧面15-20度的位置上,或者所占面积小于侧面总面积的10%。
在步骤S12之前,还包括步骤S18:对原始图像进行图像预处理,具体地可以是对图像进行亮度校正、裁剪,以便后续能够准确识别原始字符码,提高识别的精度。
在步骤S15之后,还包括步骤S19:将纹理特征和字符码的对应关系存储至数据库,对数据库中的存储信息进行更新,以便后续查询和追溯。
该方法还包括:在未识别出原始图像中的原始字符码时,控制待编码木塞进入待识别仓,以便后续对其进行再次进行筛选或者在数据库中已经存在有上述字符码时丢弃。
图3和图4为木塞编码方法的另一个流程图。首先将待编码木塞移动到检测工位上,通过触发传感器确定木塞已经到达指定位置以便开始后续工序,之后,按照预定的号码协议生成原始字符码,将全球唯一的字符码与酒的商标、名称等预先设定的LOGO形成新的模板,木塞上料后控制传动装置带动木塞转动,激光打码机按照更新后的模板进行雕刻,将原始字符码形成在木塞上。然后,在连接工业相机,进行拍图,当木塞到达检测工位时,通过触发传感器,控制相机开始采集图像,图像采集完毕后对图形进行图形预处理,预处理后进行图形定位,OCR识别原始图像中的原始字符码,识别过程可以是对比确定字符匹配分数,进而对比是否已经录入数据库,字符识别出的字符码未录入数据库则对原始图像进行BLOB分析得到原始纹理特征,最后将原始字符码与原始纹 理特征形成一一对应关系,实现数据编码,编码完成后存入数据库中。
采集计算机与数据库之间的通信流程如图5所示,工业图像拍图、分析木塞唯一特征后,进行编码,并记录到可追溯的数据库。
本实施例还提供一种木塞追溯方法,如图6所示,包括步骤S21-S24。
步骤S21:获取待追溯木塞的当前图像;待追溯木塞采用如上述实施例中任一所述的木塞编码方法进行编码。
具体地,可通过移动终端(如手机等)对待追溯木塞进行拍照,采集当前图像,也可以是其它图像采集装置,如工业相机、扫码枪等。例如,手机安装App程序,能够采集木塞图片,为了防止拍摄有误,设置一个拍摄字符的框,用于定位木塞的字符区域;图片数据,可以压缩(或者裁切—根据定位框的大小)后进行上传。
步骤S22:根据当前图像得到待追溯木塞的当前纹理特征。具体地,对当前图像进行图像处理识别木塞的当前纹理特征。
步骤S23:将当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果。对比当前纹理特征和数据库中的原始纹理特征是否一致,生成对比结果。
若两者匹配时,比对结果为验证通过,并显示相应的追溯信息(如酒名、型号等)。若两者不匹配,则验证不通过,显示没有查询到结果,之后,可以手动录入字符,实现数据查询功能;或者下载服务器原始图片,实现人工比对。
步骤S24:发送比对结果。具体地,将对比结果发送至移动终端,以便用户查看对比结果,根据对比结果对红酒实现唯一可追溯的身份验证。
该方法通过当前纹理特征与原始纹理特征的对比,实现了木塞唯一性验证 和追溯。
在一实施例中,如图7所示,步骤S23包括步骤S231-S233。
步骤S231:获取数据库中预存的原始纹理特征。
具体地,如图8所示,步骤S231可包括步骤S2311-S2313。
步骤S2311:获取当前图像中的当前字符码。具体可通过OCR识别当前图形中的当前字符码。
步骤S2312:判断当前字符码是否与数据库中预存的原始字符码匹配。具体可通过两者的匹配分数确定是否匹配,例如,匹配分数大于90%则认为匹配成功。
步骤S2313:在当前字符码与原始字符码匹配时,根据原始字符码在数据库中查找与原始字符码对应的原始纹理特征。两者匹配时,说明数据库中存储有该字符码,通过原始字符码和原始纹理特征的对应关系查找到原始纹理特征。
步骤S232:判断当前纹理特征是否与数据库中预存的原始纹理特征匹配。具体可通过判断两者的相似度确定纹理特征是否匹配,例如,相似度大于95%时确定两者匹配。
步骤S233:在当前纹理特征与原始纹理特征匹配时,生成追溯信息。
在一实施例中,当两者匹配时,说明该木塞的来源可信,生成的追溯信息可包括酒名、型号以及出厂日期等;还可以包括物流信息。
图9为木塞追溯方法的另一个流程图,手机安装App程序,能够采集木塞图片,为了防止拍摄有误,设置一个拍摄字符的框,用于定位木塞的字符区域;图片数据可以压缩(或者裁切—根据定位框的大小)上传到服务器;能够手动录入字符,实现数据查询功能;能够下载服务器原始图片,实现人工比对。
本申请实施例提供一种木塞编码装置,如图10所示,包括:第一获取模块1,用于获取带有原始字符码的待编码木塞的原始图像,参见步骤S11;第一处理模块2,用于识别原始图像中的原始字符码,参见步骤S12所述;第一判断模块3,用于判断原始字符码是否与已经录入数据库中的字符匹配,参见步骤S13所述;第二处理模块4,用于在原始字符码与数据库中的字符不匹配时,提取原始图像中的待检测木塞的原始纹理特征,参见步骤S14所述;第三处理模块5,用于将原始纹理特征与原始字符码形成一一对应关系,参见步骤S15所述。
该装置还包括:第七处理模块,用于获取待编码木塞的原始字符码;第八处理模块,用于将原始字符码形成在待编码木塞上;第九处理模块,用于对原始图像进行图像预处理;第十处理模块,用于将纹理特征和字符码的对应关系存储至数据库。
该装置还包括:第十一处理模块,用于在未识别出原始图像中的原始字符码时,或者在原始字符码与数据库中的字符匹配时,控制待编码木塞进入待识别仓。
本申请实施例提供一种木塞追溯装置,如图11所示,包括:第二获取模块6,用于获取待追溯木塞的当前图像,待追溯木塞采用如上述任一所述的木塞编码方法进行编码,参见步骤S21;第四处理模块7,用于根据当前图像得到待追溯木塞的当前纹理特征,参见步骤S22;第五处理模块8,用于将当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果,参见步骤S23;第六处理模块9,用于发送比对结果,参见步骤S24。
第五处理模块包括:第一判断子模块,用于判断当前纹理特征是否与数据库中预存的原始纹理特征匹配;第一处理子模块,用于在当前纹理特征与原始纹理特征匹配时,生成追溯信息;
第五处理模块还包括:第二处理子模块,用于获取数据库中预存的原始纹理特征。
第二处理子模块包括:第一获取单元,用于获取当前图像中的当前字符码;第一判断单元,用于判断当前字符码是否与数据库中预存的原始字符码匹配;第一处理单元,用于在当前字符码与原始字符码匹配时,根据原始字符码在数据库中查找与原始字符码对应的原始纹理特征。
本申请实施例还提供了一种电子设备,如图12所示,包括:处理器101和存储器102;存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行所述计算机指令,从而执行本申请实施例中任一所述的木塞编码方法,或者执行本申请实施例中任一所述的木塞追溯方法。其中,处理器101和存储器102可以通过总线或者其他方式连接,图12中以通过总线连接为例。
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机指令,计算机指令用于使计算机执行上述任一所述的木塞编码方法,或者执行上述任一所述的木塞追溯方法。本领域技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成的,程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;所述存储介质还可以包括上述种类的存储器的组合。

Claims (13)

  1. 一种木塞编码方法,其特征在于,包括:
    获取带有原始字符码的待编码木塞的原始图像;
    识别原始图像中的原始字符码;
    判断原始字符码是否与已经录入数据库中的字符匹配;
    在原始字符码与数据库中的字符不匹配时,提取原始图像中的待检测木塞的原始纹理特征;
    将原始纹理特征与原始字符码形成一一对应关系。
  2. 根据权利要求1所述的方法,其特征在于,获取带有原始字符码的待编码木塞的原始图像的步骤之前,还包括:
    获取待编码木塞的原始字符码;
    将原始字符码形成在待编码木塞上。
  3. 根据权利要求1所述的方法,其特征在于,将纹理特征与字符码形成一一对应关系的步骤之后,还包括:
    将纹理特征和字符码的对应关系存储至数据库。
  4. 根据权利要求1-3中任一所述的方法,其特征在于,识别原始图像中的原始字符码的步骤之前,还包括:
    对原始图像进行图像预处理。
  5. 根据权利要求1-3中任一所述的方法,其特征在于,还包括:在未识别出原始图像中的原始字符码时,或者在原始字符码与数据库中的字符匹配时, 控制待编码木塞进入待识别仓。
  6. 一种木塞追溯方法,其特征在于,包括:
    获取待追溯木塞的当前图像;待追溯木塞采用如权利要求1-5中任一所述的木塞编码方法进行编码;
    根据当前图像得到待追溯木塞的当前纹理特征;
    将当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果;
    发送比对结果。
  7. 根据权利要求6所述的方法,其特征在于,将当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果的步骤中,包括:
    判断当前纹理特征是否与数据库中预存的原始纹理特征匹配;
    在当前纹理特征与原始纹理特征匹配时,生成追溯信息。
  8. 根据权利要求7所述的方法,其特征在于,判断当前纹理特征是否与数据库中预存的原始纹理特征匹配的步骤之前,还包括:
    获取数据库中预存的原始纹理特征。
  9. 根据权利要求8所述的方法,其特征在于,获取数据库中预存的原始纹理特征的步骤中,包括:
    获取当前图像中的当前字符码;
    判断当前字符码是否与数据库中预存的原始字符码匹配;
    在当前字符码与原始字符码匹配时,根据原始字符码在数据库中查找与原始字符码对应的原始纹理特征。
  10. 一种木塞编码装置,其特征在于,包括:
    第一获取模块,用于获取带有原始字符码的待编码木塞的原始图像;
    第一处理模块,用于识别原始图像中的原始字符码;
    第一判断模块,用于判断原始字符码是否与已经录入数据库中的字符匹配;
    第二处理模块,用于在原始字符码与数据库中的字符不匹配时,提取原始图像中的待检测木塞的原始纹理特征;
    第三处理模块,用于将原始纹理特征与原始字符码形成一一对应关系。
  11. 一种木塞追溯装置,其特征在于,包括:
    第二获取模块,用于获取待追溯木塞的当前图像;待追溯木塞采用如权利要求1-5中任一所述的木塞编码方法进行编码;
    第四处理模块,用于根据当前图像得到待追溯木塞的当前纹理特征;
    第五处理模块,用于将当前纹理特征与数据库中预存的原始纹理特征进行比对,生成比对结果;
    第六处理模块,用于发送比对结果。
  12. 一种电子设备,其特征在于,包括:
    存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行所述计算机指令,从而执行权利要求1-5中任一所述的木塞编码方法,或者执行权利要求6-9中任一所述的木塞追溯方法。
  13. 一种计算机可读存储介质,其特征在于,计算机可读存储介质存储有计算机指令,计算机指令用于使计算机执行权利要求1-5中任一所述的木塞编码 方法,或者执行权利要求6-9中任一所述的木塞追溯方法。
PCT/CN2019/086034 2019-05-08 2019-05-08 木塞编码方法及装置、木塞追溯方法及装置、电子设备 WO2020223929A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/734,698 US20210233264A1 (en) 2019-05-08 2019-05-08 Cork coding method and device, cork tracing method and device, and an electronic device
PCT/CN2019/086034 WO2020223929A1 (zh) 2019-05-08 2019-05-08 木塞编码方法及装置、木塞追溯方法及装置、电子设备
CN201980072027.2A CN113016020B (zh) 2019-05-08 2019-05-08 木塞编码方法及装置、木塞追溯方法及装置、电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/086034 WO2020223929A1 (zh) 2019-05-08 2019-05-08 木塞编码方法及装置、木塞追溯方法及装置、电子设备

Publications (1)

Publication Number Publication Date
WO2020223929A1 true WO2020223929A1 (zh) 2020-11-12

Family

ID=73050522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/086034 WO2020223929A1 (zh) 2019-05-08 2019-05-08 木塞编码方法及装置、木塞追溯方法及装置、电子设备

Country Status (3)

Country Link
US (1) US20210233264A1 (zh)
CN (1) CN113016020B (zh)
WO (1) WO2020223929A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE29919460U1 (de) * 1999-11-05 2000-02-10 Dmt Gmbh Feinwerktechnische Ko Verschlußstopfen für Flaschen oder Behälter
CN1244698A (zh) * 1998-08-08 2000-02-16 田耀来 结构纹理防伪方法
CN101927862A (zh) * 2009-06-25 2010-12-29 潘国平 智能防伪瓶塞
CN103072743A (zh) * 2012-12-20 2013-05-01 成都市易恒信科技有限公司 葡萄酒rfid电子标签组合式防伪瓶塞
CN103144848A (zh) * 2013-03-11 2013-06-12 褚万青 一种植物包装物和一种商品防伪方法
CN205441299U (zh) * 2015-12-30 2016-08-10 立德高科(北京)数码科技有限责任公司 带有防伪标识的软木塞
CN108985792A (zh) * 2018-06-27 2018-12-11 中南民族大学 农资产品的追溯方法、装置、终端设备及可读存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0680927B1 (en) * 1992-06-08 1997-03-05 Azbar Inc. Beverage dispensing device for a bar
PT983830E (pt) * 1998-09-03 2005-02-28 Mannoni Salvatore Metodo e instalacao de fabrico de elementos de fechamento de cortica natural
CN101261785A (zh) * 2007-03-09 2008-09-10 王康 一种防伪方法
US9314953B2 (en) * 2007-11-16 2016-04-19 Nomacorc, Llc Multi-component synthetic closure and method of manufacture
CN104220270A (zh) * 2012-03-27 2014-12-17 锡克拜控股有限公司 具有高水平编码的多层薄片
US10956732B2 (en) * 2014-11-21 2021-03-23 Guy Le Henaff System and method for detecting the authenticity of products
CN107640429A (zh) * 2016-11-05 2018-01-30 海南拍拍看信息技术有限公司 膨胀塞封包装方法及其产品
WO2019018859A1 (en) * 2017-07-21 2019-01-24 Mississippi State University IMPROVED MONITORING METHOD FOR CONTAINERS WITH REMOVABLE PLUGS

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1244698A (zh) * 1998-08-08 2000-02-16 田耀来 结构纹理防伪方法
DE29919460U1 (de) * 1999-11-05 2000-02-10 Dmt Gmbh Feinwerktechnische Ko Verschlußstopfen für Flaschen oder Behälter
CN101927862A (zh) * 2009-06-25 2010-12-29 潘国平 智能防伪瓶塞
CN103072743A (zh) * 2012-12-20 2013-05-01 成都市易恒信科技有限公司 葡萄酒rfid电子标签组合式防伪瓶塞
CN103144848A (zh) * 2013-03-11 2013-06-12 褚万青 一种植物包装物和一种商品防伪方法
CN205441299U (zh) * 2015-12-30 2016-08-10 立德高科(北京)数码科技有限责任公司 带有防伪标识的软木塞
CN108985792A (zh) * 2018-06-27 2018-12-11 中南民族大学 农资产品的追溯方法、装置、终端设备及可读存储介质

Also Published As

Publication number Publication date
CN113016020A (zh) 2021-06-22
US20210233264A1 (en) 2021-07-29
CN113016020B (zh) 2023-03-28

Similar Documents

Publication Publication Date Title
US10635946B2 (en) Eyeglass positioning method, apparatus and storage medium
CN107223246B (zh) 图像标注方法、装置及电子设备
CN106934595B (zh) 建筑工程管理系统工程进度数据录入方法
CN108537129B (zh) 训练样本的标注方法、装置和系统
CN107835397B (zh) 一种多镜头视频同步的方法
CN103607524A (zh) 一种条烟32位码图像采集处理装置及条烟32位码识别方法
CN113033711A (zh) 题目批改方法、装置、电子设备及计算机存储介质
CN116188700B (zh) 一种基于aigc自动生成3d场景的系统
US10402777B2 (en) Method and a system for object recognition
CN111414905B (zh) 一种文本检测方法、文本检测装置、电子设备及存储介质
CN110942063B (zh) 证件文字信息获取方法、装置以及电子设备
CN110717397A (zh) 一种基于手机相机的在线翻译系统
WO2020223929A1 (zh) 木塞编码方法及装置、木塞追溯方法及装置、电子设备
WO2019140641A1 (zh) 信息处理方法、系统、云处理设备以及计算机程序产品
CN110443306B (zh) 葡萄酒木塞的鉴伪方法
WO2018185574A1 (en) Apparatus and method for documents and/or personal identities recognition and validation
GB2613753A (en) Wine product positioning method and apparatus, wine product information management method and apparatus, and device and storage medium
AU2019200458B2 (en) Method and system for acquiring data files of blocks of land and of building plans and for automatic making of matches thereof
CN110717060A (zh) 图像mask的过滤方法、装置及存储介质
US20150186687A1 (en) Coded visual information system
CN106778449B (zh) 动态影像的物件辨识方法及自动截取目标图像的互动式影片建立方法
WO2017219562A1 (zh) 一种二维码生成方法及装置
CN112418371B (zh) 用于区块链的安全三维码以及生成和解码方法
CN110909187B (zh) 图像存储方法、图像读取方法、图像存储器及存储介质
US20180173989A1 (en) Process and system of identification of products in motion in a product line

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: 19928183

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: 19928183

Country of ref document: EP

Kind code of ref document: A1