Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore BinOpDiv BinOpMult Num NameLoad Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Num keyword Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr If CompareIs Call AttributeLoad NameLoad attr Str NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad keyword TupleLoad Num Num keyword Num keyword TupleLoad BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num TupleLoad NameLoad Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword TupleLoad NameLoad Num Num For NameStore NameLoad body If CompareGt SubscriptLoad SubscriptLoad NameLoad Index Num Index Num NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Num Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Assign NameStore Num Assign NameStore NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Num Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Break Assign NameStore SubscriptLoad NameLoad Index CompareEq NameLoad Num Assign NameStore SubscriptLoad NameLoad Index CompareEq NameLoad Num Assign NameStore ListLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad If CompareGtE NameLoad NameLoad body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body If CompareGt Call NameLoad BinOpSub NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Num If NameLoad body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Index Num Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Num Num AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Dict Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareGt Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str body Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad TupleLoad Num Num Num Num Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad TupleLoad Num Num Num Num If CompareGt NameLoad BinOpDiv BinOpMult NameLoad NameLoad NameLoad body Break If CompareGt Call NameLoad NameLoad NameLoad body Assign NameStore Num Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad If CompareGtE NameLoad NameLoad body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareLtE NameLoad BinOpDiv NameLoad Num CompareLtE NameLoad BinOpDiv NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body If CompareGt Call NameLoad BinOpSub NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd CompareGtE NameLoad BinOpDiv NameLoad Num CompareLtE NameLoad BinOpDiv NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body If CompareGt Call NameLoad BinOpSub NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd CompareLtE NameLoad BinOpDiv NameLoad Num CompareGtE NameLoad BinOpDiv NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body If CompareGt Call NameLoad BinOpSub NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd CompareGtE NameLoad BinOpDiv NameLoad Num CompareGtE NameLoad BinOpDiv NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body If CompareGt Call NameLoad BinOpSub NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Num If NameLoad body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Index Num Index Num If NameLoad body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Index Num Index Num If NameLoad body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Index Num Index Num If NameLoad body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Index Num Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Num Num AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Dict Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareGt Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str body Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad TupleLoad Num Num Num Num Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad TupleLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad TupleLoad Num Num Num Num If CompareGt NameLoad BinOpDiv BinOpMult NameLoad NameLoad NameLoad body Break orelse Pass Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Num Num AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad If CompareGtE NameLoad NameLoad body Break Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore BinOpBitAnd Call AttributeLoad NameLoad attr Num Num If CompareEq NameLoad Num body Break Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A N/A numpy N/A cv2 N/A argparse N/A time N/A random N/A math N/A imutils collections Counter N/A TRACKER_POINTS 500 N/A CRAZY_LINE_DISTANCE 50 N/A CRAZY_LINE_LIMIT N/A N/A 100 TRACKER_POINTS 1000 N/A ABSDIFF_ANGLE 20 N/A LINE_THICKNESS 3 N/A CONTOUR_LIMIT 10 N/A TARGET_HEIGHT 360 N/A DELTA_LIMIT_DIVISOR 3 N/A ap N/A N/A argparse ArgumentParser N/A N/A N/A ap add_argument -v --video help path to the video file N/A N/A N/A ap add_argument -a --min-area type int default 500 help minimum area size N/A args N/A vars N/A N/A ap parse_args N/A N/A N/A N/A args get video None None N/A N/A cap N/A N/A cv2 VideoCapture 0 N/A N/A N/A time sleep 0.25 N/A N/A cap N/A N/A cv2 VideoCapture N/A args N/A video N/A lk_params N/A dict winSize N/A 15 15 maxLevel 2 criteria N/A N/A N/A cv2 TERM_CRITERIA_EPS N/A cv2 TERM_CRITERIA_COUNT 10 0.03 N/A True N/A N/A color N/A N/A N/A numpy random randint 0 255 N/A TRACKER_POINTS 3 N/A N/A ret old_frame N/A N/A cap read N/A old_frame N/A N/A imutils resize old_frame height TARGET_HEIGHT N/A old_gray N/A N/A cv2 cvtColor old_frame N/A cv2 COLOR_BGR2GRAY N/A N/A height width N/A N/A old_frame shape N/A 2 N/A p1 N/A N/A N/A numpy random randint width size N/A TRACKER_POINTS 1 2 N/A y p1 N/A N/A N/A N/A N/A y N/A 0 N/A 1 height N/A N/A N/A N/A y N/A 0 N/A 1 N/A N/A N/A numpy random random_integers height N/A p1 N/A N/A p1 astype N/A numpy float32 N/A mask N/A N/A numpy zeros_like old_frame N/A mask_delta N/A N/A numpy zeros_like old_frame N/A mask_white N/A N/A numpy ones_like old_frame N/A white_color N/A N/A numpy array N/A 255 255 255 N/A total_crazy_lines 0 N/A most_common_angle None N/A True N/A N/A mask_biggest_contour N/A N/A numpy zeros_like old_frame N/A N/A ret frame N/A N/A cap read N/A frame N/A N/A imutils resize frame height TARGET_HEIGHT N/A frame_gray N/A N/A cv2 cvtColor frame N/A cv2 COLOR_BGR2GRAY N/A delta_value 0 N/A N/A p2 st err N/A N/A cv2 calcOpticalFlowPyrLK old_gray frame_gray p1 None lk_params N/A N/A p2 None N/A N/A N/A good_points2 N/A p2 N/A N/A st 1 N/A good_points1 N/A p1 N/A N/A st 1 N/A angles_array N/A N/A N/A i N/A good_point2 good_point1 N/A enumerate N/A zip good_points2 good_points1 N/A N/A N/A x2 y2 N/A N/A good_point2 ravel N/A N/A x1 y1 N/A N/A good_point1 ravel N/A distance N/A N/A math hypot N/A x2 x1 N/A y2 y1 N/A N/A distance CRAZY_LINE_DISTANCE N/A N/A total_crazy_lines 1 N/A angle N/A N/A math atan2 N/A y2 y1 N/A x2 x1 N/A angle N/A N/A math degrees angle N/A angle N/A round angle N/A N/A N/A angles_array append angle N/A N/A most_common_angle None N/A N/A N/A N/A abs N/A most_common_angle angle ABSDIFF_ANGLE N/A N/A N/A N/A cv2 line mask_delta N/A x2 y2 N/A x1 y1 white_color LINE_THICKNESS N/A N/A N/A cv2 line mask N/A x2 y2 N/A x1 y1 N/A N/A N/A color N/A i tolist 1 N/A angles_array N/A N/A most_common_angle N/A N/A N/A N/A N/A Counter angles_array most_common N/A 0 N/A 0 N/A mask_delta_gray N/A N/A cv2 cvtColor mask_delta N/A cv2 COLOR_BGR2GRAY N/A thresh N/A N/A N/A cv2 threshold mask_delta_gray 12 255 N/A cv2 THRESH_BINARY N/A 1 N/A thresh N/A N/A cv2 dilate thresh None iterations 1 N/A N/A cnts _ N/A N/A cv2 findContours N/A N/A thresh copy N/A cv2 RETR_EXTERNAL N/A cv2 CHAIN_APPROX_SIMPLE N/A contour_area_stack N/A N/A contour_dictionary N/A N/A biggest_contour_coordinates None N/A frame_final_form N/A N/A cv2 add frame mask_white N/A cnts N/A N/A c cnts N/A N/A N/A N/A contour_area_stack append N/A N/A cv2 contourArea c N/A N/A N/A N/A cv2 contourArea c N/A args N/A min_area N/A N/A N/A x y w h N/A N/A cv2 boundingRect c N/A N/A N/A cv2 rectangle frame N/A x y N/A N/A x w N/A y h N/A 0 255 0 2 N/A N/A contour_dictionary N/A N/A N/A cv2 contourArea c N/A x y w h N/A delta_value N/A max contour_area_stack N/A contour_dictionary N/A N/A biggest_contour_coordinates N/A contour_dictionary N/A delta_value N/A biggest_contour_coordinates N/A N/A x N/A biggest_contour_coordinates N/A 0 N/A y N/A biggest_contour_coordinates N/A 1 N/A w N/A biggest_contour_coordinates N/A 2 N/A h N/A biggest_contour_coordinates N/A 3 N/A N/A N/A cv2 rectangle mask_biggest_contour N/A x y N/A N/A x w N/A y h N/A 255 255 255 -1 N/A N/A delta_value N/A N/A height width DELTA_LIMIT_DIVISOR N/A N/A N/A N/A N/A len contour_dictionary CONTOUR_LIMIT N/A N/A total_crazy_lines 0 N/A most_common_angle1 None N/A angles_array1 N/A N/A most_common_angle2 None N/A angles_array2 N/A N/A most_common_angle3 None N/A angles_array3 N/A N/A most_common_angle4 None N/A angles_array4 N/A N/A mask_delta N/A N/A numpy zeros_like old_frame N/A N/A i N/A good_point2 good_point1 N/A enumerate N/A zip good_points2 good_points1 N/A N/A N/A x2 y2 N/A N/A good_point2 ravel N/A N/A x1 y1 N/A N/A good_point1 ravel N/A distance N/A N/A math hypot N/A x2 x1 N/A y2 y1 N/A N/A distance CRAZY_LINE_DISTANCE N/A N/A total_crazy_lines 1 N/A angle N/A N/A math atan2 N/A y2 y1 N/A x2 x1 N/A angle N/A N/A math degrees angle N/A angle N/A round angle N/A N/A N/A x1 N/A width 2 N/A y1 N/A height 2 N/A N/A N/A N/A angles_array1 append angle N/A N/A most_common_angle1 None N/A N/A N/A N/A abs N/A most_common_angle1 angle ABSDIFF_ANGLE N/A N/A N/A N/A cv2 line mask_delta N/A x2 y2 N/A x1 y1 white_color LINE_THICKNESS N/A N/A N/A x1 N/A width 2 N/A y1 N/A height 2 N/A N/A N/A N/A angles_array2 append angle N/A N/A most_common_angle2 None N/A N/A N/A N/A abs N/A most_common_angle2 angle ABSDIFF_ANGLE N/A N/A N/A N/A cv2 line mask_delta N/A x2 y2 N/A x1 y1 white_color LINE_THICKNESS N/A N/A N/A x1 N/A width 2 N/A y1 N/A height 2 N/A N/A N/A N/A angles_array3 append angle N/A N/A most_common_angle3 None N/A N/A N/A N/A abs N/A most_common_angle3 angle ABSDIFF_ANGLE N/A N/A N/A N/A cv2 line mask_delta N/A x2 y2 N/A x1 y1 white_color LINE_THICKNESS N/A N/A N/A x1 N/A width 2 N/A y1 N/A height 2 N/A N/A N/A N/A angles_array4 append angle N/A N/A most_common_angle3 None N/A N/A N/A N/A abs N/A most_common_angle3 angle ABSDIFF_ANGLE N/A N/A N/A N/A cv2 line mask_delta N/A x2 y2 N/A x1 y1 white_color LINE_THICKNESS N/A N/A N/A cv2 line mask N/A x2 y2 N/A x1 y1 N/A N/A N/A color N/A i tolist 1 N/A angles_array1 N/A N/A most_common_angle1 N/A N/A N/A N/A N/A Counter angles_array1 most_common N/A 0 N/A 0 N/A angles_array2 N/A N/A most_common_angle2 N/A N/A N/A N/A N/A Counter angles_array2 most_common N/A 0 N/A 0 N/A angles_array3 N/A N/A most_common_angle3 N/A N/A N/A N/A N/A Counter angles_array3 most_common N/A 0 N/A 0 N/A angles_array4 N/A N/A most_common_angle4 N/A N/A N/A N/A N/A Counter angles_array4 most_common N/A 0 N/A 0 N/A mask_delta_gray N/A N/A cv2 cvtColor mask_delta N/A cv2 COLOR_BGR2GRAY N/A thresh N/A N/A N/A cv2 threshold mask_delta_gray 12 255 N/A cv2 THRESH_BINARY N/A 1 N/A thresh N/A N/A cv2 dilate thresh None iterations 1 N/A N/A cnts _ N/A N/A cv2 findContours N/A N/A thresh copy N/A cv2 RETR_EXTERNAL N/A cv2 CHAIN_APPROX_SIMPLE N/A contour_area_stack N/A N/A contour_dictionary N/A N/A biggest_contour_coordinates None N/A frame_final_form N/A N/A cv2 add frame mask_white N/A cnts N/A N/A c cnts N/A N/A N/A N/A contour_area_stack append N/A N/A cv2 contourArea c N/A N/A N/A N/A cv2 contourArea c N/A args N/A min_area N/A N/A N/A x y w h N/A N/A cv2 boundingRect c N/A N/A N/A cv2 rectangle frame N/A x y N/A N/A x w N/A y h N/A 0 255 0 2 N/A N/A contour_dictionary N/A N/A N/A cv2 contourArea c N/A x y w h N/A delta_value N/A max contour_area_stack N/A contour_dictionary N/A N/A biggest_contour_coordinates N/A contour_dictionary N/A delta_value N/A biggest_contour_coordinates N/A N/A x N/A biggest_contour_coordinates N/A 0 N/A y N/A biggest_contour_coordinates N/A 1 N/A w N/A biggest_contour_coordinates N/A 2 N/A h N/A biggest_contour_coordinates N/A 3 N/A N/A N/A cv2 rectangle mask_biggest_contour N/A x y N/A N/A x w N/A y h N/A 255 255 255 -1 N/A N/A delta_value N/A N/A height width DELTA_LIMIT_DIVISOR N/A N/A N/A N/A N/A mask_biggest_contour_gray N/A N/A cv2 cvtColor mask_biggest_contour N/A cv2 COLOR_BGR2GRAY N/A thresh_biggest_contour N/A N/A N/A cv2 threshold mask_biggest_contour_gray 12 255 N/A cv2 THRESH_BINARY N/A 1 N/A thresh_final_form N/A N/A cv2 bitwise_and thresh thresh mask thresh_biggest_contour N/A thresh_final_form N/A N/A cv2 dilate thresh_final_form None iterations 1 N/A frameDelta N/A N/A cv2 bitwise_and frame_final_form frame_final_form mask thresh_final_form N/A N/A total_crazy_lines CRAZY_LINE_LIMIT N/A N/A N/A frame_with_mask N/A N/A cv2 add frame mask N/A N/A N/A cv2 imshow Original Frame frame_with_mask N/A N/A N/A cv2 imshow Mask Delta mask_delta N/A N/A N/A cv2 imshow Mask Biggest Contour mask_biggest_contour N/A N/A N/A cv2 imshow Frame Delta frameDelta N/A k N/A N/A N/A cv2 waitKey 30 255 N/A N/A k 27 N/A N/A N/A old_gray N/A N/A frame_gray copy N/A p1 N/A N/A good_points2 reshape -1 1 2 N/A N/A N/A cv2 destroyAllWindows N/A N/A N/A cap release