Git Product home page Git Product logo

plmp's Introduction

PLMP -- point-line minimal problems

This repository hosts code for checking minimality and computing algebraic degrees of relative pose estimation problems in computer vision involving complete correspondences of points, lines, and their incidence relations across some number of views. It was used to classify all PLMPs in complete multi-view visibility.

To get started, read through and execute the Macaulay2-based examples described in this supplemental document (See caveats.)

Files in CODE/

  • Suplementary material exposition:
    • supplementary.pdf
  • Examples with detailed commentary:
    • example-jacobian_1.m2
    • example-2111_1-numerical.m2
    • example-2111_1-unrolled.m2
    • example-2111_1.m2
  • Numerical degree computations:
    • degree-5cameras.m2
    • degree-4cameras.m2
  • Symbolic minimality check and degree computations:
    • dim-5cameras.m2
    • dim-6cameras.m2
    • dim-degree-F4-3cameras.m2
    • dim-degree-F4-4cameras.m2
    • dim-degree-F4-2cameras.m2
  • Methods and functions used by the scripts above:
    • numerical-problem-builder.m2
    • partial-view-builder.m2
    • problem-builder.m2
    • tester.m2
    • common.m2
    • partial-line-builder.m2
    • problem-builder-core.m2
    • problem-builder-matrices.m2
    • vision-toolbox.m2

Caveats

  • Certain computations may take a long time (couple of hours) and may exceed the RAM capacity (one example employing F4 consumed ~16Gb).
  • The numerical degree computations require a recent version of Macaulay2.

plmp's People

Contributors

antonleykin avatar timduff35 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plmp's Issues

example-2111_1-numerical.m2 fails on M2 1.23

Hi,

I tried to run the software per supplementary.pdf, but I get this on the most recent M2 1.23:

i4 : load("example-2111_1-numerical.m2")
--loading configuration for package "NumericalAlgebraicGeometry" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-NumericalAlgebraicGeometry.m2
--loading configuration for package "Bertini" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-Bertini.m2
 -- warning: symbol "old'random'Type" in User#"private dictionary" is shadowed by a symbol in MonodromySolver#"private dictionary"
 --   use the synonym old'random'Type$0
warning: 'rowSelector' redefined
/usr/local/share/Macaulay2/NumericalAlgebraicGeometry/systems.m2:21:0-21:11: here is the first use of 'rowSelector'
       : debug with expression   debug 4808   or with command line option   --debug 4808
warning: 'pCompose' redefined
/usr/local/share/Macaulay2/MonodromySolver/galois-group.m2:2:0-2:8: here is the first use of 'pCompose'
       : debug with expression   debug 8688   or with command line option   --debug 8688
warning: 'writePermutations' redefined
/usr/local/share/Macaulay2/MonodromySolver/galois-group.m2:100:8-100:25: here is the first use of 'writePermutations'
       : debug with expression   debug 1619   or with command line option   --debug 1619
currentString:1:5:(3):[12]: error: no method for assignment to binary operator _ applied to objects:
--            z (of class Rz)
--      _     2 (of class ZZ)
currentString:1:5:(3):[12]: --entering debugger (type help to see debugger commands)
currentString:1:0-1:18: --source code:
z_2 = inputGate z_2

The problems seems to be when running the following code similar to the initial part of the file:

restart
setRandomSeed 0
m=3 -- number of cameras
D = (4,0,{{0,1},{0,2},{1,2}}) -- encoding for CLEVELAND, a problem of degree 216

needsPackage "NumericalAlgebraicGeometry"

needs "numerical-problem-builder.m2"     -- <-- This is what gives the problem.

The remaining example files of section 2.1 run without problem:

Macaulay2, version 1.23
--loading configuration for package "FourTiTwo" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-FourTiTwo.m2
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism, LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation,
               TangentCone, Truncations, Varieties

i1 : load("example-2111_1-unrolled.m2")

i2 : load("example-2111_1.m2")
--building: 3 points, 1 pins, 1 free lines.
--          dependent points:
MutableHashTable{2 => {0, 1}}
-- commonPoint: #equations = 15
-- commonPoint: #equations = 15
-- commonPoint: #equations = 15
-- seeLine: #equations = 4
-- seeLine: #equations = 4
-- seeLine: #equations = 4

i3 : load("example-2111_1-jacobian.m2")
--building: 3 points, 1 pins, 1 free lines.
--          dependent points:
MutableHashTable{2 => {0, 1}}

Tested on MacOS X 12.6.6

Trying M2 1.12 gives:

Macaulay2, version 1.12
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone

i1 : load("example-2111_1-numerical.m2")
--warning: symbol "Jacobian" in ReesAlgebra.Dictionary is shadowed by a symbol in NAGtypes.Dictionary
--  use the synonym ReesAlgebra$Jacobian
--loading configuration for package "NumericalAlgebraicGeometry" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-NumericalAlgebraicGeometry.m2
--loading configuration for package "PHCpack" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-PHCpack.m2
--loading configuration for package "Bertini" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-Bertini.m2
--warning: symbol "sampleInitFile" in User#"private dictionary" is shadowed by a symbol in Core#"private dictionary"
--  use the synonym sampleInitFile$0
     -- 0.019499 seconds elapsed
 number of polynomials is 60
{0, 1, 2}
common.m2:327:13:(3):[11]: error: no method found for applying evaluate to:
     argument 1 :  SLProgram (   (of class RawSLProgram)
                     inputs: 17
                     #mNodes: 0
                     outputs: 12
                   .............
     argument 2 :  | -.726792+.686857i .080013+.99679. (of class MutableMatrix)
     argument 3 :  0 (of class MutableMatrix)
common.m2:327:13:(3):[11]: --entering debugger (type help to see debugger commands)
common.m2:327:13-327:66: --source code:
            evaluate(cam, mutableMatrix{sampleCameraParameters}, M);

Trying M2 1.15 gives:

Macaulay2, version 1.15
--loading configuration for package "FourTiTwo" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-FourTiTwo.m2
--loading configuration for package "Topcom" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-Topcom.m2
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone, Truncations
+
i1 : load("example-2111_1-numerical.m2")
--loading configuration for package "NumericalAlgebraicGeometry" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-NumericalAlgebraicGeometry.m2
--loading configuration for package "PHCpack" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-PHCpack.m2
--loading configuration for package "Bertini" from file /Users/rfabbri/Library/Application Support/Macaulay2/init-Bertini.m2
--warning: symbol "sampleInitFile" in User#"private dictionary" is shadowed by a symbol in Core#"private dictionary"
--  use the synonym sampleInitFile$0
     -- 0.01712 seconds elapsed
 number of polynomials is 60
{0, 1, 2}
     -- 0.00331732 seconds elapsed
{0, 1, 2}
example-2111_1-numerical.m2:13:22:(3):[6]: error: no method found for applying evaluate to:
     argument 1 :  {{(((((l      * 1) + (l      * 0) + (. (of class GateMatrix)
                           1,0,1          1,0,2         .
     argument 2 :  | -.726792+.686857ii  | (of class Matrix)
                   | .0800129+.996794ii  |
                   | .742918+.669382ii   |
                   | -.939129+.343564ii  |
                   .......................
example-2111_1-numerical.m2:13:22:(3):[6]: --entering debugger (type help to see debugger commands)
example-2111_1-numerical.m2:13:22-13:36: --source code:
max(cStarts/(c->norm evaluate(F,c||yStart)))

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.