A method comprising: - obtaining a cropping window in a picture comprising a plurality of objects of interest; - detecting each object of interest of said plurality of objects; - determining a weight for each of said detected object of interest, wherein said weight is determined at least based on the size of the corresponding detected object of interest; - modifying the position of the cropping window in said picture based on said weight(s); and - cropping the picture part delimited by said cropping window, wherein modifying the position of the cropping window in said picture based on said weights comprises: a) ordering said plurality of objects of interest in a decreasing order of said weights to form an ordered list of objects of interest; a1) setting a bounding box around the first object of interest of the ordered list, wherein a bounding box is a box with the smallest area, within which all the pixels of a detected object of interest lie; b) modifying the position of the cropping window so that it is centered on the bounding box comprising at least the first object of interest of the ordered list b1) determining whether the bounding box is smaller than the cropping window; c) responsive to determining that the bounding box is smaller than the cropping window, enlarging said bounding box so that it further comprises a next object of interest of the ordered list; d) repeating b), b1) and c) while the bounding box remains smaller than the cropping window, and while there are remaining objects of interest in the ordered list; e) responsive to determining that the bounding box is larger than the cropping window, using for cropping the cropping window before its previous modification of position in step b). - obtaining a cropping window in a picture comprising a plurality of objects of interest; - detecting each object of interest of said plurality of objects; - determining a weight for each of said detected object of interest, wherein said weight is determined at least based on the size of the corresponding detected object of interest; - modifying the position of the cropping window in said picture based on said weight(s); and - cropping the picture part delimited by said cropping window, wherein modifying the position of the cropping window in said picture based on said weights comprises: a) ordering said plurality of objects of interest in a decreasing order of said weights to form an ordered list of objects of interest; a1) setting a bounding box around the first object of interest of the ordered list, wherein a bounding box is a box with the smallest area, within which all the pixels of a detected object of interest lie; b) modifying the position of the cropping window so that it is centered on the bounding box comprising at least the first object of interest of the ordered list b1) determining whether the bounding box is smaller than the cropping window; c) responsive to determining that the bounding box is smaller than the cropping window, enlarging said bounding box so that it further comprises a next object of interest of the ordered list; d) repeating b), b1) and c) while the bounding box remains smaller than the cropping window, and while there are remaining objects of interest in the ordered list; e) responsive to determining that the bounding box is larger than the cropping window, using for cropping the cropping window before its previous modification of position in step b). a) ordering said plurality of objects of interest in a decreasing order of said weights to form an ordered list of objects of interest; a1) setting a bounding box around the first object of interest of the ordered list, wherein a bounding box is a box with the smallest area, within which all the pixels of a detected object of interest lie; b) modifying the position of the cropping window so that it is centered on the bounding box comprising at least the first object of interest of the ordered list b1) determining whether the bounding box is smaller than the cropping window; c) responsive to determining that the bounding box is smaller than the cropping window, enlarging said bounding box so that it further comprises a next object of interest of the ordered list; d) repeating b), b1) and c) while the bounding box remains smaller than the cropping window, and while there are remaining objects of interest in the ordered list; e) responsive to determining that the bounding box is larger than the cropping window, using for cropping the cropping window before its previous modification of position in step b).