3 Replies Latest reply on Jan 5, 2012 8:15 AM by Paulo Skylar

    Problems using Photoshop CS3 to calculate pixel areas


      Is there a known problem with CS3 Photoshop when using it to calculate how many pixels are contained within selected areas when they are complex shapes?  I am trying to do some calculations and for simple areas it is very good but for other areas it comes up with blatantly incorrect values. For example if you create a matrix of tangent circles within a rectangle and start looking at the areas of the circles and the intervening spaces between the circles and or between the circles and the enclosing rectangle surrounding the edges of the outermost circles, and then start to use the "Histogram" window/panel (I'm using Mac version of CS3 Photoshop) the number of pixels is way off sometimes. I've notice that there is sometimes a warning icon in the Histogram panel that says "Click for Histogram with uncached data" and when that is done then beleivable numbers are shown.


      So why would the "cached" data be so far off when doing these sorts of calculations??


      Thanks for any suggestion on how to accurately compute areas this way.




      ps - I tried to post a version of the file but it's over the 2MB limit - if you want to see the exact file I'm playing with let me know and will be happy to send a copy so you can see what I'm talking about.

        • 1. Re: Problems using Photoshop CS3 to calculate pixel areas
          Paulo Skylar Level 4

          What you have experienced is not  a problem - it is the way Photoshop works. To increase the responsiveness of the program cached data may be used.  Histograms based on the image cache display faster and are based on a representative sampling of the image - think a lower resolution version of the working image.  Hence the pixel count will be inaccurate.


          If what you are doing is simply a measurement then consider changing  your preference setting to use uncached data. Go to Preferences > Performance > History & Cache and change the cache levels to 1 (no caching).  When you are done with your measurements change the cache level back to its typical value (4) or you will experience some performance issues with normal work.



          • 2. Re: Problems using Photoshop CS3 to calculate pixel areas
            DeepYogurt Level 1



            What does "representative sample" really mean?


            The funny thing is that for some areas (circles for example) the number in the Histogram was very accurate, but complex shapes were horriblly inaccurate (off by about a factor of 4-5). The complex areas involved combinations of other smaller circular areas, so have trouble understanding why these areas would be so far off compared to circles. None of the areas in question were rectangular, but some sides of the regions did have one or two straight edges along with the circular other edges.


            Anyway, glad to read that it's a known issue and there is a way around the problem to get at an accurate number.


            Thanks for the suggestion - will keep that in mind for next time I do this.



            • 3. Re: Problems using Photoshop CS3 to calculate pixel areas
              Paulo Skylar Level 4

              The sample used is some sub-sampled version of your image, that is, a low resolution version.


              You should be aware that if such anaylsis this is an important aspect of your work you would benefit from having the Extended version of Photoshop, which has numerous measurement capabilities. You could, for example, have several areas selected and take a measurement which would provide you with the areas of all the selections plus their combined areas as well as numerous other data. All these data can then be exported to a spread sheet for additional analysis.