Module Import alias Import alias identifier ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num TupleLoad Num Num Num body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num If BoolOpOr CompareEq Call NameLoad AttributeLoad NameLoad attr Num CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd CompareEq NameLoad NameLoad UnaryOpNot NameLoad body Break Assign NameStore SubscriptLoad NameLoad Index BinOpMod BinOpAdd NameLoad Num NameLoad Assign NameStore TupleLoad BinOpDiv BinOpAdd BinOpMult SubscriptLoad NameLoad Index Num BinOpSub NameLoad NameLoad BinOpMult SubscriptLoad NameLoad Index Num NameLoad NameLoad BinOpDiv BinOpAdd BinOpMult SubscriptLoad NameLoad Index Num BinOpSub NameLoad NameLoad BinOpMult SubscriptLoad NameLoad Index Num NameLoad NameLoad BinOpDiv BinOpAdd BinOpMult SubscriptLoad NameLoad Index Num BinOpSub NameLoad NameLoad BinOpMult SubscriptLoad NameLoad Index Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Num AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Return ListLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore BinOpMult BinOpMult NameLoad Num BinOpPow BinOpMult Num Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If CompareNotEq Call NameLoad NameLoad NameLoad body Continue If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Continue If CompareLt Call AttributeLoad NameLoad attr NameLoad NameLoad body Continue Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Index Num If CompareGt BinOpMult NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults BinOpAdd BinOpPow SubscriptLoad NameLoad Index Num Num BinOpPow SubscriptLoad NameLoad Index Num Num NameLoad Assign TupleStore NameStore NameStore Call NameLoad GeneratorExp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad If CompareGt NameLoad Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Num For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad Num TupleLoad Num Num Num Num TupleLoad Num Num Num Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num If CompareEq NameLoad Num body Break
N/A N/A cv2 N/A numpy np cam OpenCV_Cam time time draw_oriented_polylines N/A N/A img pts_in is_closed color_start thickness color_end N/A 1 N/A 0 0 0 N/A N/A img_out img N/A pts N/A N/A pts_in reshape -1 2 N/A N/A N/A N/A len N/A img shape 2 N/A N/A N/A img shape N/A 2 1 N/A N/A img_out N/A N/A cv2 cvtColor img_out N/A cv2 COLOR_GRAY2BGR N/A N/A cs ce N/A color_start color_end N/A n N/A len pts N/A N/A idx pt N/A enumerate pts N/A N/A N/A N/A idx n N/A is_closed N/A N/A N/A next_pt N/A pts N/A N/A N/A idx 1 n N/A color N/A N/A N/A N/A N/A cs N/A 0 N/A n idx N/A N/A ce N/A 0 idx n N/A N/A N/A N/A cs N/A 1 N/A n idx N/A N/A ce N/A 1 idx n N/A N/A N/A N/A cs N/A 2 N/A n idx N/A N/A ce N/A 2 idx n N/A N/A N/A cv2 line img_out N/A tuple pt N/A tuple next_pt color thickness N/A find_polygons N/A N/A gray_image_in edge_num tolerance area_threshold convex_only edge_threshold orientation N/A 0.1 100 True 60 1.0 N/A N/A find contours that appears to be a  N/A img N/A N/A gray_image_in copy N/A N/A lo hi N/A 100 150 N/A edge N/A N/A cv2 Canny img lo hi N/A N/A thresh1 dst N/A N/A cv2 threshold edge edge_threshold 255 N/A cv2 THRESH_BINARY N/A N/A ctr hry N/A N/A cv2 findContours dst N/A cv2 RETR_TREE N/A cv2 CHAIN_APPROX_SIMPLE N/A N/A hry None N/A N/A N/A N/A hry N/A hry N/A 0 N/A polygons N/A N/A cnt ctr N/A N/A cnt N/A N/A cnt reshape -1 2 N/A epsilon N/A N/A tolerance 2 N/A N/A 3.14 N/A N/A cv2 contourArea cnt 0.5 N/A tmp N/A N/A cv2 approxPolyDP cnt epsilon True N/A N/A N/A len tmp edge_num N/A N/A N/A N/A convex_only N/A N/A N/A cv2 isContourConvex tmp N/A N/A N/A N/A N/A N/A cv2 contourArea tmp area_threshold N/A N/A N/A cross_product N/A N/A N/A np cross N/A N/A tmp N/A 1 N/A tmp N/A 0 N/A N/A tmp N/A 2 N/A tmp N/A 1 N/A 0 N/A N/A N/A cross_product orientation 0 N/A N/A tmp N/A N/A np flipud tmp N/A tmp N/A N/A tmp reshape -1 2 N/A distance_from_origin N/A map N/A N/A N/A pt N/A N/A N/A N/A pt N/A 0 2 N/A N/A pt N/A 1 2 tmp N/A N/A val idx N/A min N/A N/A val idx N/A N/A idx val N/A enumerate distance_from_origin N/A N/A idx 0 N/A N/A N/A up down N/A N/A np vsplit tmp N/A idx N/A tmp N/A N/A np vstack N/A down up N/A N/A N/A polygons append tmp N/A polygons N/A N/A N/A __name__ __main__ N/A N/A cam N/A OpenCV_Cam N/A True N/A N/A img N/A N/A cam read N/A polygons N/A find_polygons img 4 N/A ctr polygons N/A N/A N/A draw_oriented_polylines img ctr 0 N/A 0 0 255 2 N/A 255 0 0 N/A N/A N/A cv2 imshow find quadrangles img N/A k N/A N/A cv2 waitKey 5 N/A N/A k 27 N/A N/A