Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
b1eba01a
Commit
b1eba01a
authored
Jul 05, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed several mistakes in documentation
parent
5f8715c8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
26 deletions
+26
-26
check_docs2.py
doc/check_docs2.py
+1
-1
colormaps.rst
modules/contrib/doc/facerec/colormaps.rst
+7
-7
facerec_api.rst
modules/contrib/doc/facerec/facerec_api.rst
+5
-11
facerec_tutorial.rst
modules/contrib/doc/facerec/facerec_tutorial.rst
+0
-0
contrib.hpp
modules/contrib/include/opencv2/contrib/contrib.hpp
+2
-2
filtering.rst
modules/imgproc/doc/filtering.rst
+1
-1
rst_parser.py
modules/java/generator/rst_parser.py
+10
-4
No files found.
doc/check_docs2.py
View file @
b1eba01a
...
...
@@ -312,7 +312,7 @@ def process_module(module, path):
if
namespace
:
name
=
name
[
len
(
namespace
)
+
1
:]
#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"
)
else
:
fdescr
=
(
namespace
,
parent
,
name
,
fn
)
...
...
modules/contrib/doc/facerec/colormaps.rst
View file @
b1eba01a
...
...
@@ -7,7 +7,7 @@ applyColorMap
Trains a FaceRecognizer with given data and associated labels.
.. ocv:function:: void applyColorMap(InputArray src, OutputArray dst, int colormap)
:param src: The source image, grayscale or colored does not matter.
:param dst: The result is the colormapped source image. Note: :ocv:func:`Mat::create` is called on dst.
:param colormap: The colormap to apply, see the list of available colormaps below.
...
...
@@ -55,10 +55,10 @@ In OpenCV 2.4 you only need :ocv:func:`applyColorMap` to apply a colormap on a g
if (argc > 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
// thrown if the path to the image is invalid.
if(!filename.empty()) {
// 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
// thrown if the path to the image is invalid.
if(!filename.empty()) {
Mat img0 = imread(filename);
// Throw an exception, if the image can't be read:
if(img0.empty()) {
...
...
@@ -71,9 +71,9 @@ In OpenCV 2.4 you only need :ocv:func:`applyColorMap` to apply a colormap on a g
// Show the result:
imshow("cm_img0", cm_img0);
waitKey(0);
}
}
return 0;
return 0;
}
And here are the color scales for each of the available colormaps:
...
...
modules/contrib/doc/facerec/facerec_api.rst
View file @
b1eba01a
...
...
@@ -6,7 +6,7 @@ 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
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
-----------------------
.. ocv:function:: int FaceRecognizer::predict(InputArray src) const
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
.. 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 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.
.. ocv:function:: void FaceRecognizer::load(
const string& filename
)
.. ocv:function:: void FaceRecognizer::load(
FileStorage& fs)
.. 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)``
...
...
modules/contrib/doc/facerec/facerec_tutorial.rst
View file @
b1eba01a
This diff is collapsed.
Click to expand it.
modules/contrib/include/opencv2/contrib/contrib.hpp
View file @
b1eba01a
...
...
@@ -931,7 +931,7 @@ namespace cv
virtual
int
predict
(
InputArray
src
)
const
=
0
;
// 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.
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
bool
initModule_contrib
();
CV_EXPORTS
bool
initModule_contrib
();
}
#include "opencv2/contrib/retina.hpp"
...
...
modules/imgproc/doc/filtering.rst
View file @
b1eba01a
...
...
@@ -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:pyfunction:: cv2.GaussianBlur(src, ksize, sigma
1[, dst[, sigma2
[, borderType]]]) -> dst
.. ocv:pyfunction:: cv2.GaussianBlur(src, ksize, sigma
X[, 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``.
...
...
modules/java/generator/rst_parser.py
View file @
b1eba01a
...
...
@@ -47,6 +47,8 @@ params_mapping = {
}
}
known_text_sections_names
=
[
"Appendix"
,
"Results"
,
"Prerequisites"
,
"Introduction"
,
"Description"
]
class
DeclarationParser
(
object
):
def
__init__
(
self
,
line
=
None
):
if
line
is
None
:
...
...
@@ -130,7 +132,7 @@ class RstParser(object):
for
root
,
dirs
,
files
in
os
.
walk
(
os
.
path
.
join
(
module_path
,
"doc"
)):
for
filename
in
fnmatch
.
filter
(
files
,
"*.rst"
):
doclist
.
append
(
os
.
path
.
join
(
root
,
filename
))
for
doc
in
doclist
:
self
.
parse_rst_file
(
module_name
,
doc
)
...
...
@@ -146,7 +148,7 @@ class RstParser(object):
self
.
sections_total
+=
1
# skip sections having whitespace in name
#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
:
print
>>
sys
.
stderr
,
"RST parser warning W
%03
d: SKIPPED:
\"
%
s
\"
File:
%
s:
%
s"
%
(
WARNING_002_HDRWHITESPACE
,
section_name
,
file_name
,
lineno
)
self
.
sections_skipped
+=
1
...
...
@@ -306,7 +308,11 @@ class RstParser(object):
if
verbose
:
self
.
print_info
(
func
)
elif
func
:
if
show_errors
:
if
func
[
"name"
]
in
known_text_sections_names
:
if
show_errors
:
print
>>
sys
.
stderr
,
"RST parser warning W
%03
d: 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
)
def
parse_rst_file
(
self
,
module_name
,
doc
):
...
...
@@ -336,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
):
if
len
(
prev_line
)
>
0
and
len
(
ll
)
>=
len
(
prev_line
)
and
(
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
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment