A camera module, comprising: a lens unit and a lens driving unit configured to move the lens unit; a memory configured to store a plurality of point spread functions each corresponding to a respective distance between the lens unit and an object, wherein a magnitude of each point spread function is calculated depending on the position of the lens unit and a distance of the object; and a processor configured to: obtain a first image of an object from the camera; move the lens unit by a specified amount of movement using the lens driving unit; obtain a second image of the object that corresponds to a position to which the lens unit is moved; perform a depth from defocus operation based on a difference between the first image and the second image and the specified amount of movement using a specified first point spread function among the plurality of point spread functions to thereby determine a focus position for an image of the object; determine an amount of movement for moving the lens unit to the focus position including determining a distance between the object and the lens unit; characterized by the memory further storing a correction value corresponding to a defocus magnitude ratio between a second point spread function and the first point spread function, wherein the second point spread function among the plurality of point spread functions corresponds to the determined distance; the processor being further configured to: correct the determined amount of movement for moving the lens unit using the correction value, and move the lens unit by the corrected determined amount of movement using the lens driving unit. a lens unit and a lens driving unit configured to move the lens unit; a memory configured to store a plurality of point spread functions each corresponding to a respective distance between the lens unit and an object, wherein a magnitude of each point spread function is calculated depending on the position of the lens unit and a distance of the object; and a processor configured to: obtain a first image of an object from the camera; move the lens unit by a specified amount of movement using the lens driving unit; obtain a second image of the object that corresponds to a position to which the lens unit is moved; perform a depth from defocus operation based on a difference between the first image and the second image and the specified amount of movement using a specified first point spread function among the plurality of point spread functions to thereby determine a focus position for an image of the object; determine an amount of movement for moving the lens unit to the focus position including determining a distance between the object and the lens unit; characterized by the memory further storing a correction value corresponding to a defocus magnitude ratio between a second point spread function and the first point spread function, wherein the second point spread function among the plurality of point spread functions corresponds to the determined distance; the processor being further configured to: correct the determined amount of movement for moving the lens unit using the correction value, and move the lens unit by the corrected determined amount of movement using the lens driving unit. obtain a first image of an object from the camera; move the lens unit by a specified amount of movement using the lens driving unit; obtain a second image of the object that corresponds to a position to which the lens unit is moved; perform a depth from defocus operation based on a difference between the first image and the second image and the specified amount of movement using a specified first point spread function among the plurality of point spread functions to thereby determine a focus position for an image of the object; determine an amount of movement for moving the lens unit to the focus position including determining a distance between the object and the lens unit; characterized by the memory further storing a correction value corresponding to a defocus magnitude ratio between a second point spread function and the first point spread function, wherein the second point spread function among the plurality of point spread functions corresponds to the determined distance; the processor being further configured to: correct the determined amount of movement for moving the lens unit using the correction value, and move the lens unit by the corrected determined amount of movement using the lens driving unit. correct the determined amount of movement for moving the lens unit using the correction value, and move the lens unit by the corrected determined amount of movement using the lens driving unit.