CN109034844A - A kind of food safety trace back system retrieval method based on camera lens sample searching - Google Patents

A kind of food safety trace back system retrieval method based on camera lens sample searching Download PDF

Info

Publication number
CN109034844A
CN109034844A CN201810826354.XA CN201810826354A CN109034844A CN 109034844 A CN109034844 A CN 109034844A CN 201810826354 A CN201810826354 A CN 201810826354A CN 109034844 A CN109034844 A CN 109034844A
Authority
CN
China
Prior art keywords
shot
feature
retrieval
key frame
points
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
CN201810826354.XA
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.)
Longkou Sheng Fu Da Food Co Ltd
Original Assignee
Longkou Sheng Fu Da Food 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 Longkou Sheng Fu Da Food Co Ltd filed Critical Longkou Sheng Fu Da Food Co Ltd
Priority to CN201810826354.XA priority Critical patent/CN109034844A/en
Publication of CN109034844A publication Critical patent/CN109034844A/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The food safety trace back system retrieval method based on camera lens sample searching that the invention discloses a kind of, specifically include that A. obtains the food camera lens picture for needing to retrieve, shot segmentation extracts key frame, and the feature space that can sufficiently reflect camera lens content is formed according to the set of characteristic points of key frame;B. connection features point forming curves carry out linear approximation to curve, determine most preferably approaching as key frame for the point of inflexion;C. it is determined by the threshold value of characteristic point line and retrieves image at a distance from feature lines all in sample camera lens, and it is ranked up, obtain most like camera lens, complete the retrieval of food safety trace back system.This method has preferable timing, versatility and correlation, improves retrieval precision by approaching extraction key frame combination space length, complexity is reduced, the time required to reducing retrieval.

Description

