CN110569716A - Goods shelf image copying detection method - Google Patents

Goods shelf image copying detection method Download PDF

Info

Publication number
CN110569716A
CN110569716A CN201910680901.2A CN201910680901A CN110569716A CN 110569716 A CN110569716 A CN 110569716A CN 201910680901 A CN201910680901 A CN 201910680901A CN 110569716 A CN110569716 A CN 110569716A
Authority
CN
China
Prior art keywords
lbp
image
neighborhood
pixel
detection method
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
CN201910680901.2A
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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201910680901.2A priority Critical patent/CN110569716A/en
Publication of CN110569716A publication Critical patent/CN110569716A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

a shelf image duplication detection method, the method comprising the steps of: (1) obtaining a shelf image to be detected; (2) preprocessing the shelf image in the step (1); (3) processing the image obtained in the step (2) by using an LBP (local binary pattern) calculation method to obtain a texture description map; (4) extracting LBP characteristic vectors of the texture description maps in the step (3); (5) and (4) inputting the LBP feature vector obtained in the step (4) into an XGboost model to obtain a class label to which the image belongs. According to the method, the characteristics of very fine Moire patterns in the copied image are captured through the multi-scale LBP, and then the XGboost model is combined to classify and identify the copied image. Can help the fast-moving goods enterprises to effectively solve the problems in the business.

Description

