How to get Coordinates of edges from image into excel

Hi,
I am new to labview and I am doing a project in which i move an XY stage under a laser to etch pictures.  So far I have managed to get the stage to move by reading off coordinates from an excel spread sheet and so can draw pictures if I have the coordinates.
 I am trying to use the vision module to be able to put any image in and then find the edges, get the coordinates of the edge and so draw the image.  Using the vision assistant I do colour plane extraction (to make greyscale) then use shape detection looking for lines with a small minimum length, this gets the information i want and if i click the button on the right that says send data to excell i get a spread sheet with all the information i need.  However, I cant get it to automatically save to excell (the write to spread sheet function doesnt work as "The type of the source is 1-D array of cluster of 5 elements."
It would probably be bettter if i could use the output of the vision assistant (shape detection) straight away without having to save to excell but I cannot extract the information i need from the output as none of the array/cluster functions seem compatible with the data.  I am using labview 10 and have attached my VI below any help would be greatly appreciated!
Attachments:
image to coords (good).vi ‏109 KB

Hello hzub1,
It seems your having trouble getting to the information in the output of your Vision Assistant. You can use Context Help (Ctrl+H to show) to help understand the contents of a large array or cluster when you hover your mouse over the wire (see below).
Looking at the above I created the code below which breaks out all the contents of one item in the array.
Here I use the Index Array function to break out one element of the array. Each element is a circle descriptor, cluster of 5 elements so I use the Unbundle by Name function to access each of the values in the cluster
I hope this helps,
Jack. W
Applications Engineer
National Instruments

Similar Messages

  • How to get max 5 color from image??

    I try to get max 5 color from image (ex. jpeg,gif) ,I use PixelGrabber
    it too slowly when i use large image,Please help me, to run more fast
    (other way PixelGrabber)
    best regard
    [email protected],[email protected]
    source below:
    public String generateColor(InputStream source,String filePath){
    BufferedImage image = null;
    String RGB = "";
    System.out.println("==generateColor==");
    try {
    image = ImageIO.read(source);
    catch (IOException ex1) {
    ex1.printStackTrace();
    //image.getGraphics().getColor().get
    // BufferedImage image2 = ImageIO.read(source);
    // image.getColorModel().getNumColorComponents()
    if(image.getColorModel() instanceof IndexColorModel) {
    IndexColorModel icm = (IndexColorModel)image.getColorModel();
    byte[][] data = new byte[3][icm.getMapSize()];
    int[] rgbB = new int[icm.getMapSize()];
    icm.getRGBs(rgbB);
    String dataHtm = "<HTML><table width=\"100\" border=\"0\"><tr>";
    for(int i = 0 ;i< rgbB.length;i++){
    int r = (rgbB[i] >> 16) & 0xff;
    int g = (rgbB[i] >> 8) & 0xff;
    int k = (rgbB) & 0xff;
    System.out.println("red:" + Integer.toHexString(r));
    System.out.println("green:" + Integer.toHexString(g));
    System.out.println("blue:" + Integer.toHexString(k));
    dataHtm = dataHtm + "<td width=\"10\" bgcolor=\"#" + Integer.toHexString(r)+Integer.toHexString(g)+Integer.toHexString(k);
    dataHtm = dataHtm + "\"> </td>";
    dataHtm = dataHtm + "</tr></table></HTML>";
    try {
    BufferedWriter out = new BufferedWriter(new FileWriter("c:\\23289207.html"));
    out.write(dataHtm);
    out.close();
    catch (IOException e) {
    e.printStackTrace();
    int w = image.getWidth();
    int h = image.getHeight();
    int[] pixels = new int[w*h];
    int[] pixs = new int[w*h];
    System.out.println("image width:"+w+"image hight:"+h+"image w*h:"+(w*h));
    Image img = Toolkit.getDefaultToolkit().getImage(filePath);
    PixelGrabber pg = new PixelGrabber(img, 0,0, w, h, pixels, 0, w);
    try {
    pg.grabPixels();
    catch (Exception x) {
    x.printStackTrace();
    String picColor = "";
    Stack stackColor = new Stack();
    Hashtable hashColor = new Hashtable();
    for (int i = 0; i < w * h; i++) {
    int rgb = pixels[i];
    int a = (rgb >> 24) & 0xff;
    int r = (rgb >> 16) & 0xff;
    int g = (rgb >> 8) & 0xff;
    int k = (rgb) & 0xff;
    i = i+1000;
    //System.out.println("i:" + i);
    picColor = convertToSring(r)+convertToSring(g)+convertToSring(k);
    stackColor.add(picColor);
    //System.out.println("picColor:"+picColor);
    // System.out.println("\n\n a:" + a);
    // System.out.println("red:" + r);
    // System.out.println("green:" + g);
    // System.out.println("blue:" + k);
    }//end for
    getMaxColor(stackColor);
    System.out.println("==generateColor==end\n\n");
    return null;

    import java.awt.Color;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    public class HighFive
        private void examineColors(BufferedImage image)
            long start = System.currentTimeMillis();
            int w = image.getWidth(), h = image.getHeight();
            int[] rgbs = image.getRGB(0,0,w,h,null,0,w);
            findHighFive(rgbs);
            long end = System.currentTimeMillis();
            System.out.println("total time = " + (end - start)/1000.0 + " seconds");
        private void findHighFive(int[] colors)
            int[] uniqueColors = getUniqueColors(colors);
            int[] colorCounts  = getColorCounts(uniqueColors, colors);
            int[] highFive     = getHighFive(colorCounts);
            // for each value of highFive find index in colorCounts
            // and use this index to find color code in uniqueColors
            for(int j = 0; j < highFive.length; j++)
                int index = findIndexInArray(colorCounts, highFive[j]);
                Color color = new Color(uniqueColors[index]);
                String s = color.toString();
                s = s.substring(s.indexOf("["));
                System.out.println("color " + s + "  occurs " +
                                    highFive[j] + " times");
        private int[] getUniqueColors(int[] colors)
            // collect unique colors
            int[] uniqueColors = new int[colors.length];
            int count = 0;
            for(int j = 0; j < colors.length; j++)
                if(isUnique(uniqueColors, colors[j]))
                    uniqueColors[count++] = colors[j];
            // trim uniqueColors
            int[] temp = new int[count];
            System.arraycopy(uniqueColors, 0, temp, 0, count);
            uniqueColors = temp;
            return uniqueColors;
        private int[] getColorCounts(int[] uniqueColors, int[] colors)
            // count the occurance of each unique color in colors
            int[] colorCounts = new int[uniqueColors.length];
            for(int j = 0; j < colors.length; j++)
                int index = findIndexInArray(uniqueColors, colors[j]);
                colorCounts[index]++;
            return colorCounts;
        private int[] getHighFive(int[] colorCounts)
            // find five highest values in colorCounts
            int[] highFive = new int[5];
            int count = 0;
            for(int j = 0; j < highFive.length; j++)
                int max = Integer.MIN_VALUE;
                for(int k = 0; k < colorCounts.length; k++)
                    if(colorCounts[k] > max)
                        if(isUnique(highFive, colorCounts[k]))
                            max = colorCounts[k];
                            highFive[count] = colorCounts[k];
                count++;
            return highFive;
        private boolean isUnique(int[] n, int target)
            for(int j = 0; j < n.length; j++)
                if(n[j] == target)
                    return false;
            return true;
        private int findIndexInArray(int[] n, int target)
            for(int j = 0; j < n.length; j++)
                if(n[j] == target)
                    return j;
            return -1;
        public static void main(String[] args) throws IOException
            String path = "images/cougar.jpg";
            Object o = HighFive.class.getResource(path);
            BufferedImage image = ImageIO.read(((URL)o).openStream());
            new HighFive().examineColors(image);
    }

  • How to get an opening title from imovie06 into imovie09 ?

    There is a opening title I really want from imovie06 which is not available in imovie09 is there any way of getting it ? or how to import it please.

    Prepare your title in iMovie HD 6, then export the movie. Go to Share>QuickTime and select Full Quality.
    Before starting your Title project, make sure you set it up as the same aspect ratio as your proposed iMovie '09 project, that is, Standard 4:3 or Widescreen 16:9.
    The exported movie can be imported to iMovie '09 by selecting File>Import>Movies from the Menu.
    John

  • How to get the forecast data from SCM into BW

    Hello,
    Is there a table or Function module in SCM F&R  that can be used  to transfer the forecast data from SCM F&R into BW? I dont see any Business content datasources that has the forecast data.
    I would like to get the future forecast data. For ex, if there is a forecast for a material and Site for the next 52 weeks, I would like to retrieve
    the same from SCM. I dont see any business content. The closest would be 0FRE_ANA_WEEKLY_1. But it has only the past data, not the future data.
    Thanks,
    SBS.

    Hi,
    You would follow the same process as you would for getting data from a R3 system to BW, i.e generate datsources on the APO side and then set the extraction to flow from APO to BW. On the BW side, you'll need a source system for the APO, replicate datsources, set up update and transfer rules in the infosource and then load data to the data targets.
    Cheers,
    Kedar

  • How to get coordinates from Google Map

    I wonder how to get coordinates from Google Map to JavaFX application when click has occured. Here is an example of code:
    public class JavaFXApplication extends Application {
    public void showCoordinates(String coords)
            System.out.println("Coordinates: " + coords);
        @Override public void start(Stage stage)
            final WebView webView = new WebView();
            final WebEngine webEngine = webView.getEngine();
            webEngine.load(getClass().getResource("googlemap.html").toString());
            webEngine.getLoadWorker().stateProperty().addListener(
                    new ChangeListener<State>() {
                        @Override
                        public void changed(ObservableValue<? extends State> ov, State oldState, State newState) {
                            if (newState == State.SUCCEEDED) {
                                JSObject window = (JSObject) webEngine.executeScript("window");
                                window.setMember("java", new JavaFXApplication());
            BorderPane root = new BorderPane();
            root.setCenter(webView);
            stage.setTitle("Google maps");
            Scene scene = new Scene(root,1000,700, Color.web("#666970"));
            stage.setScene(scene);
            stage.show();
       public static void main(String[] args){
            Application.launch(args);
    // googlemap.html file
    <!DOCTYPE html>
    <html>
        <head>
            <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
            <style type="text/css">
                html { height: 100% }
                body { height: 100%; margin: 0px; padding: 0px }
                #map_canvas { height: 100%; background-color: #666970; }
            </style>       
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
            </script>
            <script type="text/javascript">           
                function initialize() {
                    var latlng = new google.maps.LatLng(40.75089, -73.93804);
                    var myOptions = {
                        zoom: 10,
                        center: latlng,
                        mapTypeId: google.maps.MapTypeId.ROADMAP,
                        mapTypeControl: false,
                        panControl: true,
                        navigationControl: true,
                        streetViewControl: false,
                        backgroundColor: "#666970"
                    var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);    
                    document.map = map;
            google.maps.event.addListener(map, 'click', function(event) {
                //java.showCoordinates(event.latLng); ???
            map.setCenter(location);
            </script>
        </head>
        <body onload="initialize()">
            <div id="map_canvas" style="width:100%; height:100%"></div>
        </body>
    </html>Edited by: krbltik on 03.10.2012 22:59

    Hi, welcome!
    You may also have a look at GPS Info Qt, available for free at Ovi Store: http://store.ovi.com/content/165671
    GPS Info Qt is a nice Qt app. I have it on my C6-01 and I like it.
    Regards.

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to get warranty service claim from nokia c5-03...

    how to get warranty service claim from nokia c5-03 in india because i have problem with nokia c5-03 I Purchase 2 week ago a new nokia c5-03 but from day 1 i facing same problem like 1) app close itself 2) internet browse close if any thing is downloading or downloading over 3) memory full always then i should reboot the phone then it work. 4) ovi map is open it shows memory full close the app So kindly help me how to get warranty service claim from nokia c5-03 in india i am unhappy with nokia c5-03
    Solved!
    Go to Solution.

    i updated software also but the same problem cont... I want to know that nokia will give back money or exchange for other new mobile

  • For some reason the system is telling me my birth date is wrong when it's not and it won't let me proceed to reset my password. Can someone tell me how to get a "real" person from tech on line?

    For some reason the system is telling me my birth date is wrong when it's not and it won't let me proceed to reset my password. Can someone tell me how to get a "real" person from tech on line?

    contact itunes support

  • How to get the current week from sysdate?

    Hi sir,
    i want to know how to get the current week from sysdate?
    thanks

    Hi Nicolas
    It seems you like to check my post and also make commend ;) thanks for your attention
    Have you ever read the posts above and given solutions ?Yes, I did
    Have you read the docs ? Yes, I checked
    What's the added value here ?Did youYou shared doc with solution(long one), I shared short one which point same solution(Check what Joel posted)..So what is benefit, As you can guess oracle docs are sometimes become so complicated as specialy for beginner...(At least it was like that for me and Belive me somedocs are still sooo complicated even for oracle coworkers ) But for you I dont know ;)
    => Why writting the PS in bold ?Why.. Let me think... Ohh Maybe I am looking some questions(many) and even user get answer they should not changed status so I am reading some posts and try to get problem and loosing time..
    So I am putting that PS wiht BOLD because I dont wanna lose time my friend ;) Because While I am trying to help ppl here In same time I am trying to giving support to my customer prod systems. Which mean time is very important for me...
    Hope my answer could satisfy you..
    One important PS for you.. You may not like my posts (or someone) but my friend I become tired to read&answer and make commend to on your comment which is about my posts.
    I am not newbie in forum(At least I fell like that) and I belive I know how I should make post..
    Thank you
    Regards
    Helios

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • How to get payment document number from paid column in monthly invoice

    Dear experts
    I use SBO japan version and i need to know how to get payment document number from paid column in monthly invoice ?
    in table MIN1, only contain invoice and credit note document number, there is no payment document number
    thank you for your help
    Best Regards
    JeiMing

    Dear Gordon
    Yeah, you are right, i can use field MIentry in RCT2
    thank you
    Best regards
    jeiming

  • How to get the path of the image stored in sap??

    Hi All
    The problem is
    While making an entry in standard there is a field called documents through which we attach our images in sap.
    How to get the path of the image stored with the corresponding order so that the image can be displayed while we are creating a report.
    I know how to upload the image while creating a report using docking control.
    I am not able to get the path of the image stored...
    Please Help
    Thanks in advance..
    Pooja

    I am not aware of exactly which tables are used for storing the attached doc. details, but we have worked in the similar requiremnent.
    What you can do is .... before uploading the image to any order, try swich on the SQL trace ST05 and after upload switch off.
    The log will display what are the tables involved while storing the image. And you can easily find out the image location.

  • How to get the date starting from 1 to the current date from the system dat

    Dear all,
    Please tell me how to get the date starting from 1 based on the system date
    and it should come with respect of time also.
    example.
    suppose today is 6 Dec, 2006
    so ABAP report should find the 1 dec. 2006.
    Please help me as soon as possible.
    Regards,

    concatenate sy-datum0(2) '01' sy-datum4(4) into v_firstdate.
    or yo ucan use the fm:
    HR_JP_MONTH_BEGIN_END_DATE
    usage:
        call function 'HR_JP_MONTH_BEGIN_END_DATE'
             exporting
                  iv_date             = sy-datum
             importing
                  ev_month_begin_date = gv_begda
                  ev_month_end_date   = gv_endda.
    Regards,
    Ravi
    Message was edited by:
            Ravi Kanth Talagana

  • How to Get a Video Thumbnail preview image in sharepoint Asset Library

    namespace ConsoleApplication3
    class Program
    static void Main(string[] args)
    using (var site = new SPSite("http://contoso/sites/teams"))
    using (var web = site.OpenWeb())
    var list = web.Lists.TryGetList("Videos");
    var videoProperties = new Dictionary<string, object>();
    videoProperties["Keywords"] = "Intranet Video";
    //videoProperties["AlternateThumbnailUrl"] = "/_layouts/images/preview.jpg";
    UploadVideo(list, @"C:\Downloads\Video3.mp4", videoProperties);
    public static void UploadVideo(SPList list,string fileName,IDict ionary<string,object> properties)
    SPFile file;
    using (var fileStream = File.OpenRead(fileName))
    var urlOfFile = SPUrlUtility.CombineUrl(list.RootFolder.ServerRelativeUrl, Path.GetFileName(fileName));
    file = list.RootFolder.Files.Add(urlOfFile, fileStream, true);
    list.Update();
    //listid = list.ID.add();
    SPListItem listItem = list.GetItemById(file.ListItemAllFields.ID);
    //SPListItem listItem = list.GetItems("Video3");
    var videoContentType = list.ParentWeb.Site.RootWeb.AvailableContentTypes["Video"];
    // listItem["ContentTypeId"] = videoContentType.Id;
    foreach (var property in properties)
    listItem[property.Key] = property.Value;
    listItem.Update();
    in this code "SPListItem listItem = list.GetItemById(file.ListItemAllFields.ID); " im getting null reference exception.an i have tried with other line "var listItem = file.ListItemAllFields;" same error.any one help me to get solve this
    issue.And how to Get a uploaded video Thumnail image.

    Hi,
    I did a test with your code in my environment and it works fine.
    For a better troubleshooting, I suggest you debug your code step by step. You may need to check if file.ListItemAllFields.ID is valid.
    If you want to get video Thumnail image, there is a column named Preview Image URL, the internal name of the field is AlternateThumbnailUrl.
    You can get the field value using Sever Object Model like below.
    String url = item[“AlternateThumbnailUrl”].ToString();
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/251974d8-18ac-4ff9-88a2-633b5bd80fce/get-asset-library-column-value-preview-image-url-programmatically?forum=sharepointgeneralprevious
    More information about how to get list item using Server Object Model:
    http://msdn.microsoft.com/en-us/library/office/ms460897%28v=office.14%29.aspx
    Best regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

Maybe you are looking for

  • DVD to MP4 programs, all non-US companies?

    In the brief search I have conducted on the web, it looks like the DVD to MP4 converters are all companies from outside the United States. Are their legal issues (it seems so) that do not allow a person to rip their legally purchased DVD into a forma

  • Issue on sync for iPhone4S(iOS6.1) with iTune Ver11.3.1.2 to Win7 and Outlook 2007

    Hi Fans of iPhone, Anyone can advise? Thanks a lot. After I synchronized my iPhone4S (iOS6.1) with iTune Version 11.3.1.2 to my PC (Chinese Win 7 and Outlook 2007), then most 95% of Contact's phone number be also disappeared in my iPhone & Outlook. A

  • Tables used in FS10N

    Hi All, I want to develop a customized report based on FS10N. Just wanted to know the different table names being used for transaction code FS10N. Please revert back asap. Thanks in Advance! Rgds, Kunal Vichare Moderator: Please, search before postin

  • Redwood Free Version / Paid Version Comparison Key Difference Omission

    After having read several Redwood brochures, white papers, etc. and the SAP press book on job scheduling with Redwood I am confused as to why the 2 SAP Instance license limitation of the Free OEM version seems to be omitted from all of them. One of t

  • Automatically signed out of skype after signing in

    Evertime i log in it automatically logs me out instantly. I've uploded the footage here for clearer understanding http://youtu.be/bFTJn9xraSA Im operating on Windows 8 and Im thinking its not the software that's giving the problem because evrytime i