CN111932281A - Anti-counterfeiting detection method and device - Google Patents

Anti-counterfeiting detection method and device Download PDF

Info

Publication number
CN111932281A
CN111932281A CN202011001024.0A CN202011001024A CN111932281A CN 111932281 A CN111932281 A CN 111932281A CN 202011001024 A CN202011001024 A CN 202011001024A CN 111932281 A CN111932281 A CN 111932281A
Authority
CN
China
Prior art keywords
reference image
commodity
target
counterfeiting
random mark
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011001024.0A
Other languages
Chinese (zh)
Inventor
宋莉华
雷华
比佳·穆萨维
尹笑斐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dayu Dream Technology Co ltd
Original Assignee
Beijing Dayu Dream Technology Co ltd
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 Beijing Dayu Dream Technology Co ltd filed Critical Beijing Dayu Dream Technology Co ltd
Priority to CN202011001024.0A priority Critical patent/CN111932281A/en
Publication of CN111932281A publication Critical patent/CN111932281A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • 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
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Multimedia (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the application discloses an anti-counterfeiting detection method and an anti-counterfeiting detection device, wherein the method comprises the following steps: acquiring a target image uploaded by a user, wherein the target image is obtained by shooting a to-be-detected commodity and comprises an identification code to be identified and a random mark to be identified on the to-be-detected commodity; calling a reference image corresponding to a commodity to be detected according to the identification code to be identified, wherein the reference image is obtained by shooting a legal commodity and comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity; processing the marked image based on a reference image corresponding to the reference image to obtain a target reference image, wherein the area corresponding to the target reference image is the same as the area corresponding to the reference image; and detecting whether the commodity to be detected is a legal commodity or not according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.

Description

Anti-counterfeiting detection method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an anti-counterfeit detection method and apparatus.
Background
Under the rapid development environment of economic society, commodities circulating on the market are increasingly abundant, illegal merchants are bred in the environment to counterfeit the commodities which are popular and sold on the market, once the fake commodities circulate on the market, huge economic loss can be brought to legal merchants, unqualified product quality can be caused due to the fact that the technology of the fake merchants is not excessive, and economic loss and even personal injury are brought to consumers purchasing the fake commodities.
In order to prevent counterfeit goods from circulating in the market, legal merchants usually take certain anti-counterfeiting measures. The two-dimension code anti-counterfeiting label is one of the most common anti-counterfeiting modes on the market at present, a legal merchant can stamp the two-dimension code anti-counterfeiting label on a commodity, a consumer can acquire information carried in the two-dimension code by scanning the two-dimension code, and then whether the purchased commodity is a legal commodity is judged according to the information carried in the two-dimension code.
For a counterfeit merchant, the two-dimensional code imprinted on a legal commodity can be completely copied, and then the two-dimensional code is imprinted on a pirated commodity, so that the counterfeit-proof check of a consumer is passed. Therefore, the anti-counterfeiting effect of the two-dimensional code anti-counterfeiting label is still not ideal enough at present, and illegal merchants cannot be effectively restrained from performing counterfeiting activities.
Disclosure of Invention
The embodiment of the application provides an anti-counterfeiting detection method and an anti-counterfeiting detection device, which improve the anti-counterfeiting precision to improve the counterfeiting cost of illegal merchants, thereby effectively inhibiting the illegal merchants from performing counterfeiting activities.
In view of the above, a first aspect of the present application provides an anti-counterfeit detection method, including:
acquiring a target image uploaded by a user; the target image is obtained by shooting a commodity to be detected, and the target image comprises an identification code to be identified and a random mark to be identified on the commodity to be detected;
calling a reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code; the reference image is obtained by shooting a legal commodity, and the reference image comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity;
processing the target image based on a reference image corresponding to the reference image to obtain a target reference image; the area corresponding to the target reference image is the same as the area corresponding to the reference image;
and detecting whether the commodity to be detected is the legal commodity or not according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
Optionally, when the random mark to be identified is a non-dot mark, detecting whether the commodity to be detected is the legal commodity according to the feature of the random mark to be identified in the target reference image and the feature of the anti-counterfeit random mark in the reference image, including:
constructing a first coordinate system in both the target reference image and the benchmark reference image;
for each random mark to be recognized in the target reference image, determining a characteristic parameter corresponding to the random mark to be recognized according to the distribution position characteristic and/or the shape characteristic of the random mark to be recognized in the first coordinate system; constructing a target characteristic matrix according to the characteristic parameters corresponding to the random marks to be identified in the target reference image; the characteristic parameters corresponding to the random mark to be identified comprise: the coordinate is determined according to the distribution position characteristics of the random mark to be recognized in the first coordinate system, and/or the shape parameter is determined according to the shape characteristics of the random mark to be recognized;
determining characteristic parameters corresponding to each anti-counterfeiting random mark in the reference image according to the distribution position characteristics and/or the shape characteristics of the anti-counterfeiting random mark in the first coordinate system; constructing a benchmark characteristic matrix according to the characteristic parameters corresponding to the anti-counterfeiting random marks in the benchmark reference image; the characteristic parameters corresponding to the anti-counterfeiting random mark comprise: coordinates determined according to the distribution position characteristics of the anti-counterfeiting random mark in the first coordinate system and/or shape parameters determined according to the shape characteristics of the anti-counterfeiting random mark;
and detecting whether the commodity to be detected is the legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
Optionally, when the random mark to be identified is a dotted mark, the detecting whether the commodity to be detected is the legal commodity according to the feature of the random mark to be identified in the target reference image and the feature of the anti-counterfeit random mark in the reference image includes:
constructing a second coordinate system in both the target reference image and the benchmark reference image;
determining the coordinates of the random mark to be recognized in the second coordinate system as the coordinates corresponding to the random mark to be recognized aiming at each random mark to be recognized in the target reference image; constructing a target feature matrix according to the respective corresponding coordinates of each random mark to be identified in the target reference image;
determining the coordinates of the anti-counterfeiting random mark in the second coordinate system as the coordinates corresponding to the anti-counterfeiting random mark aiming at each anti-counterfeiting random mark in the reference image; constructing a benchmark characteristic matrix according to the respective corresponding coordinates of each anti-counterfeiting random mark in the benchmark reference image;
and detecting whether the commodity to be detected is the legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
Optionally, the detecting whether the to-be-detected commodity is the legal commodity according to the target feature matrix and the reference feature matrix includes:
detecting the number of difference parameters in the target feature matrix and the reference feature matrix;
and judging whether the number of the difference parameters is larger than a preset parameter number threshold value, if so, determining that the commodity to be detected is not the legal commodity, and if not, determining that the commodity to be detected is the legal commodity.
Optionally, the detecting whether the to-be-detected commodity is the legal commodity according to the target feature matrix and the reference feature matrix includes:
constructing a target distance collection corresponding to the target feature matrix according to the respective corresponding coordinates of each random mark to be identified in the target feature matrix;
constructing a reference distance collection corresponding to the reference characteristic matrix according to the coordinates corresponding to the anti-counterfeiting random marks in the reference characteristic matrix;
calculating norms of the target distance collection and the reference distance collection;
and judging whether the norm is greater than a preset norm threshold value, if so, determining that the commodity to be detected is not the legal commodity, and if not, determining that the commodity to be detected is the legal commodity.
Optionally, the detecting whether the commodity to be detected is the legal commodity according to the features of the random mark to be identified in the target reference image and the features of the anti-counterfeiting random mark in the reference image includes:
and detecting whether the commodity to be detected is the legal commodity or not according to the color characteristics of the random mark to be identified in the target reference image and the color characteristics of the anti-counterfeiting random mark in the reference image.
Optionally, after the target image uploaded by the user is acquired, the method further includes:
judging whether the definition of the target image meets a preset definition standard or not;
if not, returning a prompt message for re-uploading the target image; if yes, continuing to execute the reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code.
Optionally, after the target image uploaded by the user is acquired, the method further includes:
identifying the identification code to be identified in the target image to obtain target information;
judging whether reference information consistent with the target information exists in reference information prestored in a database; the reference information prestored in the database is information carried in the anti-counterfeiting identification code on the legal commodity;
if not, determining that the commodity to be detected is not the legal commodity; and if so, determining a reference image corresponding to the to-be-detected commodity according to the reference information consistent with the target information.
Optionally, the processing the target image based on the reference image corresponding to the reference image to obtain the target reference image includes:
performing rotation transformation processing on the target image based on the reference image to obtain a reference image with the same direction as the reference image;
and performing image cutting processing on the reference image to obtain the target reference image which comprises an interested area and has the same size as the standard reference image.
Optionally, after the target image uploaded by the user is acquired, the method further includes:
and filtering the light and the brightness of the target image to make the light and the brightness of the target image consistent with those of the reference image respectively.
This application second aspect provides an anti-counterfeiting detection device, the device includes:
the target image acquisition module is used for acquiring a target image uploaded by a user; the target image is obtained by shooting a commodity to be detected, and the target image comprises an identification code to be identified and a random mark to be identified on the commodity to be detected;
the reference image acquisition module is used for calling a reference image corresponding to the to-be-detected commodity according to the identification code to be identified; the reference image is obtained by shooting a legal commodity, and the reference image comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity;
the target image processing module is used for processing the target image based on a reference image corresponding to the reference image to obtain a target reference image; the area corresponding to the target reference image is the same as the area corresponding to the reference image;
and the commodity detection module is used for detecting whether the commodity to be detected is the legal commodity according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
According to the technical scheme, the embodiment of the application has the following advantages:
in the anti-counterfeiting detection method provided by the embodiment of the application, the server can acquire a target image uploaded by a user, wherein the target image is obtained by shooting a to-be-detected commodity by using a terminal device, and comprises an identification code to be identified and a random mark to be identified on the to-be-detected commodity; then, calling a reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code, wherein the reference image is obtained by shooting a legal commodity by a legal merchant and comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity; then, processing the target image based on a reference image corresponding to the reference image to obtain a target reference image, wherein the area corresponding to the target reference image is the same as the area corresponding to the reference image; and further, detecting whether the commodity to be detected is a legal commodity according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
In the anti-counterfeiting detection method, a legal merchant can randomly endow an anti-counterfeiting random mark on an outer package of a legal commodity when producing the legal commodity, and keep a reference image comprising an anti-counterfeiting identification code and the anti-counterfeiting random mark on the legal commodity. The anti-counterfeiting random mark on the legal commodity is randomly assigned by the legal merchant when the legal merchant generates the legal commodity, and has extremely high randomness, so that the illegal merchant often needs to consume extremely high counterfeiting cost to realize when the anti-counterfeiting random mark on the legal commodity is completely re-engraved when the illegal merchant manufactures the fake commodity, and the counterfeiting is basically impossible.
Drawings
Fig. 1 is a schematic flow chart of an anti-counterfeit detection method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an anti-counterfeit identification code and an identification code to be identified provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a reference image provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an anti-counterfeiting detection device provided in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Aiming at the problem that counterfeiting of illegal merchants is difficult to effectively inhibit in the prior art, the embodiment of the application provides the anti-counterfeiting detection method, and the anti-counterfeiting cost of the illegal merchants is improved by improving the anti-counterfeiting precision, so that the counterfeiting activities of the illegal merchants are effectively inhibited.
Specifically, in the anti-counterfeiting detection method provided by the embodiment of the application, the server can acquire a target image uploaded by a user, wherein the target image is obtained by shooting a to-be-detected commodity by using a terminal device, and comprises an identification code to be identified and a random mark to be identified on the to-be-detected commodity; then, calling a reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code, wherein the reference image is obtained by shooting a legal commodity by a legal merchant and comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity; then, processing the target image based on a reference image corresponding to the reference image to obtain a target reference image, wherein the area corresponding to the target reference image is the same as the area corresponding to the reference image; and further, detecting whether the commodity to be detected is a legal commodity according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
In the anti-counterfeiting detection method, a legal merchant can randomly endow an anti-counterfeiting random mark on an outer package of a legal commodity when producing the legal commodity, and keep a reference image comprising an anti-counterfeiting identification code and the anti-counterfeiting random mark on the legal commodity. The anti-counterfeiting random mark on the legal commodity is randomly assigned by the legal merchant when the legal merchant generates the legal commodity, and has extremely high randomness, so that the illegal merchant often needs to consume extremely high counterfeiting cost to realize when the anti-counterfeiting random mark on the legal commodity is completely re-engraved when the illegal merchant manufactures the fake commodity, and the counterfeiting is basically impossible.
It should be noted that, in practical applications, the anti-counterfeiting detection method provided in the embodiment of the present application may be independently completed by the server, or may be independently completed by the terminal device, that is, independently completed by the anti-counterfeiting detection program running on the terminal device, or may be completed by the server and the terminal device in cooperation with each other, and the present application does not limit any execution main body of the anti-counterfeiting detection method provided in the embodiment of the present application.
The following describes the anti-counterfeit detection method provided by the present application in detail by way of an embodiment of the method.
Referring to fig. 1, fig. 1 is a schematic flow chart of an anti-counterfeiting detection method provided in the embodiment of the present application. The following embodiments are described by taking an execution subject of the method as an example of a server, and as shown in fig. 1, the method includes:
step 101: acquiring a target image uploaded by a user; the target image is obtained by shooting the commodity to be detected, and the target image comprises the identification code to be recognized and the random mark to be recognized on the commodity to be detected.
In practical Application, when a user wants to perform anti-counterfeit detection on a certain to-be-detected commodity to determine whether the to-be-detected commodity is a legal commodity produced by a legal merchant, the user can shoot the to-be-detected commodity through a specific commodity detection Application (APP) or a commodity detection applet in related applications to obtain a target image. For example, if a small commodity detection program is integrated in the WeChat, the user may open the small commodity detection program and turn on a camera of the terminal device to shoot the commodity to be detected.
It should be noted that, in order to ensure that the anti-counterfeit detection can be smoothly performed on the to-be-detected commodity, the commodity detection application or the commodity detection applet can prompt the user to ensure that the photographed target image includes the to-be-identified identification code and the to-be-identified random mark on the to-be-detected commodity before the user photographs the to-be-detected commodity; for example, if the identification code to be identified included in the to-be-detected commodity is a two-dimensional code, and the random mark to be identified is a point, a line segment, or another shape randomly assigned around the two-dimensional code, after the commodity detection applet is started, the user may be prompted that the image taken by the user includes the two-dimensional code on the commodity and the point, the line segment, or another shape around the two-dimensional code.
Certainly, in order to ensure that the target image shot by the user includes the identification code to be recognized and the random mark to be recognized on the commodity to be detected, the commodity detection application or the commodity detection applet can also directly prompt the user to completely shoot the commodity label of the commodity to be detected. The method and the device do not limit the way for prompting the user to shoot the target image, and only need to ensure that the target image shot by the user comprises the identification code to be recognized and the random mark to be recognized on the commodity to be detected.
After the user finishes shooting the target image through the commodity detection application or the commodity detection applet, the commodity detection application or the commodity detection applet can send the shot target image to the server through the network, so that the server can obtain the target image.
After receiving the target image, the server may preliminarily determine whether the target image meets the quality requirement, and if not, feed back the prompt information of the target image uploaded again. Specifically, the server may determine whether the definition of the target image meets a preset definition standard, determine that the target image is qualified if the definition of the target image meets the preset definition standard, perform subsequent anti-counterfeiting detection operation based on the target image, and return prompt information for re-uploading the target image to the commodity detection application or the commodity detection applet if the definition of the target image does not meet the preset definition standard, so as to prompt the target user to re-shoot the target image.
Step 102: calling a reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code; the reference image is obtained by shooting a legal commodity, and the reference image comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity.
After the server acquires the target image, the server can call a reference image corresponding to the to-be-detected commodity from the database according to the to-be-identified identification code included in the target image. It should be noted that a large number of reference images are stored in the database, different reference images correspond to different legal commodities, the reference images are captured and stored by legal merchants before the legal commodities flow into the market, and the reference images include anti-counterfeiting identification codes and anti-counterfeiting random marks on the corresponding legal commodities.
In specific implementation, the server can identify the identification code to be identified in the target image to obtain the target information carried in the identification code to be identified. Then, whether reference information consistent with the target information exists or not is searched in reference information prestored in a database, wherein the reference information prestored in the database is information carried by the anti-counterfeiting identification code in the reference image stored in the database; if the reference information consistent with the target information can be found, the reference image including the identification code to be identified is stored in the database, namely the reference image of the legal commodity corresponding to the commodity to be detected exists, and then the server can call the reference image including the anti-counterfeiting identification code carrying the target information; on the contrary, if the reference information consistent with the target information cannot be found, it is indicated that the reference image including the identification code to be identified is not stored in the database, that is, a legal commodity corresponding to the commodity to be detected does not exist at all, so that the commodity to be detected can be directly determined to be not a legal commodity, and the anti-counterfeiting detection result is fed back to the user.
Step 103: processing the target image based on a reference image corresponding to the reference image to obtain a target reference image; the region corresponding to the target reference image is the same as the region corresponding to the reference image.
After the server acquires the target image and the reference image, the target image can be processed based on the reference image corresponding to the reference image, so as to obtain the target reference image which is more convenient for executing anti-counterfeiting detection operation.
It should be noted that the reference image is an image only including a region of interest (ROI) in the reference image, where the region of interest may be a region including the anti-fake identification code and the anti-fake random mark, if the reference image itself is an image only including the region of interest, the reference image corresponding to the reference image is the reference image itself, and if the reference image itself is not an image only including the region of interest, the reference image corresponding to the reference image needs to be further acquired.
It should be understood that, in practical applications, the reference image corresponding to the reference image may be stored in the database, and when the target image needs to be processed to obtain the target reference image, the server may directly retrieve the reference image corresponding to the reference image. Of course, if the reference image corresponding to the reference image is not stored in the database, the server needs to perform image cropping processing on the reference image to obtain the reference image including only the region of interest.
Specifically, when the target image is processed based on the reference image, the server may perform rotation transformation on the target image to obtain a reference image having a direction consistent with that of the reference image, and then perform image cropping on the reference image to obtain a target reference image including the region of interest and having the same size as the reference image.
When the server performs rotation transformation processing on the target image, the rotation transformation processing can be performed on the target image according to the positioning area of the anti-counterfeiting identification code in the reference image and the positioning area of the identification code to be identified in the target image. As shown in fig. 2, (a) is an anti-counterfeit identification code in the reference image, and (b) is an identification code to be recognized in the target image, and black square frame regions distributed at three vertex positions of the anti-counterfeit identification code and the identification code to be recognized are positioning regions corresponding to the black square frame regions, the server can perform rotation transformation processing on the target image in a clockwise direction to sequentially obtain the identification codes to be recognized shown in (c), (d) and (e), and since the directions of the positioning regions of the identification code to be recognized shown in (e) and the positioning regions of the anti-counterfeit identification code in the reference image are completely consistent, the target image including the identification code to be recognized shown in (e) obtained through the rotation transformation processing can be considered as the reference image.
Furthermore, the server may perform image cropping processing on the reference image according to the benchmark reference image to obtain a target reference image which includes an area of interest and is the same as the benchmark reference image in size, where the area of interest may be an area completely including the identification code to be identified and the random mark to be identified. In order to facilitate subsequent anti-counterfeiting detection processing, the sizes of the target reference image and the reference image are consistent.
Optionally, in order to better perform the anti-counterfeiting detection processing, the light and the brightness of the target image and the reference image may be further filtered, so that the light and the brightness of the target image are respectively consistent with the light and the brightness of the reference image. Of course, after the target reference image and the reference image are obtained, the light and the brightness of the target reference image and the reference image may be filtered to make the light and the brightness of the target reference image and the reference image consistent.
Step 104: and detecting whether the commodity to be detected is the legal commodity or not according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
After the server obtains the target reference image and the benchmark reference image, whether the commodity to be detected is a legal commodity can be detected according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the benchmark reference image.
In some embodiments, the server may detect whether the commodity to be detected is a legitimate commodity according to the color feature of the random mark to be identified in the target reference image and the color feature of the anti-counterfeit random mark in the reference image. Specifically, the server may search, for each random mark to be identified in the target reference image, an anti-counterfeit random mark having a distribution position that is the same as or close to that of the random mark to be identified in the reference image, and then determine whether the color of the random mark to be identified is the same as the color of the anti-counterfeit random mark. If the number of the random marks to be identified, which are different from the corresponding anti-counterfeiting random marks in color, in the target reference image exceeds a preset number threshold, the commodity to be detected is considered to be a legal commodity, otherwise, if the number of the random marks to be identified, which are different from the corresponding anti-counterfeiting random marks in color, in the target reference image does not exceed the preset number threshold, the commodity to be detected is considered to be a legal commodity, or if the color feature identification is only one sub-link in the anti-counterfeiting detection, the subsequent sub-links in the anti-counterfeiting detection can be continuously executed.
In some embodiments, when the random mark to be identified is a non-dot mark, the server may detect whether the commodity to be detected is a legal commodity in the following manner. Specifically, the server may construct a first coordinate system in both the target reference image and the reference image; then, for each random mark to be identified in the target reference image, determining a characteristic parameter corresponding to the random mark to be identified according to the distribution position characteristic and/or the shape characteristic of the random mark to be identified in the first coordinate system, and constructing a target characteristic matrix according to the characteristic parameter corresponding to each random mark to be identified in the target reference image; the characteristic parameters corresponding to the random mark to be identified herein include: the coordinate is determined according to the distribution position characteristics of the random mark to be recognized in the first coordinate system, and/or the shape parameter is determined according to the shape characteristics of the random mark to be recognized; determining characteristic parameters corresponding to the anti-counterfeiting random marks according to the distribution position characteristics and/or the shape characteristics of the anti-counterfeiting random marks in a first coordinate system aiming at each anti-counterfeiting random mark in the reference image, and constructing a reference characteristic matrix according to the characteristic parameters corresponding to the anti-counterfeiting random marks in the reference image; the characteristic parameters corresponding to the anti-counterfeiting random mark comprise: coordinates determined according to the distribution position characteristics of the anti-counterfeiting random mark in a first coordinate system and/or shape parameters determined according to the shape characteristics of the anti-counterfeiting random mark; and finally, detecting whether the commodity to be detected is a legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
The following describes an exemplary implementation of the above implementation by taking an example of a line segment randomly assigned to an outer package of a legal commodity, where fig. 3 is a schematic diagram of a reference image of the anti-counterfeiting random mark as a line segment.
In a specific implementation, the server may construct the first coordinate system in both the target reference image and the base reference image, i.e. ensure that the coordinate systems constructed in the target reference image and the base reference image are consistent. Then, aiming at each random line segment to be recognized in the target reference image, taking the distance from the origin of the first coordinate system to the random line segment to be recognized as an x value in a characteristic parameter corresponding to the random line segment to be recognized, taking the included angle between the perpendicular line from the origin of the first coordinate system to the random line segment to be recognized and the x axis as a y value in the characteristic parameter corresponding to the random line segment to be recognized, so as to obtain the characteristic parameter corresponding to the random line segment to be recognized, wherein the characteristic parameter corresponding to the random line segment to be recognized can be understood as a position coordinate determined according to the distribution position characteristic of the random line segment to be recognized in the first coordinate system, and further, the characteristic parameters corresponding to the random line segments to be recognized in the target reference image are arranged according to a certain sequence to form a target characteristic matrix. Similarly, for each anti-counterfeiting random line segment in the reference image, the corresponding characteristic parameters can be constructed in the above manner, and the characteristic parameters corresponding to the anti-counterfeiting random line segments in the reference image are arranged in the same order to form a reference characteristic matrix.
The above implementation is further described by way of example, in case the pseudo-random label is a circle randomly assigned on the outer package of a legitimate good.
In a specific implementation, the server may construct the first coordinate system in both the target reference image and the base reference image, i.e. ensure that the coordinate systems constructed in the target reference image and the base reference image are consistent. Then, regarding each random circle to be recognized in the target reference image, taking the abscissa of the center of the random circle to be recognized in the first coordinate system as the x value of the position coordinate in the characteristic parameter corresponding to the random circle to be recognized, taking the ordinate of the center of the random circle to be recognized in the first coordinate system as the y value of the position coordinate in the characteristic parameter corresponding to the random circle to be recognized, taking the radius of the random circle to be recognized as the shape parameter in the characteristic parameter corresponding to the random circle to be recognized, the characteristic parameters corresponding to the random circle to be recognized are obtained in this way, in other words, the characteristic parameters corresponding to the random circle to be recognized here can be understood as the combination of the position coordinates and the shape parameters of the random circle to be recognized, and further, arranging the characteristic parameters corresponding to the random circles to be identified in the target reference image according to a certain sequence to form a target characteristic matrix. Similarly, for each anti-counterfeiting random circle in the reference image, the corresponding characteristic parameters can be constructed in the above manner, and the characteristic parameters corresponding to the anti-counterfeiting random circles in the reference image are arranged in the same order to form a reference characteristic matrix.
It should be understood that for other types of non-dot random marks, the server may also determine the characteristic parameters corresponding to each non-dot random mark, construct a target characteristic matrix according to the characteristic parameters corresponding to each non-dot random mark to be identified in the target reference image, and construct a reference characteristic matrix according to the characteristic parameters corresponding to each anti-counterfeiting non-dot random mark in the reference image.
In other words, the server may establish a suitable cartesian coordinate system for the target reference image and the reference image, convert each random mark to be identified in the target reference image into a set of points in the mathematical space through data transformation (one random mark to be identified may be converted into one point or multiple points), convert each random anti-counterfeiting mark in the reference image into a set of points in the mathematical space through data transformation (one random anti-counterfeiting mark may be converted into one point or multiple points), thus obtain a point diagram of each random mark to be identified in the target reference image in the mathematical space and a point diagram of each random anti-counterfeiting mark in the reference image in the mathematical space, where coordinates of each point of each random mark to be identified in the target reference image in the mathematical space may be converted into a target feature matrix U of n × 2 (n is the number of points in the mathematical space), the coordinates of each point of each anti-counterfeiting random mark in the benchmark reference image in the mathematical space can also be converted into a benchmark characteristic matrix O of n x 2. And then, determining whether the commodity to be detected is a legal commodity by comparing the target characteristic matrix U with the reference characteristic matrix O.
In some embodiments, when the random mark to be recognized is a dot mark, the server may detect whether the commodity to be detected is a legal commodity in the following manner. Specifically, the server may construct a second coordinate system in the target reference image and the reference image; then, for each random mark to be identified in the target reference image, determining the coordinate of the random mark to be identified in the second coordinate system as the coordinate corresponding to the random mark to be identified, and constructing a target feature matrix according to the coordinate corresponding to each random mark to be identified in the target reference image; determining the coordinates of the anti-counterfeiting random mark in a second coordinate system as the coordinates corresponding to the anti-counterfeiting random mark aiming at each anti-counterfeiting random mark in the reference image, and constructing a reference characteristic matrix according to the coordinates corresponding to the anti-counterfeiting random coordinates in the reference image; and further detecting whether the commodity to be detected is a legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
That is to say, when the random marks to be identified are dot marks, the server may construct the same second coordinate system in the target reference image and the reference image, use the respective coordinates of each random point to be identified in the target reference image in the second coordinate system as the respective corresponding coordinates of each random point to be identified, and use the respective coordinates of each random point to be identified in the reference image in the second coordinate system as the respective corresponding coordinates of each random point to be identified. And arranging the coordinates corresponding to the random points to be identified according to a certain sequence to obtain a target feature matrix, and arranging the coordinates corresponding to the random points to be identified according to the same sequence to obtain a reference feature matrix. And then, determining whether the commodity to be detected is a legal commodity by comparing the target characteristic matrix with the reference characteristic matrix.
In a possible implementation manner, when detecting whether the commodity to be detected is a legal commodity according to the target feature matrix and the reference feature matrix, the server may detect the number of difference parameters in the target feature matrix and the reference feature matrix, and judge whether the number of the difference parameters is greater than a preset parameter number threshold, if so, it may be determined that the commodity to be detected is not a legal commodity, and if not, it may be determined that the commodity to be detected is a legal commodity.
That is, the server may compare the target feature matrix with the reference feature matrix, and determine the number of parameters having a difference therebetween, where, for a non-dot random mark to be recognized, the target feature matrix and the reference feature matrix are compared, and the number of the feature parameters having a difference therebetween is to be determined, and, for a dot random mark to be recognized, the target feature matrix and the reference feature matrix are compared, and the number of coordinates having a difference therebetween is to be determined; when the number of the difference parameters is larger than the preset parameter number threshold, a large number of random marks which cannot be matched exist in the target reference image and the reference image, so that the commodity to be detected can be determined to be not a legal commodity, otherwise, when the number of the difference parameters is not larger than the preset parameter number threshold, only a small number of random marks which cannot be matched exist in the target reference image and the reference image, and the random marks cannot be matched due to picture shooting errors, so that the commodity to be detected can be determined to be a legal commodity.
In another possible implementation manner, when the server detects whether the commodity to be detected is a legal commodity according to the target characteristic matrix and the reference characteristic matrix, a target distance collection corresponding to the target feature matrix can be constructed according to respective corresponding coordinates of each random mark to be identified in the target feature matrix (for the non-point random mark to be identified, the corresponding coordinates refer to position coordinates constructed based on the distribution position characteristics of the random mark in the first coordinate system when the corresponding feature parameters are determined), constructing a reference distance set corresponding to the reference feature matrix according to respective corresponding coordinates of each anti-counterfeiting random mark in the reference feature matrix (for non-point anti-counterfeiting random marks, the corresponding coordinates refer to position coordinates constructed based on the distribution position characteristics of the anti-counterfeiting random marks in a first coordinate system when the corresponding feature parameters are determined); and then, calculating the norm of the target distance collection and the reference distance collection, and further judging whether the norm is greater than a preset norm threshold value, if so, determining that the commodity to be detected is not a legal commodity, and if not, determining that the commodity to be detected is a legal commodity.
Specifically, the server may target the target feature matrix,constructing a horizontal distance set d according to the abscissa (namely x value) corresponding to each random mark to be identifiedh=(d1,d2,…,dn) Constructing a vertical distance set d according to the ordinate (namely y value) respectively corresponding to each random mark to be identifiedv=(d1+n,d2+n,…,d2n) Then, the horizontal distance set and the vertical distance set are combined to obtain a target distance set d ═ corresponding to the target feature matrix (d ═ of the target feature matrix1,d2,…,dn,d1+n,d2+n,…,d2n). Similarly, the server constructs a horizontal distance set O according to the abscissa (i.e. x value) corresponding to each anti-counterfeiting random mark in the reference feature matrixh=(O1,O2,…,On) Constructing a vertical distance set Ov (O) according to the ordinate (i.e. y value) corresponding to each anti-counterfeiting random mark1+n,O2+n,…,O2n) Then, the horizontal distance set and the vertical distance set are combined to obtain a reference distance set O ═ corresponding to the reference feature matrix (O)1,O2,…,On,O1+n,O2+n,…,O2n)。
Furthermore, the server may calculate a norm S corresponding to the target distance set d and the reference distance set o according to the following formula:
Figure BDA0002694323170000141
wherein d isiFor the ith parameter, o, in the target distance set diIs the ith parameter in the reference distance set o.
When the calculated norm S is greater than the preset norm threshold, it may be determined that the commodity to be detected is not a legitimate commodity, and when the calculated norm S is not greater than the preset norm threshold, it may be determined that the commodity to be detected is a legitimate commodity.
It should be understood that the preset norm threshold may be set according to actual requirements, and the preset norm threshold is not specifically limited herein.
After the server determines the anti-counterfeiting detection result, namely whether the commodity to be detected is a legal commodity or not, the anti-counterfeiting detection result can be fed back to the commodity detection application or the commodity detection small program, so that the commodity detection application or the commodity detection small program can inform a user whether the currently detected commodity to be detected is a legal commodity or not.
In the anti-counterfeiting detection method, a legal merchant can randomly endow an anti-counterfeiting random mark on an outer package of a legal commodity when producing the legal commodity, and keep a reference image comprising an anti-counterfeiting identification code and the anti-counterfeiting random mark on the legal commodity. The anti-counterfeiting random mark on the legal commodity is randomly assigned by the legal merchant when the legal merchant generates the legal commodity, and has extremely high randomness, so that the illegal merchant often needs to consume extremely high counterfeiting cost to realize when the anti-counterfeiting random mark on the legal commodity is completely re-engraved when the illegal merchant manufactures the fake commodity, and the counterfeiting is basically impossible.
The embodiment of the present application further provides an anti-counterfeit detection device, refer to fig. 4, and fig. 4 is a schematic structural diagram of the anti-counterfeit detection device provided in the embodiment of the present application. As shown in fig. 4, the apparatus includes:
a target image obtaining module 401, configured to obtain a target image uploaded by a user; the target image is obtained by shooting a commodity to be detected, and the target image comprises an identification code to be identified and a random mark to be identified on the commodity to be detected;
a reference image obtaining module 402, configured to invoke a reference image corresponding to the to-be-detected commodity according to the identification code to be identified; the reference image is obtained by shooting a legal commodity, and the reference image comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity;
a target image processing module 403, configured to process the target image based on a reference image corresponding to the reference image to obtain a target reference image; the area corresponding to the target reference image is the same as the area corresponding to the reference image;
a commodity detection module 404, configured to detect whether the commodity to be detected is the legitimate commodity according to the feature of the random mark to be identified in the target reference image and the feature of the anti-counterfeit random mark in the reference image.
Optionally, when the random mark to be identified is a non-dot mark, the commodity detection module 404 is specifically configured to:
constructing a first coordinate system in both the target reference image and the benchmark reference image;
for each random mark to be recognized in the target reference image, determining a characteristic parameter corresponding to the random mark to be recognized according to the distribution position characteristic and/or the shape characteristic of the random mark to be recognized in the first coordinate system; constructing a target characteristic matrix according to the characteristic parameters corresponding to the random marks to be identified in the target reference image; the characteristic parameters corresponding to the random mark to be identified comprise: the coordinate is determined according to the distribution position characteristics of the random mark to be recognized in the first coordinate system, and/or the shape parameter is determined according to the shape characteristics of the random mark to be recognized;
determining characteristic parameters corresponding to each anti-counterfeiting random mark in the reference image according to the distribution position characteristics and/or the shape characteristics of the anti-counterfeiting random mark in the first coordinate system; constructing a benchmark characteristic matrix according to the characteristic parameters corresponding to the anti-counterfeiting random marks in the benchmark reference image; the characteristic parameters corresponding to the anti-counterfeiting random mark comprise: coordinates determined according to the distribution position characteristics of the anti-counterfeiting random mark in the first coordinate system and/or shape parameters determined according to the shape characteristics of the anti-counterfeiting random mark;
and detecting whether the commodity to be detected is the legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
Optionally, when the random mark to be identified is a dot mark, the commodity detection module 404 is specifically configured to:
constructing a second coordinate system in both the target reference image and the benchmark reference image;
determining the coordinates of the random mark to be recognized in the second coordinate system as the coordinates corresponding to the random mark to be recognized aiming at each random mark to be recognized in the target reference image; constructing a target feature matrix according to the respective corresponding coordinates of each random mark to be identified in the target reference image;
determining the coordinates of the anti-counterfeiting random mark in the second coordinate system as the coordinates corresponding to the anti-counterfeiting random mark aiming at each anti-counterfeiting random mark in the reference image; constructing a benchmark characteristic matrix according to the respective corresponding coordinates of each anti-counterfeiting random mark in the benchmark reference image;
and detecting whether the commodity to be detected is the legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
Optionally, the commodity detection module 404 is specifically configured to:
detecting the number of difference parameters in the target feature matrix and the reference feature matrix;
and judging whether the number of the difference parameters is larger than a preset parameter number threshold value, if so, determining that the commodity to be detected is not the legal commodity, and if not, determining that the commodity to be detected is the legal commodity.
Optionally, the commodity detection module 404 is specifically configured to:
constructing a target distance collection corresponding to the target feature matrix according to the respective corresponding coordinates of each random mark to be identified in the target feature matrix;
constructing a reference distance collection corresponding to the reference characteristic matrix according to the coordinates corresponding to the anti-counterfeiting random marks in the reference characteristic matrix;
calculating norms of the target distance collection and the reference distance collection;
and judging whether the norm is greater than a preset norm threshold value, if so, determining that the commodity to be detected is not the legal commodity, and if not, determining that the commodity to be detected is the legal commodity.
Optionally, the commodity detection module 404 is specifically configured to:
and detecting whether the commodity to be detected is the legal commodity or not according to the color characteristics of the random mark to be identified in the target reference image and the color characteristics of the anti-counterfeiting random mark in the reference image.
Optionally, the apparatus further comprises:
the definition judging module is used for judging whether the definition of the target image meets a preset definition standard or not after the target image uploaded by the user is obtained; if not, returning a prompt message for re-uploading the target image; if yes, continuing to execute the reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code.
Optionally, the reference image acquiring module 402 is specifically configured to:
identifying the identification code to be identified in the target image to obtain target information;
judging whether reference information consistent with the target information exists in reference information prestored in a database; the reference information prestored in the database is information carried in the anti-counterfeiting identification code on the legal commodity;
if not, determining that the commodity to be detected is not the legal commodity; and if so, determining a reference image corresponding to the to-be-detected commodity according to the reference information consistent with the target information.
Optionally, the target image processing module 403 is specifically configured to:
performing rotation transformation processing on the target image based on the reference image to obtain a reference image with the same direction as the reference image;
and performing image cutting processing on the reference image to obtain the target reference image which comprises an interested area and has the same size as the standard reference image.
Optionally, the apparatus further comprises:
and the image light brightness processing module is used for filtering the light and brightness of the target image and the reference image after the target image uploaded by the user is obtained, so that the light and the brightness of the target image are respectively consistent with the light and the brightness of the reference image.
In the anti-counterfeiting detection device, a legal merchant can randomly endow an anti-counterfeiting random mark on an outer package of a legal commodity when producing the legal commodity, and keep a reference image comprising an anti-counterfeiting identification code and the anti-counterfeiting random mark on the legal commodity. The anti-counterfeiting random mark on the legal commodity is randomly assigned by the legal merchant when the legal merchant generates the legal commodity, and has extremely high randomness, so that the illegal merchant often needs to consume extremely high counterfeiting cost to realize when the anti-counterfeiting random mark on the legal commodity is completely re-engraved when the illegal merchant manufactures the fake commodity, and the counterfeiting is basically impossible.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing computer programs.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (11)