Goods shelf image copying detection method
Technical Field
the invention relates to the field of image processing, in particular to a goods shelf image copying detection method.
Background
The management of the fast-moving consumer goods enterprise to the offline sales terminal depends on the image of the goods shelf in the store uploaded by the store owner, and then the image is audited online by the auditor.
Generally, a fast-moving goods enterprise can restrict a store owner to call a mobile phone camera for shooting when using a mobile phone to upload an image, an IP address must be positioned near a store, and the like, so as to avoid some common cheating means. But store owners tend to upload the copied images. The copied image is very similar to the real image, and even an experienced image auditor can hardly recognize the copied image. The copying cheating means not only brings direct economic loss to enterprises, but also brings misleading information to marketing management of the enterprises. Therefore, identifying whether images uploaded by a store owner are being copied is a pressing need for a fast-moving consumer product enterprise.
The phenomenon of moire is often generated due to the interference of the spatial frequency of the photosensitive element of the camera and the spatial distribution of the image presented by the liquid crystal screen, and whether the image is copied or not can be judged by detecting the moire.
local Binary Pattern (LBP) is an operator that describes Local texture features. By comparing the pixel values of the target pixel point and the neighborhood pixel point in the window range of the image, the texture information of the target image can be calculated and extracted. On the basis of LBP, LBP windows with different sizes can be combined to extract texture information in the multi-scale range of the image.
XGboost is one of boosting algorithms. The idea of Boosting is to integrate many weak classifiers together to form one strong classifier. Because the XGboost is a lifting tree model, a plurality of tree models are integrated together to form a strong classifier. The Tree model used is a Classification Regression Tree (CART).
disclosure of Invention
in order to solve the above problems, the present invention provides a method for detecting a duplication of a shelf image based on Local Binary Pattern (LBP). The method utilizes the characteristic that LBP has strong expressive force on local texture characteristics to capture the characteristics of Moire patterns in the copied image, and then utilizes an XGboost model to classify and judge whether the image is copied or not.
the technical scheme adopted by the invention for solving the technical problems is as follows:
A shelf image copying detection method comprises the following steps:
(1) obtaining a shelf image to be detected;
(2) Preprocessing the shelf image in the step (1);
(3) Processing the image obtained in the step (2) by using an LBP (local binary pattern) calculation method to obtain a texture description map;
(4) Extracting LBP characteristic vectors of the texture description maps in the step (3);
(5) and (4) inputting the LBP feature vector obtained in the step (4) into an XGboost model to obtain a class label to which the image belongs.
Further, in the step (2), the image preprocessing includes the following steps:
(2a) Converting an original RGB three-channel image into a single-channel gray image, wherein the conversion formula is as follows:
Gray=0.299R+0.587G+0.114B;
(2b) and (3) uniformly dividing the gray-scale image obtained in the step (2a) into 8 x 8 sub-images.
still further, in the step (3), the process of extracting the texture description map includes the following steps:
(3a) And (3) calculating each subgraph output in the step (2) by using an LBP operator. For each pixel in each sub-image, comparing the adjacent 8 pixel points in the neighborhood with the central point to obtain a gray value, if the pixel value of the point is greater than that of the central point, marking the position corresponding to the pixel point as 1, and otherwise, marking the position as 0.8 neighborhood points in each pixel neighborhood can generate 8-bit 0 and 1 values through comparison, the 8 neighborhood points are regarded as binary numbers and are arranged according to a fixed sequence, and an eight-bit binary number can be obtained to represent the field; and then converting the LBP value into a decimal system to obtain the LBP value of the central point, wherein the calculation formula is as follows:
wherein (x)c,yc) Is a center point, gcpixel value of center, gpIs the pixel value of the neighborhood point and s (x) is the corresponding LBP value. P is the number of neighborhood points and R is the neighborhood range. After all the pixel points are calculated, a corresponding LBP map is obtained;
(3b) repeating the LBP calculation of step (3a) by using LBP operators with the scales of 5 x 5, 7 x 7 and 9 x 9, wherein the neighborhood points are (x)c+Δxk,yc+Δyk) Where the relative coordinate offset of the neighborhood point to the center point is Δ xk,Δykthe calculation formula of (2) is as follows:
(3c) Integrating the LBP maps under the four scales obtained in the step (3a) and the step (3b), and averaging to obtain a texture description map;
(3d) and (3) repeating the steps (3a), (3b) and (3c) for each sub-graph output by the step (2). An LBP map of 8X 8 subunits was obtained.
In the step (4), the LBP feature vector extraction process includes the following steps:
(4a) Calculating the histogram of the LBP map of each image block output in the step (3), and converting the histogram into a one-dimensional sequence to obtain the corresponding sub-graph LBP characteristic vector
(4b) and (4) splicing the 8 x 8 LBP feature vectors output in the step (4a) into one-dimensional vectors with the length of 64 times to obtain the overall feature vectors of the original image.
In the step (5), the target of the classification model selects two classifications, an L2 regular term parameter lambda controlling the complexity of the model is 2, a parameter gamma controlling whether post pruning is 0.3, a depth parameter max depth of the decision tree is 6, a percentage subsample of the randomly sampled training sample is 0.8, and a column sampling parameter colsamplebytree when the decision tree is generated is 0.8.
The invention has the following beneficial effects: capturing very fine Moire characteristics in the copied image through multi-scale LBP, and then classifying and identifying the copied image by combining an XGboost model. Can help the fast-moving goods enterprises to effectively solve the problems in the business.
Drawings
FIG. 1 is a flow chart of an implementation of the present invention;
fig. 2 is a schematic diagram of LBP feature extraction.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1 and 2, a shelf image duplication detection method includes the following steps:
(1) Obtaining a shelf image to be detected;
(2) preprocessing the shelf image in the step (1);
(3) Processing the image obtained in the step (2) by using an LBP (local binary pattern) calculation method to obtain a texture description map;
(4) Extracting LBP characteristic vectors of the texture description maps in the step (3);
(5) and (4) inputting the LBP feature vector obtained in the step (4) into an XGboost model to obtain a class label to which the image belongs.
Further, in the step (2), the image preprocessing includes the following steps:
(2a) converting an original RGB three-channel image into a single-channel gray image, wherein the conversion formula is as follows:
Gray=0.299R+0.587G+0.114B;
(2b) and (3) uniformly dividing the gray-scale image obtained in the step (2a) into 8 x 8 sub-images.
Still further, in the step (3), the process of extracting the texture description map includes the following steps:
(3a) And (3) calculating each subgraph output in the step (2) by using an LBP operator. For each pixel in each sub-image, comparing the adjacent 8 pixel points in the neighborhood with the central point to obtain a gray value, if the pixel value of the point is greater than that of the central point, marking the position corresponding to the pixel point as 1, and otherwise, marking the position as 0.8 neighborhood points in each pixel neighborhood can generate 8-bit 0 and 1 values through comparison, the 8 neighborhood points are regarded as binary numbers and are arranged according to a fixed sequence, and an eight-bit binary number can be obtained to represent the field; and then converting the LBP value into a decimal system to obtain the LBP value of the central point, wherein the calculation formula is as follows:
Wherein (x)c,yc) Is a center point, gcpixel value of center, gpis the pixel value of the neighborhood point and s (x) is the corresponding LBP value. P is the number of neighborhood points and R is the neighborhood range. After all the pixel points are calculated, a corresponding LBP map is obtained;
(3b) Repeating the LBP calculation of step (3a) by using LBP operators with the scales of 5 x 5, 7 x 7 and 9 x 9, wherein the neighborhood points are (x)c+Δxk,yc+Δyk) Where the relative coordinate offset of the neighborhood point to the center point is Δ xk,Δykthe calculation formula of (2) is as follows:
(3c) Integrating the LBP maps under the four scales obtained in the step (3a) and the step (3b), and averaging to obtain a texture description map;
(3d) And (3) repeating the steps (3a), (3b) and (3c) for each sub-graph output by the step (2). An LBP map of 8X 8 subunits was obtained.
in the step (4), the LBP feature vector extraction process includes the following steps:
(4a) Calculating the histogram of the LBP map of each image block output in the step (3), and converting the histogram into a one-dimensional sequence to obtain the corresponding sub-graph LBP characteristic vector
(4b) and (4) splicing the 8 x 8 LBP feature vectors output in the step (4a) into one-dimensional vectors with the length of 64 times to obtain the overall feature vectors of the original image.
In the step (5), the target of the classification model selects two classifications, an L2 regular term parameter lambda controlling the complexity of the model is 2, a parameter gamma controlling whether post pruning is 0.3, a depth parameter max depth of the decision tree is 6, a percentage subsample of the randomly sampled training sample is 0.8, and a column sampling parameter colsamplebytree when the decision tree is generated is 0.8.

