Hi everyone, first time here.
I have a camera from which I get “intensity” raw data, this comes at 25hz. This is a callback from the camera sdk that returns an array. The size of the array is 640 and the resolution is 10bit. Data is grayscale, meaning 1023 = white, 0 = black.
I have a mat of an arbitrary row size and 640 columns that I push back a row to every time I get a new frame line. I loose the top (row(0)) in this process which is ok, otherwise I’d have an ever-growing image. This is how I accomplish that:
My question is, what is the best way to normalize the 10 bit frame line from the C style array (ushort) to a 8 or 16 bit Mat?