A method for measuring a plurality of object features on an object moving on a conveyor relatively past a field of view of a linear optical sensor, comprising: providing said relative motion between the object and the field of view of the sensor, wherein said relative motion comprises said object moving past said sensor, and wherein said linear optical sensor is aligned along a direction of said motion; capturing a sequence of images of the field of view; detecting, for each image of the sequence of images, a set of edge features wherein said detected edge features are denoted static edge features; storing in a memory a plurality of edge features, denoted dynamic edge features, corresponding to the plurality of object features, each dynamic edge feature comprising at least one measurement of the corresponding object feature position; analyzing, for each image of the sequence of images, the set of static edge features and the stored plurality of dynamic features so as to determine a map, the map comprising: a pose that maps between points on the object in object coordinates and points in the image, the pose comprising a global position of said object; and an association that maps dynamic features to corresponding static features; and updating at least one dynamic edge feature position, responsive to the map, so as to improve a measurement of a position of the corresponding object feature; wherein said updating responsive to said map comprises: determining that a static edge corresponds to a dynamic edge if the position of the static edge, after mapping to said object coordinates using said pose, is sufficiently close to the position of the dynamic edge and if the polarities of the edges match; and wherein said improving of said dynamic edge position is based on at least the age of the dynamic edge feature, being the number of images in which the feature appears, and optionally the weights of static edge features to which said dynamic edge feature corresponds. providing said relative motion between the object and the field of view of the sensor, wherein said relative motion comprises said object moving past said sensor, and wherein said linear optical sensor is aligned along a direction of said motion; capturing a sequence of images of the field of view; detecting, for each image of the sequence of images, a set of edge features wherein said detected edge features are denoted static edge features; storing in a memory a plurality of edge features, denoted dynamic edge features, corresponding to the plurality of object features, each dynamic edge feature comprising at least one measurement of the corresponding object feature position; analyzing, for each image of the sequence of images, the set of static edge features and the stored plurality of dynamic features so as to determine a map, the map comprising: a pose that maps between points on the object in object coordinates and points in the image, the pose comprising a global position of said object; and an association that maps dynamic features to corresponding static features; and a pose that maps between points on the object in object coordinates and points in the image, the pose comprising a global position of said object; and an association that maps dynamic features to corresponding static features; and updating at least one dynamic edge feature position, responsive to the map, so as to improve a measurement of a position of the corresponding object feature; determining that a static edge corresponds to a dynamic edge if the position of the static edge, after mapping to said object coordinates using said pose, is sufficiently close to the position of the dynamic edge and if the polarities of the edges match; and wherein said improving of said dynamic edge position is based on at least the age of the dynamic edge feature, being the number of images in which the feature appears, and optionally the weights of static edge features to which said dynamic edge feature corresponds.