Food safety tracing system retrieval method based on lens sample retrieval
Technical Field
The invention relates to a retrieval method of a food safety tracing system, and belongs to the fields of food safety, video retrieval and differential geometry.
Background
In recent years, because food safety crisis frequently generated, the health of people is seriously affected, the worldwide attention is attracted, and how to effectively track and trace food becomes an extremely urgent global subject. The food safety tracing system can connect all links of production, inspection, supervision and consumption, so that consumers can know the production and circulation processes which accord with sanitary safety. The system provides a tracing mode from farmland to dining table, extracts public tracing elements concerned by consumers in supply chain links such as production, processing, circulation and consumption, establishes a food safety information database, can trace back to the source according to video retrieval once problems are found, and guarantees the legal rights and interests of the consumers from the source. The existing video retrieval ignores the time sequence relation and the correlation among key frames, the retrieval precision is not accurate enough, and the time is long.
Disclosure of Invention
In order to solve the above problems, the present invention aims to provide a food safety traceability system retrieval method with good timing sequence, universality and relevance, which improves the retrieval accuracy by extracting key frames by approximation in combination with spatial distance, reduces the complexity and reduces the time required for retrieval.
The technical scheme adopted by the invention for solving the problems comprises the following steps:
A. acquiring a food shot picture to be retrieved, segmenting a shot to extract a key frame, and forming a feature space capable of fully reflecting the content of the shot according to a feature point set of the key frame;
B. connecting the characteristic points to form a curve, performing linear approximation on the curve, and determining the optimal approximation of the points of inflection as a key frame;
C. and determining the distances between the retrieval image and all the characteristic connecting lines in the sample lens through the threshold values of the characteristic point connecting lines, and sequencing the distances to obtain the most similar lens so as to finish the retrieval of the food safety tracing system.
Further, the step a comprises:
(1) acquiring food shot pictures to be searched, dividing shots, extracting key frames, finding out a boundary between two continuously appearing shots through detecting shot switching points, gathering the frames belonging to the same shot together, and gathering feature points in each frame to form a feature space capable of fully reflecting the content of the shot;
(2) two key frames F are selected to represent the main content of the shota、FbCorresponding to two feature points fa、fbIs provided with
Where d is the dimension of the feature space, the similarity between two frames is measured by the euclidean distance:
D(fa,fb)=∥fa-fb∥。
further, the step B includes:
(1) n feature points in the shot feature set S, structureA connecting line, if there are Q sets in the space, the total characteristic line isProjection of search point r on feature connecting line
fr=fa+k(fa-fb)
Wherein,therefore, the similarity between the search point and the shot is:
D(fr,(fa,fb))=∥r-fr
(3) performing linear approximation on the characteristic point connecting curve by using an approximation line lalbApproximation curve fafbThe feature space is composed of n-1 feature lines, the line of continuous reverse curve points is used for approaching the feature curve, and the frame corresponding to the reverse curve points is used as the key frame of the lens; setting a threshold value ε, if D (f)j,fj+1)>ε or D (f)j-1,fj+1)>c is e, then fj+1Is a new key frame, where 0<j is n-1, c is a constant and 1<c<2, searching key frames in each feature space, determining the number of key frames in the shot, and determining the number of key frames
The object can reflect the characteristics of the shot, and if no key frame exists, the whole shot can be regarded as a characteristic point; if the number of the key frames is large, the shot content is changed greatly or the set threshold is small, the threshold can be adjusted for recalculation, and if the feature points of the new key frame are on a straight line, the middle redundant feature points can be removed, so that the calculation complexity is reduced.
Further, the step C includes:
(1) setting a threshold value delta of the distance between the connection lines of the feature points, wherein/f only when the distance between the search point and the connection line of the feature points is less than or equal to the threshold valuer-fj/. ltoreq.δ, the result is accepted, otherwise the characteristic point is not considered to belong to the set;
(2) the method comprises the steps of searching and applying a shot sample to a food safety tracing system, establishing a video library containing a plurality of shots, recording all information including transportation, packaging, subpackaging and sales circulation processes from four links of food production, processing, circulation and consumption, giving food shots needing to be inquired, and displaying an inquiry result according to a distance.
The invention has the beneficial effects that:
under the conditions of large video storage data volume and long storage time, the method has better time sequence, universality and correlation, improves the retrieval precision by extracting key frames by approximation and combining with the space distance, reduces the complexity and reduces the time required by retrieval.
Drawings
FIG. 1 is an overall flow chart of a retrieval method of a food safety tracing system based on lens sample retrieval;
FIG. 2 is a flowchart of an approximation algorithm for extracting key frames;
FIG. 3 is a graph of a food sample query result;
Detailed Description
Referring to fig. 1, the method of the present invention comprises the steps of:
A. acquiring a food shot picture to be retrieved, segmenting a shot to extract a key frame, and forming a feature space capable of fully reflecting the content of the shot according to a feature point set of the key frame;
(1) the method comprises the steps of obtaining food shot pictures needing to be searched, dividing shots, extracting key frames, finding out the boundary between two continuously appearing shots through detecting shot switching points, gathering the frames belonging to the same shot together, and gathering feature points in each frame to form a feature space capable of fully reflecting the content of the shot.
(2) Two key frames F are selected to represent the main content of the shota、FbCorresponding to two feature points fa、fbIs provided with
Where d is the dimension of the feature space. The similarity between two frames is measured by the euclidean distance:
D(fa,fb)=∥fa-fb
B. connecting the characteristic points to form a curve, performing linear approximation on the curve, and determining the optimal approximation of the point of inflection as a key frame (as shown in FIG. 2);
(1) n feature points in the shot feature set S, structureA connecting line, if there are Q sets in the space, the total characteristic line isProjection of search point r on feature connecting line
fr=fa+k(fa-fb)
Wherein,therefore, the similarity between the search point and the shot is:
D(fr,(fa,fb))=∥r-fr
(2) performing linear approximation on the characteristic point connecting curve by using an approximation line lalbApproximation curve fafb. The feature space is composed of n-1 feature lines. And (5) approximating the characteristic curve by using a connecting line of continuous reverse curve points, and taking a frame corresponding to the reverse curve points as a key frame of the lens. Setting a threshold value ε, if D (f)j,fj+1)>ε or D (f)j-1,fj+1)>c is e, then fj+1Is a new key frame, where 0<j is n-1, c is a constant and 1<c<2. And finding key frames in each feature space, and determining the number of the key frames in the shot. Number of key frames
The object can reflect the characteristics of the shot, and if no key frame exists, the whole shot can be regarded as a characteristic point; if the number of the key frames is large, the shot content is changed greatly or the set threshold is small, and the threshold can be adjusted for recalculation. If the feature points of the new key frame are on a straight line, the middle redundant feature points can be removed, and the calculation complexity is reduced.
C. And determining the distances between the retrieval image and all the characteristic connecting lines in the sample lens through the threshold values of the characteristic point connecting lines, and sequencing the distances to obtain the most similar lens so as to finish the retrieval of the food safety tracing system.
(1) Setting a threshold value delta of the distance between the connection lines of the feature points, wherein/f only when the distance between the search point and the connection line of the feature points is less than or equal to the threshold valuer-fj/. ltoreq.delta.the result is accepted, otherwise this characteristic point is considered notBelonging to this set.
(2) The shot sample retrieval is applied to a food safety tracing system, a video library containing 200 shots is established, the shots are taken from four links of food production, processing, circulation and consumption, recording is started from the links of food planting, cultivation and production processing, and the whole process from farmland to dining table tracking and tracing are realized, wherein the whole information comprises all information in the circulation processes of transportation, packaging, subpackaging, sale and the like. And (3) giving food shots needing to be inquired, and displaying the inquiry result according to the distance (as shown in figure 3). The result shows that the retrieval obtains better results and the retrieval precision is more accurate.
In conclusion, the food safety tracing system searching method based on lens sample searching is completed. The method has better time sequence, universality and relevance, improves the retrieval precision by extracting the key frame and combining the spatial distance through approximation, reduces the complexity and reduces the time required by retrieval.

