Fixed several mistakes in documentation
This commit is contained in:
parent
5f8715c8b4
commit
b1eba01afb
@ -312,7 +312,7 @@ def process_module(module, path):
|
|||||||
if namespace:
|
if namespace:
|
||||||
name = name[len(namespace) + 1:]
|
name = name[len(namespace) + 1:]
|
||||||
#print namespace, parent, name, fn[0]
|
#print namespace, parent, name, fn[0]
|
||||||
if not namespace and not parent and not name.startswith("cv") and not name.startswith("CV_"):
|
if not namespace and not parent and not name.startswith("cv") and not name.startswith("icv") and not name.startswith("CV_"):
|
||||||
logerror(ERROR_004_MISSEDNAMESPACE, "function " + name + " from opencv_" + module + " is placed in global namespace but violates C-style naming convention")
|
logerror(ERROR_004_MISSEDNAMESPACE, "function " + name + " from opencv_" + module + " is placed in global namespace but violates C-style naming convention")
|
||||||
else:
|
else:
|
||||||
fdescr = (namespace, parent, name, fn)
|
fdescr = (namespace, parent, name, fn)
|
||||||
|
@ -6,7 +6,7 @@ FaceRecognizer
|
|||||||
FaceRecognizer
|
FaceRecognizer
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. ocv:class:: FaceRecognizer
|
.. ocv:class:: FaceRecognizer : public Algorithm
|
||||||
|
|
||||||
All face recognition models in OpenCV are derived from the abstract base class :ocv:class:`FaceRecognizer`, which provides
|
All face recognition models in OpenCV are derived from the abstract base class :ocv:class:`FaceRecognizer`, which provides
|
||||||
a unified access to all face recongition algorithms in OpenCV. ::
|
a unified access to all face recongition algorithms in OpenCV. ::
|
||||||
@ -143,14 +143,8 @@ And finally train it on the given dataset (the face images and labels):
|
|||||||
FaceRecognizer::predict
|
FaceRecognizer::predict
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
.. ocv:function:: int FaceRecognizer::predict(InputArray src) const
|
.. ocv:function:: int FaceRecognizer::predict( InputArray src ) const = 0
|
||||||
|
.. ocv:function:: void FaceRecognizer::predict( InputArray src, int & label, double & confidence ) const = 0
|
||||||
Predicts a label for a given input image.
|
|
||||||
|
|
||||||
:param src: Sample image to get a prediction from.
|
|
||||||
|
|
||||||
|
|
||||||
.. ocv:function:: void predict(InputArray src, int &label, double &confidence) const
|
|
||||||
|
|
||||||
Predicts a label and associated confidence (e.g. distance) for a given input image.
|
Predicts a label and associated confidence (e.g. distance) for a given input image.
|
||||||
|
|
||||||
@ -219,8 +213,8 @@ FaceRecognizer::load
|
|||||||
|
|
||||||
Loads a :ocv:class:`FaceRecognizer` and its model state.
|
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(FileStorage& fs)
|
.. ocv:function:: void FaceRecognizer::load( const FileStorage& fs ) = 0
|
||||||
|
|
||||||
Loads a persisted model and state from a given XML or YAML file . Every
|
Loads a persisted model and state from a given XML or YAML file . Every
|
||||||
:ocv:class:`FaceRecognizer` has to overwrite ``FaceRecognizer::load(FileStorage& fs)``
|
:ocv:class:`FaceRecognizer` has to overwrite ``FaceRecognizer::load(FileStorage& fs)``
|
||||||
|
@ -931,7 +931,7 @@ namespace cv
|
|||||||
virtual int predict(InputArray src) const = 0;
|
virtual int predict(InputArray src) const = 0;
|
||||||
|
|
||||||
// Predicts the label and confidence for a given sample.
|
// Predicts the label and confidence for a given sample.
|
||||||
CV_WRAP virtual void predict(InputArray src, CV_OUT int &label, CV_OUT double &dist) const = 0;
|
CV_WRAP virtual void predict(InputArray src, CV_OUT int &label, CV_OUT double &confidence) const = 0;
|
||||||
|
|
||||||
// Serializes this object to a given filename.
|
// Serializes this object to a given filename.
|
||||||
CV_WRAP virtual void save(const string& filename) const;
|
CV_WRAP virtual void save(const string& filename) const;
|
||||||
@ -970,7 +970,7 @@ namespace cv
|
|||||||
|
|
||||||
CV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, int colormap);
|
CV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, int colormap);
|
||||||
|
|
||||||
CV_EXPORTS_W bool initModule_contrib();
|
CV_EXPORTS bool initModule_contrib();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "opencv2/contrib/retina.hpp"
|
#include "opencv2/contrib/retina.hpp"
|
||||||
|
@ -968,7 +968,7 @@ Smoothes an image using a Gaussian filter.
|
|||||||
|
|
||||||
.. ocv:function:: void GaussianBlur( InputArray src, OutputArray dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT )
|
.. ocv:function:: void GaussianBlur( InputArray src, OutputArray dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT )
|
||||||
|
|
||||||
.. ocv:pyfunction:: cv2.GaussianBlur(src, ksize, sigma1[, dst[, sigma2[, borderType]]]) -> dst
|
.. ocv:pyfunction:: cv2.GaussianBlur(src, ksize, sigmaX[, dst[, sigmaY[, borderType]]]) -> dst
|
||||||
|
|
||||||
:param src: Source image. The image can have any number of channels, which are processed independently. The depth should be ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32F`` or ``CV_64F``.
|
:param src: Source image. The image can have any number of channels, which are processed independently. The depth should be ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32F`` or ``CV_64F``.
|
||||||
|
|
||||||
|
@ -47,6 +47,8 @@ params_mapping = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
known_text_sections_names = ["Appendix", "Results", "Prerequisites", "Introduction", "Description"]
|
||||||
|
|
||||||
class DeclarationParser(object):
|
class DeclarationParser(object):
|
||||||
def __init__(self, line=None):
|
def __init__(self, line=None):
|
||||||
if line is None:
|
if line is None:
|
||||||
@ -146,7 +148,7 @@ class RstParser(object):
|
|||||||
self.sections_total += 1
|
self.sections_total += 1
|
||||||
# skip sections having whitespace in name
|
# skip sections having whitespace in name
|
||||||
#if section_name.find(" ") >= 0 and section_name.find("::operator") < 0:
|
#if section_name.find(" ") >= 0 and section_name.find("::operator") < 0:
|
||||||
if section_name.find(" ") >= 0 and not bool(re.match(r"(\w+::)*operator\s*(\w+|>>|<<|\(\)|->|\+\+|--|=|==|\+=|-=)", section_name)):
|
if (section_name.find(" ") >= 0 and not bool(re.match(r"(\w+::)*operator\s*(\w+|>>|<<|\(\)|->|\+\+|--|=|==|\+=|-=)", section_name)) ) or section_name.endswith(":"):
|
||||||
if show_errors:
|
if show_errors:
|
||||||
print >> sys.stderr, "RST parser warning W%03d: SKIPPED: \"%s\" File: %s:%s" % (WARNING_002_HDRWHITESPACE, section_name, file_name, lineno)
|
print >> sys.stderr, "RST parser warning W%03d: SKIPPED: \"%s\" File: %s:%s" % (WARNING_002_HDRWHITESPACE, section_name, file_name, lineno)
|
||||||
self.sections_skipped += 1
|
self.sections_skipped += 1
|
||||||
@ -306,7 +308,11 @@ class RstParser(object):
|
|||||||
if verbose:
|
if verbose:
|
||||||
self.print_info(func)
|
self.print_info(func)
|
||||||
elif func:
|
elif func:
|
||||||
|
if func["name"] in known_text_sections_names:
|
||||||
if show_errors:
|
if show_errors:
|
||||||
|
print >> sys.stderr, "RST parser warning W%03d: SKIPPED: \"%s\" File: %s:%s" % (WARNING_002_HDRWHITESPACE, section_name, file_name, lineno)
|
||||||
|
self.sections_skipped += 1
|
||||||
|
elif show_errors:
|
||||||
self.print_info(func, True, sys.stderr)
|
self.print_info(func, True, sys.stderr)
|
||||||
|
|
||||||
def parse_rst_file(self, module_name, doc):
|
def parse_rst_file(self, module_name, doc):
|
||||||
@ -336,7 +342,7 @@ class RstParser(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
ll = l.rstrip()
|
ll = l.rstrip()
|
||||||
if len(prev_line) > 0 and len(ll) >= len(prev_line) and ll == "-" * len(ll):
|
if len(prev_line) > 0 and len(ll) >= len(prev_line) and (ll == "-" * len(ll) or ll == "+" * len(ll)):
|
||||||
# new function candidate
|
# new function candidate
|
||||||
if len(lines) > 1:
|
if len(lines) > 1:
|
||||||
self.parse_section_safe(module_name, fname, doc, flineno, lines[:len(lines)-1])
|
self.parse_section_safe(module_name, fname, doc, flineno, lines[:len(lines)-1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user