Claims (5)

1. A shelf image copying detection method is characterized by comprising the following steps:
(1) obtaining a shelf image to be detected;
(2) preprocessing the shelf image in the step (1);
(3) Processing the image obtained in the step (2) by using an LBP (local binary pattern) calculation method to obtain a texture description map;
(4) extracting LBP characteristic vectors of the texture description maps in the step (3);
(5) and (4) inputting the LBP feature vector obtained in the step (4) into an XGboost model to obtain a class label to which the image belongs.
2. The shelf image duplication detection method of claim 1, wherein in the step (2), the image preprocessing comprises the steps of:
(2a) Converting an original RGB three-channel image into a single-channel gray image, wherein the conversion formula is as follows:
Gray=0.299R+0.587G+0.114B;
(2b) And (3) uniformly dividing the gray-scale image obtained in the step (2a) into 8 x 8 sub-images.
3. the shelf image duplication detection method according to claim 1 or 2, wherein in the step (3), the texture description atlas extracting process comprises the following steps:
(3a) Calculating each sub-image output in the step (2) by using an LBP operator, comparing 8 adjacent pixel points in a neighborhood with a central point for each pixel in each sub-image, if the pixel value of the point is greater than that of the central point, marking the position corresponding to the pixel point as 1, otherwise marking the position as 0, comparing 8 neighborhood points in each pixel neighborhood to generate 8-bit 0 and 1 values, regarding the 8 neighborhood points as binary numbers and arranging the binary numbers according to a fixed sequence, thus obtaining an eight-bit binary number to represent the field; and then converting the LBP value into a decimal system to obtain the LBP value of the central point, wherein the calculation formula is as follows:
Wherein (x)c,yc) Is a center point, gcpixel value of center, gptaking the pixel values of the neighborhood points, s (x) as corresponding LBP values, P as the number of the neighborhood points and R as the neighborhood range, and obtaining a corresponding LBP map after all the pixel points are calculated;
(3b) Repeating the LBP calculation of step (3a) by using LBP operators with the scales of 5 x 5, 7 x 7 and 9 x 9, wherein the neighborhood points are (x)c+Δxk,yc+Δyk) Where the relative coordinate offset of the neighborhood point to the center point is Δ xk,ΔykThe calculation formula of (2) is as follows:
(3c) Integrating the LBP maps under the four scales obtained in the step (3a) and the step (3b), and averaging to obtain a texture description map;
(3d) And (3) repeating the steps (3a), (3b) and (3c) for each subgraph output in the step (2) to obtain 8 x 8 sub-LBP maps.
4. The shelf image duplication detection method as claimed in claim 1 or 2, wherein in step (4), the LBP feature vector extraction process comprises the following steps:
(4a) calculating a histogram of the LBP map of each image block output in the step (3), and converting the histogram into a one-dimensional sequence to obtain a corresponding sub-graph LBP feature vector;
(4b) And (4) splicing the 8 x 8 LBP feature vectors output in the step (4a) into one-dimensional vectors with the length of 64 times to obtain the overall feature vectors of the original image.
5. the shelf image duplication detection method according to claim 1 or 2, wherein in step (5), the target of the classification model selects two classes, the L2 regular term parameter lambda controlling the complexity of the model is 2, the gamma controlling whether post-pruning is 0.3, the depth parameter max depth of the decision tree is 6, the percentage subsample of the randomly sampled training samples is 0.8, and the column sampling parameter colsample byte when the decision tree is generated is 0.8.
CN201910680901.2A 2019-07-26 2019-07-26 Goods shelf image copying detection method Pending CN110569716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910680901.2A CN110569716A (en) 2019-07-26 2019-07-26 Goods shelf image copying detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910680901.2A CN110569716A (en) 2019-07-26 2019-07-26 Goods shelf image copying detection method

