Patent Description:
The invention relates to a mapping method and system.

In particular, the invention relates to a mapping method and system for mapping at least one real environment to be mapped.

In different technical fields there is an increasingly strong need to map some real places/elements. The results deriving from the mapping, indeed, are usually used to assess the users' attitude when they are interfaced with these specific places or elements, so as to identify elements of interest in sequences of images in order to determine their position and/or to show items of information concerning them and/or interact with the elements of interest. Some known mapping methods involve mapping the real world starting from acquired images of the real world itself.

However, in order to make the acquisition of the images easy and in order to affect the users' behaviour during the acquisition of the images as least as possible, miniature video cameras are used and built-in in movable and/or wearable devices. The images acquired by so doing are images in motion, which can sometimes be characterized by medium/low quality, scarce definition or imperfect focusing.

Some examples of mapping systems are disclosed in documents <CIT> or <CIT>. Document <CIT> discloses a method and device to determine features in a reference image and in another image of the same environment taken from a different view in order to compute an homography to map each point of the two images. An eye tracker monitors where the user is looking in the second image and the homography is used to project the gaze location on the reference image to provide gaze maps and plots.

Document <CIT> discloses a method and a system to detect a gaze point of a user with respect to a reference image. A set of IR emitters are placed on the scene and an image of the IR emitters is taken with an image of the field of view of the user as well as a location of the gaze on the image. A reference image is taken that contains as well an image of the IR emitters. Then a perspective projection is performed, to map the gaze location of in an actual image of the scene to the reference image.

However, a quick and reliable mapping starting from this type of images acquired by moving video cameras is not currently available.

Therefore, an object of the invention is to provide a mapping method, which allows users to overcome the drawbacks discussed above in a simple and economic fashion, both from a functional point of view and from a constructive point of view. In other words, an object of the invention is to provide a quick mapping method, which, at the same time, is capable of providing reliable data.

In accordance with these objects, the invention relates to a mapping method according to claim <NUM>.

The method according to the invention advantageously ensures a reliable mapping in short times. The use of a specific reference arrangement, in which the markers are organized in cells, allows for the use of markers of different types, even particularly simple ones, thus making the identification in the video sequence reliable and quick despite the fact that the video images are acquired by means of a moving video camera and are sometimes characterized by medium/low quality, scarce definition or imperfect focusing.

Besides, the method according to the invention also allows very large environments to be mapped thanks to the division in cells. Indeed, the method according to the invention allows very large environments to be mapped even if only a portion of the environment of interest is framed.

A further object of the invention is to provide a mapping system for mapping a real environment, which is quick, easy and economic to be manufactured and is capable of providing reliable data.

In accordance with these objects, the invention relates to a mapping system according to claim <NUM>.

Further features and advantages of the invention will be best understood upon perusal of the following description of a non-limiting embodiment thereof, with reference to the accompanying drawing, wherein:.

In <FIG> number <NUM> indicates a mapping system for mapping a real environment according to the invention.

Hereinafter reference will be made to a mapping system and method applied to the study of the buying attitudes of a consumer in a supermarket. Obviously, the mapping method and system according to the invention can be used in other applications, such as for example the displaying of items of information concerning particular framed environments or particular areas of interest, or applications of augmented reality, in the retail field, in the industrial field and in the management of warehouses.

The mapping system <NUM> comprises a video camera <NUM> and a control device <NUM> configured to receive the data acquired by the video camera <NUM> and carry out the mapping.

In the non-limiting embodiment shown and disclosed herein, the video camera <NUM> is fitted on a pair of glasses <NUM>, so as to acquire a sequence of images in motion concerning what the person is looking at. Since the glasses <NUM> are a scarcely invasive device, users are not influenced in their approach to the environment and/or to the element to be mapped. According to variants, the video camera is a built-in video camera of a "smart device" (tablet, phone, watch, etc.).

In the non-limiting embodiment shown and disclosed herein, the environment to be mapped is a shelf of a supermarket displaying products that can be bought by consumers.

<FIG> shows a reference image <NUM> of an environment to be mapped <NUM>. This reference image <NUM> is often defined, in the technical field, "snapshot".

The reference image <NUM> is a preferably high-definition image of the environment to be mapped <NUM>. In the non-limiting embodiment shown and disclosed herein, the reference image <NUM> is an image showing a substantially front view of the environment to be mapped <NUM>.

As already mentioned above, in the non-limiting embodiment shown and disclosed herein, the environment to be mapped <NUM> is a shelf of a supermarket.

The environment to be mapped <NUM> contains a specific arrangement of a plurality of markers <NUM> organized in cells <NUM> (shown in <FIG> with a broken line). In other words, the markers <NUM> are properly positioned by a user before going on with the mapping step. As already mentioned above, the markers <NUM> are arranged so as to define one or more cells <NUM>. In this way, the markers <NUM> define a sort of coordinate system in the environment to be mapped <NUM>.

The markers <NUM> are passive markers and do not emit any signal.

Each cell <NUM>, as discussed more in detail below, is identified by a marker <NUM> or by a combination of markers <NUM>. By combination of markers we mean a specific arrangement of markers, preferably different ones, capable of identifying the cell. In other words, the cell is defined by markers having, for example, a given space arrangement, orientation, etc..

The plurality of markers <NUM> comprises a number of different types of markers equal to a type-number K.

The type-number K of different types of markers is equal to at least two.

According to a variant which is not shown herein, the type-number K of different types of markers is equal to at least <NUM>.

In the non-limiting embodiment shown and disclosed herein, the type-number K of different types of markers is equal to four. In the non-limiting embodiment shown and disclosed herein, the markers <NUM> all have a circular shape and have a number of different colours equal to the type-number K.

More precisely, the markers <NUM> have K different colours.

For example, the markers <NUM> can be magenta, blue, green and orange. However, in the accompanying <FIG>, the markers <NUM> are schematically shown in <NUM> different shades of the greyscale.

The colours of the markers are preferably classified in terms of space-LAB colour coordinates.

Alternatively, the colour of the markers <NUM> is recognized in an automatic manner by a suitable colour-classification algorithm.

In the non-limiting embodiment shown and disclosed herein, the markers <NUM> have a same diameter.

According to a variant which is not shown herein, the markers can have different diameters. For example, some cells can have markers with a greater diameter than the rest of the markers, so that they can easily be detected also at high distances. In this way, some cells can be detected at a given distance and other cells at a different distance. Therefore, the number of large-sized markers can be reduced to a minimum and the visual impact of the user can be maximized.

The markers <NUM> are preferably arranged on a white background. In this way, the colours chosen for the markers <NUM> (magenta, blue, green and orange) are more identifiable. Obviously, the background can be different for markers with a different shape and/or different colours.

In the non-limiting embodiment shown and disclosed herein, the cells <NUM> are defined by four markers <NUM> arranged at the vertexes of a quadrilateral.

<FIG> shows a specific arrangement of the cells <NUM> (shown by broken lines). In the non-limiting embodiment shown and disclosed herein, some cells 11a can contain other smaller cells 11b. Obviously, the specific arrangement of the cells <NUM> can change depending on the type of application and/or on the type of environment to be monitored. For example, the cells <NUM> can be more or less close to one another relative to the configuration shown in <FIG>, depending on the needs.

<FIG> shows a block diagram concerning the control device <NUM>.

The control device <NUM> comprises a memory module <NUM> and a calculating module <NUM>.

The memory module <NUM> stores the reference image <NUM> of the environment to be mapped <NUM> and the items of information connected thereto (SNAPSHOT DATA), which comprise, for example, type of markers <NUM>, specific arrangement of the cell <NUM>, etc., as well as other items of information, such as for example the predefined area of interest (AOI).

The calculating module <NUM> is configured to receive the video sequence (VIDEO-DATA) detected by the video camera <NUM>, in which the environment to be mapped <NUM> is at least partly framed, and to identify, in at least one frame of the video sequence, one or more cells <NUM> being part of the specific arrangement of the markers <NUM> of the reference image <NUM> contained in the data coming from the memory module <NUM> (SNAPSHOT DATA). As discussed more in detail below, the calculating module <NUM> is configured to determine, starting from the video sequence (VIDEO-DATA) detected by the video camera <NUM> and starting from the data coming from the memory module <NUM> (SNAPSHOT DATA), the mapping data (MAPPING DATA).

The control device <NUM> can optionally comprise a projection module <NUM> and/or a graphic module <NUM> and/or a statistical module <NUM>, which are interfaced with the memory module <NUM> and/or with calculating module <NUM> and which will be described more in detail below.

With reference to <FIG>, the calculating module <NUM> is configured to:.

In particular, the step of identifying, in at least one frame of the video sequence VIDEO-DATA, a set of candidate markers MARKERS CANDIDATE SET comprises detecting all the elements associable with a marker and considering them as part of the set of candidate markers MARKERS CANDIDATE SET.

The step of eliminating false positives (step <NUM>) takes place by means of the evaluation of some parameters of the candidate markers that are part of the set of candidate markers MARKERS CANDIDATE SET.

In the non-limiting embodiment shown and disclosed herein, wherein the markers <NUM> are circular and have different colours, the elimination step is based on the evaluation of the area of the candidate markers and/or of the brightness of the candidate markers and/or of the circularity of the candidate markers and/or of the inertial moment of the candidate markers and/or of the convexity of the candidate markers and/or of the colour of the candidate markers and/or on the basis of a reference dataset of false positives already classified.

