convert pixel buffer into a float array

Is there is an easy way to convert a pixel buffer into a float array?

thanks

A.

what kind of conversion do you want? you can convert ofPixels to ofFloatPixels just by doing:

  
ofPixels pix;  
ofFloatPixels fpix;  
  
fpix = pix;  

but it will convert the range from 0…255 to 0…1. Then you can access the float array by using getPixels() which return a float* or access to individual pixels, color component… by using the methods in ofPixels