OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Thu, 27 Aug 2015 15:32:56 -0500Converting pixel data from MatLab to something useable in OpenCV4Androidhttp://answers.opencv.org/question/69576/converting-pixel-data-from-matlab-to-something-useable-in-opencv4android/ So I have a bunch of data from MatLab in a 16bit format... Values like Red: 42676, Green: 60145, Blue: 38758 and I'm trying to convert it to something usable in OpenCV as my values coming back are like 238.38.
I'm at a bit of a loss how to make those numbers match up... Any idea's on how to convert the MatLab data would be appreciated.
edit: Is it as simple as dividing by 256?Thu, 27 Aug 2015 15:10:32 -0500http://answers.opencv.org/question/69576/converting-pixel-data-from-matlab-to-something-useable-in-opencv4android/Comment by LBerger for <p>So I have a bunch of data from MatLab in a 16bit format... Values like Red: 42676, Green: 60145, Blue: 38758 and I'm trying to convert it to something usable in OpenCV as my values coming back are like 238.38.</p>
<p>I'm at a bit of a loss how to make those numbers match up... Any idea's on how to convert the MatLab data would be appreciated.</p>
<p>edit: Is it as simple as dividing by 256?</p>
http://answers.opencv.org/question/69576/converting-pixel-data-from-matlab-to-something-useable-in-opencv4android/?comment=69581#post-id-69581Mat (row,col,CV_16UC3) for unsigned short with three channels?Thu, 27 Aug 2015 15:32:56 -0500http://answers.opencv.org/question/69576/converting-pixel-data-from-matlab-to-something-useable-in-opencv4android/?comment=69581#post-id-69581