Page 1 of 5 12345 LastLast
Results 1 to 10 of 41

Thread: geometric correction algorithm

  1. #1
    Join Date
    Dec 2016
    Posts
    18

    Default geometric correction algorithm

    Hi!

    I write my own software in order to display simple shapes using laser projector. I faced with geometric correction problem while I was trying to display straight vertical lines. I have read in W. R. Benner's book (LASER SCANNERS: Technologies and Applications: How they work, and how they can work for your product) about geometric correction and I know why this problem occurs.
    Do anybody know what it the state of the art method to solve it? I don't want to reinvent the wheel.

    Thanks in advance,
    Tomek

  2. #2
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    I have the equations, give me a day or two to scan it in...

    Steve
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  3. #3
    Join Date
    Dec 2016
    Posts
    18

    Default

    I have equations too and I have very simple idea how to correct it. According to the equations "display virtual line (in computer program), find the leftmost/rightmost point of the vertical line of the line and then display real line taking into account above information. I hope that this high level description is understandable, but I thought that it is well know problem and that they are some common ways to solve it - probably better then my idea.

    Tomek

  4. #4
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    Real way uses a partial Taylor series approximation of trig... I'm typing it now...

    Steve
    Last edited by mixedgas; 01-26-2017 at 09:06.
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  5. #5
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    ONE WAY, BUT NOT THE ONLY WAY, OF DOING THIS... THERE ARE SOME SHORTCUTS IN OTHER MORE EFFECTIVE METHODS...
    K(n)= PROPORTIONALITY CONSTANT...., which may be negative....
    ~

    X DEFLECTION = K1(X^3) + K2(X(Y^2))+K3(X*Y)+K5(Y)+K6(Y^2)+K7(X^2)+K8(x)+K17
    ~
    Y DEFLECTION = K9(Y^3)+K10(Y(X^2))+K11(Y*X)+K12(X)+K13(X^2)+K14(Y ^2)+K15(y)+K16
    ~
    Once or twice a year I end up typing or emailing this, so....
    search keywords so I can find this post = geometric correction, barrel, pincushion, distortion, tangent . taylor series approximation, Ugc, math
    ~
    Things like ((X^3)(Y^2)) get interesting too...
    ~
    Steve
    Last edited by mixedgas; 01-26-2017 at 09:09.
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  6. #6
    Join Date
    Dec 2016
    Posts
    18

    Default

    Quote Originally Posted by mixedgas View Post
    K(n)= PROPORTIONALITY CONSTANT...., which may be negative....
    ~

    X DEFLECTION = K1(X^3) + K2(X(Y^2))+K3(X*Y)+K5(Y)+K6(Y^2)+K7(X^2)+K8(x)+K17
    ~
    Y DEFLECTION = K9(Y^3)+K10(Y(X^2))+K11(Y*X)+K12(X)+K13(X^2)+K14(Y ^2)+K15(y)+K16
    ~
    I don't understand your equations. Could you write where you find them and why it should works?
    Tomek

  7. #7
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default


    Quote Originally Posted by trojek View Post
    I don't understand your equations. Could you write where you find them and why it should works?
    Tomek
    The Equation Source is my reverse engineering a correction board from a 1970s machine that made microfilms using a laser. All calculations including multiply and squaring/cubing were done in analog using log/antilog and Gilbert cell techniques.
    ~
    So you can need correction for Pincushion, Barrel, DC Offset, Skew, Linearity, Shear, Pincushion Offset, and Bowline. All corrections are derived from the current X,Y point to be output. Corrections are then Scaled using a constant (Konstant factors in my equation) and Summed to form the new output.
    ~
    While it is possible in analog to create Sin, Cos, Tangent, etc. It is easer and more accurate to approximate them using squares and cubes, as is done in the equation in my post...
    ~

    However it is easer to do the same in software now...
    ~
    Each Konstant in the equation is a value you derive based on the screen your projecting on. The classical way is to have a slider in software controlled by the user for each value.
    ~
    For example, Xcorrected = (X current point + (K*Y current point)) corrects for Keystone in the vertical axis.. Where K is a small number from 0 to say +/- 0.5.
    ~
    To do that keystone correction in analog, all I would need is a potentiometer fed by the Y axis analog signal, summed with the current X axis signal with an op-amp.
    ~
    Another Example, K8 in the X Axis equation is IMAGE SIZE for the X Axis.... X corrected = X * a variable representing image size.
    ~
    SO for total X axis correction, you need X cubed, Y Squared, X times Y Squared, X times Y, Y squared and X squared, plus an offset value... Each is multiplied by a small constant and summed to the original X value.
    ~
    I'll give you another one, Pincushion correction for X can be computed as X *(1-K*Y*Y)
    ~
    Determining what each term corrects is left as exercise for the reader, I'd start with an Excel worksheet and a frame of data that represents a Square. This is because I have no idea how you handle your image data format in your software...
    ~

    ~
    Steve
    Last edited by mixedgas; 01-27-2017 at 06:42.
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  8. #8
    Join Date
    Dec 2016
    Posts
    18

    Default

    Thank you Steve, this helps a lot.

    In my software I handle data describing shapes as a list of points. It it very simple software which one can use from command line. I just want to know a properties of laser projectors.

  9. #9
    Join Date
    Nov 2008
    Location
    Cleveland Ohio
    Posts
    2,599

    Default

    Ps that's how your calculator calculates trig functions and exp ln.....too
    but if your doing this in software why not just use the built in trig functions

  10. #10
    Join Date
    Dec 2016
    Posts
    18

    Default

    What exactly do you mean by build trig functions?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •