1 | initial version |
This is what I ended up using:
double Spectrum[N_SPECT][PIXEL_COUNT]; //define contiguous memory block
[...]
DLL_Get_Spectra(Spectrum[SpectrumCount], &CaseTemp);// Grab data into Spectrum[][] one row at a time
[...]
cv::Mat_<double> Image(SpectrumCount, PIXEL_COUNT, &Spectrum[0][0]);//build Mat around Spectrum[][]
It works quite well. I decided to use Mat_<double>
instead of Mat(,,CV_64F)
to be absolutely sure that I get the pixel type right - Microsoft is very fuzzy on the exact size of a double
. Why the spectrometer is returning 16 bit integers as double
in the first place is beyond me.
guy
2 | No.2 Revision |
This is what I ended up using:
double Spectrum[N_SPECT][PIXEL_COUNT]; //define contiguous memory block
[...]
DLL_Get_Spectra(Spectrum[SpectrumCount], &CaseTemp);// Grab data into Spectrum[][] one row at a time
[...]
cv::Mat_<double> Image(SpectrumCount, PIXEL_COUNT, &Spectrum[0][0]);//build Mat around Spectrum[][]
It works quite well. I decided to use Mat_<double>
instead of Mat(,,CV_64F)
to be absolutely sure that I get the pixel type right - Microsoft is very I was somewhat fuzzy on the exact size of a double
. Why the spectrometer is returning 16 bit integers as double
in the first place is beyond me.
guy