Coordinate system translation from screen coordinates to stage coordinates

I realize this is not truly a LabVIEW question, but I'm hoping for suggestions.
I have a digitized image of a sample on a 3 axis stage. The user selects "paths" for a drill to take along the surface of the sample. On the image, 3 reference points are identified. The stage posititions (x, y, and z) corresponding to these points are then identified.
I need to now convert the coordinates of the paths to the stage coordinate system. Are there any LabVIEW vi's that are suited to this need? I have IMAQ vi's but not very experience with these yet. Suggestions much appreciated
Tim

Hello Shan:
Were almost have the same problem but mine is for a AOI handler with a robot arm which I need to pick (x,y) pairs along the work envelope. Anyway, for the most math part it will involve are coordinate transformation from a "mouse coordinates" to "real world coordinates" and your image processing textbook (I use McGrawHill Computer Graphics by Hill) will outline both the code and the math but LabVIEW will not have a facility to do with an actual VI instead you have to use the array manipulations and treat them coordinates as matrix elements. There is a Math VI and G-Math VI or a MatLAB call you can use for coordinate matrix manipulations as long as you have the math quite figured out in paper already.
Bernardino Jerez Buenaobra
Senior Test and Systems Development Engineer
Test and Systems Development Group
Integrated Microelectronics Inc.- Philippines
Telephone:+632772-4941-43
Fax/Data: +632772-4944
URL: http://www.imiphil.com/our_location.html
email: [email protected]

Similar Messages

  • Use of "IVA Coordinate System Mmanager"?

    I do not understand how the vi "IVA Coordinate System Mmanager" is used. When I do create the LV-code from the NI Vision Assistant it gives me following fragment:
    Here the "reference System" input is set (the x-/y axis) automatically to the value 562.95 and 558.641 (see picture above). What indicates those values if I do pattern matching? And to which values I need to set it for any image where I do pattern matching? The output of this vi gives me a cluster with the origin and the measurement system. Even I set those two values to 0/0 it gives me the corect and new coordinate system of the found pattern but I'll get an NaN if I use the same function (pattern matching) twice in a row for a different image. In both cases NI Vision Assistant sets those two default values automatically.
    thanks..!

    I have attachted a script file. Here u can see that the coordinates for the reference system has been set to the values where the coordinate system is.
    Question: Why are this coordinates (87.45/221) already set? Does it matter if I set the values for the reference system to 0,0?
    best regards
    Attachments:
    test.vi ‏58 KB

  • User defined coordinate system

    Hi,
    I'm trying to create a new user defined coordinate system on Oracle 10.2.
    This coordinate system is a local one. But I would transform between this local one and Gauss-Krueger Zone 2 (EPSG:31466). For this I have the information for the affine transformation (local --> EPSG:31466 and reverse, too).
    How can I create a projected coordinate system with these information?
    Has anybody an idea or has had a similar problem?

    Hi,
    I'm trying to create a new user defined coordinate system on Oracle 10.2.
    This coordinate system is a local one. But I would transform between this local one and Gauss-Krueger Zone 2 (EPSG:31466). For this I have the information for the affine transformation (local --> EPSG:31466 and reverse, too).
    How can I create a projected coordinate system with these information?
    Has anybody an idea or has had a similar problem?

  • Need ruling on screen coordinate system to use with AWTVideoSizeControl...

    Hi -
    I’m working on a tru2way application and a nagging question keeps popping up with stack vendors on the usage of the AWTVideoSizeControl interface. I was hoping you could provide a definitive answer (note that Bill Foote is the author of the interface spec).
    In short…my reading of the javadocs for AWTVideoSizeControl is that all values passed to and received from it are to be expressed in the graphics plane coordinate system. Stack vendors don’t always agree.
    Periodically, I run into a stack vendor who expects AWTVideoSize (as passed to AWTVideoSizeControl.setSize) to be expressed in video plane coordinates – I’ve so far been able to convince these folks that the spec requires graphics coordinates. I’ve just run into an interesting situation, though, where although the vendor agrees that AWTVideoSize should be in graphics coordinates, they’re feeling that the Dimension returned from AWTVideoSizeControl.getSourceVideoSize() should be based on the video plane coordinate system. Their thinking is that while ‘x’ and ‘y’ are coordinates (and therefore are called out as needing to be expressed relative to the graphics screen), ‘height’ and ‘width’ aren’t.
    Perhaps I’m wrong, but that seems incorrect. I would expect the Dimension height and width to be relative to the graphics screen as well.
    I’d appreciate it greatly if you could provide a ruling on this that I could take back to them (and others).
    Thanks.

    You would have to check with the manufacture of your system to see if they have an app available in the Apple App store to access their system. Since you do not indicate the system name or other information, you would need to also search the app store based on the answer the manufacturer provides for you. No one here would be able to guess at what you have.

  • Coordinate system for StackPane

    Hi,
    I have a task to implement a selection tool - click the mouse to draw connected poligon. But I can not find a connection between the coordinate system and screen pixels. When I try to draw a line as Line.setStartX (xx), Line.setEndX (yy), the line is always drawn from the center. If I try to set the offset of the node as setTranslateX(mm), line is drawn with the center from the current point.. Is any workable example how to add line from start point to the end point to the stackpane?
    Thank you!

    I found solution.
    BTW when I try to check doubleclick instead of using Ctrl (i.e. if (me.getClickCount()>1) this is not detect double click when line already painting. It calculates only as single-click.
        public void start(Stage stage) throws Exception {
            final StackPane root = new StackPane();
            Scene scene = new Scene(root, 600, 600);
            stage.setScene(scene);
            stage.setTitle("Selection tool");
            final double centerX = root.getWidth() / 2;
            final double centerY = root.getHeight() / 2;
            root.setOnMouseMoved(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent me) {
                    if (isDraw && line!=null) {
                        line.setEndX(me.getX()+centerX);
                        line.setEndY(me.getY()+centerY);
                        double midX = (startX+me.getX())/2;
                        double midY = (startY+me.getY())/2;
                        line.setTranslateX(midX-centerX);
                        line.setTranslateY(midY-centerY);
            root.setOnMouseClicked(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent me) {
                    if (me.isControlDown())
                        if (!isDraw) {
                            isDraw = true;
                        else
                            isDraw = false;
                    if (isDraw) {
                        startX = me.getX();
                        startY = me.getY();
                        line = new Line();
                        line.setStroke(Color.LIGHTBLUE);
                        line.setStartX(startX+centerX);
                        line.setStartY(startY+centerY);
                        root.getChildren().add(line);
            stage.show();
        }Edited by: 918392 on 27.03.2012 7:02

  • Coordinate System of template form

    Hi there,
    we are currently using Headstart 3.4.2 that was adjusted to our clients requirements. One of the requirements was not to work with a real MDI look and feel, that means every Forms-Module is sized to fit exactly into the MDI Window and then maximized. The surrounding MDI window is sized to a 800x600 screen resolution and centered on the screen.
    To achieve this the consultant changed the coordinate system to pixel and therefore a number of program units in the PLLs had to be changed.
    For us this change had a lot of drawbacks especially, because a lot of the delivered Headstart modules make some sizing stuff based on the inch coordinate system.
    On the other hand a pixel based coordinate system seems much more natural to SW developers and therefore I am not sure how to nadle this task after migration to a newer Headstart version.
    Any opinions or experiences out there?
    Thanks in advance
    --Thomas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    @MLBrown,
    I disagree. Although the "Oracle Developer: Advanced Forms and Reports" book by Peter Koletzke and Paul Dorsey was written at the time of Forms 6 and was written primarily to the Client Server topology, this book does cover the topic "Design for the Web" (Chapter 13) which is still valid today. Additionally, there are other topics that are still relevant with web deployed forms, such as Reducing Network Traffic, Message Diff'ing and Optimize the Class File Loading just to name a few.
    Yes, this is an old book, but with the lack of any better books available - it is still a good place to start to get a basic understanding of how to design an Oracle Form for the web; not to mention it is still a good reference for using some of the more advanced features of Oracle Forms like "Basing a Block on a Procedure" or a "From Clause Query", just to name a few. These Forms features haven't changed much since they were introduced.
    @jbleg,
    With respects to the "Template System" referred to in the book. This was not a commercially available product, but a reference to a set of templates that Peter created. The point was to enforce the need to create standards and partially enforce them through the use of Templates. The use of Templates in you design/development process is still a very valid approach and I suggest you review Chapters 10-12 again.
    Craig... B-)

  • Coordinate system

    I am having trouble getting my local-world-view-screen matrix setup right.
    First, coordinate system is:
    +x to the right
    +y down
    +z into the screen
    right? this is what I get from Vector3D class.
    But now that I am thinking of it DirectX and OpenGL have different coordinate systems so how does Molehill work that out?  Do I need to know what API I am runnging to transform to screen space?

    Yes things are starting to look better now. Thanks you both.  I incorrectly assumed the coordinates system was as described in the Vector3D class docs.
    I have a cube with each side a different color and now it appears oriented as expected.
    Now I am appending a view-screen matrix built using lookAtRH().  I create an eye position Vector3D that rotates around the Up/Y axis, looking at (0,0,0) and there is nothing on screen.  I looked at my DirectX engine lookAtRH() equivalent function and notice that in the Molehill implementation there is:
    _w,x = _x.dotProduct(eye);
    _w,y = _y.dotProduct(eye);
    _w,z = _z.dotProduct(eye);
    _w,w = 1.0;
    but in the directX version it is expressed as the negative of the dot products, i.e.:
    _w,x = -_x.dotProduct(eye);
    _w,y = -_y.dotProduct(eye);
    _w,z = -_z.dotProduct(eye);
    _w,x  = 1.0;
    so I tried this and the cube appears on screen!!, however the camera is not rotating around the Y axis it is rotating around the cube off-axis.
    Have you used the lookAtRH() method and had good results, or are you using your own math?
    Does the matrix from lookAtRH() get appended to the stack or do I invert this matrix and append it?
    I am not an expert at the math, but have been able to work this out on PS2, PSP, OpenGL, DirectX, WPF, and now it is Molehill. I know that the PerspectiveMatrix3D.as is in progress because I have gotten it from several sources/example programs and I see for instance that the OrthoRH() method has a typo/bug in it that was fixed in the teapot example.
    Any help is appreciated!!

  • Implementing a coordinate system

    I am writing a simple 2D game running in full-screen mode at 1024x768px.
    I have to measure some distances in the game and don't want to measure this in pixels; I would like to use, for example, kilometers, miles or nautical miles.
    Is there a way to implement a certain coordinate system so that I could say, e.g., 20px = 1km?
    From my Java standard of knowledge I would write a method calculating the px each time to km, miles or nautical miles - at the end I would still calculate in px, just the output would be in km or m... :(
    Thanks for your help!

    But you usually want stuff like text positioned by world coordinates
    but sized in screen coordinates.Sure, but a simple:AffineTransform t= g2d.getTransform();would've solved that too: use the transform to get the screen coordinates
    from your world coordinates and use the gcopy graphics to do the actual
    text rendering (also see my previous reply).
    What I wound up doing in the project where I did lots of this, was the
    create methods to create fonts, strokes etc.. compensating for the
    scaling, but I wound up wishing I'd done it the other way arround
    and converted the world coordinates myself.I always let the Graphics2D do the scaling, stretching etc. while I keep
    a copy of the original Graphics passed in as a parameter; it works for
    me, but I agree: I can imagine code where the other way around would
    be simpler than my way of doing this sort of stuff. It's just that I hate
    doing those silly matrix multiplications myself ;-)
    kind regards,
    Jos

  • Java coordinate system.

    I'm trying to code a program that crops a selected rectangle of a given image. The way I thought to do this was first I created an array holing the pixels of the image. Then I would use the size of the selected area to define the size of a second array and then use the origin of the selected area to reference where to start the second array copying the pixels across.
    This was based on the assumtion that the coordinate system worked in pixels, that given that the image and program window have been set to 640 X 1200 any given point in a 640 X 1200 array would corresspond to it's equivilent on the screen. Yet when I call the getX() method on the selected area object it returns a double.
    why a double?
    Edited by: FyodorK on Dec 5, 2008 4:46 AM

    Which class are you calling the getX() method on? If the documentation says it returns a double, then it does.
    As a side note, Graphics2D (in java.awt) objects can have what is called an affine transform, i.e. rotation, translation, skewing, etc. And that's why the logical coordinate system and the physical coordinate system (pixels on the screen) may be different.
    s

  • Java3D has different coordinate system than 3dsMAX

    Hi, I make 3d game. 3D scene I have created in 3d studio MAX and exported to files which I loaded into Java3D scene. Because 3dsMAX has Z a Y axis exchanged instead of Java3D coordinate system I replacementing Y and Z coordinates in 3d mesh. [X,Y,Z] -> [X,Z,-Y]. Problem come in Transform3D when I exchanged translational values. It is not enough. I must exchange some values in rotational components of 3d matrix. And I don't know how.
    Thanks

    It is not really a problem, the model is just rotated the axes are still same place relative to each other. Just put put a rotation in at start of file, I have done that with countless of files from 3d s max.
    And there are noone that are forcing you to define Y as upwards in java3D, you can define it as you like. Thats why there are parameters like 'up' in the method transform3d.lookAt() , Java3d make no presumptions about your worldview.

  • MapViewer and AUTO:42004 coordinate system

    How can I use Oracle MapViewer against an external WMS server using the coordinate system AUTO:42004?
    I have tried it, but the min/max longitude values in the BBOX parameter become wrong.
    - Ingebrigt -

    Ingebrigt
    The AUTO keyword is not supported in the current release.
    From the MV doc Sec D.2.1.14 SRS Parameter
    "The namespace AUTO, for projections that have an arbitrary center of projection, is not supported. "
    Jayant

  • Select data with SDO_RELATE in lat long coordinate system(8307) in 10gR2

    Hi all,
    I have problem with selecting data from table.
    Data are in lat lon coordinate system 8307.
    These requests don't return any data:
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_FILTER(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,1),sdo_ordinate_array(-180,-90, 180,-90, 180,90, -180,90, -180,-90)) ) = 'TRUE';
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_RELATE(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,1),sdo_ordinate_array(-180,-90, 180,-90, 180,90, -180,90, -180,-90)), 'MASK=ANYINTERACT' ) = 'TRUE'
    Optimized polygon does return all data correctly:
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_FILTER(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,3),sdo_ordinate_array (-180,-90,180,90)) ) = 'TRUE'
    Smaller polygon select data correctly too.
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_FILTER(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,1),sdo_ordinate_array (52,-7, 54,-7 , 54,-5 , 52,-5, 52,-7)) ) = 'TRUE'
    I have tried changed polygon to be clockwise, counter clockwise, make the area a bit smaller( 160 instead of 180, 89 instead of 90) nothing has helped.
    My explanation than was, that Earth is sphere and each defined polygon defines TWO polygons in the sphere and there is convention that the smaller is chosen to select data. It would make sense along the previous results, but than I found one post which says that this is bug http://www.frontoracle.com/oracle-database/703/180703-size-of-are-of-interest-smaller-equals.html
    I have found in other thread that max only 1/2 of Earth could be selected Different results using SDO_RELATE with polygon and rectangle type but it seems not true, because optimized bounding box works fine!
    What is right? Is there anything in official documentation?
    Is it bug.
    Max 1/2 of Earth could be selected in one request.
    Each polygon defines two areas in the Earth and the smaller one is used to do spatial SDO_RELATE operation?
    Thanks!
    Regards,
    Zdenek

    Zdenek,
    A bug, or limititation, whichever you choose. IMHO if you ask for something, and don't get what you expect, it is a bug that could be fixed.
    But for 10g anywho, the following applies, which is why I choose 120 degree breaks for my code as it is less than 180...
    The following size limits apply with geodetic data:
    ■ No polygon element can have an area larger than one-half the surface of the Earth.
    ■ In a line, the distance between two adjacent coordinates cannot be greater than or
    equal to one-half the perimeter (a great circle) of the Earth.
    If you need to work with larger elements, first break these elements into multiple
    smaller elements and work with them. For example, you cannot create a geometry
    representing the entire ocean surface of the Earth; however, you can create multiple
    geometries, each representing part of the overall ocean surface. To work with a line
    string that is greater than or equal to one-half the perimeter of the Earth, you can add
    one or more intermediate points on the line so that all adjacent coordinates are less
    than one-half the perimeter of the Earth.
    Bryan

  • Connection between 2 points in a geodetic coordinate system

    In a geodetic coordinate system the connection between two points is a geodetic line or "great circle" (the shortest connection between two points on the surface of the earth).
    Since Oracle 9i distances and queries like "Is a point outside or inside the polygon" are computed correctly for a geodetic coordinate system.
    Even though a circle or arc is not allowed in a geodetic coordinate system (like WGS84 - SRID 8307)
    arcs and circles are used in geographic applications like aeronautical maps.
    Frequently a special area is defined like this "10 nautical miles around airport XXXX"
    and this area is shown as a circle in aeronautical maps (in the projection).
    The function SDO_UTIL.CIRCLE_POLYGON (in Oracle 10g) is very useful to construct such kind of areas and for queries like
    "Does the area belonging to airport XXXX overlap with the area belonging to airport YYYY?".
    For Oracle 8i we had to write special PL/SQL code.
    Another type of connection between two points that is frequently used is a line of equal latitude (parallel).
    Many boundaries are defined like "from meridian (longitude) 30°E to meridian 31°E along parallel 47.5°N".
    If this line is a border of a polygon and if we use a direct connection (geodetic line) and we ask if a point is
    inside or outside the polygon, we will not get the correct answer if the point is close north to this line.
    We have to approximate the line and add points e.g. every 0.1° longitude (30.1,30.2,30.3...), then the answer will be correct.
    My question:
    Are there plans to support circles of equal latitude or generally rhumb lines as a type of connection between two points?
    Karl Mann

    There are no plans to support rhumb lines, also know as loxodromes, and including the special case of parallels of latitude, at this time. Note that it is easy to simulate such rhumb lines with a sufficiently dense set of sampled points. Such a densification is implemented implicitly for parallels in the VIEWPORT_TRANSFORM function so that the concept of the "geodetic minimum bounding rectangle" can be supported, primarily for visualization applications.

  • Coordinate system in illustrator

    Hi. I'm trying to build a shape in Illustrator CS6, OSX 10.7.5, using a script with setEntirePath. I begin with:
    var aPoints = new Array ([20, 50], [60, 30]);
    pShape = app.activeDocument.pathItems.add();
    pShape.setEntirePath(aPoints);
    I expected a diagonal line on my artboard but it is actually drawn outside it. From this I gathered that the y axis is considered inverted in javascript and so I have to change the code to var aPoints = new Array ([20, -50], [60, -30]); to get the intended result.
    To me this is not intuitive at all. Is there a reason this happens? And is there a way to change it so I can write the y coordinates the way they actually appear on Illustrator, with (0,0) at the top left and positive values to the right and down?
    Thank you.

    Thank you very much. If I understand correctly, your solution gives me the option to change back to the CS4 and previous coordinate system, based on the 1st quadrant, as opposed to the 4th quadrant used in CS5 and 6.
    I'm still a bit puzzled as to why writing a positive value for the y axis in javascript will turn out a negative value in Illustrator and vice-versa, but I guess it must have something to do with javascript being tied to the 1st quadrant coordinate settings, or maybe to improve compatibility with the previous CS versions.

  • How can I use FlexMotion vector move function for cartesian coordinate system to other coordinate.

    I have problem with convesion from cartesian coordinate system to other one. I need use standard move function for example blend to moving 2 arms manipulator. What i need to do?

    The vector move will probably not give the results you are looking for. The vector move calculates the trajectory based on unit vectors in cartesian space. For a 2 arm robot (ex. 2 rotation joints), you would be able to move from point A to point B as desired, however the path would not be a straight line. The path may also not be suitable for the mechanism, which could cause a collision or maybe a singularity.
    The best solution is probably the contour move. You can use the inverse kinematic routine you wrote and send the results to a contour move. Contour moves are a little more complicated to use than the simple one axis or vector moves, however they are also much more flexible. I do not know of any functions already written for your system,
    but it sounds like you are already on the right path.
    Regards,
    Brent Runnels
    Applications Engineer
    National Instruments

