create histogram in two ranges

I have a gray scale image say size 40 x 130.
And all pixels have value in range 0 t o 180.
Now my work is to create histogram in this range .
90 ~ 0 and 180 to 91.

How can i create histogram like that?
Kindly guide me to make it work.
Thanks
Topic archived. No new replies allowed.