1. An anti-counterfeiting detection method, characterized in that the method comprises:
acquiring a target image uploaded by a user; the target image is obtained by shooting a commodity to be detected, and the target image comprises an identification code to be identified and a random mark to be identified on the commodity to be detected;
calling a reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code; the reference image is obtained by shooting a legal commodity, and the reference image comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity;
processing the target image based on a reference image corresponding to the reference image to obtain a target reference image; the area corresponding to the target reference image is the same as the area corresponding to the reference image;
and detecting whether the commodity to be detected is the legal commodity or not according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
2. The method according to claim 1, wherein when the random mark to be recognized is a non-dot mark, the detecting whether the commodity to be detected is the legal commodity according to the feature of the random mark to be recognized in the target reference image and the feature of the anti-counterfeiting random mark in the benchmark reference image comprises:
constructing a first coordinate system in both the target reference image and the benchmark reference image;
for each random mark to be recognized in the target reference image, determining a characteristic parameter corresponding to the random mark to be recognized according to the distribution position characteristic and/or the shape characteristic of the random mark to be recognized in the first coordinate system; constructing a target characteristic matrix according to the characteristic parameters corresponding to the random marks to be identified in the target reference image; the characteristic parameters corresponding to the random mark to be identified comprise: the coordinate is determined according to the distribution position characteristics of the random mark to be recognized in the first coordinate system, and/or the shape parameter is determined according to the shape characteristics of the random mark to be recognized;
determining characteristic parameters corresponding to each anti-counterfeiting random mark in the reference image according to the distribution position characteristics and/or the shape characteristics of the anti-counterfeiting random mark in the first coordinate system; constructing a benchmark characteristic matrix according to the characteristic parameters corresponding to the anti-counterfeiting random marks in the benchmark reference image; the characteristic parameters corresponding to the anti-counterfeiting random mark comprise: coordinates determined according to the distribution position characteristics of the anti-counterfeiting random mark in the first coordinate system and/or shape parameters determined according to the shape characteristics of the anti-counterfeiting random mark;
and detecting whether the commodity to be detected is the legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
3. The method according to claim 1, wherein when the random mark to be recognized is a dot-like mark, the detecting whether the commodity to be detected is the legal commodity according to the feature of the random mark to be recognized in the target reference image and the feature of the anti-counterfeiting random mark in the benchmark reference image comprises:
constructing a second coordinate system in both the target reference image and the benchmark reference image;
determining the coordinates of the random mark to be recognized in the second coordinate system as the coordinates corresponding to the random mark to be recognized aiming at each random mark to be recognized in the target reference image; constructing a target feature matrix according to the respective corresponding coordinates of each random mark to be identified in the target reference image;
determining the coordinates of the anti-counterfeiting random mark in the second coordinate system as the coordinates corresponding to the anti-counterfeiting random mark aiming at each anti-counterfeiting random mark in the reference image; constructing a benchmark characteristic matrix according to the respective corresponding coordinates of each anti-counterfeiting random mark in the benchmark reference image;
and detecting whether the commodity to be detected is the legal commodity or not according to the target characteristic matrix and the reference characteristic matrix.
4. The method according to claim 2 or 3, wherein the detecting whether the commodity to be detected is the legal commodity according to the target feature matrix and the reference feature matrix comprises:
detecting the number of difference parameters in the target feature matrix and the reference feature matrix;
and judging whether the number of the difference parameters is larger than a preset parameter number threshold value, if so, determining that the commodity to be detected is not the legal commodity, and if not, determining that the commodity to be detected is the legal commodity.
5. The method according to claim 2 or 3, wherein the detecting whether the commodity to be detected is the legal commodity according to the target feature matrix and the reference feature matrix comprises:
constructing a target distance collection corresponding to the target feature matrix according to the respective corresponding coordinates of each random mark to be identified in the target feature matrix;
constructing a reference distance collection corresponding to the reference characteristic matrix according to the coordinates corresponding to the anti-counterfeiting random marks in the reference characteristic matrix;
calculating norms of the target distance collection and the reference distance collection;
and judging whether the norm is greater than a preset norm threshold value, if so, determining that the commodity to be detected is not the legal commodity, and if not, determining that the commodity to be detected is the legal commodity.
6. The method according to claim 1, wherein the detecting whether the commodity to be detected is the legal commodity according to the features of the random mark to be recognized in the target reference image and the features of the anti-counterfeiting random mark in the benchmark reference image comprises:
and detecting whether the commodity to be detected is the legal commodity or not according to the color characteristics of the random mark to be identified in the target reference image and the color characteristics of the anti-counterfeiting random mark in the reference image.
7. The method of claim 1, wherein after the obtaining of the target image uploaded by the user, the method further comprises:
judging whether the definition of the target image meets a preset definition standard or not;
if not, returning a prompt message for re-uploading the target image; if yes, continuing to execute the reference image corresponding to the to-be-detected commodity according to the to-be-identified identification code.
8. The method of claim 1, wherein after the obtaining of the target image uploaded by the user, the method further comprises:
identifying the identification code to be identified in the target image to obtain target information;
judging whether reference information consistent with the target information exists in reference information prestored in a database; the reference information prestored in the database is information carried in the anti-counterfeiting identification code on the legal commodity;
if not, determining that the commodity to be detected is not the legal commodity; and if so, determining a reference image corresponding to the to-be-detected commodity according to the reference information consistent with the target information.
9. The method of claim 1, wherein processing the target image based on a reference image corresponding to the reference image to obtain a target reference image comprises:
performing rotation transformation processing on the target image based on the reference image to obtain a reference image with the same direction as the reference image;
and performing image cutting processing on the reference image to obtain the target reference image which comprises an interested area and has the same size as the standard reference image.
10. The method of claim 1, wherein after the obtaining of the target image uploaded by the user, the method further comprises:
and filtering the light and the brightness of the target image to make the light and the brightness of the target image consistent with those of the reference image respectively.
11. An anti-counterfeiting detection device, comprising:
the target image acquisition module is used for acquiring a target image uploaded by a user; the target image is obtained by shooting a commodity to be detected, and the target image comprises an identification code to be identified and a random mark to be identified on the commodity to be detected;
the reference image acquisition module is used for calling a reference image corresponding to the to-be-detected commodity according to the identification code to be identified; the reference image is obtained by shooting a legal commodity, and the reference image comprises an anti-counterfeiting identification code and an anti-counterfeiting random mark on the legal commodity;
the target image processing module is used for processing the target image based on a reference image corresponding to the reference image to obtain a target reference image; the area corresponding to the target reference image is the same as the area corresponding to the reference image;
and the commodity detection module is used for detecting whether the commodity to be detected is the legal commodity according to the characteristics of the random mark to be identified in the target reference image and the characteristics of the anti-counterfeiting random mark in the reference image.
CN202011001024.0A 2020-09-22 2020-09-22 Anti-counterfeiting detection method and device Pending CN111932281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011001024.0A CN111932281A (en) 2020-09-22 2020-09-22 Anti-counterfeiting detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001024.0A CN111932281A (en) 2020-09-22 2020-09-22 Anti-counterfeiting detection method and device

