Select the image areas in focus

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.

In action: A Focus Area selection using the default options

Use the brush controls to manually add () or remove () areas from the selection.

Add areas to the selection manually.

If the selection area has noise, control it by adjusting the Advanced > Image Noise Level slider control.

Note:

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.

Toggle the Preview option.

If necessary, select Soften Edge to feather the edges of the selection.

If you want to fine-tune the selection edges, click Refine Edge. For information about specifying the settings in the Refine Edge dialog box, see Refine selection edges.

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: