Commit 30645f8d authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

moved the new docs from docroot to doc

parent 16bfe3f4
*******************************************************
calib3d. Camera Calibration, Pose Estimation and Stereo
*******************************************************
.. toctree::
:maxdepth: 2
calib3d_camera_calibration_and_3d_reconstruction
# -*- coding: utf-8 -*-
#
# opencv documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 4 21:06:43 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.pngmath', 'sphinx.ext.doctest'] # , 'sphinx.ext.intersphinx']
doctest_test_doctest_blocks = 'block'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'opencv'
copyright = u'2010, authors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.2'
# The full version, including alpha/beta/rc tags.
release = '2.2.9'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
#unused_docs = []
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'blue'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"lang" : "%LANG%" # buildall substitutes this for c, cpp, py
}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['../_themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = '../opencv-logo2.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['../_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_use_modindex = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'opencvdoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'opencv.tex', u'opencv Documentation',
u'author', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_use_modindex = True
pngmath_latex_preamble = '\usepackage{mymath}\usepackage{amsmath}\usepackage{bbm}\usepackage[usenames]{color}'
# intersphinx_mapping = {
# 'http://docs.python.org/': None,
# }
intersphinx_mapping = {}
latex_elements = {'preamble': '\usepackage{mymath}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}'}
Cookbook
========
.. highlight:: python
Here is a collection of code fragments demonstrating some features
of the OpenCV Python bindings.
Convert an image
----------------
.. doctest::
>>> import cv
>>> im = cv.LoadImageM("building.jpg")
>>> print type(im)
<type 'cv.cvmat'>
>>> cv.SaveImage("foo.png", im)
..
Resize an image
---------------
To resize an image in OpenCV, create a destination image of the appropriate size, then call
:ref:`Resize`
.
.. doctest::
>>> import cv
>>> original = cv.LoadImageM("building.jpg")
>>> thumbnail = cv.CreateMat(original.rows / 10, original.cols / 10, cv.CV_8UC3)
>>> cv.Resize(original, thumbnail)
..
Compute the Laplacian
---------------------
.. doctest::
>>> import cv
>>> im = cv.LoadImageM("building.jpg", 1)
>>> dst = cv.CreateImage(cv.GetSize(im), cv.IPL_DEPTH_16S, 3)
>>> laplace = cv.Laplace(im, dst)
>>> cv.SaveImage("foo-laplace.png", dst)
..
Using GoodFeaturesToTrack
-------------------------
To find the 10 strongest corner features in an image, use
:ref:`GoodFeaturesToTrack`
like this:
.. doctest::
>>> import cv
>>> img = cv.LoadImageM("building.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)
>>> eig_image = cv.CreateMat(img.rows, img.cols, cv.CV_32FC1)
>>> temp_image = cv.CreateMat(img.rows, img.cols, cv.CV_32FC1)
>>> for (x,y) in cv.GoodFeaturesToTrack(img, eig_image, temp_image, 10, 0.04, 1.0, useHarris = True):
... print "good feature at", x,y
good feature at 198.0 514.0
good feature at 791.0 260.0
good feature at 370.0 467.0
good feature at 374.0 469.0
good feature at 490.0 520.0
good feature at 262.0 278.0
good feature at 781.0 134.0
good feature at 3.0 247.0
good feature at 667.0 321.0
good feature at 764.0 304.0
..
Using GetSubRect
----------------
GetSubRect returns a rectangular part of another image. It does this without copying any data.
.. doctest::
>>> import cv
>>> img = cv.LoadImageM("building.jpg")
>>> sub = cv.GetSubRect(img, (60, 70, 32, 32)) # sub is 32x32 patch within img
>>> cv.SetZero(sub) # clear sub to zero, which also clears 32x32 pixels in img
..
Using CreateMat, and accessing an element
-----------------------------------------
.. doctest::
>>> import cv
>>> mat = cv.CreateMat(5, 5, cv.CV_32FC1)
>>> cv.Set(mat, 1.0)
>>> mat[3,1] += 0.375
>>> print mat[3,1]
1.375
>>> print [mat[3,i] for i in range(5)]
[1.0, 1.375, 1.0, 1.0, 1.0]
..
ROS image message to OpenCV
---------------------------
See this tutorial:
`Using CvBridge to convert between ROS images And OpenCV images <http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages>`_
.
PIL Image to OpenCV
-------------------
(For details on PIL see the
`PIL handbook <http://www.pythonware.com/library/pil/handbook/image.htm>`_
.)
.. doctest::
>>> import Image, cv
>>> pi = Image.open('building.jpg') # PIL image
>>> cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH_8U, 3)
>>> cv.SetData(cv_im, pi.tostring())
>>> print pi.size, cv.GetSize(cv_im)
(868, 600) (868, 600)
>>> print pi.tostring() == cv_im.tostring()
True
..
OpenCV to PIL Image
-------------------
.. doctest::
>>> import Image, cv
>>> cv_im = cv.CreateImage((320,200), cv.IPL_DEPTH_8U, 1)
>>> pi = Image.fromstring("L", cv.GetSize(cv_im), cv_im.tostring())
>>> print pi.size
(320, 200)
..
NumPy and OpenCV
----------------
Using the
`array interface <http://docs.scipy.org/doc/numpy/reference/arrays.interface.html>`_
, to use an OpenCV CvMat in NumPy:
.. doctest::
>>> import cv, numpy
>>> mat = cv.CreateMat(3, 5, cv.CV_32FC1)
>>> cv.Set(mat, 7)
>>> a = numpy.asarray(mat)
>>> print a
[[ 7. 7. 7. 7. 7.]
[ 7. 7. 7. 7. 7.]
[ 7. 7. 7. 7. 7.]]
..
and to use a NumPy array in OpenCV:
.. doctest::
>>> import cv, numpy
>>> a = numpy.ones((480, 640))
>>> mat = cv.fromarray(a)
>>> print mat.rows
480
>>> print mat.cols
640
..
also, most OpenCV functions can work on NumPy arrays directly, for example:
.. doctest::
>>> picture = numpy.ones((640, 480))
>>> cv.Smooth(picture, picture, cv.CV_GAUSSIAN, 15, 15)
..
Given a 2D array,
the
:ref:`fromarray`
function (or the implicit version shown above)
returns a single-channel
:ref:`CvMat`
of the same size.
For a 3D array of size
:math:`j \times k \times l`
, it returns a
:ref:`CvMat`
sized
:math:`j \times k`
with
:math:`l`
channels.
Alternatively, use
:ref:`fromarray`
with the
``allowND``
option to always return a
:ref:`cvMatND`
.
OpenCV to pygame
----------------
To convert an OpenCV image to a
`pygame <http://www.pygame.org/>`_
surface:
.. doctest::
>>> import pygame.image, cv
>>> src = cv.LoadImage("lena.jpg")
>>> src_rgb = cv.CreateMat(src.height, src.width, cv.CV_8UC3)
>>> cv.CvtColor(src, src_rgb, cv.CV_BGR2RGB)
>>> pg_img = pygame.image.frombuffer(src_rgb.tostring(), cv.GetSize(src_rgb), "RGB")
>>> print pg_img
<Surface(512x512x24 SW)>
..
OpenCV and OpenEXR
------------------
Using
`OpenEXR's Python bindings <http://www.excamera.com/sphinx/articles-openexr.html>`_
you can make a simple
image viewer:
::
import OpenEXR, Imath, cv
filename = "GoldenGate.exr"
exrimage = OpenEXR.InputFile(filename)
dw = exrimage.header()['dataWindow']
(width, height) = (dw.max.x - dw.min.x + 1, dw.max.y - dw.min.y + 1)
def fromstr(s):
mat = cv.CreateMat(height, width, cv.CV_32FC1)
cv.SetData(mat, s)
return mat
pt = Imath.PixelType(Imath.PixelType.FLOAT)
(r, g, b) = [fromstr(s) for s in exrimage.channels("RGB", pt)]
bgr = cv.CreateMat(height, width, cv.CV_32FC3)
cv.Merge(b, g, r, None, bgr)
cv.ShowImage(filename, bgr)
cv.WaitKey()
..
****************************
core. The Core Functionality
****************************
.. toctree::
:maxdepth: 2
core_basic_structures
core_operations_on_arrays
core_dynamic_structures
core_drawing_functions
core_xml_yaml_persistence
core_clustering
core_utility_and_system_functions_and_macros
Basic Structures
================
.. highlight:: python
.. index:: CvPoint
.. _CvPoint:
CvPoint
-------
`id=0.407060643954 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvPoint>`__
.. class:: CvPoint
2D point with integer coordinates (usually zero-based).
2D point, represented as a tuple
``(x, y)``
, where x and y are integers.
.. index:: CvPoint2D32f
.. _CvPoint2D32f:
CvPoint2D32f
------------
`id=0.638091190655 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvPoint2D32f>`__
.. class:: CvPoint2D32f
2D point with floating-point coordinates
2D point, represented as a tuple
``(x, y)``
, where x and y are floats.
.. index:: CvPoint3D32f
.. _CvPoint3D32f:
CvPoint3D32f
------------
`id=0.334583364495 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvPoint3D32f>`__
.. class:: CvPoint3D32f
3D point with floating-point coordinates
3D point, represented as a tuple
``(x, y, z)``
, where x, y and z are floats.
.. index:: CvPoint2D64f
.. _CvPoint2D64f:
CvPoint2D64f
------------
`id=0.352962148614 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvPoint2D64f>`__
.. class:: CvPoint2D64f
2D point with double precision floating-point coordinates
2D point, represented as a tuple
``(x, y)``
, where x and y are floats.
.. index:: CvPoint3D64f
.. _CvPoint3D64f:
CvPoint3D64f
------------
`id=0.00812295344272 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvPoint3D64f>`__
.. class:: CvPoint3D64f
3D point with double precision floating-point coordinates
3D point, represented as a tuple
``(x, y, z)``
, where x, y and z are floats.
.. index:: CvSize
.. _CvSize:
CvSize
------
`id=0.980418044509 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvSize>`__
.. class:: CvSize
Pixel-accurate size of a rectangle.
Size of a rectangle, represented as a tuple
``(width, height)``
, where width and height are integers.
.. index:: CvSize2D32f
.. _CvSize2D32f:
CvSize2D32f
-----------
`id=0.623013904609 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvSize2D32f>`__
.. class:: CvSize2D32f
Sub-pixel accurate size of a rectangle.
Size of a rectangle, represented as a tuple
``(width, height)``
, where width and height are floats.
.. index:: CvRect
.. _CvRect:
CvRect
------
`id=0.706717090055 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvRect>`__
.. class:: CvRect
Offset (usually the top-left corner) and size of a rectangle.
Rectangle, represented as a tuple
``(x, y, width, height)``
, where all are integers.
.. index:: CvScalar
.. _CvScalar:
CvScalar
--------
`id=0.733448405451 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvScalar>`__
.. class:: CvScalar
A container for 1-,2-,3- or 4-tuples of doubles.
CvScalar is always represented as a 4-tuple.
.. doctest::
>>> import cv
>>> cv.Scalar(1, 2, 3, 4)
(1.0, 2.0, 3.0, 4.0)
>>> cv.ScalarAll(7)
(7.0, 7.0, 7.0, 7.0)
>>> cv.RealScalar(7)
(7.0, 0.0, 0.0, 0.0)
>>> cv.RGB(17, 110, 255)
(255.0, 110.0, 17.0, 0.0)
..
.. index:: CvTermCriteria
.. _CvTermCriteria:
CvTermCriteria
--------------
`id=0.996691519996 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvTermCriteria>`__
.. class:: CvTermCriteria
Termination criteria for iterative algorithms.
Represented by a tuple
``(type, max_iter, epsilon)``
.
.. attribute:: type
``CV_TERMCRIT_ITER`` , ``CV_TERMCRIT_EPS`` or ``CV_TERMCRIT_ITER | CV_TERMCRIT_EPS``
.. attribute:: max_iter
Maximum number of iterations
.. attribute:: epsilon
Required accuracy
::
(cv.CV_TERMCRIT_ITER, 10, 0) # terminate after 10 iterations
(cv.CV_TERMCRIT_EPS, 0, 0.01) # terminate when epsilon reaches 0.01
(cv.CV_TERMCRIT_ITER | cv.CV_TERMCRIT_EPS, 10, 0.01) # terminate as soon as either condition is met
..
.. index:: CvMat
.. _CvMat:
CvMat
-----
`id=0.619633266675 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvMat>`__
.. class:: CvMat
A multi-channel 2D matrix. Created by
:ref:`CreateMat`
,
:ref:`LoadImageM`
,
:ref:`CreateMatHeader`
,
:ref:`fromarray`
.
.. attribute:: type
A CvMat signature containing the type of elements and flags, int
.. attribute:: step
Full row length in bytes, int
.. attribute:: rows
Number of rows, int
.. attribute:: cols
Number of columns, int
.. method:: tostring() -> str
Returns the contents of the CvMat as a single string.
.. index:: CvMatND
.. _CvMatND:
CvMatND
-------
`id=0.493284398358 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvMatND>`__
.. class:: CvMatND
Multi-dimensional dense multi-channel array.
.. attribute:: type
A CvMatND signature combining the type of elements and flags, int
.. method:: tostring() -> str
Returns the contents of the CvMatND as a single string.
.. index:: IplImage
.. _IplImage:
IplImage
--------
`id=0.479556472461 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/IplImage>`__
.. class:: IplImage
The
:ref:`IplImage`
object was inherited from the Intel Image Processing
Library, in which the format is native. OpenCV only supports a subset
of possible
:ref:`IplImage`
formats.
.. attribute:: nChannels
Number of channels, int.
.. attribute:: width
Image width in pixels
.. attribute:: height
Image height in pixels
.. attribute:: depth
Pixel depth in bits. The supported depths are:
.. attribute:: IPL_DEPTH_8U
Unsigned 8-bit integer
.. attribute:: IPL_DEPTH_8S
Signed 8-bit integer
.. attribute:: IPL_DEPTH_16U
Unsigned 16-bit integer
.. attribute:: IPL_DEPTH_16S
Signed 16-bit integer
.. attribute:: IPL_DEPTH_32S
Signed 32-bit integer
.. attribute:: IPL_DEPTH_32F
Single-precision floating point
.. attribute:: IPL_DEPTH_64F
Double-precision floating point
.. attribute:: origin
0 - top-left origin, 1 - bottom-left origin (Windows bitmap style)
.. method:: tostring() -> str
Returns the contents of the CvMatND as a single string.
.. index:: CvArr
.. _CvArr:
CvArr
-----
`id=0.249942454209 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/CvArr>`__
.. class:: CvArr
Arbitrary array
``CvArr``
is used
*only*
as a function parameter to specify that the parameter can be:
* an :ref:`IplImage`
* a :ref:`CvMat`
* any other type that exports the `array interface <http://docs.scipy.org/doc/numpy/reference/arrays.interface.html>`_
Clustering
==========
.. highlight:: python
.. index:: KMeans2
.. _KMeans2:
KMeans2
-------
`id=0.682106387651 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/KMeans2>`__
.. function:: KMeans2(samples,nclusters,labels,termcrit)-> None
Splits set of vectors by a given number of clusters.
:param samples: Floating-point matrix of input samples, one row per sample
:type samples: :class:`CvArr`
:param nclusters: Number of clusters to split the set by
:type nclusters: int
:param labels: Output integer vector storing cluster indices for every sample
:type labels: :class:`CvArr`
:param termcrit: Specifies maximum number of iterations and/or accuracy (distance the centers can move by between subsequent iterations)
:type termcrit: :class:`CvTermCriteria`
The function
``cvKMeans2``
implements a k-means algorithm that finds the
centers of
``nclusters``
clusters and groups the input samples
around the clusters. On output,
:math:`\texttt{labels}_i`
contains a cluster index for
samples stored in the i-th row of the
``samples``
matrix.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Utility and System Functions and Macros
=======================================
.. highlight:: python
Error Handling
--------------
Errors in argument type cause a
``TypeError``
exception.
OpenCV errors cause an
``cv.error``
exception.
For example a function argument that is the wrong type produces a
``TypeError``
:
.. doctest::
>>> import cv
>>> cv.LoadImage(4)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument 1 must be string, not int
..
A function with the
.. doctest::
>>> cv.CreateMat(-1, -1, cv.CV_8UC1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
error: Non-positive width or height
..
.. index:: GetTickCount
.. _GetTickCount:
GetTickCount
------------
`id=0.81706194546 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/GetTickCount>`__
.. function:: GetTickCount() -> long
Returns the number of ticks.
The function returns number of the ticks starting from some platform-dependent event (number of CPU ticks from the startup, number of milliseconds from 1970th year, etc.). The function is useful for accurate measurement of a function/user-code execution time. To convert the number of ticks to time units, use
:ref:`GetTickFrequency`
.
.. index:: GetTickFrequency
.. _GetTickFrequency:
GetTickFrequency
----------------
`id=0.967317163838 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/GetTickFrequency>`__
.. function:: GetTickFrequency() -> long
Returns the number of ticks per microsecond.
The function returns the number of ticks per microsecond. Thus, the quotient of
:ref:`GetTickCount`
and
:ref:`GetTickFrequency`
will give the number of microseconds starting from the platform-dependent event.
XML/YAML Persistence
====================
.. highlight:: python
.. index:: Load
.. _Load:
Load
----
`id=0.778290631419 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/Load>`__
.. function:: Load(filename,storage=NULL,name=NULL)-> generic
Loads an object from a file.
:param filename: File name
:type filename: str
:param storage: Memory storage for dynamic structures, such as :ref:`CvSeq` or :ref:`CvGraph` . It is not used for matrices or images.
:type storage: :class:`CvMemStorage`
:param name: Optional object name. If it is NULL, the first top-level object in the storage will be loaded.
:type name: str
The function loads an object from a file. It provides a
simple interface to
:ref:`Read`
. After the object is loaded, the file
storage is closed and all the temporary buffers are deleted. Thus,
to load a dynamic structure, such as a sequence, contour, or graph, one
should pass a valid memory storage destination to the function.
.. index:: Save
.. _Save:
Save
----
`id=0.295047298682 Comments from the Wiki <http://opencv.willowgarage.com/wiki/documentation/py/core/Save>`__
.. function:: Save(filename,structPtr,name=NULL,comment=NULL)-> None
Saves an object to a file.
:param filename: File name
:type filename: str
:param structPtr: Object to save
:type structPtr: :class:`generic`
:param name: Optional object name. If it is NULL, the name will be formed from ``filename`` .
:type name: str
:param comment: Optional comment to put in the beginning of the file
:type comment: str
The function saves an object to a file. It provides a simple interface to
:ref:`Write`
.
*******************************************************
features2d. Feature Detection and Descriptor Extraction
*******************************************************
.. toctree::
:maxdepth: 2
features2d_feature_detection_and_description
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment