Finding The Area Of An Object Using Photoshop
This is a way to estimate the area of any shape in Photoshop. I developed this technique because I didn’t have a better app or program to find the relative size of the sun (indicating its brightness) as it went through the solar eclipse in August 2017. I did this by filling the sun with little dots and then counting those dots and comparing the numbers for the sun at various stages of eclipse. In other uses, you would need to divide the number of dots in your shape of interest with the number of dots in a unit square (for example a square that was one inch on each side) to find the number of those units (square inches) that were in your shape. This technique will not give an answer with eight significant decimal places, but is good for quickly finding the area of complicated shapes. When I developed this technique, I had never used the pattern fill or count functions before.
Since I've surrendered to the 'cloud', I have trouble keeping track of which version of Photoshop I'm using, or for which versions this technique will work. Use at your own risk.
- If you haven’t already done this, make a small pattern. For simplicity, I chose a small black dot, but if you really want to use the available small hollow red heart, that will work too.
- Select Custom Shape Tool (under the Rectangle Tool (shortcut U)).
- Select a shape. For the largest selection of shapes, you may have to click on the little gear in the upper right corner of the window and select "All".
- Make sure Pixels or Shape are selected instead of Path.
- Pick a color with some contrast to the background.
- Draw that shape on a blank layer.
- Use the Rectangular Marquee Tool to draw a rectangle closely around your shape.
- Click Edit ⇒ Define Pattern... Name your pattern and click "OK".
- Delete or erase your shape, layer, and selection rectangle.
- Select area to be measured.
- Fill the selected area with your pattern (you may want to do this on a blank layer above the desired shape in your photograph). Click Edit ⇒ Fill...
- Contents: Pattern
- Custom Pattern: select your simple pattern.
- Put a check in the Script: box
- Select Brick Fill
- Mode: Normal
- Opacity: 100%
- Click "OK".
- Pattern Scale: You may have to play with this. The smaller your pattern, the higher the count and the more precise your answer will be, but the Count Tool can only count to 4,094. Start around 0.5 for pattern scale. If this causes the Count Tool to max out in the next step, you can either increase the pattern scale, or divide your shape into segments.
- Offset between rows: I like 50%, but it doesn’t really matter.
- Leave all other settings at 0. Click "OK".
- Count objects.
- With the Magic Wand Tool, select your new fill objects to count (uncheck Anti-alias and Contiguous)
- Click Image ⇒ Analysis ⇒ Select Data Points ⇒ Custom
- In the Data Points area, under Selections, check "Count".
- Click "OK".
- Click Window ⇒ Measurement Log.
- In the Measurement Log window, click Record Measurements. Your answer will be in the new last line of the Measurement Log.
- Repeat Steps 2 through 4 to count fill objects of a reference area. This can be either a unit square or whatever else you want to compare your area to.
- Clean up your mess. Delete your dots and/or their layer, etc.
Well, that’s all there is to it. Congratulations.
You can contact us if you have any questions, or hit the Comment Button below if you have any suggestions for improvement.