You need to learn a lot. It begins with some
information about the HSV color mode and its usage in Java and your libraries.
Here is some
OpenCV example for that and some
OpnCV color managment.
You have a bunch of learning and coding to do. It is a challenge for you to learn and code. I wish you the best for your ambitious work.
PS: ask some mate for help or consult your teacher, but work
HARD. In the
OpenCV Java tutorials you may find some helping stuff.