A method of calibration of a device for analyzing at least one element present in a sample , said device comprising : - a detection assembly comprising a light source configured to illuminate said sample , an optical system configured to collect a light radiation originating from said sample , and a planar image sensor configured to acquire a holographic image (Ih) formed by the interference between a reference wave originating from said light source and a wave diffracted by said radiation originating from the sample ; and - digital processing means configured to detect a digital position (Pn) of at least one element in said sample based on said acquired holographic image (Ih), and to calculate a real position (Pr) of said element according to said digital position (Pn) and to a digital position (Pn) and real position (Pr) matching model; wherein the calibration method comprises implementing a plurality of predetermined displacements of said sample with respect to said optical system and, for each of said displacements, detecting a digital position (Pn) of a same element to determine said digital position (Pn) and real position (Pr) matching model according to the predetermined displacements and to the digital positions (Pn) of said element after each displacement, said detection comprising the steps of: - acquiring a holographic image (Ih); - digitally constructing a series of electromagnetic matrices ( I 1 - IN) modeling, by digital propagation of said acquired holographic image (Ih), the electromagnetic wave in planes parallel to the plane of the image sensor and comprised in said sample for a plurality of differences with respect to said plane; - based on the series of electromagnetic matrices ( I 1 - I N), determining an average focusing distance for said sample and determining the corresponding electromagnetic matrix (Ifmoy); - identifying said same element in the corresponding electromagnetic matrix (Ifmoy); and - determining said digital position (Pn) of said same element in said electromagnetic matrix (Ifmoy); said digital position (Pn) and real position (Pr) matching model corresponding to a triaxial matrix (Mc) along three axes of a metric system, said step of determining said digital position (Pn) of said same identified element in said electromagnetic matrix (Ifmoy) being carried out along an axis (z), modeling the position of said identified element in the depth of said sample , according to said series of electromagnetic matrices ( I 1 - I N). - a detection assembly comprising a light source configured to illuminate said sample , an optical system configured to collect a light radiation originating from said sample , and a planar image sensor configured to acquire a holographic image (Ih) formed by the interference between a reference wave originating from said light source and a wave diffracted by said radiation originating from the sample ; and - digital processing means configured to detect a digital position (Pn) of at least one element in said sample based on said acquired holographic image (Ih), and to calculate a real position (Pr) of said element according to said digital position (Pn) and to a digital position (Pn) and real position (Pr) matching model; - acquiring a holographic image (Ih); - digitally constructing a series of electromagnetic matrices ( I 1 - IN) modeling, by digital propagation of said acquired holographic image (Ih), the electromagnetic wave in planes parallel to the plane of the image sensor and comprised in said sample for a plurality of differences with respect to said plane; - based on the series of electromagnetic matrices ( I 1 - I N), determining an average focusing distance for said sample and determining the corresponding electromagnetic matrix (Ifmoy); - identifying said same element in the corresponding electromagnetic matrix (Ifmoy); and - determining said digital position (Pn) of said same element in said electromagnetic matrix (Ifmoy); <EOS>