A computer-implemented method for segmenting an object in at least one image acquired by a camera, comprising the steps of: a) computing an edge probabilities image based on the image, said edge probabilities image comprising, for each pixel of the image, the probability that said pixel is an edge; b) computing a segmentation probabilities image based on the image, said segmentation probabilities image comprising, for each pixel of the image, the probability that said pixel belongs to the object; characterized in that the method also comprises a step of: c) computing a binary mask of the object based on the edge probabilities image and based on the segmentation probabilities image, wherein step c) comprises the following sub-steps of c1) building a graph comprising a plurality of nodes (n i,j) connected one to the other through n-links, each node representing a pixel (p i,j) of the image acquired by the camera, said graph comprising also a source which represents the object, and a sink which represents a background of the image, each node being connected to the source and to the sink through t-links; c2) defining: - for each n-link, a link cost which is equal to the probability that there is no edge between corresponding adjacent pixels; - for each t-link, a source cost which is equal to the probability that the corresponding pixel belongs to the object, and a sink cost which is equal to the probability that the corresponding pixel does not belong to the object c3) computing a minimum cut which separates the source and the sink and which minimizes the sum of the link costs, source costs and sink costs of the corresponding n-links or t-links that the cut severs. a) computing an edge probabilities image based on the image, said edge probabilities image comprising, for each pixel of the image, the probability that said pixel is an edge; b) computing a segmentation probabilities image based on the image, said segmentation probabilities image comprising, for each pixel of the image, the probability that said pixel belongs to the object; characterized in that the method also comprises a step of: c) computing a binary mask of the object based on the edge probabilities image and based on the segmentation probabilities image, wherein step c) comprises the following sub-steps of c1) building a graph comprising a plurality of nodes (n i,j) connected one to the other through n-links, each node representing a pixel (p i,j) of the image acquired by the camera, said graph comprising also a source which represents the object, and a sink which represents a background of the image, each node being connected to the source and to the sink through t-links; c2) defining: - for each n-link, a link cost which is equal to the probability that there is no edge between corresponding adjacent pixels; - for each t-link, a source cost which is equal to the probability that the corresponding pixel belongs to the object, and a sink cost which is equal to the probability that the corresponding pixel does not belong to the object c3) computing a minimum cut which separates the source and the sink and which minimizes the sum of the link costs, source costs and sink costs of the corresponding n-links or t-links that the cut severs. wherein step c) comprises the following sub-steps of c1) building a graph comprising a plurality of nodes (n i,j) connected one to the other through n-links, each node representing a pixel (p i,j) of the image acquired by the camera, said graph comprising also a source which represents the object, and a sink which represents a background of the image, each node being connected to the source and to the sink through t-links; c2) defining: - for each n-link, a link cost which is equal to the probability that there is no edge between corresponding adjacent pixels; - for each t-link, a source cost which is equal to the probability that the corresponding pixel belongs to the object, and a sink cost which is equal to the probability that the corresponding pixel does not belong to the object c3) computing a minimum cut which separates the source and the sink and which minimizes the sum of the link costs, source costs and sink costs of the corresponding n-links or t-links that the cut severs. - for each n-link, a link cost which is equal to the probability that there is no edge between corresponding adjacent pixels; - for each t-link, a source cost which is equal to the probability that the corresponding pixel belongs to the object, and a sink cost which is equal to the probability that the corresponding pixel does not belong to the object c3) computing a minimum cut which separates the source and the sink and which minimizes the sum of the link costs, source costs and sink costs of the corresponding n-links or t-links that the cut severs.