opencv posterize

Hello

Is it possible to change the number of colours (colour depth?) of a live video via ofxOpenCv.
Photoshop calls this posterize.

The opencv library in processing does not have it either but using contrast, brightness and threshold gave me good enough results.

Seems though ofxOpenCv does not have contrast and brightness controls included yet. Unfortunately i am too much of a beginner to go ahead and implement more of the opencv capabilities in to OF.

good night.