mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Samples Python:
* Unused variables * Bad identation
This commit is contained in:
@@ -35,7 +35,7 @@ def main():
|
||||
model.load_(classifier_fn) #Known bug: https://github.com/opencv/opencv/issues/4969
|
||||
|
||||
while True:
|
||||
ret, frame = cap.read()
|
||||
_ret, frame = cap.read()
|
||||
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
|
||||
@@ -59,12 +59,12 @@ def main():
|
||||
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0))
|
||||
|
||||
bin_roi = bin[y:,x:][:h,:w]
|
||||
gray_roi = gray[y:,x:][:h,:w]
|
||||
|
||||
m = bin_roi != 0
|
||||
if not 0.1 < m.mean() < 0.4:
|
||||
continue
|
||||
'''
|
||||
gray_roi = gray[y:,x:][:h,:w]
|
||||
v_in, v_out = gray_roi[m], gray_roi[~m]
|
||||
if v_out.std() > 10.0:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user