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
dfe7708f
Commit
dfe7708f
authored
Jul 11, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved javadoc comments generation scripts; fixed some typos in documentation
parent
eea62ca6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
+21
-13
reading_and_writing_images_and_video.rst
modules/highgui/doc/reading_and_writing_images_and_video.rst
+6
-6
filtering.rst
modules/imgproc/doc/filtering.rst
+1
-1
gen_javadoc.py
modules/java/gen_javadoc.py
+14
-6
rst_parser.py
modules/java/rst_parser.py
+0
-0
No files found.
modules/highgui/doc/reading_and_writing_images_and_video.rst
View file @
dfe7708f
...
...
@@ -218,7 +218,7 @@ Closes video file or capturing device.
.. ocv:pyfunction:: cv2.VideoCapture.release()
.. ocv:cfunction: void cvReleaseCapture(CvCapture** capture)
.. ocv:cfunction:
:
void cvReleaseCapture(CvCapture** capture)
The methods are automatically called by subsequent :ocv:func:`VideoCapture::open` and by ``VideoCapture`` destructor.
...
...
@@ -233,7 +233,7 @@ Grabs the next frame from video file or capturing device.
.. ocv:pyfunction:: cv2.VideoCapture.grab() -> successFlag
.. ocv:cfunction: int cvGrabFrame(CvCapture* capture)
.. ocv:cfunction:
:
int cvGrabFrame(CvCapture* capture)
.. ocv:pyoldfunction:: cv.GrabFrame(capture) -> int
...
...
@@ -252,7 +252,7 @@ Decodes and returns the grabbed video frame.
.. ocv:pyfunction:: cv2.VideoCapture.retrieve([image[, channel]]) -> successFlag, image
.. ocv:cfunction: IplImage* cvRetrieveFrame(CvCapture* capture)
.. ocv:cfunction:
:
IplImage* cvRetrieveFrame(CvCapture* capture)
.. ocv:pyoldfunction:: cv.RetrieveFrame(capture) -> iplimage
...
...
@@ -271,7 +271,7 @@ Grabs, decodes and returns the next video frame.
.. ocv:pyfunction:: cv2.VideoCapture.read([image]) -> successFlag, image
.. ocv:cfunction: IplImage* cvQueryFrame(CvCapture* capture)
.. ocv:cfunction:
:
IplImage* cvQueryFrame(CvCapture* capture)
.. ocv:pyoldfunction:: cv.QueryFrame(capture) -> iplimage
...
...
@@ -444,7 +444,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
...
...
@@ -455,7 +455,7 @@ VideoWriter::isOpened
---------------------
Returns true if video writer has been successfully initialized.
.. ocv:function: bool VideoWriter::isOpened()
.. ocv:function:
:
bool VideoWriter::isOpened()
.. ocv:pyfunction:: cv2.VideoWriter.isOpened() -> retval
...
...
modules/imgproc/doc/filtering.rst
View file @
dfe7708f
...
...
@@ -1537,7 +1537,7 @@ The second case corresponds to a kernel of:
.. seealso::
:ocv:func:`Scharr`,
:ocv:func:`Lapacian`,
:ocv:func:`Lap
l
acian`,
:ocv:func:`sepFilter2D`,
:ocv:func:`filter2D`,
:ocv:func:`GaussianBlur`
...
...
modules/java/gen_javadoc.py
View file @
dfe7708f
...
...
@@ -23,7 +23,7 @@ def document(infile, outfile, decls):
marker
=
parceJavadocMarker
(
l
)
decl
=
decls
.
get
(
marker
[
0
],
None
)
if
decl
:
for
line
in
makeJavadoc
(
decl
,
marker
[
2
])
.
split
(
"
\n
"
):
for
line
in
makeJavadoc
(
decl
,
decls
,
marker
[
2
])
.
split
(
"
\n
"
):
outf
.
write
(
marker
[
1
]
+
line
+
"
\n
"
)
else
:
print
"Error: could not find documentation for
%
s"
%
l
.
lstrip
()[
len
(
javadoc_marker
):
-
1
]
...
...
@@ -50,12 +50,12 @@ def ReformatForJavadoc(s):
pos_end
=
min
(
77
,
len
(
term
)
-
1
)
while
pos_start
<
pos_end
:
if
pos_end
-
pos_start
==
77
:
while
pos_end
>=
pos_start
:
while
pos_end
>=
pos_start
+
60
:
if
not
term
[
pos_end
]
.
isspace
():
pos_end
-=
1
else
:
break
if
pos_end
<
pos_start
:
if
pos_end
<
pos_start
+
60
:
pos_end
=
min
(
pos_start
+
77
,
len
(
term
)
-
1
)
while
pos_end
<
len
(
term
):
if
not
term
[
pos_end
]
.
isspace
():
...
...
@@ -72,6 +72,8 @@ def getJavaName(decl):
name
+=
decl
[
"module"
]
if
"class"
in
decl
:
name
+=
"."
+
decl
[
"class"
]
else
:
name
+=
"."
+
decl
[
"module"
]
.
capitalize
()
if
"method"
in
decl
:
name
+=
"."
+
decl
[
"method"
]
return
name
...
...
@@ -84,7 +86,7 @@ def getDocURL(decl):
url
+=
"#"
+
decl
[
"name"
]
.
replace
(
"::"
,
"-"
)
.
replace
(
"()"
,
""
)
.
replace
(
"="
,
""
)
.
strip
()
.
rstrip
(
"_"
)
.
replace
(
" "
,
"-"
)
.
replace
(
"_"
,
"-"
)
.
lower
()
return
url
def
makeJavadoc
(
decl
,
args
=
None
):
def
makeJavadoc
(
decl
,
decls
,
args
=
None
):
doc
=
""
prefix
=
"/**
\n
"
...
...
@@ -130,7 +132,11 @@ def makeJavadoc(decl, args = None):
# other links
if
"seealso"
in
decl
:
for
see
in
decl
[
"seealso"
]:
doc
+=
prefix
+
" * @see "
+
see
.
replace
(
"::"
,
"."
)
+
"
\n
"
seedecl
=
decls
.
get
(
see
,
None
)
if
seedecl
:
doc
+=
prefix
+
" * @see "
+
getJavaName
(
seedecl
)
+
"
\n
"
else
:
doc
+=
prefix
+
" * @see "
+
see
.
replace
(
"::"
,
"."
)
+
"
\n
"
prefix
=
" *
\n
"
#doc += prefix + " * File: " + decl["file"] + " (line " + str(decl["line"]) + ")\n"
...
...
@@ -155,9 +161,11 @@ if __name__ == "__main__":
print
"Parsing documentation..."
for
m
in
[
"core"
,
"flann"
,
"imgproc"
,
"ml"
,
"highgui"
,
"video"
,
"features2d"
,
"calib3d"
,
"objdetect"
,
"legacy"
,
"contrib"
,
"gpu"
,
"androidcamera"
,
"haartraining"
,
"java"
,
"python"
,
"stitching"
,
"traincascade"
,
"ts"
]:
parser
.
parse
(
m
,
os
.
path
.
join
(
selfpath
,
"../"
+
m
))
parser
.
printSummary
()
for
i
in
range
(
1
,
len
(
sys
.
argv
)):
folder
=
os
.
path
.
abspath
(
sys
.
argv
[
i
])
for
jfile
in
glob
.
glob
(
os
.
path
.
join
(
folder
,
"*.java"
))
:
for
jfile
in
[
f
for
f
in
glob
.
glob
(
os
.
path
.
join
(
folder
,
"*.java"
))
if
not
f
.
endswith
(
"-jdoc.java"
)]
:
outfile
=
os
.
path
.
abspath
(
os
.
path
.
basename
(
jfile
)
.
replace
(
".java"
,
"-jdoc.java"
))
document
(
jfile
,
outfile
,
parser
.
definitions
)
modules/java/rst_parser.py
View file @
dfe7708f
This diff is collapsed.
Click to expand it.
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