12-02-2011 02:29 PM - edited 12-02-2011 02:31 PM
Hi guys![]()
Although I have a simple problem, i could not solve it yet.
I am tring to combine opencv and labview by using .dll.I succesfully process and read 8bit images from opencv to display on labview as a 8bit images.
My problem encounters here. When i try to process 3 different 8bit images in opencv and display them as a single 3 channel RGB image, labview can not read image properly.
I also think that can I combine these 3 different 8bit images in labview not in opencv? is there any .vi that can merge 3 8bit images and produces single 32bit RGB image?
Thanks
Baris Togrul
I am sending my .vi,my dll. and my opencv function.it may give a idea.
IBO2_API int Convolution_OpenCV_NI (char* LVImagePtrSrc, int LVLineWidthSrc,
char* LVImagePtrDst, int LVLineWidthDst,
int LVWidth, int LVHeight)
{
IplImage *CVImageSrc, *CVImageDst;
//Create OpenCV headers and set pointers/geometry from LabVIEW:
CVImagesrc=cvCreateImage( cvSize(LVWidth, LVHeight), 8, 4);
CVImageSrc->imageData = LVImagePtrSrc;
CVImageSrc->widthStep = LVLineWidthSrc;
CVImageDst = cvCreateImage( cvSize(LVWidth, LVHeight), 8, 4);
CVImageDst->imageData = LVImagePtrDst;
CVImageDst->widthStep = LVLineWidthDst;
//Create convolution kernel:
cvSmooth(CVImageSrc,CVImageDst,CV_BLUR,3,3,0,0);
return 0;
}
by the way I am using opencv 2.1
12-02-2011 02:45 PM - edited 12-02-2011 02:46 PM
When you're saying that you want to combine the 3 8 bit images into a single 32 bit image, do you mean something like you have the R, G and B bytes separately and want to make them into a single 4 byte RGB image? Which version of LabVIEW are you using?
12-02-2011 03:40 PM
Is this what you want? I saved it to LV2010.
It lets you initialize the three planes to different colors and then merges them into a color RGB image.
12-02-2011 04:19 PM
Great! this is exactly what i want.i checked vision vi so many times but i apperantly missed it 🙂
Thanks a lot for quick reply and solution 🙂