Photoshop lets you easily select the areas/pixels of an image that are in focus.
Do the following:
- With the image open in Photoshop, select Select > Focus Area. Photoshop opens the Focus Area dialog in which you can make changes to the default selection.
- Adjust the In-Focus Range parameter to broaden or narrow down the selection. If you move the slider to 0, the entire image gets selected. However, if you move the slider to the extreme right, only the parts of the image that are in clearest focus remain selected.