02-06-2013 10:05 PM
Good Morning,
I am using labview 2012 version to develop a program for capturing images and processing them to use for pattern matching.
Can any body guide me to complete the missing links in the attached program.
My requirement is
1. acquire real time images using my laptop webcamera through "vision acquisition express".
2. process the acquired imags
3. save the processed images.
The saved images are read using "imaq read file" and used in later stage.
Thanking you.
Solved! Go to Solution.
02-06-2013 11:23 PM
It's easier if you keep things to the one thread http://forums.ni.com/t5/Machine-Vision/image-processing/td-p/2303494
02-06-2013 11:37 PM
I did not get sufficient help from the earlier post.
So I thought that I should post in LABVIEW forum to get help.
I would appreciate any help regarding the program.
Thank you.
02-07-2013 03:21 AM
HI.
I suggest you consider the following example:
"To Grab HL Target with Real Time Save to disk (Express). Vi" in "Find Examples".
Basically your code is missing some function to assign a name to each image you save, if not done this way will overwrite the file. For example, use the "Format Into String" and combine it with the index entry of the while loop.
Regards.
02-07-2013 09:42 AM
Dear Jonathan Cruz,
Thank you very much for your response.
I checked the example you mentioned.
It meets my program requirement of capturing the image and writing it to a file.
I want to perform processing on the acquired image using vision assistant.
I am following the following steps now.
1. acquire image using vision acquisition express.
2. remove motion blur using weiner filter.
3. BCG correction.
4. choose ROI
5. color segmentation in HSI.
6. canny edge detection.
But Iam not getting the expected output image which I want to write to a file.
What are the proper steps to be folowed to achieve the output image as shown below.(Input image cotains background which varies as it is a realtime acquisition )
02-07-2013 01:04 PM
You could do the following test:
when finished processing the images, you must use the VI "IMAQ Equalize.vi", and then if you save the images to disk.
You tell me after doing this test if it worked its algorithm.
Regards.
02-07-2013 11:44 PM
I tried the program you suggested with a little modification in the code.
I encountered the following errors.
1. Error -1074395797 occurred at an unidentified location.Possible reason(s): IMAQ Vision: Not a valid classifier session. at the color segementation.
2. Error -1074396154 occurred at IMAQ Canny Edge Operator. Possible reason(s): IMAQ Vision: The image is not large enough for the operation. at the canny edge detection.
3. Error -1074396154 occurred at IMAQ Equalize. Possible reason(s): IMAQ Vision: The image is not large enough for the operation. at the imaq equalize
4. Error -1074395995 occurred at IMAQ WritePNGFile. Possible reason(s): IMAQ Vision: File not found.
I used imaq write file 2 to save the processed image because I could not find the save to disk function you used in your program.Can you tell me where it is? I could find it anywhere in my system.
Thanking you.
02-09-2013 04:23 PM
Hi.
"IMAQ Write File 2", has the same function, one is an update of the latest version of "NI-IMAQ".
As for the errors you have.:
1. Error -1074395797 : I see that you are using the "IMAQ Color segmentation.vi", this function requires a session that handles a file that is generated after performing a training process color, if you do not do this step the function does not it will work.
2 Error -1074396154 : To work with the "canny edge detection", you need to have a binary image. This is done first, by converting the image to grayscale, typically using the "IMAQ Extract color", then you have to convert the image to binary, this is achieved by applying a threshold adeuado. After doing this if you can apply the function "Canny edge detection".
3. Error -1074395995: You need to find a folder, not a file, because you will be working with multiple images, therefore the "Path Control" you have to configure it for this purpose: (Right click / Browse Options / Selection Mode / folder). After this you can select Current Folder when looking for the folder where they will be stored your images.
Attached a program, which shows the above process, only this with all your posts by default, so you have to check her some parameters. Nor I understood the function of the function "Wiener Filter.vi".
Regards.
02-09-2013 11:14 PM
Dear Jonathan Cruz,
Thank you very much for sparing your time for solving my problem.
Your program worked excellent.
The output image matches my expected result.
The wiener filter is used to perform deblurring. As I am trying to acquire real time images I thought I should perform deblurring before performing any other processing operations.
Do you think that it is necessary to use wiener filter?
I want to use the saved images to perform pattern matching. I am attaching the program for that.
when a pattern is matched then my program gives a corresponding audio file.
Please check it and kindly notify me if I am doing it right ,and help me with any suggestions and modifications to make the program work properly.
Once again thank you for sparing your valuable time.
02-13-2013 10:17 PM
The program is saving every image that is captured. But I want only the proper images to be saved. What should I do?