02-04-2014 09:27 AM
Hello all. My apologies if this has already been discussed but my searches did little to point me in the right direction.
I am using LabVIEW 2011 SP1. Also, I am using the latest VDM Evaluation package. I have a few issues I need assitance with:
1: I am trying to manipulate pixel values of a 32-bit color image (changing them to a specific color) and saving that newly edited image. After setting up my code i successfully change pixel values and display the result on the front panel. In this case i chose to write a vertical black bar down the middle of the image. However, when i attempt to save the edited image using IMAQ Write File 2 only the original image is saved without the black bar.
Could it be because I am using the evaluation vision module?
2: I attempted to build an application from this so I could run it on another computer without LabVIEW. I get a build error however, indicating that I am using the eval VDM and therefore cannot build an executable. Does anyone know of a solution to this other than purchasing the module? Is it possible to achieve what I am trying without using VIs from the VDM?
I have attached an image of my block diagram along with the resulting image.
Thanks in advance.
02-04-2014 09:35 AM
Update:
I tried relocating the IMAQ Write File 2 to the inner for loop. It begins to write the result in the newly saved file but I suspect it goes through too many iterations within the loop and crashes. I get the result that is shown in the attachment.
An additional question: When I run the program both Image and Image Out displays show the processed image. How can I make Image Out show the original image and Image show the processed image?
Thanks again.
02-04-2014 10:12 PM
02-05-2014 08:34 AM
Thanks for your reply uday. I accidentally posted my problem from my coworkers account (hence the different username today).
Why is it that when I take the image out line to the end of the inner for loop it turns the data into a 1-D array and subsequently a 2-D array coming out of the outer for loop? Now i cannot display the image with a simple image display vi.
Any pointers on what I am missing here?
Much appreciated,
Wayne
02-05-2014 08:55 AM
Never mind, the loop tunnel had indexing enabled by default. Problem solved. Thanks again.
02-05-2014 10:23 PM
02-06-2014 07:23 AM
Uday,
Yes, the problem of saving the newly edited image was solved after writing the file after the outer for loop.
Regarding my other issue, I have not figured out how to build an application from my code, which includes VIs from the VDM module since my VDM is in evaluation (getting errors and build failures). Do you know of any alternative ways to do pixel writes on an image without the VDM VIs?
Thanks again.
02-06-2014 10:17 AM - edited 02-06-2014 10:23 AM
Hello,
a digital image is just a numerical representation of the object,scene,etc... It is simply a matrix containing the intensity values. And the VDM is just a library that does the image read,process and display part.
You can also process images without the VDM in Labview. Take a look for example at read/write bmp/jpeg file.vi. Operate directly on the image data.
Best regards,K
02-06-2014 10:43 AM
Thank you K, I have been researching that path.