Commit 0e9405e5 authored by Andrey Kamaev's avatar Andrey Kamaev

Honor resently added functionality in hdr_parser and rst_parser; minor fixes in documentation

parent dc5c7ee6
......@@ -179,6 +179,10 @@ div.body p, div.body dd, div.body li {
margin-bottom: 1em;
}
div.toctree-wrapper li, ul.simple li {
margin:0;
}
div.body h1,
div.body h2,
div.body h3,
......
......@@ -31,7 +31,7 @@ doc_signatures_whitelist = [
# templates
"Matx", "Vec", "SparseMat_", "Scalar_", "Mat_", "Ptr", "Size_", "Point_", "Rect_", "Point3_",
"DataType", "detail::RotationWarperBase", "flann::Index_", "CalonderDescriptorExtractor",
"gpu::DevMem2D_", "gpu::PtrStep_", "gpu::PtrElemStep_",
"gpu::PtrStepSz", "gpu::PtrStep", "gpu::PtrElemStep_",
# black boxes
"CvArr", "CvFileStorage",
# other
......@@ -191,7 +191,7 @@ def process_module(module, path):
hdrlist.append(os.path.join(root, filename))
if module == "gpu":
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "devmem2d.hpp"))
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "cuda_devptrs.hpp"))
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "gpumat.hpp"))
decls = []
......
......@@ -121,7 +121,7 @@ FaceRecognizer::train
Trains a FaceRecognizer with given data and associated labels.
.. ocv:function:: void FaceRecognizer::train(InputArray src, InputArray labels)
.. ocv:function:: void FaceRecognizer::train( InputArrayOfArrays src, InputArray labels ) = 0
:param src: The training images, that means the faces you want to learn. The data has to be given as a ``vector<Mat>``.
......@@ -166,7 +166,7 @@ FaceRecognizer::update
Updates a FaceRecognizer with given data and associated labels.
.. ocv:function:: void FaceRecognizer::update(InputArray src, InputArray labels)
.. ocv:function:: void FaceRecognizer::update( InputArrayOfArrays src, InputArray labels )
:param src: The training images, that means the faces you want to learn. The data has to be given as a ``vector<Mat>``.
......
This diff is collapsed.
......@@ -222,7 +222,7 @@ protected:
void getLikelihoods(const Mat& queryImgDescriptor, const vector<
Mat>& testImgDescriptors, vector<IMatch>& matches);
//procomputed data
//precomputed data
int (*table)[8];
//data precision
......
......@@ -821,10 +821,10 @@ Performs linear blending of two images.
gpu::bilateralFilter
-------------------
--------------------
Performs bilateral filtering of passed image
.. ocv:function:: void gpu::bilateralFilter(const GpuMat& src, GpuMat& dst, int kernel_size, float sigma_color, float sigma_spatial, int borderMode, Stream& stream = Stream::Null());
.. ocv:function:: void gpu::bilateralFilter(const GpuMat& src, GpuMat& dst, int kernel_size, float sigma_color, float sigma_spatial, int borderMode, Stream& stream = Stream::Null())
:param src: Source image. Supports only (channles != 2 && depth() != CV_8S && depth() != CV_32S && depth() != CV_64F).
......@@ -849,7 +849,7 @@ gpu::nonLocalMeans
-------------------
Performs pure non local means denoising without any simplification, and thus it is not fast.
.. ocv:function:: void nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, int search_widow_size = 11, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null());
.. ocv:function:: void nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, int search_widow_size = 11, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null())
:param src: Source image. Supports only CV_8UC1, CV_8UC3.
......
import os, sys, re, string, fnmatch
allmodules = ["core", "flann", "imgproc", "ml", "highgui", "video", "features2d", "calib3d", "objdetect", "legacy", "contrib", "gpu", "androidcamera", "java", "python", "stitching", "ts", "photo", "nonfree", "videostab"]
allmodules = ["core", "flann", "imgproc", "ml", "highgui", "video", "features2d", "calib3d", "objdetect", "legacy", "contrib", "gpu", "androidcamera", "java", "python", "stitching", "ts", "photo", "nonfree", "videostab", "ocl"]
verbose = False
show_warnings = True
show_errors = True
......@@ -342,7 +342,7 @@ class RstParser(object):
continue
ll = l.rstrip()
if len(prev_line) > 0 and len(ll) >= len(prev_line) and (ll == "-" * len(ll) or ll == "+" * len(ll)):
if len(prev_line) > 0 and len(ll) >= len(prev_line) and (ll == "-" * len(ll) or ll == "+" * len(ll) or ll == "=" * len(ll)):
# new function candidate
if len(lines) > 1:
self.parse_section_safe(module_name, fname, doc, flineno, lines[:len(lines)-1])
......
......@@ -155,6 +155,8 @@ class CppHeaderParser(object):
elif angle_stack:
arg_type += w
angle_stack[-1] += 1
elif arg_type == "struct":
arg_type += " " + w
elif arg_type and arg_type != "~":
arg_name = " ".join(word_list[wi:])
break
......@@ -429,7 +431,7 @@ class CppHeaderParser(object):
decl_start = decl_start[0:-2].rstrip() + " ()"
# constructor/destructor case
if bool(re.match(r'(\w+::)*(?P<x>\w+)::~?(?P=x)', decl_start)):
if bool(re.match(r'^(\w+::)*(?P<x>\w+)::~?(?P=x)$', decl_start)):
decl_start = "void " + decl_start
rettype, funcname, modlist, argno = self.parse_arg(decl_start, -1)
......@@ -441,10 +443,14 @@ class CppHeaderParser(object):
else:
if bool(re.match('\w+\s+\(\*\w+\)\s*\(.*\)', decl_str)):
return [] # function typedef
elif bool(re.match('\w+\s+\(\w+::\*\w+\)\s*\(.*\)', decl_str)):
return [] # class method typedef
elif bool(re.match('[A-Z_]+', decl_start)):
return [] # it seems to be a macro instantiation
elif "__declspec" == decl_start:
return []
elif bool(re.match(r'\w+\s+\(\*\w+\)\[\d+\]', decl_str)):
return [] # exotic - dynamic 2d array
else:
#print rettype, funcname, modlist, argno
print "Error at %s:%d the function/method name is missing: '%s'" % (self.hname, self.lineno, decl_start)
......@@ -799,6 +805,10 @@ class CppHeaderParser(object):
stmt = " ".join(stmt.split()) # normalize the statement
stack_top = self.block_stack[-1]
if stmt.startswith("@"):
# Objective C ?
break
decl = None
if stack_top[self.PROCESS_FLAG]:
# even if stack_top[PUBLIC_SECTION] is False, we still try to process the statement,
......@@ -850,5 +860,7 @@ if __name__ == '__main__':
decls = []
for hname in opencv_hdr_list:
decls += parser.parse(hname)
#for hname in sys.argv[1:]:
#decls += parser.parse(hname, wmode=False)
parser.print_decls(decls)
print len(decls)
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