Publications (1)

Publication Number Publication Date
CN110569716A true CN110569716A (en) 2019-12-13

Family

ID=68773410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910680901.2A Pending CN110569716A (en) 2019-07-26 2019-07-26 Goods shelf image copying detection method

Country Status (1)

Country Link
CN (1) CN110569716A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705608A (en) * 2019-09-12 2020-01-17 杭州惠合信息科技有限公司 Retail terminal display shelf reproduction identification method and device
CN111798376A (en) * 2020-07-08 2020-10-20 泰康保险集团股份有限公司 Image recognition method and device, electronic equipment and storage medium
CN112258481A (en) * 2020-10-23 2021-01-22 北京云杉世界信息技术有限公司 Portal photo reproduction detection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727573A (en) * 2008-10-13 2010-06-09 汉王科技股份有限公司 Method and device for estimating crowd density in video image
CN107909073A (en) * 2017-10-18 2018-04-13 天津大学 Multidimensional local binary patterns and the hand-written music score spectral line delet method of machine learning
CN108805050A (en) * 2018-05-28 2018-11-13 上海交通大学 Electric wire detection method based on local binary patterns
CN109558794A (en) * 2018-10-17 2019-04-02 平安科技(深圳)有限公司 Image-recognizing method, device, equipment and storage medium based on moire fringes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727573A (en) * 2008-10-13 2010-06-09 汉王科技股份有限公司 Method and device for estimating crowd density in video image
CN107909073A (en) * 2017-10-18 2018-04-13 天津大学 Multidimensional local binary patterns and the hand-written music score spectral line delet method of machine learning
CN108805050A (en) * 2018-05-28 2018-11-13 上海交通大学 Electric wire detection method based on local binary patterns
CN109558794A (en) * 2018-10-17 2019-04-02 平安科技(深圳)有限公司 Image-recognizing method, device, equipment and storage medium based on moire fringes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王延江等: "《数字图像处理》", 30 November 2016 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705608A (en) * 2019-09-12 2020-01-17 杭州惠合信息科技有限公司 Retail terminal display shelf reproduction identification method and device
CN111798376A (en) * 2020-07-08 2020-10-20 泰康保险集团股份有限公司 Image recognition method and device, electronic equipment and storage medium
CN111798376B (en) * 2020-07-08 2023-10-17 泰康保险集团股份有限公司 Image recognition method, device, electronic equipment and storage medium
CN112258481A (en) * 2020-10-23 2021-01-22 北京云杉世界信息技术有限公司 Portal photo reproduction detection method

Similar Documents

Publication Publication Date Title
CN107545239B (en) Fake plate detection method based on license plate recognition and vehicle characteristic matching
EP3455782B1 (en) System and method for detecting plant diseases
CN108090511B (en) Image classification method and device, electronic equipment and readable storage medium
Yimyam et al. The automated parking fee calculation using license plate recognition system
CN111008961B (en) Transmission line equipment defect detection method and system, equipment and medium thereof
CN111126115B (en) Violent sorting behavior identification method and device
CN111915704A (en) Apple hierarchical identification method based on deep learning
CN110569716A (en) Goods shelf image copying detection method
CN107220664B (en) Oil bottle boxing and counting method based on structured random forest
CN109948625A (en) Definition of text images appraisal procedure and system, computer readable storage medium
CN108268832A (en) Electric operating monitoring method, device, storage medium and computer equipment
Do et al. Automatic license plate recognition using mobile device
Masood et al. Plants disease segmentation using image processing
CN109448009A (en) Infrared Image Processing Method and device for transmission line faultlocating
Jagtap et al. Multi-style license plate recognition using artificial neural network for Indian vehicles
Patki et al. Cotton leaf disease detection & classification using multi SVM
CN110991434B (en) Self-service terminal certificate identification method and device
CN108021913A (en) Certificate photograph information identifying method and device
CN107301421A (en) The recognition methods of vehicle color and device
Triantoro et al. Image based water gauge reading developed with ANN Kohonen
CN111507119A (en) Identification code identification method and device, electronic equipment and computer readable storage medium
CN106650824B (en) Moving object classification method based on support vector machines
Garg et al. Color based segmentation using K-mean clustering and watershed segmentation
CN117218672A (en) Deep learning-based medical records text recognition method and system
CN116824624A (en) Cow identity recognition method, system, equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213