For example, the reference dataset of the false positives can be defined thanks to automatic learning algorithms and/or can be defined based on experimental data.

<FIG> shows some examples of the parameters on which the false positive elimination step (step <NUM>) is based.

Point a) shows candidate markers with areas of different dimensions.

Point b) shows candidate markers with different brightnesses, wherein brightness means the intensity of the centre of the binary image of the candidate marker.

Point c) shows candidate markers with different circularity indexes.

Point d) shows candidate markers with different indexes of inertia, wherein inertia means the degree of dispersion of all the pixels belonging to the candidate marker around its centre of mass.

Point e) shows candidate markers with different convexity indexes.

The evaluation of the colour of the candidate markers is preferably based on the space-LAB colour coordinates. The space-LAB colour coordinates are three: a, b, L. The evaluation of the colour of the candidate markers, however, is preferably carried out by detecting the sole coordinates a, b of the candidate markers, which are compared with acceptable intervals of coordinates a, b starting from the colours assigned to the markers <NUM>.

Obviously, as already mentioned above, the items of information concerning the colours assigned to the markers <NUM> are contained in the data SNAPSHOT DATA coming from the memory module <NUM>.

In this way, the coordinate L, depending on the brightness, is not compared. By so doing, it is possible to avoid eliminating candidate markers having the colour of the markers <NUM>, but a different brightness (a parameter that excessively depends on the conditions of detection of the sequence of images).

At the end of the elimination step (step <NUM>) there is a reliable set of candidate markers MARKERS RELIABLE SET.

The step of identifying (step <NUM>) a set of candidate cells CELLS CANDIDATE SET involves detecting, starting from the markers that are part of the reliable set of candidate markers MARKERS RELIABLE SET, combinations of the candidate markers that can be associated with one of the cells <NUM> that are part of the specific arrangement in the reference image <NUM>.

In the non-limiting embodiment shown and disclosed herein, the cells <NUM> that are part of the specific arrangement in the reference image <NUM> are quadrangular. Therefore, the candidate cells are formed by candidate markers arranged at the vertexes of quadrilaterals.

Once all the candidate cells have been identified, the step of eliminating false positive cells (step <NUM>) substantially takes place in four steps.

The first step involves eliminating all the candidate cells that do not have at least one of the combinations of markers <NUM> of the cells <NUM>.

In other words, the candidate cells are all those cells formed by candidate markers having an arrangement and colours that are identical to one of the specific combinations defining the cells <NUM> of the reference image <NUM>.

The second step involves eliminating the candidate cells that represent projections of the cells <NUM> deriving from a hypothetical non-plausible and non-realistic framing. The cells, when deemed to be false positive, can generate non-plausible projections, i.e. projections that cannot derive from an actual framing. These cells can be eliminated a priori.

The third step involves eliminating the candidate cells that have an ACCAND/AMCAND ratio (cell area/area of the markers defining the candidate cell) that does not correspond to the ACSNAPSHOT/AMSNAPSHOT ratio (cell area/area of the markers of the cell <NUM> of the specific arrangement in the reference image <NUM> having the same combination of markers as the candidate cell).

The fourth step involves calculating a homography starting from the data of all the candidate cells.

If the homography calculated by so doing corresponds to a plausible projection of the specific arrangement of the reference image <NUM>, the candidate cells are considers as reliable.

If the homography does not correspond to a plausible projection of the specific arrangement of the reference image <NUM>, at least some of the candidate cells are eliminated.

At the end of the four cell selection steps, there is a reliable set of cells CELLS RELIABLE SET.

Starting from the reliable set of candidate cells CELLS RELIABLE SET and starting from the data SNAPSHOT DATA coming from the memory module <NUM>, the method comprises calculating, for at least some frames of the video sequence (VIDEO DATA), a homography (MAPPING DATA) capable of transforming the coordinates of the cells of the reliable set of cells CELLS RELIABLE SET acquired with a given perspective into coordinates representable in the perspective of the reference image <NUM> and vice versa.

In other words, the method comprises calculating a homography capable of obtaining a perspective transformation of the coordinated acquired by means of the sequence of images into coordinates representable in the reference image or, vice versa, a homography capable of obtaining a perspective transformation of the coordinates in the reference image into coordinates representable in the sequence of images.

The homography is calculated, as already mentioned above, for at least some of the frames of the video sequence VIDEO DATA.

The method according to the invention preferably comprises calculating at least one homography of at least one frame and determining the homographies of the remaining frames preferably through computer vision algorithms, such as for example "optical flow" algorithms, starting from the homography and the images of the frames or through interpolation algorithms.

Sometimes, on the other hand, it is preferable to calculate a plurality of homographies and obtain, by means of the methods described above, the non-calculable homographies comprised between calculable homographies.

The homographies obtained by so doing define the mapping of the environment to be monitored (MAPPING DATA). These matrices can be used for the most varied applications.