Publications (1)

Publication Number Publication Date
CN111932281A true CN111932281A (en) 2020-11-13

Family

ID=73334403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001024.0A Pending CN111932281A (en) 2020-09-22 2020-09-22 Anti-counterfeiting detection method and device

Country Status (1)

Country Link
CN (1) CN111932281A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113408526A (en) * 2021-06-18 2021-09-17 深圳市数标国际科技有限公司 Image recognition anti-counterfeiting method and image recognition anti-counterfeiting system based on Handle identification positioning

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093173A (en) * 2011-11-02 2013-05-08 李华容 Anti-fake method, anti-fake label and label manufacture method
US20140258156A1 (en) * 2013-03-05 2014-09-11 Achilleas Tziazas System and method to authenticate integrated circuits
CN108647975A (en) * 2018-04-03 2018-10-12 王登顺 Method for anti-counterfeit and application are precisely compared based on random sprinkling overlay image
CN109636417A (en) * 2018-12-04 2019-04-16 雷华 A kind of method for anti-counterfeit and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093173A (en) * 2011-11-02 2013-05-08 李华容 Anti-fake method, anti-fake label and label manufacture method
US20140258156A1 (en) * 2013-03-05 2014-09-11 Achilleas Tziazas System and method to authenticate integrated circuits
CN108647975A (en) * 2018-04-03 2018-10-12 王登顺 Method for anti-counterfeit and application are precisely compared based on random sprinkling overlay image
CN109636417A (en) * 2018-12-04 2019-04-16 雷华 A kind of method for anti-counterfeit and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113408526A (en) * 2021-06-18 2021-09-17 深圳市数标国际科技有限公司 Image recognition anti-counterfeiting method and image recognition anti-counterfeiting system based on Handle identification positioning

