LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i put the results from a calculation as the offset value

hi .. i am trying to set the value of the mask offset from the results i get from a calculation.

this is what i am trying to do

i want to get a ROI from an image, so i used thresholding to separate it form the background
then i find the centroid of the image. i then create a mask a little larger than the ROI to get rid of the background in an unthresholded image but the position of the mask is at origin(0,0)
i need the centroid of the mask to be the same as the ROI. so i subtract the x and y values of the ROI centroid with the centroid of the mask to get the offset.  which is done manually. but i want to do it for ROIs in different positions, so i want to get the value of the subtraction staight into the VI .. how can i do that..?? i tried wiring the value of subtraction into the input of the "set offset" node but it does not work .. can anyone help me ??thanks very much
0 Kudos
Message 1 of 21
(4,069 Views)
Could you post the code you've written so far?

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 21
(4,054 Views)
i managed to get it done...i did not know how about the cluster to element function .. could you comment on my program?

 i'm trying to construct a sign language translator.  for the signing. i am using yellow colored gloves with colored finger tips. the yellow region is to help me detect the position of the gloves during thresholding.

1st of all .. i do thresholding to separate the ROI from the background.. then i put a bouding box around the region of interest. is there any better and easier way to do this??
could anyone point me in the right direction ?

 i am very new to LV and image processing. i always have problem using some functions especially when it requires lots of settings. sometimes the help file does no help much ..

my next problem after creating the bounding box is how do i extract only the colors from the image? i tried color thresholding but the result is gray scale. how do i extract only the yellow region of the gloves and the finger tips to be further processed? in MATLAB , color segmentation is used.. but i can't figure how it works in LV .. please help me .. thanx
0 Kudos
Message 3 of 21
(4,045 Views)

Hikupikup,

With the IMAQ functions it's easier and a lot quicker to work with Monochrome images (greyscale) and so when you do extract an image you will end up with a greyscale image.  This image will have a hight intensity value where the yellow colout was and low intensity value where the colour wasn't present.  I believe that this is exactly what you will need to use the more advanced functions. (which you will probably need)

What are you expecting to do with the image after this point?

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 4 of 21
(4,030 Views)
as i'm doing sign language translation. i will use gloves with the palm yellow and the finger tips in different colors. i need to extract only these colors to be processed. until now i have managed to mask the image to get rid of most of the background. now, i need to know how do i extract the colors to be processed. anyone knows how to use statistical pattern matching? i need to match the image with a set of images. i can't use pattern matching as the orientation of the fingers would not always be exactly the same. any ideas of what else i can use besides stastistical pattern matching ?? can anyone help me ??
0 Kudos
Message 5 of 21
(4,028 Views)
Am I right in assuming all you need to process the information is the location and orientation of each of the colours?
If I am correct then you can just use "Colour Location.vi".
This will locate the colour you are looking for.(regardless of it's orientation) this way you wouldn't actually need to extract any colours. The function does this for you.
Once these functions are used, you will have to locations of each of the fingers and you can work from here.
 
However...if you need the actual orientation of each of the fingers aswell, then you need to use the "Colour Pattern Matching.vi".  (you can use pattern matching as this function is rotational).
It is possible to find a pattern location as well as it's orientation.
 
These functions will give you a score for each match and you can use this for your statistical analysis.
Could you post an example image?
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 6 of 21
(4,022 Views)
yes, i need to process the information is the location and orientation of each of the colours. but not only that i think because some signs might have the same location and orientation. but how do i set the location and orientation for different users sigining. and how do i set for different orientation ie . the range of angles? position ?? i am using LV 7.1 , i can't find the color location.vi ..

i also have another problem with the acquisition of images. how do i store the images into a buffer and process it one by one ? thanx very much for the reply... i attached am example sign to be processed. the program i attached in my second post gets rid of the background using a mask.  my next stage is to process the images

Message Edited by kupikupi on 07-07-2006 04:44 AM

0 Kudos
Message 7 of 21
(4,015 Views)
Attached is picture of the colour matching vi's.
You will need to associate each of the colours you match with each other to take into acount the size of each users hand etc. (using caliper functions can help you with this)
Unfortunatelly I can't help you with the actual coding of the program but I can point you in the right direction.
 
If you go to the example finder and using the search tab look for "colors" (yes it's American) then you will find a number of really good examples that will help you use the colour matching vi's.
Instead of putting the images into a buffer, would it be feasable to put them into an AVI?
Vision Utilities>>Files>>AVI
 
You can then extract a frame at a time "offline" and process the images from there. (this also means that you can store the avi and process this many times to perfect the algorithms.)
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 8 of 21
(4,006 Views)
Hi KupiKupi,
 
Did that help at all?
How's the coding going?
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 9 of 21
(3,978 Views)
hi adamB, i'm still working on it ... i dont  really know how to use the caliper function,  actually i need to extract the colors from the images to be processed. i dont think color matching can do this yet.... from the program i posted earlier i have removed some parts of the background. i still need to process till i get only the yellow patch and the finger tips only, i need to remove anything other than that..  which only then i think i can do color matching.  could u point me in the right direction? is it possible to extract the colored finger tips only ( not in grayscale).? after that i thk i can continue from there..

about the acquisition and storing images frames. . i dont get the idea of how to process the images real time, for offlline processing, i process the image 1 by 1 and thr results is out immediately. how does real time processing works?

thanx for guiding me thru this .. adamB ...really appreciate it ..

0 Kudos
Message 10 of 21
(3,970 Views)