2014-06-16 05:23:09 -0600 | asked a question | Android opencv and java datatypes hi, i come from a windows c/cpp/c# + intel IPP background, but recently delved into img processing on android + opencv. My question is on opencv data types vis-a-vis java data type. Colors image are represented in opencv as CV_8UC3. In c/cpp the data type is unsigned char: 0-255. But java has no unsigned type and the closest type that can handle 0-255 is short. What i've been trying to do is create a LUT for gamma correction: Current code: This seems to work (have not fully examined the result), but I am troubled by the cast to java byte. Or does opencv handle this correctly in android? I tried creating lutMat as CvType.CV_16SC1 and temp as short array but my app will crash after a short while. |