Similar Documents

Publication Publication Date Title
CN108229120B (en) Face unlocking method, face unlocking information registration device, face unlocking information registration equipment, face unlocking program and face unlocking information registration medium
CN102663600B (en) Anti-counterfeiting system based on digital watermarks and barcodes, anti-counterfeiting method for anti-counterfeiting system and application of anti-counterfeiting system
Amerini et al. A sift-based forensic method for copy–move attack detection and transformation recovery
US20170344823A1 (en) Controlled authentication of physical objects
US20180349695A1 (en) System and method for detecting the authenticity of products
CN104933721B (en) Stitching image altering detecting method based on color filter array characteristic
Christlein et al. A study on features for the detection of copy-move forgeries
EP2619711A2 (en) Machine-readable symbols
CN110428028B (en) Identification and verification method, device, equipment and medium based on quasi-dynamic laser label
WO2013039002A1 (en) Solid identification information generation device, article determination device and article determination system and method
CN101009755B (en) Watermarked image generation apparatus and method, watermarked image analysis apparatus
CN111950673B (en) Commodity anti-counterfeiting verification method, device and equipment based on two-dimensional code and storage medium
CN108427959A (en) Board state collection method based on image recognition and system
CN113627411A (en) Super-resolution-based commodity identification and price matching method and system
CN106169064A (en) The image-recognizing method of a kind of reality enhancing system and system
CN114092108A (en) Method for identifying authenticity of Pu' er tea
CN110533704B (en) Method, device, equipment and medium for identifying and verifying ink label
CN110009080B (en) Two-dimensional code generation method, verification method, server and two-dimensional code
CN106709915B (en) Image resampling operation detection method
CN111932281A (en) Anti-counterfeiting detection method and device
US8269849B2 (en) Method and system for testing image pipelines
CN111932282A (en) Anti-counterfeiting detection method and device
CN106845540B (en) Image resampling operation interpolation type identification method
EP3992356A1 (en) Method for verifying product authenticity and establishing authorized product data with fabric features
CN111316305A (en) System and method for authenticating a consumer product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination