Update documentation
This commit is contained in:
parent
be7bbe3aa9
commit
33ef7990b0
@ -51,9 +51,9 @@ In OpenCV 2.4 you only need :ocv:func:`applyColorMap` to apply a colormap on a g
|
||||
int main(int argc, const char *argv[]) {
|
||||
// Get the path to the image, if it was given
|
||||
// if no arguments were given.
|
||||
string filename;
|
||||
String filename;
|
||||
if (argc > 1) {
|
||||
filename = string(argv[1]);
|
||||
filename = String(argv[1]);
|
||||
}
|
||||
// The following lines show how to apply a colormap on a given image
|
||||
// and show it with cv::imshow example with an image. An exception is
|
||||
|
@ -30,10 +30,10 @@ a unified access to all face recongition algorithms in OpenCV. ::
|
||||
virtual void predict(InputArray src, int &label, double &confidence) const = 0;
|
||||
|
||||
// Serializes this object to a given filename.
|
||||
virtual void save(const string& filename) const;
|
||||
virtual void save(const String& filename) const;
|
||||
|
||||
// Deserializes this object from a given filename.
|
||||
virtual void load(const string& filename);
|
||||
virtual void load(const String& filename);
|
||||
|
||||
// Serializes this object to a given cv::FileStorage.
|
||||
virtual void save(FileStorage& fs) const = 0;
|
||||
@ -52,7 +52,7 @@ I'll go a bit more into detail explaining :ocv:class:`FaceRecognizer`, because i
|
||||
|
||||
* So called “virtual constructor”. That is, each Algorithm derivative is registered at program start and you can get the list of registered algorithms and create instance of a particular algorithm by its name (see :ocv:func:`Algorithm::create`). If you plan to add your own algorithms, it is good practice to add a unique prefix to your algorithms to distinguish them from other algorithms.
|
||||
|
||||
* Setting/Retrieving algorithm parameters by name. If you used video capturing functionality from OpenCV highgui module, you are probably familar with :ocv:cfunc:`cvSetCaptureProperty`, :ocv:cfunc:`cvGetCaptureProperty`, :ocv:func:`VideoCapture::set` and :ocv:func:`VideoCapture::get`. :ocv:class:`Algorithm` provides similar method where instead of integer id's you specify the parameter names as text strings. See :ocv:func:`Algorithm::set` and :ocv:func:`Algorithm::get` for details.
|
||||
* Setting/Retrieving algorithm parameters by name. If you used video capturing functionality from OpenCV highgui module, you are probably familar with :ocv:cfunc:`cvSetCaptureProperty`, :ocv:cfunc:`cvGetCaptureProperty`, :ocv:func:`VideoCapture::set` and :ocv:func:`VideoCapture::get`. :ocv:class:`Algorithm` provides similar method where instead of integer id's you specify the parameter names as text Strings. See :ocv:func:`Algorithm::set` and :ocv:func:`Algorithm::get` for details.
|
||||
|
||||
* Reading and writing parameters from/to XML or YAML files. Every Algorithm derivative can store all its parameters and then read them back. There is no need to re-implement it each time.
|
||||
|
||||
@ -251,7 +251,7 @@ FaceRecognizer::save
|
||||
|
||||
Saves a :ocv:class:`FaceRecognizer` and its model state.
|
||||
|
||||
.. ocv:function:: void FaceRecognizer::save(const string& filename) const
|
||||
.. ocv:function:: void FaceRecognizer::save(const String& filename) const
|
||||
|
||||
Saves this model to a given filename, either as XML or YAML.
|
||||
|
||||
@ -265,7 +265,7 @@ Saves a :ocv:class:`FaceRecognizer` and its model state.
|
||||
|
||||
|
||||
Every :ocv:class:`FaceRecognizer` overwrites ``FaceRecognizer::save(FileStorage& fs)``
|
||||
to save the internal model state. ``FaceRecognizer::save(const string& filename)`` saves
|
||||
to save the internal model state. ``FaceRecognizer::save(const String& filename)`` saves
|
||||
the state of a model to the given filename.
|
||||
|
||||
The suffix ``const`` means that prediction does not affect the internal model
|
||||
@ -276,13 +276,13 @@ FaceRecognizer::load
|
||||
|
||||
Loads a :ocv:class:`FaceRecognizer` and its model state.
|
||||
|
||||
.. ocv:function:: void FaceRecognizer::load( const string& filename )
|
||||
.. ocv:function:: void FaceRecognizer::load( const String& filename )
|
||||
.. ocv:function:: void FaceRecognizer::load( const FileStorage& fs ) = 0
|
||||
|
||||
Loads a persisted model and state from a given XML or YAML file . Every
|
||||
:ocv:class:`FaceRecognizer` has to overwrite ``FaceRecognizer::load(FileStorage& fs)``
|
||||
to enable loading the model state. ``FaceRecognizer::load(FileStorage& fs)`` in
|
||||
turn gets called by ``FaceRecognizer::load(const string& filename)``, to ease
|
||||
turn gets called by ``FaceRecognizer::load(const String& filename)``, to ease
|
||||
saving a model.
|
||||
|
||||
createEigenFaceRecognizer
|
||||
|
@ -2484,13 +2484,13 @@ Algorithm::set
|
||||
--------------
|
||||
Sets the algorithm parameter
|
||||
|
||||
.. ocv:function:: void Algorithm::set(const string& name, int value)
|
||||
.. ocv:function:: void Algorithm::set(const string& name, double value)
|
||||
.. ocv:function:: void Algorithm::set(const string& name, bool value)
|
||||
.. ocv:function:: void Algorithm::set(const string& name, const string& value)
|
||||
.. ocv:function:: void Algorithm::set(const string& name, const Mat& value)
|
||||
.. ocv:function:: void Algorithm::set(const string& name, const vector<Mat>& value)
|
||||
.. ocv:function:: void Algorithm::set(const string& name, const Ptr<Algorithm>& value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, int value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, double value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, bool value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, const String& value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, const Mat& value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, const vector<Mat>& value)
|
||||
.. ocv:function:: void Algorithm::set(const String& name, const Ptr<Algorithm>& value)
|
||||
|
||||
:param name: The parameter name.
|
||||
:param value: The parameter value.
|
||||
@ -2546,7 +2546,7 @@ Algorithm::create
|
||||
-----------------
|
||||
Creates algorithm instance by name
|
||||
|
||||
.. ocv:function:: template<typename _Tp> Ptr<_Tp> Algorithm::create(const string& name)
|
||||
.. ocv:function:: template<typename _Tp> Ptr<_Tp> Algorithm::create(const String& name)
|
||||
|
||||
:param name: The algorithm name, one of the names returned by ``Algorithm::getList()``.
|
||||
|
||||
|
@ -10,7 +10,7 @@ CommandLineParser
|
||||
The CommandLineParser class is designed for command line arguments parsing
|
||||
|
||||
|
||||
.. ocv:function:: CommandLineParser::CommandLineParser( int argc, const char* const argv[], const string& keys )
|
||||
.. ocv:function:: CommandLineParser::CommandLineParser( int argc, const char* const argv[], const String& keys )
|
||||
|
||||
:param argc:
|
||||
:param argv:
|
||||
@ -33,7 +33,7 @@ The CommandLineParser class is designed for command line arguments parsing
|
||||
.. ocv:function:: bool CommandLineParser::check()
|
||||
|
||||
|
||||
.. ocv:function:: void CommandLineParser::about( const string& message )
|
||||
.. ocv:function:: void CommandLineParser::about( const String& message )
|
||||
|
||||
:param message:
|
||||
|
||||
|
@ -225,7 +225,7 @@ getTextSize
|
||||
---------------
|
||||
Calculates the width and height of a text string.
|
||||
|
||||
.. ocv:function:: Size getTextSize(const string& text, int fontFace, double fontScale, int thickness, int* baseLine)
|
||||
.. ocv:function:: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine)
|
||||
|
||||
.. ocv:pyfunction:: cv2.getTextSize(text, fontFace, fontScale, thickness) -> retval, baseLine
|
||||
|
||||
@ -246,7 +246,7 @@ Calculates the width and height of a text string.
|
||||
The function ``getTextSize`` calculates and returns the size of a box that contains the specified text.
|
||||
That is, the following code renders some text, the tight box surrounding it, and the baseline: ::
|
||||
|
||||
string text = "Funny text inside the box";
|
||||
String text = "Funny text inside the box";
|
||||
int fontFace = FONT_HERSHEY_SCRIPT_SIMPLEX;
|
||||
double fontScale = 2;
|
||||
int thickness = 3;
|
||||
@ -570,7 +570,7 @@ putText
|
||||
-----------
|
||||
Draws a text string.
|
||||
|
||||
.. ocv:function:: void putText( Mat& img, const string& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false )
|
||||
.. ocv:function:: void putText( Mat& img, const String& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false )
|
||||
|
||||
.. ocv:pyfunction:: cv2.putText(img, text, org, fontFace, fontScale, color[, thickness[, lineType[, bottomLeftOrigin]]]) -> None
|
||||
|
||||
|
@ -218,19 +218,19 @@ Exception class passed to an error. ::
|
||||
public:
|
||||
// various constructors and the copy operation
|
||||
Exception() { code = 0; line = 0; }
|
||||
Exception(int _code, const string& _err,
|
||||
const string& _func, const string& _file, int _line);
|
||||
Exception(int _code, const String& _err,
|
||||
const String& _func, const String& _file, int _line);
|
||||
Exception(const Exception& exc);
|
||||
Exception& operator = (const Exception& exc);
|
||||
|
||||
// the error code
|
||||
int code;
|
||||
// the error text message
|
||||
string err;
|
||||
String err;
|
||||
// function name where the error happened
|
||||
string func;
|
||||
String func;
|
||||
// the source file name where the error happened
|
||||
string file;
|
||||
String file;
|
||||
// the source file line where the error happened
|
||||
int line;
|
||||
};
|
||||
@ -272,7 +272,7 @@ format
|
||||
------
|
||||
Returns a text string formatted using the ``printf``\ -like expression.
|
||||
|
||||
.. ocv:function:: string format( const char* fmt, ... )
|
||||
.. ocv:function:: String format( const char* fmt, ... )
|
||||
|
||||
:param fmt: ``printf`` -compatible formatting specifiers.
|
||||
|
||||
|
@ -156,7 +156,7 @@ The constructors.
|
||||
|
||||
.. ocv:function:: FileStorage::FileStorage()
|
||||
|
||||
.. ocv:function:: FileStorage::FileStorage(const string& source, int flags, const string& encoding=string())
|
||||
.. ocv:function:: FileStorage::FileStorage(const String& source, int flags, const String& encoding=String())
|
||||
|
||||
:param source: Name of the file to open or the text string to read the data from. Extension of the file (``.xml`` or ``.yml``/``.yaml``) determines its format (XML or YAML respectively). Also you can append ``.gz`` to work with compressed files, for example ``myHugeMatrix.xml.gz``. If both ``FileStorage::WRITE`` and ``FileStorage::MEMORY`` flags are specified, ``source`` is used just to specify the output file format (e.g. ``mydata.xml``, ``.yml`` etc.).
|
||||
|
||||
@ -179,7 +179,7 @@ FileStorage::open
|
||||
-----------------
|
||||
Opens a file.
|
||||
|
||||
.. ocv:function:: bool FileStorage::open(const string& filename, int flags, const string& encoding=string())
|
||||
.. ocv:function:: bool FileStorage::open(const String& filename, int flags, const String& encoding=String())
|
||||
|
||||
See description of parameters in :ocv:func:`FileStorage::FileStorage`. The method calls :ocv:func:`FileStorage::release` before opening the file.
|
||||
|
||||
@ -208,7 +208,7 @@ FileStorage::releaseAndGetString
|
||||
--------------------------------
|
||||
Closes the file and releases all the memory buffers.
|
||||
|
||||
.. ocv:function:: string FileStorage::releaseAndGetString()
|
||||
.. ocv:function:: String FileStorage::releaseAndGetString()
|
||||
|
||||
Call this method after all I/O operations with the storage are finished. If the storage was opened for writing data and ``FileStorage::WRITE`` was specified
|
||||
|
||||
@ -237,7 +237,7 @@ FileStorage::operator[]
|
||||
-----------------------
|
||||
Returns the specified element of the top-level mapping.
|
||||
|
||||
.. ocv:function:: FileNode FileStorage::operator[](const string& nodename) const
|
||||
.. ocv:function:: FileNode FileStorage::operator[](const String& nodename) const
|
||||
|
||||
.. ocv:function:: FileNode FileStorage::operator[](const char* nodename) const
|
||||
|
||||
@ -261,7 +261,7 @@ FileStorage::writeRaw
|
||||
---------------------
|
||||
Writes multiple numbers.
|
||||
|
||||
.. ocv:function:: void FileStorage::writeRaw( const string& fmt, const uchar* vec, size_t len )
|
||||
.. ocv:function:: void FileStorage::writeRaw( const String& fmt, const uchar* vec, size_t len )
|
||||
|
||||
:param fmt: Specification of each array element that has the following format ``([count]{'u'|'c'|'w'|'s'|'i'|'f'|'d'})...`` where the characters correspond to fundamental C++ types:
|
||||
|
||||
@ -293,7 +293,7 @@ FileStorage::writeObj
|
||||
---------------------
|
||||
Writes the registered C structure (CvMat, CvMatND, CvSeq).
|
||||
|
||||
.. ocv:function:: void FileStorage::writeObj( const string& name, const void* obj )
|
||||
.. ocv:function:: void FileStorage::writeObj( const String& name, const void* obj )
|
||||
|
||||
:param name: Name of the written object.
|
||||
|
||||
@ -306,7 +306,7 @@ FileStorage::getDefaultObjectName
|
||||
---------------------------------
|
||||
Returns the normalized object name for the specified name of a file.
|
||||
|
||||
.. ocv:function:: static string FileStorage::getDefaultObjectName(const string& filename)
|
||||
.. ocv:function:: static String FileStorage::getDefaultObjectName(const String& filename)
|
||||
|
||||
:param filename: Name of a file
|
||||
|
||||
@ -383,7 +383,7 @@ FileNode::operator[]
|
||||
--------------------
|
||||
Returns element of a mapping node or a sequence node.
|
||||
|
||||
.. ocv:function:: FileNode FileNode::operator[](const string& nodename) const
|
||||
.. ocv:function:: FileNode FileNode::operator[](const String& nodename) const
|
||||
|
||||
.. ocv:function:: FileNode FileNode::operator[](const char* nodename) const
|
||||
|
||||
@ -507,7 +507,7 @@ FileNode::name
|
||||
--------------
|
||||
Returns the node name.
|
||||
|
||||
.. ocv:function:: string FileNode::name() const
|
||||
.. ocv:function:: String FileNode::name() const
|
||||
|
||||
:returns: The node name or an empty string if the node is nameless.
|
||||
|
||||
@ -588,7 +588,7 @@ FileNode::readRaw
|
||||
-----------------
|
||||
Reads node elements to the buffer with the specified format.
|
||||
|
||||
.. ocv:function:: void FileNode::readRaw( const string& fmt, uchar* vec, size_t len ) const
|
||||
.. ocv:function:: void FileNode::readRaw( const String& fmt, uchar* vec, size_t len ) const
|
||||
|
||||
:param fmt: Specification of each array element. It has the same format as in :ocv:func:`FileStorage::writeRaw`.
|
||||
|
||||
@ -692,7 +692,7 @@ FileNodeIterator::readRaw
|
||||
-------------------------
|
||||
Reads node elements to the buffer with the specified format.
|
||||
|
||||
.. ocv:function:: FileNodeIterator& FileNodeIterator::readRaw( const string& fmt, uchar* vec, size_t maxCount=(size_t)INT_MAX )
|
||||
.. ocv:function:: FileNodeIterator& FileNodeIterator::readRaw( const String& fmt, uchar* vec, size_t maxCount=(size_t)INT_MAX )
|
||||
|
||||
:param fmt: Specification of each array element. It has the same format as in :ocv:func:`FileStorage::writeRaw`.
|
||||
|
||||
|
@ -33,7 +33,7 @@ Abstract base class for computing descriptors for image keypoints. ::
|
||||
virtual int descriptorSize() const = 0;
|
||||
virtual int descriptorType() const = 0;
|
||||
|
||||
static Ptr<DescriptorExtractor> create( const string& descriptorExtractorType );
|
||||
static Ptr<DescriptorExtractor> create( const String& descriptorExtractorType );
|
||||
|
||||
protected:
|
||||
...
|
||||
@ -70,7 +70,7 @@ DescriptorExtractor::create
|
||||
-------------------------------
|
||||
Creates a descriptor extractor by name.
|
||||
|
||||
.. ocv:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string& descriptorExtractorType )
|
||||
.. ocv:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const String& descriptorExtractorType )
|
||||
|
||||
:param descriptorExtractorType: Descriptor extractor type.
|
||||
|
||||
|
@ -88,7 +88,7 @@ with an image set. ::
|
||||
|
||||
virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const = 0;
|
||||
|
||||
static Ptr<DescriptorMatcher> create( const string& descriptorMatcherType );
|
||||
static Ptr<DescriptorMatcher> create( const String& descriptorMatcherType );
|
||||
|
||||
protected:
|
||||
vector<Mat> trainDescCollection;
|
||||
@ -237,7 +237,7 @@ DescriptorMatcher::create
|
||||
-----------------------------
|
||||
Creates a descriptor matcher of a given type with the default parameters (using default constructor).
|
||||
|
||||
.. ocv:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string& descriptorMatcherType )
|
||||
.. ocv:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const String& descriptorMatcherType )
|
||||
|
||||
:param descriptorMatcherType: Descriptor matcher type. Now the following matcher types are supported:
|
||||
|
||||
|
@ -88,7 +88,7 @@ Abstract base class for 2D image feature detectors. ::
|
||||
virtual void read(const FileNode&);
|
||||
virtual void write(FileStorage&) const;
|
||||
|
||||
static Ptr<FeatureDetector> create( const string& detectorType );
|
||||
static Ptr<FeatureDetector> create( const String& detectorType );
|
||||
|
||||
protected:
|
||||
...
|
||||
@ -116,7 +116,7 @@ FeatureDetector::create
|
||||
-----------------------
|
||||
Creates a feature detector by its name.
|
||||
|
||||
.. ocv:function:: Ptr<FeatureDetector> FeatureDetector::create( const string& detectorType )
|
||||
.. ocv:function:: Ptr<FeatureDetector> FeatureDetector::create( const String& detectorType )
|
||||
|
||||
:param detectorType: Feature detector type.
|
||||
|
||||
@ -439,7 +439,7 @@ Class providing an interface for adjusting parameters of a feature detector. Thi
|
||||
virtual void tooMany(int max, int n_detected) = 0;
|
||||
virtual bool good() const = 0;
|
||||
virtual Ptr<AdjusterAdapter> clone() const = 0;
|
||||
static Ptr<AdjusterAdapter> create( const string& detectorType );
|
||||
static Ptr<AdjusterAdapter> create( const String& detectorType );
|
||||
};
|
||||
|
||||
|
||||
@ -500,7 +500,7 @@ AdjusterAdapter::create
|
||||
-----------------------
|
||||
Creates an adjuster adapter by name
|
||||
|
||||
.. ocv:function:: Ptr<AdjusterAdapter> AdjusterAdapter::create( const string& detectorType )
|
||||
.. ocv:function:: Ptr<AdjusterAdapter> AdjusterAdapter::create( const String& detectorType )
|
||||
|
||||
Creates an adjuster adapter by name ``detectorType``. The detector name is the same as in :ocv:func:`FeatureDetector::create`, but now supports ``"FAST"``, ``"STAR"``, and ``"SURF"`` only.
|
||||
|
||||
|
@ -110,7 +110,7 @@ Class providing functionality for querying the specified GPU properties. ::
|
||||
DeviceInfo();
|
||||
DeviceInfo(int device_id);
|
||||
|
||||
string name() const;
|
||||
String name() const;
|
||||
|
||||
int majorVersion() const;
|
||||
int minorVersion() const;
|
||||
@ -146,7 +146,7 @@ gpu::DeviceInfo::name
|
||||
---------------------
|
||||
Returns the device name.
|
||||
|
||||
.. ocv:function:: string gpu::DeviceInfo::name() const
|
||||
.. ocv:function:: String gpu::DeviceInfo::name() const
|
||||
|
||||
|
||||
|
||||
|
@ -209,11 +209,11 @@ Cascade classifier class used for object detection. Supports HAAR and LBP cascad
|
||||
{
|
||||
public:
|
||||
CascadeClassifier_GPU();
|
||||
CascadeClassifier_GPU(const string& filename);
|
||||
CascadeClassifier_GPU(const String& filename);
|
||||
~CascadeClassifier_GPU();
|
||||
|
||||
bool empty() const;
|
||||
bool load(const string& filename);
|
||||
bool load(const String& filename);
|
||||
void release();
|
||||
|
||||
/* Returns number of detected objects */
|
||||
@ -235,7 +235,7 @@ gpu::CascadeClassifier_GPU::CascadeClassifier_GPU
|
||||
-----------------------------------------------------
|
||||
Loads the classifier from a file. Cascade type is detected automatically by constructor parameter.
|
||||
|
||||
.. ocv:function:: gpu::CascadeClassifier_GPU::CascadeClassifier_GPU(const string& filename)
|
||||
.. ocv:function:: gpu::CascadeClassifier_GPU::CascadeClassifier_GPU(const String& filename)
|
||||
|
||||
:param filename: Name of the file from which the classifier is loaded. Only the old ``haar`` classifier (trained by the ``haar`` training application) and NVIDIA's ``nvbin`` are supported for HAAR and only new type of OpenCV XML cascade supported for LBP.
|
||||
|
||||
@ -253,7 +253,7 @@ gpu::CascadeClassifier_GPU::load
|
||||
------------------------------------
|
||||
Loads the classifier from a file. The previous content is destroyed.
|
||||
|
||||
.. ocv:function:: bool gpu::CascadeClassifier_GPU::load(const string& filename)
|
||||
.. ocv:function:: bool gpu::CascadeClassifier_GPU::load(const String& filename)
|
||||
|
||||
:param filename: Name of the file from which the classifier is loaded. Only the old ``haar`` classifier (trained by the ``haar`` training application) and NVIDIA's ``nvbin`` are supported for HAAR and only new type of OpenCV XML cascade supported for LBP.
|
||||
|
||||
|
@ -61,7 +61,7 @@ setWindowProperty
|
||||
---------------------
|
||||
Changes parameters of a window dynamically.
|
||||
|
||||
.. ocv:function:: void setWindowProperty( const string& winname, int prop_id, double prop_value )
|
||||
.. ocv:function:: void setWindowProperty( const String& winname, int prop_id, double prop_value )
|
||||
|
||||
.. ocv:pyfunction:: cv2.setWindowProperty(winname, prop_id, prop_value) -> None
|
||||
|
||||
@ -97,7 +97,7 @@ getWindowProperty
|
||||
---------------------
|
||||
Provides parameters of a window.
|
||||
|
||||
.. ocv:function:: double getWindowProperty( const string& winname, int prop_id )
|
||||
.. ocv:function:: double getWindowProperty( const String& winname, int prop_id )
|
||||
|
||||
.. ocv:pyfunction:: cv2.getWindowProperty(winname, prop_id) -> retval
|
||||
|
||||
@ -123,7 +123,7 @@ fontQt
|
||||
----------
|
||||
Creates the font to draw a text on an image.
|
||||
|
||||
.. ocv:function:: CvFont fontQt(const string& nameFont, int pointSize = -1, Scalar color = Scalar::all(0), int weight = CV_FONT_NORMAL, int style = CV_STYLE_NORMAL, int spacing = 0)
|
||||
.. ocv:function:: CvFont fontQt(const String& nameFont, int pointSize = -1, Scalar color = Scalar::all(0), int weight = CV_FONT_NORMAL, int style = CV_STYLE_NORMAL, int spacing = 0)
|
||||
|
||||
.. ocv:cfunction:: CvFont cvFontQt(const char* nameFont, int pointSize=-1, CvScalar color=cvScalarAll(0), int weight=CV_FONT_NORMAL, int style=CV_STYLE_NORMAL, int spacing=0)
|
||||
|
||||
@ -169,7 +169,7 @@ addText
|
||||
-----------
|
||||
Creates the font to draw a text on an image.
|
||||
|
||||
.. ocv:function:: void addText( const Mat& img, const string& text, Point org, CvFont font )
|
||||
.. ocv:function:: void addText( const Mat& img, const String& text, Point org, CvFont font )
|
||||
|
||||
.. ocv:cfunction:: void cvAddText( const CvArr* img, const char* text, CvPoint org, CvFont * arg2 )
|
||||
|
||||
@ -195,7 +195,7 @@ displayOverlay
|
||||
------------------
|
||||
Displays a text on a window image as an overlay for a specified duration.
|
||||
|
||||
.. ocv:function:: void displayOverlay( const string& winname, const string& text, int delayms=0 )
|
||||
.. ocv:function:: void displayOverlay( const String& winname, const String& text, int delayms=0 )
|
||||
|
||||
.. ocv:cfunction:: void cvDisplayOverlay(const char* name, const char* text, int delayms = 0)
|
||||
|
||||
@ -212,7 +212,7 @@ displayStatusBar
|
||||
--------------------
|
||||
Displays a text on the window statusbar during the specified period of time.
|
||||
|
||||
.. ocv:function:: void displayStatusBar( const string& winname, const string& text, int delayms=0 )
|
||||
.. ocv:function:: void displayStatusBar( const String& winname, const String& text, int delayms=0 )
|
||||
|
||||
.. ocv:cfunction:: void cvDisplayStatusBar(const char* name, const char* text, int delayms = 0)
|
||||
|
||||
@ -230,7 +230,7 @@ setOpenGlDrawCallback
|
||||
------------------------
|
||||
Sets a callback function to be called to draw on top of displayed image.
|
||||
|
||||
.. ocv:function:: void setOpenGlDrawCallback( const string& winname, OpenGlDrawCallback onOpenGlDraw, void* userdata=0 )
|
||||
.. ocv:function:: void setOpenGlDrawCallback( const String& winname, OpenGlDrawCallback onOpenGlDraw, void* userdata=0 )
|
||||
|
||||
.. ocv:cfunction:: void cvSetOpenGlDrawCallback( const char* window_name, CvOpenGlDrawCallback callback, void* userdata=NULL )
|
||||
|
||||
@ -276,7 +276,7 @@ saveWindowParameters
|
||||
------------------------
|
||||
Saves parameters of the specified window.
|
||||
|
||||
.. ocv:function:: void saveWindowParameters( const string& windowName )
|
||||
.. ocv:function:: void saveWindowParameters( const String& windowName )
|
||||
|
||||
.. ocv:cfunction:: void cvSaveWindowParameters(const char* name)
|
||||
|
||||
@ -289,7 +289,7 @@ loadWindowParameters
|
||||
------------------------
|
||||
Loads parameters of the specified window.
|
||||
|
||||
.. ocv:function:: void loadWindowParameters( const string& windowName )
|
||||
.. ocv:function:: void loadWindowParameters( const String& windowName )
|
||||
|
||||
.. ocv:cfunction:: void cvLoadWindowParameters(const char* name)
|
||||
|
||||
@ -302,7 +302,7 @@ createButton
|
||||
----------------
|
||||
Attaches a button to the control panel.
|
||||
|
||||
.. ocv:function:: int createButton( const string& bar_name, ButtonCallback on_change, void* userdata=NULL, int type=CV_PUSH_BUTTON, bool initial_button_state=0 )
|
||||
.. ocv:function:: int createButton( const String& bar_name, ButtonCallback on_change, void* userdata=NULL, int type=CV_PUSH_BUTTON, bool initial_button_state=0 )
|
||||
|
||||
.. ocv:cfunction:: int cvCreateButton( const char* button_name=NULL, CvButtonCallback on_change=NULL, void* userdata=NULL, int button_type=CV_PUSH_BUTTON, int initial_button_state=0 )
|
||||
|
||||
|
@ -35,7 +35,7 @@ imencode
|
||||
--------
|
||||
Encodes an image into a memory buffer.
|
||||
|
||||
.. ocv:function:: bool imencode( const string& ext, InputArray img, vector<uchar>& buf, const vector<int>& params=vector<int>())
|
||||
.. ocv:function:: bool imencode( const String& ext, InputArray img, vector<uchar>& buf, const vector<int>& params=vector<int>())
|
||||
|
||||
.. ocv:cfunction:: CvMat* cvEncodeImage( const char* ext, const CvArr* image, const int* params=0 )
|
||||
|
||||
@ -59,7 +59,7 @@ imread
|
||||
------
|
||||
Loads an image from a file.
|
||||
|
||||
.. ocv:function:: Mat imread( const string& filename, int flags=1 )
|
||||
.. ocv:function:: Mat imread( const String& filename, int flags=1 )
|
||||
|
||||
.. ocv:pyfunction:: cv2.imread(filename[, flags]) -> retval
|
||||
|
||||
@ -120,7 +120,7 @@ imwrite
|
||||
-----------
|
||||
Saves an image to a specified file.
|
||||
|
||||
.. ocv:function:: bool imwrite( const string& filename, InputArray img, const vector<int>& params=vector<int>() )
|
||||
.. ocv:function:: bool imwrite( const String& filename, InputArray img, const vector<int>& params=vector<int>() )
|
||||
|
||||
.. ocv:pyfunction:: cv2.imwrite(filename, img[, params]) -> retval
|
||||
|
||||
@ -236,7 +236,7 @@ VideoCapture constructors.
|
||||
|
||||
.. ocv:function:: VideoCapture::VideoCapture()
|
||||
|
||||
.. ocv:function:: VideoCapture::VideoCapture(const string& filename)
|
||||
.. ocv:function:: VideoCapture::VideoCapture(const String& filename)
|
||||
|
||||
.. ocv:function:: VideoCapture::VideoCapture(int device)
|
||||
|
||||
@ -260,7 +260,7 @@ VideoCapture::open
|
||||
---------------------
|
||||
Open video file or a capturing device for video capturing
|
||||
|
||||
.. ocv:function:: bool VideoCapture::open(const string& filename)
|
||||
.. ocv:function:: bool VideoCapture::open(const String& filename)
|
||||
.. ocv:function:: bool VideoCapture::open(int device)
|
||||
|
||||
.. ocv:pyfunction:: cv2.VideoCapture.open(filename) -> retval
|
||||
@ -479,7 +479,7 @@ VideoWriter constructors
|
||||
|
||||
.. ocv:function:: VideoWriter::VideoWriter()
|
||||
|
||||
.. ocv:function:: VideoWriter::VideoWriter(const string& filename, int fourcc, double fps, Size frameSize, bool isColor=true)
|
||||
.. ocv:function:: VideoWriter::VideoWriter(const String& filename, int fourcc, double fps, Size frameSize, bool isColor=true)
|
||||
|
||||
.. ocv:pyfunction:: cv2.VideoWriter([filename, fourcc, fps, frameSize[, isColor]]) -> <VideoWriter object>
|
||||
|
||||
@ -517,7 +517,7 @@ VideoWriter::open
|
||||
-----------------
|
||||
Initializes or reinitializes video writer.
|
||||
|
||||
.. ocv:function:: bool VideoWriter::open(const string& filename, int fourcc, double fps, Size frameSize, bool isColor=true)
|
||||
.. ocv:function:: bool VideoWriter::open(const String& filename, int fourcc, double fps, Size frameSize, bool isColor=true)
|
||||
|
||||
.. ocv:pyfunction:: cv2.VideoWriter.open(filename, fourcc, fps, frameSize[, isColor]) -> retval
|
||||
|
||||
|
@ -7,7 +7,7 @@ createTrackbar
|
||||
------------------
|
||||
Creates a trackbar and attaches it to the specified window.
|
||||
|
||||
.. ocv:function:: int createTrackbar( const string& trackbarname, const string& winname, int* value, int count, TrackbarCallback onChange=0, void* userdata=0)
|
||||
.. ocv:function:: int createTrackbar( const String& trackbarname, const String& winname, int* value, int count, TrackbarCallback onChange=0, void* userdata=0)
|
||||
|
||||
.. ocv:cfunction:: int cvCreateTrackbar( const char* trackbar_name, const char* window_name, int* value, int count, CvTrackbarCallback on_change=NULL )
|
||||
|
||||
@ -37,7 +37,7 @@ getTrackbarPos
|
||||
------------------
|
||||
Returns the trackbar position.
|
||||
|
||||
.. ocv:function:: int getTrackbarPos( const string& trackbarname, const string& winname )
|
||||
.. ocv:function:: int getTrackbarPos( const String& trackbarname, const String& winname )
|
||||
|
||||
.. ocv:pyfunction:: cv2.getTrackbarPos(trackbarname, winname) -> retval
|
||||
|
||||
@ -59,7 +59,7 @@ imshow
|
||||
----------
|
||||
Displays an image in the specified window.
|
||||
|
||||
.. ocv:function:: void imshow( const string& winname, InputArray mat )
|
||||
.. ocv:function:: void imshow( const String& winname, InputArray mat )
|
||||
|
||||
.. ocv:pyfunction:: cv2.imshow(winname, mat) -> None
|
||||
|
||||
@ -84,7 +84,7 @@ namedWindow
|
||||
---------------
|
||||
Creates a window.
|
||||
|
||||
.. ocv:function:: void namedWindow( const string& winname, int flags=WINDOW_AUTOSIZE )
|
||||
.. ocv:function:: void namedWindow( const String& winname, int flags=WINDOW_AUTOSIZE )
|
||||
|
||||
.. ocv:pyfunction:: cv2.namedWindow(winname[, flags]) -> None
|
||||
|
||||
@ -119,7 +119,7 @@ destroyWindow
|
||||
-------------
|
||||
Destroys a window.
|
||||
|
||||
.. ocv:function:: void destroyWindow( const string& winname )
|
||||
.. ocv:function:: void destroyWindow( const String& winname )
|
||||
|
||||
.. ocv:pyfunction:: cv2.destroyWindow(winname) -> None
|
||||
|
||||
@ -151,7 +151,7 @@ MoveWindow
|
||||
----------
|
||||
Moves window to the specified position
|
||||
|
||||
.. ocv:function:: void moveWindow( const string& winname, int x, int y )
|
||||
.. ocv:function:: void moveWindow( const String& winname, int x, int y )
|
||||
|
||||
.. ocv:pyfunction:: cv2.moveWindow(winname, x, y) -> None
|
||||
|
||||
@ -170,7 +170,7 @@ ResizeWindow
|
||||
------------
|
||||
Resizes window to the specified size
|
||||
|
||||
.. ocv:function:: void resizeWindow( const string& winname, int width, int height )
|
||||
.. ocv:function:: void resizeWindow( const String& winname, int width, int height )
|
||||
|
||||
.. ocv:pyfunction:: cv2.resizeWindow(winname, width, height) -> None
|
||||
|
||||
@ -195,7 +195,7 @@ SetMouseCallback
|
||||
----------------
|
||||
Sets mouse handler for the specified window
|
||||
|
||||
.. ocv:function:: void setMouseCallback( const string& winname, MouseCallback onMouse, void* userdata=0 )
|
||||
.. ocv:function:: void setMouseCallback( const String& winname, MouseCallback onMouse, void* userdata=0 )
|
||||
|
||||
.. ocv:cfunction:: void cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, void* param=NULL )
|
||||
|
||||
@ -212,7 +212,7 @@ setTrackbarPos
|
||||
------------------
|
||||
Sets the trackbar position.
|
||||
|
||||
.. ocv:function:: void setTrackbarPos( const string& trackbarname, const string& winname, int pos )
|
||||
.. ocv:function:: void setTrackbarPos( const String& trackbarname, const String& winname, int pos )
|
||||
|
||||
.. ocv:pyfunction:: cv2.setTrackbarPos(trackbarname, winname, pos) -> None
|
||||
|
||||
|
@ -22,7 +22,7 @@ Wrapping class for computing descriptors by using the
|
||||
class CalonderDescriptorExtractor : public DescriptorExtractor
|
||||
{
|
||||
public:
|
||||
CalonderDescriptorExtractor( const string& classifierFile );
|
||||
CalonderDescriptorExtractor( const String& classifierFile );
|
||||
|
||||
virtual void read( const FileNode &fn );
|
||||
virtual void write( FileStorage &fs ) const;
|
||||
|
@ -26,7 +26,7 @@ and finding the nearest closest descriptor to an input feature. ::
|
||||
const char* pca_hr_config = 0, const char* pca_desc_config = 0, int pyr_levels = 1,
|
||||
int pca_dim_high = 100, int pca_dim_low = 100);
|
||||
|
||||
OneWayDescriptorBase(CvSize patch_size, int pose_count, const string &pca_filename, const string &train_path = string(), const string &images_list = string(),
|
||||
OneWayDescriptorBase(CvSize patch_size, int pose_count, const String &pca_filename, const String &train_path = String(), const String &images_list = String(),
|
||||
float _scale_min = 0.7f, float _scale_max=1.5f, float _scale_step=1.2f, int pyr_levels = 1,
|
||||
int pca_dim_high = 100, int pca_dim_low = 100);
|
||||
|
||||
@ -160,7 +160,7 @@ and finding the nearest closest descriptor to an input feature. ::
|
||||
void ConvertDescriptorsArrayToTree(); // Converting pca_descriptors array to KD tree
|
||||
|
||||
// GetPCAFilename: get default PCA filename
|
||||
static string GetPCAFilename () { return "pca.yml"; }
|
||||
static String GetPCAFilename () { return "pca.yml"; }
|
||||
|
||||
virtual bool empty() const { return m_train_feature_count <= 0 ? true : false; }
|
||||
|
||||
@ -190,16 +190,16 @@ Wrapping class for computing, matching, and classifying descriptors using the
|
||||
|
||||
Params( int poseCount = POSE_COUNT,
|
||||
Size patchSize = Size(PATCH_WIDTH, PATCH_HEIGHT),
|
||||
string pcaFilename = string(),
|
||||
string trainPath = string(), string trainImagesList = string(),
|
||||
String pcaFilename = String(),
|
||||
String trainPath = String(), String trainImagesList = String(),
|
||||
float minScale = GET_MIN_SCALE(), float maxScale = GET_MAX_SCALE(),
|
||||
float stepScale = GET_STEP_SCALE() );
|
||||
|
||||
int poseCount;
|
||||
Size patchSize;
|
||||
string pcaFilename;
|
||||
string trainPath;
|
||||
string trainImagesList;
|
||||
String pcaFilename;
|
||||
String trainPath;
|
||||
String trainImagesList;
|
||||
|
||||
float minScale, maxScale, stepScale;
|
||||
};
|
||||
@ -330,7 +330,7 @@ Wrapping class for computing, matching, and classifying descriptors using the
|
||||
int compressionMethod=FernClassifier::COMPRESSION_NONE,
|
||||
const PatchGenerator& patchGenerator=PatchGenerator() );
|
||||
|
||||
Params( const string& filename );
|
||||
Params( const String& filename );
|
||||
|
||||
int nclasses;
|
||||
int patchSize;
|
||||
@ -341,7 +341,7 @@ Wrapping class for computing, matching, and classifying descriptors using the
|
||||
int compressionMethod;
|
||||
PatchGenerator patchGenerator;
|
||||
|
||||
string filename;
|
||||
String filename;
|
||||
};
|
||||
|
||||
FernDescriptorMatcher( const Params& params=Params() );
|
||||
|
@ -146,7 +146,7 @@ CascadeClassifier::CascadeClassifier
|
||||
----------------------------------------
|
||||
Loads a classifier from a file.
|
||||
|
||||
.. ocv:function:: CascadeClassifier::CascadeClassifier(const string& filename)
|
||||
.. ocv:function:: CascadeClassifier::CascadeClassifier(const String& filename)
|
||||
|
||||
.. ocv:pyfunction:: cv2.CascadeClassifier([filename]) -> <CascadeClassifier object>
|
||||
|
||||
@ -167,7 +167,7 @@ CascadeClassifier::load
|
||||
---------------------------
|
||||
Loads a classifier from a file.
|
||||
|
||||
.. ocv:function:: bool CascadeClassifier::load(const string& filename)
|
||||
.. ocv:function:: bool CascadeClassifier::load(const String& filename)
|
||||
|
||||
.. ocv:pyfunction:: cv2.CascadeClassifier.load(filename) -> retval
|
||||
|
||||
|
@ -31,7 +31,7 @@ Public interface for soft cascade training algorithm. ::
|
||||
virtual bool train(const Dataset* dataset, const FeaturePool* pool, int weaks, int treeDepth) = 0;
|
||||
virtual void setRejectThresholds(OutputArray thresholds) = 0;
|
||||
virtual void write( cv::FileStorage &fs, const FeaturePool* pool, InputArray thresholds) const = 0;
|
||||
virtual void write( CvFileStorage* fs, string name) const = 0;
|
||||
virtual void write( CvFileStorage* fs, String name) const = 0;
|
||||
|
||||
};
|
||||
|
||||
@ -71,7 +71,7 @@ softcascade::Octave::write
|
||||
--------------------------
|
||||
|
||||
.. ocv:function:: void softcascade::Octave::train(cv::FileStorage &fs, const FeaturePool* pool, InputArray thresholds) const
|
||||
.. ocv:function:: void softcascade::Octave::train( CvFileStorage* fs, string name) const
|
||||
.. ocv:function:: void softcascade::Octave::train( CvFileStorage* fs, String name) const
|
||||
|
||||
:param fs an output file storage to store trained detector.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user