CN113158928B - Concrete test block anti-counterfeiting method based on image recognition - Google Patents

Concrete test block anti-counterfeiting method based on image recognition Download PDF

Info

Publication number
CN113158928B
CN113158928B CN202110459242.7A CN202110459242A CN113158928B CN 113158928 B CN113158928 B CN 113158928B CN 202110459242 A CN202110459242 A CN 202110459242A CN 113158928 B CN113158928 B CN 113158928B
Authority
CN
China
Prior art keywords
template
test blocks
pictures
picture
gray
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.)
Active
Application number
CN202110459242.7A
Other languages
Chinese (zh)
Other versions
CN113158928A (en
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 Yunyi Technology Co ltd
Original Assignee
Zhejiang Yunyi 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 Zhejiang Yunyi Technology Co ltd filed Critical Zhejiang Yunyi Technology Co ltd
Priority to CN202110459242.7A priority Critical patent/CN113158928B/en
Publication of CN113158928A publication Critical patent/CN113158928A/en
Application granted granted Critical
Publication of CN113158928B publication Critical patent/CN113158928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The invention discloses a concrete test block anti-counterfeiting method based on image recognition, which comprises the following steps of: shooting and collecting test blocks marked by field characters through an APP installed on a mobile terminal at a detection site, uploading photos meeting requirements to a cloud for storage, and recording the photos as P1; the sample collection personnel take a photograph again by utilizing the APP installed on the mobile terminal to collect the delivered test blocks with characters, the method is simple and convenient to operate, high in practicability, and capable of preventing the concrete test blocks delivered to a laboratory from being replaced by utilizing an image recognition technology to cause different phenomena from the test blocks manufactured on site, taking a photograph through the mobile phone APP to collect the uploaded pictures of the test blocks on site, taking the photograph again after being delivered to the laboratory in cooperation with the photograph uploaded by taking the photograph again, and utilizing an image recognition algorithm to compare the images, so that a similarity result of comparison is provided, the method is convenient to operate, and convenient to test a large number of test blocks, meanwhile, the average accuracy rate reaches ninety five percent, and the behavior of fake concrete test blocks can be effectively prevented.

Description

Concrete test block anti-counterfeiting method based on image recognition
Technical Field
The invention belongs to the field of image recognition, and particularly relates to a concrete test block anti-counterfeiting method based on image recognition.
Background
At present, the counterfeiting condition in the laboratory material detection process is commonly detected in the construction field, especially the detection of concrete test blocks, the concrete test blocks sent to a laboratory are not in the same batch with the actual use of the engineering site, and even are artificially counterfeited and exchanged, and laboratory sample collection staff can hardly judge whether the sent concrete test block samples are the same piece with the site sampling test blocks, so that the detection data cannot truly embody the condition of the concrete used in the engineering site.
At present, the inspection and detection industry also provides different solutions to the problem, such as attaching a two-dimensional code or embedding a chip on a manufactured test block, but obviously, the solutions do not solve the problem well, and a counterfeiter can perform test block counterfeiting through the migration or counterfeiting of the two-dimensional code or the chip.
The invention comprises the following steps:
the invention aims to solve the problems and provide an image recognition-based concrete test block anti-counterfeiting method, which solves the problems in the background art.
In order to solve the problems, the invention provides a technical scheme that:
a concrete test block anti-counterfeiting method based on image recognition comprises the following steps:
s1, photographing and collecting test blocks marked by field characters through an APP installed on a mobile terminal at a detection site, uploading photos meeting requirements to a cloud for storage, and recording the photos as P1;
s2, the sample collection personnel shoots and collects the sent test blocks with the characters again by utilizing the APP installed on the mobile terminal, and then uploads the photos meeting the requirements to the cloud for storage, and records the photos as P2;
s3, carrying out contrast analysis on the text images in the P1 and the P2 by adopting an image contrast module through an image contrast algorithm, and then displaying the comparison result through a mobile terminal, wherein the mobile terminal in the step S1 is mobile phone equipment with GPS time;
the image comparison algorithm in the step S3 specifically includes the following procedures:
s31, firstly, reading in pictures P1 and P2, then respectively generating 256-by-256-size color and gray picture copies, and recording the copies as P1_ori and P1_gray and P2_ori and P2_gray;
s32, dividing the gray level images of the P1 and the P2, thereby generating a template;
s33, rotating the gray level images of P2 and P1 by-15 to 15 degrees to generate pictures to be matched, and taking the pictures as a picture group to be matched;
s34, performing template matching operation, and obtaining similarity1, similarity2 and corresponding matching positions after matching is completed;
s35, obtaining and outputting the final similarity of the two pictures;
s36, taking the template with higher similarity as an output picture out1, taking the other template as an out2, marking the position and the number of the template on the out1, marking the maximum matching position of each template on the out2, and outputting two color pictures.
Preferably, the step S32 of extracting the template from P1 specifically includes the following steps:
s321, carrying out binarization extraction on the P1_gray to obtain boundary points;
s322, calculating the number of boundary points in each block, recording the positions of the boundary points, and intercepting Patch at the same position on the P1_gray as a matching template.
Preferably, the automatic clipping operation is required before the template matching operation is performed in the step S34.
Preferably, the final similarity of the two pictures in the step S35 is an average value of the two similarities.
Preferably, in the step S322, the number of 4 blocks having the largest number should be taken when the number of boundary points in each block is calculated.
Preferably, the automatic cutting operation specifically includes: firstly, reading a picture, extracting straight lines parallel to the boundary of the picture by adopting a Hough transform function provided by opencv, determining the uppermost and lowermost two transverse straight lines and the leftmost longitudinal straight line in the obtained straight lines, framing the position of a cement block, cutting, obtaining a square picture, and adjusting the resolution for subsequent similarity matching.
The beneficial effects of the invention are as follows: the invention has simple and convenient operation and strong practicability, utilizes the image recognition technology to prevent the concrete test blocks sent to the laboratory from being replaced and causing different phenomena from the test blocks manufactured on site, takes photos of the uploaded site test blocks through the mobile phone APP, and matches the photos taken again after being sent to the laboratory, and utilizes the image recognition algorithm to compare the images, thereby providing the similarity result of comparison, not only being convenient to operate, but also being convenient for testing a large number of test blocks, and simultaneously having the average accuracy reaching ninety five percent, and being capable of effectively preventing the behavior of falsification of the concrete test blocks.
Description of the drawings:
for ease of illustration, the invention is described in detail by the following detailed description and the accompanying drawings.
FIG. 1 is a schematic illustration of the operational flow of the present invention;
FIG. 2 is a schematic diagram of a specific operational procedure of the present invention.
The specific embodiment is as follows:
as shown in fig. 1-2, the present embodiment adopts the following technical scheme:
examples:
a concrete test block anti-counterfeiting method based on image recognition comprises the following steps:
s1, photographing and collecting test blocks marked by field characters through an APP installed on a mobile terminal at a detection site, uploading photos meeting requirements to a cloud for storage, and recording the photos as P1;
s2, the sample collection personnel shoots and collects the sent test blocks with the characters again by utilizing the APP installed on the mobile terminal, and then uploads the photos meeting the requirements to the cloud for storage, and records the photos as P2;
s3, carrying out contrast analysis on the text images in the P1 and the P2 by adopting an image contrast module through an image contrast algorithm, and then displaying the comparison result through a mobile terminal, wherein the mobile terminal in the step S1 is mobile phone equipment with GPS time;
the image comparison algorithm in the step S3 specifically includes the following procedures:
s31, firstly, reading in pictures P1 and P2, then respectively generating 256-by-256-size color and gray picture copies, and recording the copies as P1_ori and P1_gray and P2_ori and P2_gray;
s32, dividing the gray level images of the P1 and the P2, thereby generating a template;
s33, rotating the gray level images of P2 and P1 by-15 to 15 degrees to generate pictures to be matched, and taking the pictures as a picture group to be matched;
s34, performing template matching operation, and obtaining similarity1, similarity2 and corresponding matching positions after matching is completed;
s35, obtaining and outputting the final similarity of the two pictures;
s36, taking the template with higher similarity as an output picture out1, taking the other template as an out2, marking the position and the number of the template on the out1, marking the maximum matching position of each template on the out2, and outputting two color pictures.
The step S32 of extracting the template from P1 specifically includes the following steps:
s321, carrying out binarization extraction on the P1_gray to obtain boundary points;
s322, calculating the number of boundary points in each block, recording the positions of the boundary points, and intercepting Patch at the same position on the P1_gray as a matching template.
Wherein, the automatic clipping operation is required before the template matching operation is performed in step S34.
The final similarity of the two pictures in step S35 is an average value of the two similarities.
In step S322, the number of boundary points in each block should be calculated by taking the 4 blocks with the largest number.
Wherein, the automatic cutting operation specifically comprises: firstly, reading a picture, extracting straight lines parallel to the boundary of the picture by adopting a Hough transform function provided by opencv, determining the uppermost and lowermost two transverse straight lines and the leftmost longitudinal straight line in the obtained straight lines, framing the position of a cement block, cutting, obtaining a square picture, and adjusting the resolution for subsequent similarity matching.
In the embodiment, the APP installed on the mobile terminal is used for shooting and uploading a concrete test block with characters marked on site and recording as P1, then the concrete test block with characters is sent to a laboratory, a laboratory worker shoots and uploads the test block with characters again through the APP installed on the mobile terminal and records as P2, then a character picture acquired on the concrete test block is read, the picture is subjected to binarization extraction boundary, a Hough transformation function provided by opencv is used for extracting straight lines parallel to the picture boundary, the positions of the uppermost and the lowermost transverse straight lines and the leftmost longitudinal straight line are determined in the obtained straight lines, the cement block is framed and cut, a square picture is obtained, and the resolution is adjusted to 256 x 256, and dividing the gray level images of P1 and P2 to generate templates, rotating the gray level images of P2 and P1 by-15 to 15 degrees to generate a picture to be matched, taking the picture to be matched as a picture group to be matched, carrying out template matching operation to obtain similarity1, similarity2 and corresponding matching positions after matching is finished, taking the template with higher similarity as an output picture out1, marking the position and number of the template on the out1, marking the maximum matching position of each template on the out2, outputting two color pictures, and if the square of the distance between the similar positions of the two pictures is not more than 2000, the similarity is +0.1, and if the square of the distance between the similar positions is more than 10000, the similarity is-0.1.
In the description of the present invention, it should be understood that the terms "coaxial," "bottom," "one end," "top," "middle," "another end," "upper," "one side," "top," "inner," "front," "center," "two ends," etc. indicate orientations or positional relationships based on the orientation or positional relationships shown in the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," "third," "fourth," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated, whereby features defining "first," "second," "third," "fourth" may explicitly or implicitly include at least one such feature.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "configured," "connected," "secured," "screwed," and the like are to be construed broadly and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intermediaries, or in communication with each other or in interaction with each other, unless explicitly defined otherwise, the meaning of the terms described above in this application will be understood by those of ordinary skill in the art in view of the specific circumstances.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (2)

1. The concrete test block anti-counterfeiting method based on image recognition is characterized by comprising the following steps of:
s1, photographing and collecting test blocks marked by field characters through an APP installed on a mobile terminal at a detection site, uploading photos meeting requirements to a cloud for storage, and recording the photos as P1;
s2, the sample collection personnel shoots and collects the sent test blocks with the characters again by utilizing the APP installed on the mobile terminal, and then uploads the photos meeting the requirements to the cloud for storage, and records the photos as P2;
s3, carrying out contrast analysis on the text images in the P1 and the P2 by adopting an image contrast module through an image contrast algorithm, and then displaying the comparison result through the mobile terminal;
the mobile terminal in the step S1 is mobile phone equipment with GPS time;
the image comparison algorithm in the step S3 specifically includes the following procedures:
s31, firstly, reading in pictures P1 and P2, then respectively generating 256-by-256-size color and gray picture copies, and recording the copies as P1_ori and P1_gray and P2_ori and P2_gray;
s32, dividing the gray level images of the P1 and the P2, thereby generating a template;
s33, rotating the gray level images of P2 and P1 by-15 to 15 degrees to generate pictures to be matched, and taking the pictures as a picture group to be matched;
s34, performing template matching operation, and obtaining similarity1, similarity2 and corresponding matching positions after matching is completed;
s35, obtaining and outputting the final similarity of the two pictures;
s36, taking a template with higher similarity as an output picture out1, marking the position and the number of the template on out1, marking the maximum matching position of each template on out2, and outputting two color pictures;
the step S32 of extracting the template from P1 specifically includes the following steps:
s321, carrying out binarization extraction on the P1_gray to obtain boundary points;
s322, calculating the number of boundary points in each block, recording the positions of the boundary points, and intercepting Patch at the same position on the P1_gray as a matching template;
the automatic cutting operation is required before the template matching operation is performed in the step S34;
the final similarity of the two pictures in step S35 is the average value of the two similarities;
the automatic cutting operation specifically comprises the following steps: firstly, reading a picture, extracting straight lines parallel to the boundary of the picture by adopting a Hough transform function provided by opencv, determining the uppermost and lowermost two transverse straight lines and the leftmost longitudinal straight line in the obtained straight lines, framing the position of a cement block, cutting, obtaining a square picture, and adjusting the resolution for subsequent similarity matching.
2. The method for preventing false creation of concrete test blocks based on image recognition according to claim 1, wherein the number of 4 blocks with the largest number should be taken when calculating the number of boundary points in each block in step S322.
CN202110459242.7A 2021-04-27 2021-04-27 Concrete test block anti-counterfeiting method based on image recognition Active CN113158928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110459242.7A CN113158928B (en) 2021-04-27 2021-04-27 Concrete test block anti-counterfeiting method based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110459242.7A CN113158928B (en) 2021-04-27 2021-04-27 Concrete test block anti-counterfeiting method based on image recognition

Publications (2)

Publication Number Publication Date
CN113158928A CN113158928A (en) 2021-07-23
CN113158928B true CN113158928B (en) 2023-09-19

Family

ID=76871401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110459242.7A Active CN113158928B (en) 2021-04-27 2021-04-27 Concrete test block anti-counterfeiting method based on image recognition

Country Status (1)

Country Link
CN (1) CN113158928B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6026186A (en) * 1997-11-17 2000-02-15 Xerox Corporation Line and curve detection using local information
US6757428B1 (en) * 1999-08-17 2004-06-29 National Instruments Corporation System and method for color characterization with applications in color measurement and color matching
JP2010250663A (en) * 2009-04-17 2010-11-04 Nikon Corp Image matching device and camera
CN102654902A (en) * 2012-01-16 2012-09-05 江南大学 Contour vector feature-based embedded real-time image matching method
CN103366374A (en) * 2013-07-12 2013-10-23 重庆大学 Fire fighting access obstacle detection method based on image matching
JP2014067333A (en) * 2012-09-27 2014-04-17 Sony Corp Image processing device, image processing method, and program
KR101521136B1 (en) * 2013-12-16 2015-05-20 경북대학교 산학협력단 Method of recognizing face and face recognition apparatus
CN105260740A (en) * 2015-09-23 2016-01-20 广州视源电子科技股份有限公司 Element recognition method and apparatus
WO2016062159A1 (en) * 2014-10-20 2016-04-28 网易(杭州)网络有限公司 Image matching method and platform for testing of mobile phone applications
CN105631449A (en) * 2015-12-21 2016-06-01 华为技术有限公司 Method, device and equipment for segmenting picture
WO2017075768A1 (en) * 2015-11-04 2017-05-11 北京大学深圳研究生院 Super-resolution image reconstruction method and device based on dictionary matching
WO2017221259A1 (en) * 2016-06-23 2017-12-28 S Jyothi Automatic recognition of indian prawn species
CN109241985A (en) * 2017-07-11 2019-01-18 普天信息技术有限公司 A kind of image-recognizing method and device
CN110009673A (en) * 2019-04-01 2019-07-12 四川深瑞视科技有限公司 Depth information detection method, device and electronic equipment
CN110020692A (en) * 2019-04-13 2019-07-16 南京红松信息技术有限公司 A kind of handwritten form separation and localization method based on block letter template
CN110135525A (en) * 2019-06-04 2019-08-16 湖南建研信息技术股份有限公司 A kind of anti-exchange method of concrete sample

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6738517B2 (en) * 2000-12-19 2004-05-18 Xerox Corporation Document image segmentation using loose gray scale template matching
CN105719188B (en) * 2016-01-22 2017-12-26 平安科技(深圳)有限公司 The anti-method cheated of settlement of insurance claim and server are realized based on plurality of pictures uniformity

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6026186A (en) * 1997-11-17 2000-02-15 Xerox Corporation Line and curve detection using local information
US6757428B1 (en) * 1999-08-17 2004-06-29 National Instruments Corporation System and method for color characterization with applications in color measurement and color matching
JP2010250663A (en) * 2009-04-17 2010-11-04 Nikon Corp Image matching device and camera
CN102654902A (en) * 2012-01-16 2012-09-05 江南大学 Contour vector feature-based embedded real-time image matching method
JP2014067333A (en) * 2012-09-27 2014-04-17 Sony Corp Image processing device, image processing method, and program
CN103366374A (en) * 2013-07-12 2013-10-23 重庆大学 Fire fighting access obstacle detection method based on image matching
KR101521136B1 (en) * 2013-12-16 2015-05-20 경북대학교 산학협력단 Method of recognizing face and face recognition apparatus
WO2016062159A1 (en) * 2014-10-20 2016-04-28 网易(杭州)网络有限公司 Image matching method and platform for testing of mobile phone applications
CN105260740A (en) * 2015-09-23 2016-01-20 广州视源电子科技股份有限公司 Element recognition method and apparatus
WO2017075768A1 (en) * 2015-11-04 2017-05-11 北京大学深圳研究生院 Super-resolution image reconstruction method and device based on dictionary matching
CN105631449A (en) * 2015-12-21 2016-06-01 华为技术有限公司 Method, device and equipment for segmenting picture
WO2017221259A1 (en) * 2016-06-23 2017-12-28 S Jyothi Automatic recognition of indian prawn species
CN109241985A (en) * 2017-07-11 2019-01-18 普天信息技术有限公司 A kind of image-recognizing method and device
CN110009673A (en) * 2019-04-01 2019-07-12 四川深瑞视科技有限公司 Depth information detection method, device and electronic equipment
CN110020692A (en) * 2019-04-13 2019-07-16 南京红松信息技术有限公司 A kind of handwritten form separation and localization method based on block letter template
CN110135525A (en) * 2019-06-04 2019-08-16 湖南建研信息技术股份有限公司 A kind of anti-exchange method of concrete sample

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
An integrated similarity metric for graph-based color image segmentation;Xiang Li,et al;Multimedia Tools and Applications;2969-2987 *
一种基于灰度的快速模板匹配方法;郑剑斌,等;现代计算机(专业版)(第26期);54-58 *
基于改进模板匹配的在线钢坯标号识别方法;张浩;,等;计算机集成制造系统(第10期);206-210 *

Also Published As

Publication number Publication date
CN113158928A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN104143094B (en) A kind of paper automatic marking processing method and system without answering card
CN103487104B (en) A kind of image acquisition identification system and method for capillary pipe liquid level type data
CN108074231A (en) A kind of magnetic sheet detection method of surface flaw based on convolutional neural networks
CN110736748A (en) Immunohistochemical nuclear plasma staining section diagnosis method and system
CN114549835B (en) Pointer instrument correction identification method and device based on deep learning
CN105930852B (en) A kind of bubble image-recognizing method
CN110689013A (en) Automatic marking method and system based on feature recognition
CN108304880A (en) A kind of building site sample witness sampling method based on image tagged
CN104079587A (en) Certificate identification device and certificate check system
CN108109157B (en) Rock mass evaluation analysis method based on digital panoramic borehole image
CN109086763A (en) A kind of pointer instrument read method and device
CN111652089B (en) Automatic water level identification method and system based on image processing
CN112730326A (en) Intelligent identification device and method for rock slices
CN113158928B (en) Concrete test block anti-counterfeiting method based on image recognition
CN108399621A (en) A kind of quick identification method of engineering test specimen and system
CN116844172A (en) Digital old water meter identification method based on deep learning
CN115588196A (en) Pointer type instrument reading method and device based on machine vision
CN110619297A (en) Bean seed image batch acquisition and identification method and device
CN112330660B (en) Sperm tail detection method and system based on neural network
CN109977756A (en) A kind of online In vivo detection system
CN109145912A (en) A kind of digital instrument reading automatic identifying method
CN113505776A (en) Intelligent identification method and device for gas meter reading
CN113095293A (en) Factory calibration method for Internet of things water meter based on image recognition
CN111368823B (en) Pointer type instrument reading identification method and device
CN112729477A (en) Novel water level height measurement system based on deep learning

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
GR01 Patent grant
GR01 Patent grant