Hi sabos
Not sure if you read my prior post above with the potential issues with pixel count yet thought about your problem and I can give you an alternative that can bypass all of those issues. The approach below will allow you to stay in 16 bit mode and give you 0.4% accuracy on your count (if you need higher resolution let me know as with a few more steps you can get .003% accuracy)
- duplicate the Layer where you have already erased the upper sediment
- Layer > Layer Mask > From Transparency (this creates a Layer Mask pulling the transparency into the Layer Maks)
- Option click on Layer mask Thumbnail in layers Panel to open the mask image
- Image > Adjustments > Threshold and accept the mid point setting (this will force any partial transparency into full transparency or fully opaque to eliminate that source of partial transparency error)
- With Mask still visible Filter > Blur > Average (this averages out all pixels to one value)
- Now use the info panel with RGB setting or read in 8 bit mode and read any pixel in the mask image displaying and divide by 255. This will give you the percentage of area of the whole image that was not transparent. Just multiply by the actual area the image is supposed to represent and you have your actual area answer.
I am pretty confident this will work to 0.4% accuracy. It is limited to this accuracy because even in 16 bit mode Layer Masks are still in 8 bit mode (0.4% = 1/256)
If you need higher accuracy this can be done in a few more steps yet thought this might be good enough for you.
Hope this gives you another direction to consider.
ADDED EDIT - You can also automate most of this with a PS Action