import bpy, os, tempfile
import numpy as np
from mathutils import Vector
from bpy_extras.object_utils import world_to_camera_view

out = os.path.join(tempfile.gettempdir(), 'check_water2.png')
bpy.context.scene.render.filepath = out
bpy.ops.render.render(write_still=True)
print('rendered')

img = bpy.data.images.load(out)
w, h = img.size
px = np.array(img.pixels[:], dtype=float).reshape((h, w, 4))[..., :3]
cam = bpy.data.objects['Camera']
scene = bpy.context.scene
for xyz, label in [((8,-7,0.25),'pond_center'), ((8,-3,0.25),'pond_north'), ((8,-11,0.25),'pond_south'), ((5,-5,0.25),'pond_west')]:
    v = world_to_camera_view(scene, cam, Vector(xyz))
    if 0 <= v.x <= 1 and 0 <= v.y <= 1:
        col = int(v.x*w); row = int((1-v.y)*h)
        print(label, (round(v.x,3), round(v.y,3)), 'rgb', px[row,col].round(3))
    else:
        print(label, 'off', (round(v.x,3), round(v.y,3)))
print('overall mean', px[..., :3].mean(axis=(0,1)).round(3))
bpy.data.images.remove(img)