{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "See "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for details of the estimation procedure.  "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a good place to start."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Fundamental matrix transformation."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "params",
              "annotation": "(3, 3) array",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Fundamental matrix."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "matrix",
              "annotation": "(3, 3) array_like, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Fundamental matrix."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "dimensionality",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Fallback number of dimensions when "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "matrix"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " not specified, in which case, must equal 2 (the default)."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The fundamental matrix relates corresponding points between a pair of uncalibrated images. The matrix transforms homogeneous image points in one image to epipolar lines in the other image."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The fundamental matrix is only defined for a pair of moving images. In the case of pure rotation or planar scenes, the homography describes the geometric relation between two images ("
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ProjectiveTransform",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "skimage.transform._geometric:ProjectiveTransform"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "). If the intrinsic calibration of the images is known, the essential matrix describes the metric relation between the two images ("
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "EssentialMatrixTransform",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "skimage.transform._geometric:EssentialMatrixTransform"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ")."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Returns",
    "Yields",
    "Receives",
    "Raises",
    "Warns",
    "Other Parameters",
    "Attributes",
    "Methods",
    "Notes",
    "Warnings"
  ],
  "item_file": "/dev/scikit-image/src/skimage/transform/_geometric.py",
  "item_line": 420,
  "item_type": "ABCMeta",
  "aliases": [
    "skimage.transform.FundamentalMatrixTransform"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nimport skimage as ski\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nDefine source and destination points:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "src = np.array([1.839035, 1.924743,\n                0.543582, 0.375221,\n                0.473240, 0.142522,\n                0.964910, 0.598376,\n                0.102388, 0.140092,\n               15.994343, 9.622164,\n                0.285901, 0.430055,\n                0.091150, 0.254594]).reshape(-1, 2)\ndst = np.array([1.002114, 1.129644,\n                1.521742, 1.846002,\n                1.084332, 0.275134,\n                0.293328, 0.588992,\n                0.839509, 0.087290,\n                1.779735, 1.116857,\n                0.878616, 0.602447,\n                0.642616, 1.028681]).reshape(-1, 2)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nEstimate the transformation matrix:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "tform = ski.transform.FundamentalMatrixTransform.from_estimate(\n     src, dst)\ntform.params\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nCompute the Sampson distance:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "tform.residuals(src, dst)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nApply inverse transformation:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "tform.inverse(dst)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nThe estimation can fail - for example, if all the input or output points\nare the same.  If this happens, you will get a transform that is not\n\"truthy\" - meaning that ``bool(tform)`` is ``False``:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "if tform:\n    print(\"Estimation succeeded.\")\nbad_src = np.ones((8, 2))\nbad_tform = ski.transform.FundamentalMatrixTransform.from_estimate(\n     bad_src, dst)\nif not bad_tform:\n    print(\"Estimation failed.\")\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nTrying to use this failed estimation transform result will give a suitable\nerror:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "bad_tform.params  # doctest: +IGNORE_EXCEPTION_DETAIL\n",
        "execution_status": "success"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "matrix",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "dimensionality",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "FundamentalMatrixTransform"
  },
  "references": [
    ".. [1] Hartley, Richard, and Andrew Zisserman. Multiple view geometry in",
    "       computer vision. Cambridge university press, 2003.",
    ".. [2] Zhang, Zhengyou. \"Determining the epipolar geometry and its",
    "       uncertainty: A review.\" International journal of computer vision 27",
    "       (1998): 161-195.",
    "       :DOI:`10.1023/A:1007941100561`",
    "       https://www.microsoft.com/en-us/research/wp-content/uploads/2016/11/RR-2927.pdf"
  ],
  "qa": "skimage.transform._geometric:FundamentalMatrixTransform",
  "arbitrary": [],
  "local_refs": [
    "dimensionality",
    "matrix",
    "params"
  ]
}