I am working in C++ and I have a vector container of float values. I want to write an image file to disk where the pixel values of the image are the values from the array.For instance I have 40,000 values in my array and I want a 200x200 image file to be created in some format(the format is not very important, however, I would prefer something with lossless coding if possible). I would like to do this using Intel's libraries, IPP. Can somebody tell me which function would be most appropriate for my problem.(At present I'm sticking only to grayscale images.)
Asked
Active
Viewed 469 times
0
-
something like matrix? – Navi Jul 12 '13 at 10:10
-
I'm not sure I got you. Yes, the data is in the form of a matrix. I have to write it out as a grayscale image using Ipp – Lisa Jul 12 '13 at 10:35
-
if i found anything related to your question i will post here – Navi Jul 12 '13 at 10:57
1 Answers
0
One way would be to just write it out as space delimited numbers in a file.raw, and load it with ImageJ. ImageJ will give you an option to specify width, height and bit-depth. Second, one I have dome in the past, is (if you use Matlab too), use matlab engine commands to figure(data), and then used getframe/get(gcf) etc. to imwrite it to your fav. image format (Matlab has tons of them)

Sid
- 1
-
The original poster is not using Matlab, just as a heads up. She appears to be using C++. – Chris Forrence Aug 15 '13 at 18:30