PDA

View Full Version : Iplimage to ARuint8


ffritz
April 20th, 2005, 07:29 PM
Hi .

Does maybe one of you know , how to convert an Iplimage to the ARuint8?

Thanx in advance

philip_lamb
April 28th, 2005, 02:17 AM
Well, I don't know what format an Iplimage has its data in, but an ARToolKit image is just a stream of bytes. The first byte of the ARuint8* buffer is the first colour component of the upper-leftmost pixel of the image, and subsequent bytes contain the remaining colour components, then the remaining pixels of the first row, then remaining rows.

The number of colour components and their ordering is determined at compile time by options in config.h, the number of rows and columns is determined by the camera parameter structure.

At some time in the future, the format of the pixels in ARToolKit will be able to be specified at runtime.. at present the various platform's video libraries and gsub_lite can all handle the pixel format being specified at runtime, however libAR can't, as yet.

ffritz
April 28th, 2005, 12:21 PM
thanks.

Have had solved the problem before, sorry for not telling.

djoele
May 26th, 2005, 03:45 PM
I have a camera that uses YIQ format. I need to convert that to BGRA format. I know how to do that. But YIQ are double values, and I think the arVideoGetImage function returns a buffer that contains integer values. Is that right?

So, if I grab an image the buffer will contain wrong values because they are integers but need to be doubles. That means I should change the function arVideoGetImage to have it return double values?