LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making 3channel 32 bit images from 1 channel 8 bit images ( channel combining)

Hi guysSmiley Happy

 

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

0 Kudos
Message 1 of 4
(3,214 Views)

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?

0 Kudos
Message 2 of 4
(3,208 Views)

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.

Message 3 of 4
(3,199 Views)

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 🙂 

0 Kudos
Message 4 of 4
(3,196 Views)