Claims (4)

1. A food safety tracing system retrieval method based on lens sample retrieval is characterized in that: the method comprises the following steps:
A. acquiring a food shot picture to be retrieved, segmenting a shot to extract a key frame, and forming a feature space capable of fully reflecting the content of the shot according to a feature point set of the key frame;
B. connecting the characteristic points to form a curve, performing linear approximation on the curve, and determining the optimal approximation of the points of inflection as a key frame;
C. and determining the distances between the retrieval image and all the characteristic connecting lines in the sample lens through the threshold values of the characteristic point connecting lines, and sequencing the distances to obtain the most similar lens so as to finish the retrieval of the food safety tracing system.
2. The lens sample retrieval-based food safety tracing system retrieval method of claim 1, characterized in that: the step A comprises the following steps:
(1) acquiring food shot pictures to be searched, dividing shots, extracting key frames, finding out a boundary between two continuously appearing shots through detecting shot switching points, gathering the frames belonging to the same shot together, and gathering feature points in each frame to form a feature space capable of fully reflecting the content of the shot;
(2) two key frames F are selected to represent the main content of the shota、FbCorresponding to two feature points fa、fbIs provided with
Where d is the dimension of the feature space, the similarity between two frames is measured by the euclidean distance:
D(fa,fb)=∥fa-fb∥。
3. the lens sample search-based food safety tracing system search method according to claim 1 or 2, characterized in that: the step B comprises the following steps:
(1) n feature points in the shot feature set S, structureA connecting line, if there are Q sets in the space, the total characteristic line isProjection of search point r on feature connecting line
fr=fa+k(fa-fb)
Wherein,therefore, the similarity between the search point and the shot is:
D(fr,(fa,fb))=∥r-fr
(2) performing linear approximation on the characteristic point connecting curve by using an approximation line lalbApproximation curve fafbThe feature space is composed of n-1 feature lines, the line of continuous reverse curve points is used for approaching the feature curve, and the frame corresponding to the reverse curve points is used as the key frame of the lens; setting a threshold value ε, if D (f)j,fj+1)>ε or D (f)j-1,fj+1)>c is e, then fj+1Is a new key frame, where 0<j is n-1, c is a constant and 1<c<2, searching key frames in each feature space, determining the number of the key frames in the shot, wherein the number of the key frames can reflect the features of the shot, and if no key frame exists, the whole shot can be regarded as a feature point; if the number of the key frames is large, the shot content is changed greatly or the set threshold is small, the threshold can be adjusted for recalculation, and if the feature points of the new key frame are on a straight line, the middle redundant feature points can be removed, so that the calculation complexity is reduced.
4. The lens sample retrieval-based food safety tracing system retrieval method of claim 3, wherein: the step C comprises the following steps:
(1) setting a threshold value delta of the distance between the connection lines of the feature points, wherein/f only when the distance between the search point and the connection line of the feature points is less than or equal to the threshold valuer-fj/. ltoreq.δ, the result is accepted, otherwise the characteristic point is not considered to belong to the set;
(2) the method comprises the steps of searching and applying a shot sample to a food safety tracing system, establishing a video library containing a plurality of shots, recording all information including transportation, packaging, subpackaging and sales circulation processes from four links of food production, processing, circulation and consumption, giving food shots needing to be inquired, and displaying an inquiry result according to a distance.
CN201810826354.XA 2018-07-25 2018-07-25 A kind of food safety trace back system retrieval method based on camera lens sample searching Pending CN109034844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810826354.XA CN109034844A (en) 2018-07-25 2018-07-25 A kind of food safety trace back system retrieval method based on camera lens sample searching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810826354.XA CN109034844A (en) 2018-07-25 2018-07-25 A kind of food safety trace back system retrieval method based on camera lens sample searching

