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
b2cff440
Commit
b2cff440
authored
Jun 04, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11682 from alalek:fix_pylint
parents
9c2b924d
dcb9bc25
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
10 deletions
+10
-10
test_misc.py
modules/python/test/test_misc.py
+3
-3
object_detection.py
samples/dnn/object_detection.py
+1
-1
calibrate.py
samples/python/calibrate.py
+1
-1
camera_calibration_show_extrinsics.py
samples/python/camera_calibration_show_extrinsics.py
+1
-1
EqualizeHist_Demo.py
...rams_Matching/histogram_equalization/EqualizeHist_Demo.py
+1
-1
smoothing.py
samples/python/tutorial_code/imgProc/Smoothing/smoothing.py
+1
-1
threshold.py
samples/python/tutorial_code/imgProc/threshold/threshold.py
+1
-1
threshold_inRange.py
...orial_code/imgProc/threshold_inRange/threshold_inRange.py
+1
-1
No files found.
modules/python/test/test_misc.py
View file @
b2cff440
...
...
@@ -23,7 +23,7 @@ class Bindings(NewOpenCVTests):
try
:
cv
.
imshow
(
""
,
None
)
# This causes an assert
self
.
assertEqual
(
"Dead code"
,
0
)
except
cv
.
error
as
e
:
except
cv
.
error
as
_
e
:
pass
handler_called
=
[
False
]
...
...
@@ -34,7 +34,7 @@ class Bindings(NewOpenCVTests):
try
:
cv
.
imshow
(
""
,
None
)
# This causes an assert
self
.
assertEqual
(
"Dead code"
,
0
)
except
cv
.
error
as
e
:
except
cv
.
error
as
_
e
:
self
.
assertEqual
(
handler_called
[
0
],
True
)
pass
...
...
@@ -42,7 +42,7 @@ class Bindings(NewOpenCVTests):
try
:
cv
.
imshow
(
""
,
None
)
# This causes an assert
self
.
assertEqual
(
"Dead code"
,
0
)
except
cv
.
error
as
e
:
except
cv
.
error
as
_
e
:
pass
...
...
samples/dnn/object_detection.py
View file @
b2cff440
...
...
@@ -174,7 +174,7 @@ while cv.waitKey(1) < 0:
net
.
setInput
(
blob
)
if
net
.
getLayer
(
0
)
.
outputNameToIndex
(
'im_info'
)
!=
-
1
:
# Faster-RCNN or R-FCN
frame
=
cv
.
resize
(
frame
,
(
inpWidth
,
inpHeight
))
net
.
setInput
(
np
.
array
([
inpHeight
,
inpWidth
,
1.6
],
dtype
=
np
.
float32
),
'im_info'
)
;
net
.
setInput
(
np
.
array
([
inpHeight
,
inpWidth
,
1.6
],
dtype
=
np
.
float32
),
'im_info'
)
outs
=
net
.
forward
(
getOutputsNames
(
net
))
postprocess
(
frame
,
outs
)
...
...
samples/python/calibrate.py
View file @
b2cff440
...
...
@@ -71,7 +71,7 @@ if __name__ == '__main__':
if
debug_dir
:
vis
=
cv
.
cvtColor
(
img
,
cv
.
COLOR_GRAY2BGR
)
cv
.
drawChessboardCorners
(
vis
,
pattern_size
,
corners
,
found
)
path
,
name
,
ext
=
splitfn
(
fn
)
_path
,
name
,
_
ext
=
splitfn
(
fn
)
outfile
=
os
.
path
.
join
(
debug_dir
,
name
+
'_chess.png'
)
cv
.
imwrite
(
outfile
,
vis
)
...
...
samples/python/camera_calibration_show_extrinsics.py
View file @
b2cff440
...
...
@@ -91,7 +91,7 @@ def create_board_model(extrinsics, board_width, board_height, square_size, draw_
# draw calibration board
X_board
=
np
.
ones
((
4
,
5
))
X_board_cam
=
np
.
ones
((
extrinsics
.
shape
[
0
],
4
,
5
))
#
X_board_cam = np.ones((extrinsics.shape[0],4,5))
X_board
[
0
:
3
,
0
]
=
[
0
,
0
,
0
]
X_board
[
0
:
3
,
1
]
=
[
width
,
0
,
0
]
X_board
[
0
:
3
,
2
]
=
[
width
,
height
,
0
]
...
...
samples/python/tutorial_code/Histograms_Matching/histogram_equalization/EqualizeHist_Demo.py
View file @
b2cff440
...
...
@@ -18,7 +18,7 @@ src = cv.cvtColor(src, cv.COLOR_BGR2GRAY)
## [Convert to grayscale]
## [Apply Histogram Equalization]
dst
=
cv
.
equalizeHist
(
src
)
;
dst
=
cv
.
equalizeHist
(
src
)
## [Apply Histogram Equalization]
## [Display results]
...
...
samples/python/tutorial_code/imgProc/Smoothing/smoothing.py
View file @
b2cff440
...
...
@@ -88,7 +88,7 @@ def main(argv):
def
display_caption
(
caption
):
global
dst
dst
=
np
.
zeros
(
src
.
shape
,
src
.
dtype
)
rows
,
cols
,
ch
=
src
.
shape
rows
,
cols
,
_
ch
=
src
.
shape
cv
.
putText
(
dst
,
caption
,
(
int
(
cols
/
4
),
int
(
rows
/
2
)),
cv
.
FONT_HERSHEY_COMPLEX
,
1
,
(
255
,
255
,
255
))
...
...
samples/python/tutorial_code/imgProc/threshold/threshold.py
View file @
b2cff440
...
...
@@ -33,7 +33,7 @@ if src is None:
print
(
'Could not open or find the image: '
,
args
.
input
)
exit
(
0
)
# Convert the image to Gray
src_gray
=
cv
.
cvtColor
(
src
,
cv
.
COLOR_BGR2GRAY
)
;
src_gray
=
cv
.
cvtColor
(
src
,
cv
.
COLOR_BGR2GRAY
)
## [load]
## [window]
...
...
samples/python/tutorial_code/imgProc/threshold_inRange/threshold_inRange.py
View file @
b2cff440
...
...
@@ -94,7 +94,7 @@ while True:
break
frame_HSV
=
cv
.
cvtColor
(
frame
,
cv
.
COLOR_BGR2HSV
)
frame_threshold
=
cv
.
inRange
(
frame_HSV
,
(
low_H
,
low_S
,
low_V
),
(
high_H
,
high_S
,
high_V
))
;
frame_threshold
=
cv
.
inRange
(
frame_HSV
,
(
low_H
,
low_S
,
low_V
),
(
high_H
,
high_S
,
high_V
))
## [while]
## [show]
...
...
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