EE_ga
2008-08-13 17:10:05 UTC
I am currently creating a vi that would take an image of a target and take note of its coordinates, with the image of this target i will turn it into a template, from then on i will take an image of a live target and use pattern matching to find that target in the image to get the coordinates of it get the difference in position between the live target and the template and repeat this process untill all the targets we have are characterized. The way this works is that the first target (which will be my template) is attached to a post and i take pictures with 3 ieee cameras. The post is placed on a micropositioner. After the images of the target are taken i create 3 templates for pattern matching from each image taken with the three cameras. After the template has been made, i remove the first target (and post it is attached to) and put a new target (attached to a different post) and take images with all three cameras again only this time with the images i will use pattern matching to find the target and its position. After finding the position of the target i will find the difference in coordinates between the current target on the micropositioner and the templates coordinates. All targets are roughly the same size and exact shape. This process is done so we can allign a target in the same position in space everytime (especially since these targets are in the size of magnitude of micrometers). The problem i am having is with the pattern matching and viewing some of the images in my labview vi.Ive tried two things,First was to take an image using NI Vision and then do the pattern matching in vision to create a template by selecting a region of interest.When creating that template in vision i would bring that file up in my labview vi and pass that file as the template when i call teh pattern matching vi. To make things simple i'll just explain the vi with the use of only one camera (instead of three),In the vi i have two image windows on the front panel, one will hold the image of the template and the other window contains a live feed of the new target placed on the micropositioner.Once i tell the camera to take an image the vi then takes that newly aquired image uses pattern matching to find the position of the target. This process worked fine, the only problem i had was when bringing up the template and placing it in the image windows ont eh front panel, it did not display the whole image, rather it only displayed the region of interest of the rectangle i drew out. The problem with this is that when referencing the template the user can't compare the current targets position on the screen with that of the template. The Second thing i tried was just creating a template using the learn pattern function in labview. Here i did not have to draw out a region of interest and when bringing up the template in the vi i created, it shows the whole image which allows the user to compare the location of the template and the target through the live feed. The problem with this however is that once i move the target around and try to do pattern matching labview cant recognize it unless it was in the exact spot. I think the problem might be is when making the template without specifying a reigion of interest labview takes the whole image and thinks that is the pattern, so if the target i put onto the post is in a different postion on the screen labview will not find it. Is there a way for me to create a pattern and selecat a region of interest while at the same time keep the original size of the image when bringing up the template?