A computer-implemented method comprising: obtaining split-pixel image data captured by a split-pixel camera comprising an image sensor with each pixel of pixels of the image sensor comprising a first photosite and a second photosite, and wherein the split-pixel image data comprises a first sub-image corresponding to image data generated by the first photosites and a second sub-image corresponding to image data generated by the second photosites; determining, for each respective pixel of a plurality of pixels of the split-pixel image data, a corresponding position of a scene feature represented by the respective pixel relative to a depth of field of the split-pixel camera; identifying, based on the corresponding position of the scene feature represented by each respective pixel of the plurality of pixels, one or more out-of-focus pixels of the plurality of pixels, wherein scene features represented by the one or more out-of-focus pixels are positioned outside of the depth of field; determining, for each respective out-of-focus pixel of the one or more out-of-focus pixels, a corresponding pixel value having increased sharpness, based on a first value of a corresponding first pixel in the first sub-image and/or a second value of a corresponding second pixel in the second sub-image, wherein a contribution of each of the first and second values to the corresponding pixel value is determined based on a mapping (630, 750) between frequency content of the corresponding first and second pixels and i) the corresponding position of the scene feature represented by the respective out-of-focus pixel relative to the depth of field and ii) a location of the respective out-of-focus pixel within the split-pixel image data, and wherein the first or second pixel having a higher frequency content of these two pixels has a greater contribution than the pixel having a lower frequency content; and generating, based on the corresponding pixel value determined for each respective out-of-focus pixel, an enhanced image having an extended depth of field. obtaining split-pixel image data captured by a split-pixel camera comprising an image sensor with each pixel of pixels of the image sensor comprising a first photosite and a second photosite, and wherein the split-pixel image data comprises a first sub-image corresponding to image data generated by the first photosites and a second sub-image corresponding to image data generated by the second photosites; determining, for each respective pixel of a plurality of pixels of the split-pixel image data, a corresponding position of a scene feature represented by the respective pixel relative to a depth of field of the split-pixel camera; identifying, based on the corresponding position of the scene feature represented by each respective pixel of the plurality of pixels, one or more out-of-focus pixels of the plurality of pixels, wherein scene features represented by the one or more out-of-focus pixels are positioned outside of the depth of field; determining, for each respective out-of-focus pixel of the one or more out-of-focus pixels, a corresponding pixel value having increased sharpness, based on a first value of a corresponding first pixel in the first sub-image and/or a second value of a corresponding second pixel in the second sub-image, wherein a contribution of each of the first and second values to the corresponding pixel value is determined based on a mapping (630, 750) between frequency content of the corresponding first and second pixels and i) the corresponding position of the scene feature represented by the respective out-of-focus pixel relative to the depth of field and ii) a location of the respective out-of-focus pixel within the split-pixel image data, and wherein the first or second pixel having a higher frequency content of these two pixels has a greater contribution than the pixel having a lower frequency content; and generating, based on the corresponding pixel value determined for each respective out-of-focus pixel, an enhanced image having an extended depth of field.