You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code provided in opencv/tests/camera.nim works fine but i have not found a way to get the image/frame data into a nim's sequence/array. It is my understanding that default arguments are width:640 ,height:480 , channels:3 resulting in 921600 bytes of data .But the length of data is not constant and is generally less than 921600 bytes.
According to the code openCV returns a pointer to the string data i.e of type cstring.
Extra code i used to access the raw data is like this:
. . . . . .
. . . . . .
var frame = queryFrame(capture)
var imgData = cast[seq[uint8]](toSeq($frame.imageData))
echo("len of imgData: ",imgData.len)
Shouldn't the data length be equal to 921600 for each frame??.
The text was updated successfully, but these errors were encountered:
Code provided in opencv/tests/camera.nim works fine but i have not found a way to get the image/frame data into a nim's sequence/array. It is my understanding that default arguments are
width:640 ,height:480 , channels:3
resulting in921600 bytes
of data .But the length of data is not constant and is generally less than 921600 bytes.According to the code openCV returns a pointer to the string data i.e of type cstring.
Extra code i used to access the raw data is like this:
Shouldn't the data length be equal to 921600 for each frame??.
The text was updated successfully, but these errors were encountered: