06-09-2012 07:44 PM
Hi everyone,
I'm trying to familiarize myself with the Vision Development Module on LabView 2009 Student Edition because I want to manipulate images in real time. Currently, I'm trying to split up an RGB image into R,G, and B pixel values then recombine them back into the same image. I can do everything up to the recombining back into the same image part. I think this can be done with the IMAQ ReplaceColorPlane VI (I haven't found another VI that seems appropriate) but all I seem to get is black for both my input and output display. I really have no idea with where I went wrong on this and I need some help to figure this out.
I attached the VI I'm using for reference.
Any insight at all would be a huge help
Solved! Go to Solution.
06-09-2012 07:56 PM
PS. It seems I can't attach my VI to my post for some reason so I'll try to describe the process as best I can...
1.) Create image from file as RGB (U64) and three blank images as Grayscale(I16)
2.) Send into ExtranctColorPlanes VI, blank images as the three plane ins and RGB as source image
3.) send 3 color planes into 3 different ImageToArray VI
4.) send 3 arrays to ArrayToImage VI
5.) create blank image as RGB (U64) and send this and the three converted images into ReplaceColorPlane VI, maintaining appropriate colors as inputs and sending the new RGB as Image destination
06-11-2012 01:17 AM
Hi,
I don't really know why you couldn't upload your VI, it normally works well, a workaround if you really can't do it it to make a screen shot (print screen) of the block diagram and post the image.
For your problem, I think the issue is the size of the image you want to build from the planes, if you want the Replace color plane function to work without error, you have to set the size of the image buffer before your do the replace.
See this example :
Hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
06-12-2012 03:52 PM - edited 06-12-2012 03:58 PM
So that example immitates the end of my code exactly but I still am getting the same result. I even have the setImageSize VI to make sure I have a properly allocated space for my image. If anyone has any ideas it would help greatly
I don't know why I can't upload files but it's not a matter of it being a VI I tried screen shots and they don't work either
Thank you for your suggestions
06-12-2012 08:14 PM
I figured out the problem I had the incoming image set as U64 but the image was saved at 24 bit pixel depth so IMAQ couldn't read the image in properly. when I set the incoming image to U32 and the color planes as grayscale U8 everything worked
Thank you for the help