Publications (1)

Publication Number Publication Date
CN109034844A true CN109034844A (en) 2018-12-18

Family

ID=64646106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810826354.XA Pending CN109034844A (en) 2018-07-25 2018-07-25 A kind of food safety trace back system retrieval method based on camera lens sample searching

Country Status (1)

Country Link
CN (1) CN109034844A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073864A (en) * 2010-12-01 2011-05-25 北京邮电大学 Football item detecting system with four-layer structure in sports video and realization method thereof
CN102685398A (en) * 2011-09-06 2012-09-19 天脉聚源(北京)传媒科技有限公司 News video scene generating method
US20140010518A1 (en) * 2012-06-25 2014-01-09 Sony Corporation Video recording apparatus, information processing system, information processing method, and recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073864A (en) * 2010-12-01 2011-05-25 北京邮电大学 Football item detecting system with four-layer structure in sports video and realization method thereof
CN102685398A (en) * 2011-09-06 2012-09-19 天脉聚源(北京)传媒科技有限公司 News video scene generating method
US20140010518A1 (en) * 2012-06-25 2014-01-09 Sony Corporation Video recording apparatus, information processing system, information processing method, and recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵黎 等: "基于关键帧提取的最近特征线(NEL)聚类算法的镜头检索方法", 《计算机学报》 *

Similar Documents

Publication Publication Date Title
CN109815364B (en) Method and system for extracting, storing and retrieving mass video features
CN107515895B (en) Visual target retrieval method and system based on target detection
TWI623842B (en) Image search and method and device for acquiring image text information
CN102254015B (en) Image retrieval method based on visual phrases
CN108647350A (en) Image-text associated retrieval method based on two-channel network
JP5711387B2 (en) Method and apparatus for comparing pictures
CN104376105B (en) The Fusion Features system and method for image low-level visual feature and text description information in a kind of Social Media
CN102609548A (en) Video content retrieval method and system based on moving objects
CN107315795B (en) The instance of video search method and system of joint particular persons and scene
CN110188225A (en) A kind of image search method based on sequence study and polynary loss
CN102750347B (en) Method for reordering image or video search
CN103430175B (en) For the method and apparatus that video is compared
CN113628178A (en) Method for detecting surface defects of steel products with balanced speed and precision
CN109408578A (en) One kind being directed to isomerous environment monitoring data fusion method
CN114332510A (en) Hierarchical image matching method
CN104462550A (en) Pedestrian re-recognition method based on similarity and dissimilarity fusion ranking optimization
Zhang et al. Topological spatial verification for instance search
CN111583332B (en) Visual positioning method, system and device based on parallel search 2D-3D matching
CN105183857A (en) Automatic picture training sample extracting method and system
CN110287369B (en) Semantic-based video retrieval method and system
CN105631858B (en) Image object method of counting based on sample block
WO2004029833A2 (en) Method and device for measuring similarity between images
CN110781817B (en) Pedestrian re-identification method for solving component misalignment
CN109034844A (en) A kind of food safety trace back system retrieval method based on camera lens sample searching
Sicre et al. Dense sampling of features for image retrieval

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181218

WD01 Invention patent application deemed withdrawn after publication