diff --git a/modules/contrib/doc/facerec/colormaps.rst b/modules/contrib/doc/facerec/colormaps.rst index beba413fd..95750ab5c 100644 --- a/modules/contrib/doc/facerec/colormaps.rst +++ b/modules/contrib/doc/facerec/colormaps.rst @@ -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 diff --git a/modules/contrib/doc/facerec/facerec_api.rst b/modules/contrib/doc/facerec/facerec_api.rst index c797d6d68..e16d15e62 100644 --- a/modules/contrib/doc/facerec/facerec_api.rst +++ b/modules/contrib/doc/facerec/facerec_api.rst @@ -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 diff --git a/modules/core/doc/basic_structures.rst b/modules/core/doc/basic_structures.rst index 715fafb9a..2d0faf2c6 100644 --- a/modules/core/doc/basic_structures.rst +++ b/modules/core/doc/basic_structures.rst @@ -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& value) -.. ocv:function:: void Algorithm::set(const string& name, const Ptr& 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& value) +.. ocv:function:: void Algorithm::set(const String& name, const Ptr& 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 Ptr<_Tp> Algorithm::create(const string& name) +.. ocv:function:: template Ptr<_Tp> Algorithm::create(const String& name) :param name: The algorithm name, one of the names returned by ``Algorithm::getList()``. diff --git a/modules/core/doc/command_line_parser.rst b/modules/core/doc/command_line_parser.rst index b7b02f9d2..64c72020a 100644 --- a/modules/core/doc/command_line_parser.rst +++ b/modules/core/doc/command_line_parser.rst @@ -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: diff --git a/modules/core/doc/drawing_functions.rst b/modules/core/doc/drawing_functions.rst index 6c0ac4b35..f821fc44e 100644 --- a/modules/core/doc/drawing_functions.rst +++ b/modules/core/doc/drawing_functions.rst @@ -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 diff --git a/modules/core/doc/utility_and_system_functions_and_macros.rst b/modules/core/doc/utility_and_system_functions_and_macros.rst index ca5fe5ea4..16038e0a4 100644 --- a/modules/core/doc/utility_and_system_functions_and_macros.rst +++ b/modules/core/doc/utility_and_system_functions_and_macros.rst @@ -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. diff --git a/modules/core/doc/xml_yaml_persistence.rst b/modules/core/doc/xml_yaml_persistence.rst index 4a62e328f..b3938b75c 100644 --- a/modules/core/doc/xml_yaml_persistence.rst +++ b/modules/core/doc/xml_yaml_persistence.rst @@ -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`. diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst b/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst index 63e56f678..a1ac7b95e 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst @@ -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 create( const string& descriptorExtractorType ); + static Ptr create( const String& descriptorExtractorType ); protected: ... @@ -70,7 +70,7 @@ DescriptorExtractor::create ------------------------------- Creates a descriptor extractor by name. -.. ocv:function:: Ptr DescriptorExtractor::create( const string& descriptorExtractorType ) +.. ocv:function:: Ptr DescriptorExtractor::create( const String& descriptorExtractorType ) :param descriptorExtractorType: Descriptor extractor type. diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst index 8596ae43d..bdd834c5b 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst @@ -88,7 +88,7 @@ with an image set. :: virtual Ptr clone( bool emptyTrainData=false ) const = 0; - static Ptr create( const string& descriptorMatcherType ); + static Ptr create( const String& descriptorMatcherType ); protected: vector 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::create( const string& descriptorMatcherType ) +.. ocv:function:: Ptr DescriptorMatcher::create( const String& descriptorMatcherType ) :param descriptorMatcherType: Descriptor matcher type. Now the following matcher types are supported: diff --git a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst index 81c72d3a8..fe52bbe28 100644 --- a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst +++ b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst @@ -88,7 +88,7 @@ Abstract base class for 2D image feature detectors. :: virtual void read(const FileNode&); virtual void write(FileStorage&) const; - static Ptr create( const string& detectorType ); + static Ptr create( const String& detectorType ); protected: ... @@ -116,7 +116,7 @@ FeatureDetector::create ----------------------- Creates a feature detector by its name. -.. ocv:function:: Ptr FeatureDetector::create( const string& detectorType ) +.. ocv:function:: Ptr 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 clone() const = 0; - static Ptr create( const string& detectorType ); + static Ptr create( const String& detectorType ); }; @@ -500,7 +500,7 @@ AdjusterAdapter::create ----------------------- Creates an adjuster adapter by name -.. ocv:function:: Ptr AdjusterAdapter::create( const string& detectorType ) +.. ocv:function:: Ptr 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. diff --git a/modules/gpu/doc/initalization_and_information.rst b/modules/gpu/doc/initalization_and_information.rst index fc7236dcf..ed34541bf 100644 --- a/modules/gpu/doc/initalization_and_information.rst +++ b/modules/gpu/doc/initalization_and_information.rst @@ -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 diff --git a/modules/gpu/doc/object_detection.rst b/modules/gpu/doc/object_detection.rst index fd0ac867e..010124410 100644 --- a/modules/gpu/doc/object_detection.rst +++ b/modules/gpu/doc/object_detection.rst @@ -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. diff --git a/modules/highgui/doc/qt_new_functions.rst b/modules/highgui/doc/qt_new_functions.rst index bd889db8a..671b55823 100644 --- a/modules/highgui/doc/qt_new_functions.rst +++ b/modules/highgui/doc/qt_new_functions.rst @@ -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 ) diff --git a/modules/highgui/doc/reading_and_writing_images_and_video.rst b/modules/highgui/doc/reading_and_writing_images_and_video.rst index d1829a01d..178026c0b 100644 --- a/modules/highgui/doc/reading_and_writing_images_and_video.rst +++ b/modules/highgui/doc/reading_and_writing_images_and_video.rst @@ -35,7 +35,7 @@ imencode -------- Encodes an image into a memory buffer. -.. ocv:function:: bool imencode( const string& ext, InputArray img, vector& buf, const vector& params=vector()) +.. ocv:function:: bool imencode( const String& ext, InputArray img, vector& buf, const vector& params=vector()) .. 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& params=vector() ) +.. ocv:function:: bool imwrite( const String& filename, InputArray img, const vector& params=vector() ) .. 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]]) -> @@ -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 diff --git a/modules/highgui/doc/user_interface.rst b/modules/highgui/doc/user_interface.rst index def8451a2..ad960100c 100644 --- a/modules/highgui/doc/user_interface.rst +++ b/modules/highgui/doc/user_interface.rst @@ -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 diff --git a/modules/legacy/doc/common_interfaces_of_descriptor_extractors.rst b/modules/legacy/doc/common_interfaces_of_descriptor_extractors.rst index dc5d81db3..f13f742f1 100644 --- a/modules/legacy/doc/common_interfaces_of_descriptor_extractors.rst +++ b/modules/legacy/doc/common_interfaces_of_descriptor_extractors.rst @@ -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; diff --git a/modules/legacy/doc/common_interfaces_of_generic_descriptor_matchers.rst b/modules/legacy/doc/common_interfaces_of_generic_descriptor_matchers.rst index a2abfa3e4..3c3835937 100644 --- a/modules/legacy/doc/common_interfaces_of_generic_descriptor_matchers.rst +++ b/modules/legacy/doc/common_interfaces_of_generic_descriptor_matchers.rst @@ -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() ); diff --git a/modules/objdetect/doc/cascade_classification.rst b/modules/objdetect/doc/cascade_classification.rst index 60b9a2696..2809ab32b 100644 --- a/modules/objdetect/doc/cascade_classification.rst +++ b/modules/objdetect/doc/cascade_classification.rst @@ -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]) -> @@ -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 diff --git a/modules/softcascade/doc/softcascade_training.rst b/modules/softcascade/doc/softcascade_training.rst index 0d19bd622..fe829c54c 100644 --- a/modules/softcascade/doc/softcascade_training.rst +++ b/modules/softcascade/doc/softcascade_training.rst @@ -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.