I tried a lot of constant values but I cannot find any difference between cvtype values. What is it used for? I tried values like CV_8UC4 and CV_16S
CV_8UC4
CV_16S
The naming sheme for the types is CV_{U|S|F}C.
CV_{U|S|F}C
So CV_8UC4 translates to: four channels of unsigned char and CV_16S translates to: 1 channel of signed 2-byte integer.
Of course the topic is handled in the documentation. Here you can find more information.