First time here? Check out the FAQ!
answered 2012-11-13 07:39:12 -0600
Looks to me that the answer lies in histogram matching. You can create the histogram and modify it as per your specs. Then you can apply it to get the desired range. I can help you formulate the code.