# US 2019/0244021 A1 · Segment-based pattern matching algorithm

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0244021 A1
- Document ID: US20190244021A1
- Status: Published application
- Kind: A1
- Application number: 16/271,260
- Filed: 2019-02-08
- Published: 2019-08-08
- Earliest claimed: 2018-02-08
- Assignees: Datalogis IP Tech S.R.L.
- Applicants: Datalogic IP Tech S.R.L.
- Inventors: Alessandro Franchi; Leonardo Mora
- Web page: https://patentgrep.com/patent/US20190244021A1

## CPC

- G06V 10/46: Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features (colour feature extraction G06V10/56)
- G06V 10/752: {Contour matching}
- G06F 2218/08: Feature extraction
- G06F 2218/12: Classification; Matching
- G06V 2201/02: Recognising information on displays, dials, clocks
- G06V 2201/06: Recognition of objects for industrial automation
- G06V 2201/09: Recognition of logos
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for matching a pattern may include generating a set of model descriptors representative of segment features of a first imaged object. A set of query descriptors representative of segment features of a second imaged object may be generated. A first model segment may be selected to align with the query segments to determine if any of the query segments correspond with the first model segment based on respective model descriptors and query descriptors. An hypothesis may be generated by computing a transformation to match the selected first model descriptor with a query descriptor. The hypothesis may be validated by a model fitting algorithm when comparing other transformed model descriptors with other query descriptors. Based on a consensus value from the model fitting algorithm, a determination as to whether a pattern match exists between the first and second images may be made.

## Claims

### Claim 1

A computer-implemented method for matching a pattern, said method comprising:
generating a set of model descriptors representative of segment features of a first object captured in a first image;
generating a set of query descriptors representative of segment features of a second object captured in a second image;
selecting a first model segment to align with the query segments to determine if any of the query segments correspond with the first model segment based on respective model descriptors and query descriptors;
generating an hypothesis by computing a transformation to match the selected first model descriptor with a query descriptor;
validating the hypothesis by performing a model fitting algorithm when comparing other transformed model descriptors with other query descriptors; and
based on a consensus value from the model fitting algorithm, determining whether a pattern match exists between the first and second images.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
defining a termination criteria for the consensus value; and
if the consensus value reaches or crosses the termination criteria, stop validating the hypothesis;
otherwise, continue validating the hypothesis.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
sorting the model descriptors by length of the corresponding segments;
retaining a subset of model descriptors; and
wherein selecting a first model segment includes selecting a longest model segment based on corresponding first model descriptors of the retained subset of model descriptors.

### Claim 4 (depends on 1)

The method according to claim 1, wherein validating the hypothesis includes validating the hypothesis with each query descriptor relative to a segment with a comparable length ratio between a minimum length ratio threshold and a maximum length ratio threshold.

### Claim 5 (depends on 1)

The method according to claim 1, wherein validating the hypothesis includes:
searching for a closest query segment based on query descriptors;
comparing the closest query segment with a closest transformed model segment based on transformed model descriptors;
determining whether the closest query and transformed model descriptors match, and if so, increase the consensus value, otherwise, maintain the consensus value.

### Claim 6 (depends on 1)

The method according to claim 1, wherein generating a set of model descriptors includes defining a set of model descriptors by determining a location of a midpoint, an orientation angle relative to the x-axis, and a link between endpoints for each model segment.

### Claim 7 (depends on 6)

The method according to claim 6, further comprising determining a unique orientation of each model descriptor by performing a cross-product of a segment vector between the midpoint and a first endpoint and a gradient vector.

### Claim 8 (depends on 1)

The method according to claim 1, wherein generating an hypothesis includes generating a scaled rotation matrix including midpoint translation, rotation, and scaling of the first model descriptors to match each set of query descriptors to test correspondence thereof.

### Claim 9 (depends on 8)

The method according to claim 8, further comprising generating hypotheses for each other model descriptor by generating transforms for each model descriptor for matching to each query segment.

### Claim 10 (depends on 1)

The method according to claim 1, further comprising setting a minimum consensus threshold that the consensus value is to equal or cross in determining that a pattern match exists between the first and second images.

### Claim 11

An imaging system, comprising:
an imaging camera;
a processing unit in communication with said imaging camera, and configured to:
generate a set of model descriptors representative of segment features of a first object captured in a first image;
generate a set of query descriptors from a second object captured in a second image;
select a first model segment to align with the query segments to determine if any of the query segments correspond with the first model segment based on respective model descriptors and query descriptors;
generate an hypothesis by computing a transformation to match the selected first model descriptor with a query descriptor;
validate the hypothesis by performing a model fitting algorithm when comparing other transformed model descriptors with other query descriptors; and
based on a consensus value from the model fitting algorithm, determine whether a pattern match exists between the first and second images.

### Claim 12 (depends on 11)

The system according to claim 11, wherein said processing unit is further configured to:
define a termination criteria for the consensus value; and
if the consensus value reaches or crosses the termination criteria, stop validating the hypothesis;
otherwise, continue validating the hypothesis.

### Claim 13 (depends on 11)

The system according to claim 11, wherein said processing unit, is further configured to:
sort the model descriptors by length of the corresponding segments;
retain a subset of model descriptors; and
in selecting a first model segment, the processing unit is further configured to select a longest model segment based on corresponding first model descriptors.

### Claim 14 (depends on 11)

The system according to claim 11, wherein said processing unit, in validating the hypothesis, is configured to validate the hypothesis with each query descriptor relative to a segment with a comparable length ratio between a minimum length ratio threshold and a maximum length ratio threshold.

### Claim 15 (depends on 11)

The system according to claim 11, wherein said processing unit, in validating the hypothesis, is configured to:
search for a closest query segment based on query descriptors;
compare the closest query segment with a closest transformed model segment based on transformed model descriptors; and
determine whether the closest query and transformed model descriptors match, and if so, increase the consensus value, otherwise, maintain the consensus value.

### Claim 16 (depends on 11)

The system according to claim 11, wherein said processing unit, in generating a set of model descriptors, is further configured to define a set of model descriptors by determining a location of a midpoint, an orientation angle relative to the x-axis, and a link between endpoints for each model segment.

### Claim 17 (depends on 16)

The system according to claim 16, wherein said processing unit is further configured to determine a unique orientation of each model descriptor by performing a cross-product of a segment vector between the midpoint and a first endpoint and a gradient vector.

### Claim 18 (depends on 11)

The system according to claim 11, wherein said processing unit, in generating an hypothesis, is configured to generate a scaled rotation matrix including midpoint translation, rotation, and scaling of the first model descriptors to match each set of query descriptors to test correspondence thereof.

### Claim 19 (depends on 18)

The system according to claim 18, wherein said processing unit is further configured to generate hypotheses for each other model descriptor by generating transforms for each model descriptor for matching to each query segment.

### Claim 20 (depends on 11)

The system according to claim 11, wherein said processing unit is further configured to set a minimum consensus threshold that the consensus value is to equal or cross in determining that a pattern match exists between the first and second images.
