init of repo, calculating cummulative distribution of image channel