A method for determining an object's size based on calibration data is disclosed. The calibration data is measured by capturing images with an image sensor and a lens module, having at least one objective, of the capsule camera at a plurality of object distances and/or back focal distances and deriving from the images characterizing a focus of each objective for at least one color plane. Images of lumen walls of gastrointestinal (GI) tract are captured using the capsule camera. Object distance for at least one region in the current image is estimated based on the camera calibration data and relative sharpness of the current image in at least two color planes. The size of the object is estimated based on the object distance estimated for one or more regions overlapping with an object image of the object and the size of the object image.