Event-based code localizer and method thereof executed by a code reader
One embodiment of a method of identifying a linear barcode may include acquiring multiple events from an event-based camera imaging an object on which a linear barcode is positioned within the scene. The events may be grouped to form clusters of the events. A box may be formed around the linear barcode so as to identify a region-of-interest in which to process the linear barcode for decoding, thereby increasing speed for decoding the linear barcode as the code reader may focus on the region-of-interest within the box. In an embodiment, edges of features may be identified from the group events. Consecutive edges with the same or similar angle may be identified, thereby being indicative of the linear barcode.
1 . A method of identifying a linear barcode, said method comprising:
acquiring a plurality of events from an event-based camera imaging an object on which a linear barcode is positioned within a scene;
grouping the events to form clusters of the events;
forming a box around the linear barcode so as to identify a region-of-interest in which to identify the linear barcode for decoding;
determining normal vectors to each of the identified edges within each cluster of the events; and
utilizing the normal vectors to determine that the edges are parallel with one another.
2 . The method according to claim 1 , wherein acquiring events from the event camera includes acquiring information indicative of pixels transitioning in luminance above or below a configurable threshold.
3 . The method according to claim 2 , wherein acquiring information includes acquiring spatial and temporal information for each pixel.
4 . The method according to claim 3 , wherein acquiring spatial and temporal information includes acquiring spatial and temporal information including position (x, y), time (t), and pixel polarity (p), such that each event (E) is defined by (x, y, t, p).
5 . The method according to claim 4 , further comprising:
comparing consecutive events within a moving time window;
determining whether successive events are within a threshold distance within the moving time window; and
if consecutive events are within the threshold distance and within the moving time window, adding each of the events to a common edge, otherwise, discarding at least one of the successive events.
6 . The method according to claim 5 , wherein acquiring events includes acquiring events within the moving time window.
7 . The method according to claim 1 , further comprising:
identifying edges of features from the group events; and
identifying consecutive edges with the same or similar angle, thereby being indicative of the linear barcode.
8 . The method according to claim 7 , further comprising calculating an orientation angle and length for each of the identified edges, thereby enabling identification of consecutive edges with the same or similar angle and lengths.
9 . A method of identifying a linear barcode, said method comprising:
acquiring a plurality of events from an event-based camera imaging an object on which a linear barcode is positioned within a scene;
grouping the events to form clusters of the events;
forming a box around the linear barcode so as to identify a region-of-interest in which to identify the linear barcode for decoding;
identifying edges of features from the group events;
identifying consecutive edges with the same or similar angle, thereby being indicative of the linear barcode;
calculating an orientation angle and length for each of the identified edges, thereby enabling identification of consecutive edges with the same or similar angle and lengths; and
applying a classifier that matches consecutive edges with the same or similar angles and lengths within a cluster.
10 . A code reader, comprising:
an event-based camera configured to capture a plurality of events within a field-of-view of the code reader in a scene;
a non-transitory memory configured to store captured images; and
at least one processor in communication with the image sensor and non-transitory memory, and configured to:
acquire a plurality of events from an event-based camera imaging and object on which a linear barcode is positioned within the scene;
group the events to form clusters of the events that identify the linear barcode;
form a box around the linear barcode so as to identify a region-of-interest in which to identify the linear barcode for decoding;
determine normal vectors to each of the identified edges within each cluster of the events; and
utilize the normal vectors to determine that the edges are parallel with one another.
11 . The code reader according to claim 10 , wherein the at least one processor, in acquiring events from the event camera, is configured to acquire information indicative of pixels transitioning in luminance above or below a configurable threshold.
12 . The code reader according to claim 11 , wherein at least one processor, in acquiring information, is further configured to acquire spatial and temporal information for each pixel, wherein the spatial and temporal information include position (x, y), time (t), and pixel polarity (p), such that each event (E) is defined by (x, y, t, p).
13 . The code reader according to claim 12 , wherein the at least one processor is further configured to:
compare consecutive events within a moving time window;
determine whether successive events are within a threshold distance within the moving time window; and
if consecutive events are within the threshold distance and within the moving time window, add each of the events to a common edge, otherwise, discard at least one of the successive events.
14 . The code reader according to claim 13 , wherein the at least one processor is further configured to acquire events within the moving time window.
15 . The code reader according to claim 14 , wherein the at least one processor is further configured to:
identify edges of features from the group events;
identify consecutive edges with the same or similar angle, thereby being indicative of the linear barcode.
16 . A code reader comprising:
an event-based camera configured to capture a plurality of events within a field-of-view of the code reader in a scene;
a non-transitory memory configured to store captured images; and
at least one processor in communication with the image sensor and non-transitory memory, and configured to:
acquire a plurality of events from an event-based camera imaging and object on which a linear barcode is positioned within the scene;
group the events to form clusters of the events that identify the linear barcode;
form a box around the linear barcode so as to identify a region-of-interest in which to identify the linear barcode for decoding;
identify edges of features from the group events;
identify consecutive edges with the same or similar angle, thereby being indicative of the linear barcode; and
calculate an orientation angle and length for each of the identified edges, thereby enabling identification of consecutive edges with the same or similar angle and lengths.
17 . The code reader according to claim 16 , wherein the at least one processor is further configured to define a classifier that matches consecutive edges with the same or similar angles and lengths within a cluster.
18 . The code reader of claim 16 , wherein the at least one processor is further configured to assign a score to each pixel based on a number of edges with similar orientation angles that are near one another.
19 . The code reader of claim 16 , wherein the at least one processor is further configured to track identified edges having the same or similar orientation angles within a predefined threshold, and to discard edges that do not have the same or similar orientation angles within the predefined threshold.
20 . The code reader of claim 19 , wherein the predefined threshold is three degrees.