The other day I was wondering if there is an easy way in GIMP to choose the pixels that are part of a selected range on the histogram.
Yes, it's possible to select by pixels' intensity range.
- Make a copy of the layer (Layer → Duplicate Layer)
- Select the duplicate layer, apply threshold (Colors → Threshold) to select the range of intensities.
- In Layer → Mask → Add Layer Mask (or right click in the list of layers). Select “Grayscale copy of layer” and “Invert mask”.
- idem: Mask to selection.
- Hide or remove the layer with mask.
Original image. I want to select the circle:
Make a copy of the layer:
Apply threshold. Note that the area to be selected is black:
Add Layer Mask using the grayscale value of the image:
Now you've obtained an image with the mask. Everything except the black circle is transparent (we can see the bottom layer through it):
Convert the mask to selection. Switch to the original layer. The circle is selected.
There is a plugin called Adagio Range Selection that does pretty much what you want. You can't select from the histogram directly, but you can select the upper and lower boundaries.