Anyone familiar with Xojo / RealBasic and the port of OpenCV to that environment? I'm trying to use IPL to convert an RGB image to an RGBA image... should be pretty straight forward but I'm crashing...
This should be quite simple I have a memory block or RGB samples in a matrix form all packed no column rounding even or odd widths.
// memoryblock can be used in place of Ptr for external lib
dim img4 as ptr
dim size as CvSize
dim depth as integer
dim nchannels as integer
dim matsize as integer
dim hdrsize as integer
dim img as MemoryBlock
dim imgStruct as IplImage
// we need a 4 Channels image to be converted in Xojo BitMap Format
if nChannels <=2 then
dim img3 as ptr=cvCreateImage(size,depth,3)
// to reverse BGRA order for bitMap
// convert to Xojo
// must be improved for 16 bits
if depth>=16 then
picture=convert2BMP(img4) // Crashes here ...