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

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
Attachments:
color threshold_andreas_centroid_mask.vi ‏263 KB

Similar Messages

  • How to dispatch the result from test cases to the function that loads

    Hi ,
         I am currently working on writing a test case and i ant to execute the test case and the result of the test cases needs to be returned to function that loads the swf file using loader.
    Below is the structure
    1) Project A
             Has a action script file that has a loader which inturn loads the swf file.
    public function testRunner():void {
                loader = new Loader();
                loaderDispatcher = loader.contentLoaderInfo;         
                sharedEvents = loaderDispatcher.sharedEvents;
                parentURL = loaderDispatcher.loaderURL;
                parentDomain = URLUtil.getServerNameWithPort(parentURL);
                parentScheme = URLUtil.getProtocol(parentURL);
                load("http://localhost:8000/abc.swf");
        var callback:Function = addAsync(onMessage, 30000, {}, handleTimeout);
        sharedEvents.addEventListener("message", callback);
        /*Listener added to receive message event*/
        sharedEvents.addEventListener(MessageEvent.MESSAGE, onMessageEvent);
            private function load(location:String):void {
                // create SWF loader
                loaderDispatcher.addEventListener(Event.OPEN, onOpenEvent);
                loaderDispatcher.addEventListener(Event.INIT, onINIT);
                loaderDispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, onStatus);
                loaderDispatcher.addEventListener(Event.COMPLETE, onComplete);
                loaderDispatcher.addEventListener(IOErrorEvent.IO_ERROR, onError);
                loaderDispatcher.addEventListener(Event.UNLOAD, onUnload);
                loaderDispatcher.addEventListener(Event.CLOSE, onClose);
                var request:URLRequest = new URLRequest(location);
        //request.idleTimeout = 8000;
        try{
    loader.load(request);
    _subMovie.addChild(loader);
           catch (error:Error)
                     trace("Unable to load URL: " + error);
                // listen for DISPATCH events
                sharedEvents = loader.contentLoaderInfo.sharedEvents;
        sharedEvents.addEventListener(DISPATCH_EVENT_TYPE, handleDispatch);
    2) Project B
          Project B has the test cases written and teh swf file for this project is abc.swf.
    test.mxml
    public function go():void {
    var core:FlexUnitCore = new FlexUnitCore();
    core.addListener(new TestCaseListener());
    core.run(ABCTest);
    var messageEvent:MessageEvent = new MessageEvent("message","action test","action testing");
    //loaderInfo.sharedEvents.dispatchEvent(messageEvent);
    When I load abc.swf file this inturn call the mxml file which runs the testcases by using the FlexUnitCore .
    What I am looking for is dispatching the result that is available in TestcaseListener to the call of loader ie; in Project A
    public class TestCaseListener extends RunListener  {
    public override function testRunFinished(result:Result):void {
    trace("testRunFinished invoked 1 ::");
    trace("failureCount::"+result.failureCount);
    trace("failures::"+result.failures);
    trace("successful::"+result.successful);
    Is there any way in which i can dispatch the result from testcaselistener to the call where this swf file is loaded .

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • Spreadsheet: how can I store test results from different tests in the same central spreadsheet?

    I am looking to gather test data using LabVIEW. I then want to store all the data in the same spreadsheet, a kind of central data base. I know how to store single test data in a spreadsheet but I can I get the software to write new data in the same file without over writing the old data?

    My first recommendation is that if you need a database--use a database not a spreadsheet. A DBMS isn't that hard to use and could pay big dividends in the future.In any case, to answer your question directly, it sounds like you are writing tab-delimited data to a text file that you will then open with a spreadsheet program. On the file write vi is a boolean input that specifies whether the new data should be appended or overwrite the existing data (the default is to overwrite). Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How can I put my music from my iPad onto the iCloud so I can use it on my Mac book?

    Music form iPad mini to iCloud?

    Music form iPad mini to iCloud?
    And your music has not been purchased from the iTunes Store, consider to sign up for iTunes Match to have all your music in the cloud.
    See:  http://www.apple.com/itunes/itunes-match/

  • If I have an iPod touch with music on it and I change my pc how do I put my music from the iPod touch to the new pc without losing it on the iPod touch?

    If I have an iPod touch with music on it and I change my pc how do I put my music from the iPod touch to the new pc without losing it on the iPod touch? My knowledge on iTunes is very limited so simple answers please. :-)

    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • I had to do a recovery on my computer. How can I put my music from my ipod's on my computer itunes library without having to do the whole CD thing?

    I had to do a recovery on my computer. How can I put my music from my ipod's on my computer itunes library without having to do the whole CD thing?

    What, no backup. Download Yamipod on your computer?

  • How to export the result from executing sql statement to excel file ?

    HI all,
    Great with Oracle SQL Developer, but I have have a trouble as follwing :
    I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
    anyone can help me to do that ? Thanks so much
    Sigmasvn

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • How can i put my songs from my iphone to itunes on my laptop without replacing it with the content of the music on my laptop?

    how can i put my songs from my iphone to itunes on my laptop without replacing it with the content of the music on my laptop?

    It has always been very basic to always maintain a backup copy of your computer.
    Have you failed to do this?
    If so, not good, then you may be able to purchase third party software to extract the music from your iphone.  This is not supported by Apple.

  • , how do you put a video from the phone onto imovie

    how do you put a video from the iphone onto imovie

    Import it to your mac (http://support.apple.com/kb/HT4083) then import it to iMovie.

  • How to tokenize the result from a query

    Hi,
    I need some help in writing a query or stored procedure for the following scenario
    select rname from emp where username='user200';
    This query will return the result,as comma separated,in the format r100,r101,r102
    Now,I have to write another query using the above result like below
    select place from loc where rname in ('r100','r101','r102');
    Basically,I need to break the string 'r100,r101,r102' into 3 tokens.Can someone help me write a stored procedure or query for this?
    Thanks
    Ravi.

    Ravi, Try this.
    CREATE OR REPLACE procedure str_token
    is
    input_buffer varchar2(100);
    var1 varchar2(10);
    var2 varchar2(10);
    var3 varchar2(10);
    n1 number(4);
    n2 number(4);
    n3 number(4);
    cursor c1 is
    select place from loc1 where rname in (var1,var2,var3);
    begin
    select rname into input_buffer from emp1 where username='user200';
    n1 := instr(input_buffer,',',1,1);
    n2 := instr(input_buffer,',',1,2);
    n3 := length(input_buffer) + 1 ;
    select
    substr(input_buffer,1,n1-1),
    substr(input_buffer,n1+1,n2-n1-1),
    substr(input_buffer,n2+1,n3-n2-1)
    into var1, var2, var3
    from dual;
    for i in c1
    loop
    dbms_output.put_line('place:'||i.place);
    end loop;
    end;
    Regs,
    Karthik

  • How can the result of a formula copying the content of a cell to another cell be unlinked from the source cell?

    Numbers on iMac under Maverick.
    For each sheet in a spreadsheet (Numbers file) I have provided a corresponding sheet (to replace it). In the new sheet I want to insert a formula referencing the corresponding cell in the original sheet. I want to be able to delete the original sheet without losing the result in the new sheet. The link has to be broken.
    If the formula referencing the cells in the original sheet returns the resultant data in place of the formula, this will enable me to use this method to work through a largish file (and others like it) with comparative ease. In Excel this would be done, for example, by using Paste Value only (an option in Paste Special). In Numbers, I think it can be done for an entire row by using Insert>Copied Rows (and likewise for a whole column), by choosing Values as opposed to formulas (because that action generates new rows and columns and doesn't overwrite existing data).
    Is it something to do with generating a more complex formula, or pasting a style using the Format menu? Or the Edit>Paste and Match Style?
    It's eluding me.

    Thank you, Ian. That sub-menu is what eluded me all right. It certainly seems to me to be one way I can do this: using the Paste Formula Results sub-menu under Edit. But before I copy the cells as you say, I will have to take several prior steps.
    In the new sheet I have to select the top left cell of the subject range and there enter "=". Then, in the original sheet, I must select the corresponding cell. Returning immediately to the new sheet, I need to drag the cell right to extend the formula to two adjoining two cells. Now I need to drag those three cells to extend the formula to the bottom of my table (quite a number of rows, but the number matches that of the original sheet). Only at this point am I in a position to apply your suggested method: that is, copy what's already selected and use Shift-Command-V to paste the formula's result throughout the range.
    I feel sure that will do it. But if anyone has any further suggestion as to how this could be done less cumbersomely, I would be very happy to hear it before I embark on the task ahead - because that will have to be repeated for another 24 new sheets in a couple of files. Quite a lot of work.
    So, whilst you've helped me materially, a question still remains as to whether some other method might be possible?
    Regards,
    Peter White

  • How to join the results from 2 webservices using BPEL?Architecture question

    Hi,
    I am new to BPEL. BPEL process calls two webservices, which return complex results. I need to process the results from 2 webservices using BPEL .The result will be a complex xml, join/merge of previous results.
    What is the best practice to do it with BPEL?
    I see three ways:
    1.To do the processing (join/ merge) inside the BPEL process itself and return complex xml.
    2.Develop auxiliary webservice in java. Auxiliary webservice will do the processing (join/merge). Call this webservice from BPEL process.
    3.Do a plain concatenation of the two XMLs in BPEL and forward it to the frontend. Frontend then will do all the logic on its side
    Thanks,
    Boris

    you could process the XMLs one at a time, and use XSL transformations to process the payload to a target schema.
    Activity 1:
    output from webservice1 -> transform 1 -> partial XML (of target schema)
    Activity 2:
    output from webservice2 -> transform 2 -> completed XML (of target schema)
    Regards,
    Shanmu.

  • How can i prevent the result from the user until he does a specific action

    hi again
    1-i have created two textfields for the user to enter two names
    2-i have created a result button when the user hit it a result will appear
    in any case if the user hits the result button the result will appear
    even if he does not enter the two names
    i want to make the result available only if the user enters the two names
    by checking the inputs before the result appear
    if he enteres the names the result appear
    if he does not enter an error message appear?
    how can i do that process?

    lol i think he was talking about formating your messages on the forum.
    look at an example that i just created hope it helps. If not then read up on the GUI chapter of your java book.
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JTextField;
    import java.awt.BorderLayout;
    public class ButtonTest{
        public static void main(String args []){
            JFrame frame = new JFrame();
            JPanel panel = new JPanel();
            final JTextField textA = new JTextField(10);
            final JTextField textB = new JTextField(10);
            JButton button = new JButton("Perform Action");
            class Listener implements ActionListener{
                public void actionPerformed(ActionEvent e){
                    if(!textA.getText().equals("") && !textB.getText().equals("")){
                        System.out.println(textA.getText()+" "+textB.getText());
           ActionListener listener = new Listener();
            button.addActionListener(listener);
            panel.add(textA);
            panel.add(textB);
            panel.add(button);
            frame.getContentPane().add(panel,BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.show();
    }

  • How do I CLEAR the results from that damnable Awesome Bar?

    I cannot find a way to clear the results that build up in the "Awesome Bar".

    When you clear the history, the awesome bar suggestions should be cleared the next time the cache is refreshed (within a minute, or possibly the next time you start typing in the location bar). The delay is caused by a bug in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=567121
    This bug is already fixed in our nightly development builds, and the fix will be included in an upcoming release.

  • How do I put the audio from one clip over the video of another clip?

    So I have two videos, and I want to replace the audio of the first with the audio of the second. Sorry, I'm new to 08 and have been trying to suss this out for ages so I'd really appreciate any advice you guys can give.

    This thread seems to be on the same subject and is very helpful.
    http://discussions.apple.com/thread.jspa?threadID=2072620&tstart=50
    The Working with Audio clip also included the solution for extracting the audio from a clip at the very end of the video. Having to know the secret handshake of shift-command and dragging is really not intuitive, but such is progress....

Maybe you are looking for

  • Unable to Expand nodes under Migrated Content.

    Hi all, We have recently installed EP 7.0 and we have uploaded the Business Packages Specific to CRM 5.0.But under Migrated Content--> EP 5.0 I'm not able to drill down further.I'm able to see the Folders like Iviews, Pages,Roles etc..But I'm unable

  • Message: MZCommerce.BadPasswordToken_message HELP!

    Hi, If anyone can help, I am getting the message: MZCommerce.BadPasswordToken_message whenever I try to purchase anything from the US iTunes Store. I can't access my account summary or purchase anything because of this message. Please can someone tel

  • Worked yesterday, won't come up today; comcast problem?

    I hope someone can help. My internet provider (insight) has just been bought by COMCAST. The switchover was a couple of weeks ago. I hadn't experienced any problems iChatting until this morning. This morning I woke up to find no internet connection;

  • Unable to launch .exe projects from w/in Captivate

    I have a large project in .exe format (>250 slides) so I'd like to break it up into smaller projects. I created a navigation slide at the end of each small project to allow users to launch any of the five or so .exe files available. When a user doubl

  • Switzerland VAT number in FPP2 and FD03

    Hello All, Our client wants to enter Swiss VAT numbers in Fpp2 (BP), which inturn reflects in FD03(Customer). I have followed the below steps for enabling it Created a tax type 'CH1' using BUPA_TAXNUMTYPE Maintained data in V_TFKTAXNUMTYPE. Maintaine