2016-08-17 15:15:55 -0600 | commented question | Mat different channels
Ah, that is good to know, thanks!
This is exactly what I ended up doing :D |
2016-08-16 22:01:20 -0600 | asked a question | Mat different channels Hello everyone, newbie here. I am trying to put the pixel values of one Mat into another via mat.put(x,y,values) That does work, but only for Mats of the same type. When they are not, I get an error.
The solution to that problem would be to have the Mats share the same type by converting one of them (right?). The problem with THAT is, that I need to explicitly state in the cvtColor - Method, which channel to convert (and how). But I do not know the exact channel on runtime, channels count should either be 3 or 4... So, how do I convert one mat to the type of another mat dynamically? Any ideas? Thank you very much. With kind regards, David. |