In the non-limiting example disclosed and shown herein, the mapping data MAPPING DATA is preferably supplied to a projection module <NUM>, which is configured to combine the mapping data MAPPING DATA coming from the calculating module <NUM> with possible data concerning the eye movement of the user looking, at least partly, at the environment to be mapped <NUM>. The data concerning the eye movement of the user are detected by means of an eye tracking device <NUM> (schematically shown in <FIG> as part of the glasses <NUM>) and connected to a respective eye movement calculating module <NUM> of the control device <NUM>.

The eye tracking device <NUM> detects data concerning the eye movement of the user who is looking, at least partly, at the environment to be mapped <NUM> during the acquisition of the video sequence, whereas the eye movement calculating module <NUM> processes the data acquired by the eye tracking device <NUM> and sends the coordinates of the gaze on the video sequence GAZES ON VIDEO to the projection module <NUM>.

According to a variant which is not shown herein, the eye movement calculating module <NUM> is built-in in the eye tracking device <NUM> and is not part of the control device <NUM>. The projection module <NUM> is configured to process the coordinates of the gaze GAZES ON VIDEO coming from the eye movement calculating module <NUM> based on the homographies (MAPPING DATA) determined by the calculating module <NUM>. In this way, the projection module <NUM> calculates the gaze point coordinates on the reference image <NUM> GAZES ON SNAPSHOT.

The control device <NUM> can optionally comprise, in addition, a graphic module <NUM>, which is configured to represent the cells <NUM> identified by the calculating module <NUM> on the video sequence and/or on the reference image <NUM> and, if necessary, to also display on the reference image <NUM> the gaze coordinates GAZES ON VIDEO coming from the eye movement calculating module <NUM>.

The graphic module <NUM> is further configured to process the input data and, if necessary, to represent on the reference image heat maps (usually defined HEAT MAPS) and/or GAZE PLOTS (indicating the location of the samplings of the gaze points or of the fixations, the order of these samplings or fixations and the time spent looking) and/or GAZE OPACITY MAPS (maps displaying only the areas where the attention of the user is focused, whereas the remaining areas are masked or opaque).

The control device <NUM> can also optionally comprise a statistical module <NUM>, which is configured to process the data coming from the projection module <NUM> (GAZES ON SNAPHOT) and the data coming from the memory module <NUM> (SNAPSHOT DATA, AOI) so as to provide a statistical processing of this data (METRICS) useful for different applications and evaluations.

The mapping method and system according to the invention advantageously allow for the mapping of a real environment to be monitored in a simple and reliable manner, starting from a video sequence detected in motion, even under conditions that determine the acquisition of low-quality images.

The mapping data (MAPPING DATA) obtained by means of the mapping method and system according to the invention can be used for a statistical processing (through the statistical module <NUM>) and/or to permit the representation of significant data data and/or in applications (not described and shown herein) which involve interactions of the user with the mapped environments/elements.

All the steps of the method according to the invention are carried out in an automatic manner. This allows for a "real-time" mapping.

Besides, the method and the system according to the invention are sufficiently reliable and robust. For example, they are not affected by the acquisition of low-quality images, of partial images of the environment to be mapped, of occlusions of part of the environment to be mapped and are not affected by the framing angle of the acquired images.

Furthermore, the mapping data obtained by means of the method and the system according to the invention are accurate and capable of providing indications on the distance of acquisition of the sequence of images from the mapped environments/elements.

Finally, the system according to the invention is simple and economic, also thanks to the fact that it preferably uses passive markers (i.e. non-active markers, such as for example signal emitting markers) and does not require special maintenance.

Claim 1:
Mapping method comprising the steps of:
- positioning, in an environment to be mapped (<NUM>), a plurality of passive markers (<NUM>); the plurality of markers (<NUM>) comprising at least a number of different types of markers (<NUM>) equal to a type-number (K); the plurality of markers (<NUM>) being organized in cells (<NUM>); wherein each cell (<NUM>) is identified by a combination of markers (<NUM>); the combination of markers being a specific arrangement of markers capable of identifying the cell (<NUM>);
- memorizing at least one reference image (<NUM>) of the environment to be mapped (<NUM>) containing the plurality of markers (<NUM>) organized in cells (<NUM>);
- detecting, by a moving video camera (<NUM>), a video sequence (VIDEO DATA) wherein the environment to be mapped (<NUM>) is, at least in part, framed;
- identifying in at least one frame of the video sequence (VIDEO DATA) one or more cells (<NUM>) being part of the specific arrangement of markers (<NUM>) of the reference image (<NUM>);
- calculating, on the basis of the data regarding the identified cells, at least one homography (MAPPING DATA) for the perspective transformation of the coordinates acquired in the video sequence (VIDEO DATA) into coordinates in the reference image (<NUM>) and vice versa.