Maybe you are looking for

  • HT5621 Why can't I use my iCloud email address as an Apple ID?

    I am totally bewildered! I have taken the plunge to leave Gmail, my primary email address and move to iCloud. The first thing I tried to do, was change my Apple ID email address. To my astonishment, while it allows gmail.com, it does not allow its ow

  • Problem with email deleting

    I have an issue with deleting e-maill.  I select all and then hit delete.  Sometimes it work & sometimes it doesn"t.  Is there a glitch?

  • Bind variable code takes more time to complete?

    Hello, My database is oracle11g. I have same plsql code and first one is without bind variable and second one is with bind variable. Usually, bind variable should take less time. But here the bind variable takes more time than the regular code... Can

  • Problems with my new iPhone 4s

    Hi, I'm from Mexico, yesterday I bougth  my iPhone 4s, it had iOS 5.0 and I conected my iPhone to my pc to download the iOS 5.1.1, but when I install the iOS the pc and the iPhone said, " you're not available to use this vertion, you have to be regis

  • How to get solve below code & comment reply

    For Each (Sources [Proposed Sources] (ESRC_1)){ If (Is this a Roth Source (ESRC_8)) = 'Yes' {           //if at least one proposed source is 'Yes' for 'Is this a Roth Source' then display section below, else do not display how to create a XML for thi