Photoshop lets you easily select the areas/pixels of an image that are in focus.
Do the following:
- With the image open in Photoshop, choose Select > Focus Area. In the Focus Area dialog box, 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 in clearest focus remain selected.
- If the selection area has noise, control it by adjusting the Advanced > Image Noise Level slider control.
You can leave the Auto option selected for In-Focus Range and Image Noise Level. Photoshop automatically selects appropriate values for these parameters.
- At any point, while making changes to the Focus Area selection, you can toggle the Preview option to see the original image.
- If necessary, select Soften Edge to feather the edges of the selection.
- If you want to fine-tune the selection edges, click Select and Mask.
- Once you've adjusted the selection to your satisfaction, determine whether the refined selection should become a selection or mask on the current layer, or produce a new layer or document. You can choose one of the following output options:
- Selection (default)
- Layer Mask
- New Layer
- New Layer With Layer Mask
- New Document
- New Document With Layer Mask