52
Quadric arrangement in classifying rigid motions of a 3D digital image K. Pluta 1,2 , G. Moroz 3 , Y. Kenmochi 1 , P. Romon 2 1 University Paris-Est, LIGM, France 2 University Paris-Est, LAMA, France 3 INRIA Nancy-Grand-Est, Project Vegas, France 2017-05-04

Quadric arrangement in classifying rigid motions of a 3D ... · RIGID MOTIONS IN R3 U: R3 →R3 x 7→Rx +t x – point R – rotation matrix t – translation vector Properties:

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

  • Quadric arrangement in classifying rigidmotions of a 3D digital image

    K. Pluta1,2, G. Moroz3, Y. Kenmochi1, P. Romon2

    1 University Paris-Est, LIGM, France2 University Paris-Est, LAMA, France

    3 INRIA Nancy-Grand-Est, Project Vegas, France

    2017-05-04

  • AGENDA

    Introduction to digitized rigid motions

    Image patch and its alterations

    Problem as arrangement of hypersurfaces

    Dimension reduction

    Computing sample points

    Implementation and experiments

  • Introduction to digitizedrigid motions

    “How do I rotate in 3D, George?”

    “That is easy Lenny, take a 3× 3 skew-symmetric matrix and applyCayley Transform.”

    “Skew-, what, George?”

  • RIGID MOTIONS IN R3

    ∣∣∣∣∣ U : R3 → R3x 7→ Rx + tx – point

    R – rotation matrix

    t – translation vector

    Properties:I distance and angle

    preserving mapsI bijectiveI inverse: T = U−1 is

    also a rigid motion

  • RIGID MOTIONS IN R3

    ∣∣∣∣∣ U : R3 → R3x 7→ Rx + tx – point

    R – rotation matrix

    t – translation vector

    Properties:I distance and angle

    preserving mapsI bijectiveI inverse: T = U−1 is

    also a rigid motion

    The orbit of Earth is nearly circular, its eccentricity is just about 0.0167.

  • RIGID MOTIONS IN R3

    Cayley Transform

    R = (I−A)(I + A)−1

    = 1k

    1 + a2 − b2 − c2 2(ab− c) 2(b + ac)2(ab + c) 1− a2 + b2 − c2 2(bc− a)2(ac− b) 2(a + bc) 1− a2 − b2 + c2

    ,where k = 1 + a2 + b2 + c2,

    A =

    0 c −b−c 0 ab −a 0

  • RIGID MOTIONS IN Z3

    U = D ◦ U|Z3where D is a digitization e.g. rounding function

    Properties:I in general, does

    not preservedistances andangles

    I not always injectiveI not always

    surjectiveU(Z3) Z3

  • MOTIVATIONS

  • MOTIVATIONS

  • MOTIVATIONS

  • MOTIVATIONS

    Our goalGenerate all the variations of the 3× 3× 3 cube under digitized rigidmotions.

  • Image patch and itsalterations

    “George, look that when I rotate a photo of my house by 30◦ thenthere are holes in windows!”

    “Since you use piecewise constant transformation you have to livewith that, Lenny.”

    “If you are that smart then figure out how to explain this to clients whoare going to see the house.”

  • IMAGE PATCH

    DefinitionIn general, we consider a finite set N ⊂ Z3, called an image patchwhose center c and radius r of N are given by c = 1|N |

    ∑v∈N v and

    r = maxv∈N ‖v− c‖, respectively.

  • IMAGE PATCH

    In particular, we consider the image patchN = {(1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 0, 0), (−1, 0, 0), (0,−1, 0), (0, 0,−1)}where the center is (0, 0, 0).

  • ALTERATIONS STEP-BY-STEP

  • ALTERATIONS STEP-BY-STEP

  • ALTERATIONS STEP-BY-STEP

  • CRITICAL RIGID MOTIONS

    Formulation

    Riv + ti = ki −12

    where v ∈ N ⊂ Z3, ki ∈ H(N ) =Z ∩ [−r′, r′] and r′ = r +

    √3 – it

    the maximal radius of thetransformed image patch.

  • CRITICAL RIGID MOTIONS

    Formulation

    Riv + ti = ki −12

    where v ∈ N ⊂ Z3, ki ∈ H(N ) =Z ∩ [−r′, r′] and r′ = r +

    √3 – it

    the maximal radius of thetransformed image patch.

    The parameter spaceΩ =

    {(a, b, c, t1, t2, t3) ∈ R6 | a, b, c ≥ 0,− 12 < ti <

    12 for i = 1, 2, 3

    }

  • Problem as arrangement ofhypersurfaces

    “Wow, George what are these hypersurface equations on theblackboard about? You’re working on this for a week or so.”

    “I’ve been thinking how to solve problems of my recent life, Lenny.”

    “George, life is something to experience not a problem to solve. Justlet it happens.”

  • PROBLEM AS ARRANGEMENT OF HYPERSURFACES

    Warning: Explanation base on 2D rigid motions

    Figure: Visualization of 3D parameterspace of 2D digitized rigid motions

    Surfaces are given by

    Riv + ti = ki −12

  • PROBLEM AS ARRANGEMENT OF HYPERSURFACES

    Warning: Explanation base on 2D rigid motions

    Figure: Visualization of 3D parameterspace of 2D digitized rigid motions

    In particular, surfaces are given by

    1− a2

    1 + a2 v1 −2a

    1 + a2 v2 + t1 = k1 −12

    2a1 + a2 v1 +

    1− a2

    1 + a2 v2 + t2 = k2 −12

  • PROBLEM AS ARRANGEMENT OF HYPERSURFACES

    Complexity of the arrangementOverall number of hypersurfaces is O(r4) and the complexity of thearrangement is bounded by number of hypersurfaces to the power ofdimensionality of the space; O(r24).

  • CONTRIBUTIONS

    I Formulation of the problem as an arrangement of surfaces in two3D spaces

    I Algorithm to compute sample points of 3-dimensional connectedcomponents in an arrangement of quadrics

    I Implementation of proposed algorithm

  • Dimension reduction

    “What is going on Lenny?”

    “Do you remember this hard problem in 6D which I was trying to solvefor a long while? I’ve uncoupled variables and is so simple, right now.”

    “Uncoupling, right...”

  • UNCOUPLING THE PARAMETERS

    z

    y

    x

    k

    U(v)

    ki −12 < Riv + ti < ki +

    12

  • UNCOUPLING THE PARAMETERS

    z

    y

    x

    k

    U(v)

    ki −12 −Riv < ti < ki +

    12 −Riv

  • UNCOUPLING THE PARAMETERS

    For simplification let us consider v = (1, 0, 0) ∈ N and i = 1 – x-axis.

    k1 −12 −

    1 + a2 − b2 − c2

    1 + a2 + b2 + c2 < t1 < k1 +12 −

    1 + a2 − b2 − c2

    1 + a2 + b2 + c2

  • UNCOUPLING THE PARAMETERS

    For simplification let us consider v = (1, 0, 0) ∈ N and i = 1 – x-axis.

    k1 −12 −

    1 + a2 − b2 − c2

    1 + a2 + b2 + c2 < t1 < k1 +12 −

    1 + a2 − b2 − c2

    1 + a2 + b2 + c2

    k1 +12 −

    1 + a2 − b2 − c2

    1 + a2 + b2 + c2 − k1 +12 +

    1 + a2 − b2 − c2

    1 + a2 + b2 + c2

  • UNCOUPLING THE PARAMETERS

    Thanks to the rational expressions in Cayley transform we obtainpolynomials of degree 2:

    qi[v, ki](a, b, c) = (1 + a2 + b2 + c2)(2ki − 1− 2Riv),

  • UNCOUPLING THE PARAMETERS

    Qi[v, v′, ki, k′i](a, b, c) = qi[v, ki](a, b, c)+2(1+a2+b2+c2)−qi[v′, k′i](a, b, c),

    for i = 1, 2, 3.

  • REDUCED SET OF QUADRICS

    Discarding quadricsFor the image patch N = {(1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 0, 0), (−1, 0, 0),(0,−1, 0), (0, 0,−1)} we obtain directly 441 quadrics reduced to 81.

  • WHAT WE WANT TO COMPUTE?

    At least one sample point for each 3-dimensional connectedcomponent of the set

    Qi[v, v′, ki, k′i](a, b, c) 6= 0.

  • Computing arrangement ofquadrics in 3D

    “Wow George, what is going on?! Your flat is so clean and arrangedin a different way! Finally, nice.”

    “Well, it is you who said do not solve, just let things happen. So, yeah,my girlfriend moved in a week ago.”

    “Alright...”

  • RELATIONS WITH PREVIOUS STUDIES

    B. Mourrain, J. P. Tecourt, and M. Teillaud. On the computation of anarrangement of quadrics in 3D

    What is new?I Use of non-generic directionsI Support for asymptotic critical values

    I K. Kurdyka, P. Orro, S. Simon, et al. Semialgebraic Sard theoremfor generalized critical values

    I Z. Jelonek and K. Kurdyka. Quantitative generalized Bertini-Sardtheorem for smooth affine varieties

    I We store only 3D sample points

  • OUR ALGORITHM - THE GLOBAL IDEA

    I Along non-generic direction, detect and sort all the events inwhich topology of an arrangement of quadrics changes

    I In between two consecutive events, place a plane, intersect itwith quadrics, and compute one point in each connectedcomponent bounded by obtained conics

  • OUR ALGORITHM - THE GLOBAL IDEA

    I Along non-generic direction, detect and sort all the events inwhich topology of an arrangement of quadrics changes

    I In between two consecutive events, place a plane, intersect itwith quadrics, and compute one point in each connectedcomponent bounded by obtained conics

  • OUR ALGORITHM - THE GLOBAL IDEA

  • DETECTION OF EVENTS

  • DETECTION OF EVENTS

    Qi(s, b, c) = ∂bQi(s, b, c) = ∂cQi(s, b, c) = 0

  • DETECTION OF EVENTS

    Qi(s, b, c) = Qj(s, b, c) = (∇Qi ×∇Qj)1(s, b, c) = 0

  • DETECTION OF EVENTS

    Qi(s, b, c) = Qj(s, b, c) = Qk(s, b, c) = 0

  • DETECTION OF EVENTS

    Types of asymptotic criticalvalues:

    I A∞ – asymptote lives ina quadric

    I B∞ – asymptote given byan intersection of twoquadrics

  • Recovering the translationalpart

    “Hey Lenny have you seen this cool video about gyroscopicprecession where a guy lifts up a 20 kg turning gear above his headlike a feather?”

    “Sure, is not science cool?”

    “Yeah, I’m working on a video where I going to run with such a gearturning.”

    “George, I advise against...”

  • RECOVERING THE TRANSLATIONAL PART

    Sample points of the translational part can be computed from thesample points of the previous step from

    ki −12 −Riv < ti < ki +

    12 −Riv

  • Implementation andexperiments

    “Hey guys! What are you doing in the kitchen?”

    “Hey Kate! We are trying to find the optimal set of parameters to cookan egg in the microwave before it explodes.”

    “What?! What are you doing in my kitchen?! George!!!”

    “Oh boy...”

  • EXPERIMENTS AND IMPLEMENTATION

    ImplementationI Maple 2015 or higherI Grid frameworkI Raglib

  • EXPERIMENTS AND IMPLEMENTATION

    ImplementationSince then. . .

    I Raglib was replaced with a faster, dedicated solutionI Computation can be restarted, e.g., after a crashI Support for clusters compatible with POSIX standardI Support for FGb library by Jean-Charles FaugèreI Scripts to install, uninstall our codeI Scripts to facilitate the process of running the code in a clusterI Several bugs in Maple and a bug in Linux have been discovered

    and submitted

  • EXPERIMENTS AND IMPLEMENTATION

    ExperimentsI Used machine: 2× Intel(R) Xeon(R) E5-2680 v2 clocked at

    2.8GHz, 251.717 GiB of RAMI Computation of images of the image patch in around 40 less

    than 10 minutes

  • CONCLUSION AND PERSPECTIVES

    ConclusionI A new algorithm for computing arrangement of quadrics in 3DI Use of non-generic directionsI Treatment of asymptotic critical values

    PerspectivesI Optimization of our implementation by exploring symmetry of the

    parameters, embedding of neighborhoods and furtheroptimization of the data management

    I Identification of neighborhood motion maps which breakconnectivity under digitized rigid motions in 3D

    Implemented in Maple under Revisited BSD License

    github.com/copyme/RigidMotionsMapleTools

  • Thank you for yourattention!

  • By the way, I look for aninteresting postdoc...

    Introduction to digitized rigid motionsImage patch and its alterationsProblem as arrangement of hypersurfacesDimension reductionComputing sample pointsImplementation and experiments

    anm0: fd@rm@0: fd@rm@1: fd@rm@2: fd@rm@3: