Is there a way to analyse pictures in Unity?

Lets say I have a algorithm to check the properties of a picture. How do I analyse pictures in Unity? To be exact lets say that I want to be analyse the picture in a detail way. For example maybe the pixels, hues of an area of the picture ( for example there is a photo inputed by a player and i want to take the collective brightness of the photo to set maybe a level’s mood) , contrast, and brightness. Lets say that I want to find a way to abstract this information from the picture and auto generate the level based on a formula. Yeah like average brightness, per-channel-brightness.

You can access the Pixels of a texture with GetPixel/GetPixels.