rotate objects based on pixel value of video footage
Create the alpha mask in the compositor and render it as an image sequence. Then load those images—as separate images—into blender and follow my answer here to access image pixels and orient objects based on it.



To get this to work for the image sequence, adjust the image access expression to be something like this:

bpy.data.images[str(frame).zfill(3)].pixels[:][0::4]


Where frame is your integer frame number. This assumes the images are named 001, 002, 003, ..., adjust the expression to your naming style. This will access a different video frame image based on your scene frame number, effectively giving you the video pixels.