help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fast copy of buffer data into a matrix


From: John Swensen
Subject: Fast copy of buffer data into a matrix
Date: Thu, 08 Feb 2007 10:49:48 -0500
User-agent: Thunderbird 2.0a1 (X11/20060807)

I am currently working on a module to capture data from a firewire camera and returning it to a user in Octave. I have it all working, but currently copy from the buffer returned to me by the CamWire library into a Matrix by doing the following

Matrix ret_img( settings.height, settings.width );
for( int i = 0 ; i < settings.height, settings.width ; i++ )
   ret_img(i) = imagebuffer[i];

where imagebuffer is an array of uint8_t.

I have searched around a bit, but can't find a way of just doing a memcpy into the Matrix object, rather than my slow existing implementation. Any suggestions?

John Swensen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]