diff --git a/cut-highlights/checker.txt b/cut-highlights/checker.txt new file mode 100644 index 0000000..0efa65f --- /dev/null +++ b/cut-highlights/checker.txt @@ -0,0 +1,11 @@ +[30.0, 0] +[60.0, 0] +[90.0, 0] +[120.0, 0] +[150.0, 0] +[180.0, 0] +[210.0, 0] +[240.0, 0] +[270.0, 0] +[300.0, 0] +[330.0, 0] diff --git a/cut-highlights/cut_highlights.py b/cut-highlights/cut_highlights.py new file mode 100644 index 0000000..ce9d6a5 --- /dev/null +++ b/cut-highlights/cut_highlights.py @@ -0,0 +1,186 @@ +# File Name: cut_highlights.py +# Team: standardization +# Programmer: ssw03270 +# Start Date: 07/08/20 +# Last Update: August 2, 2020 +# Purpose: Almost highlight video has 3 game. +# So we have to cut it to compare with our highlights. +# This program help to do it. + +# 1620, 780 (1920, 1080) : minimap start point in edit video, raw video size +# If you want to see visual working process, erase #(notes) under the code. + +import cv2 as cv +import numpy as np +import os +from matplotlib import pyplot as plt + + +def matching(video_file: str, video_capture: np.ndarray, video_path: str, compare_image: np.ndarray) -> None: + """ + For comparing video's capture and image + + Args: + video_capture: One frame of video for compare + video_path: Video's path that user input + compare_image: Image file for compare + + Returns: + N/A + + Raises: + N/A + """ + checker = [] + is_writing = False + game_set = ["_GAME1", "_GAME2", "_GAME3", "_GAME4", "_GAME5"] + game_num = -1 + + width = int(video_capture.get(cv.CAP_PROP_FRAME_WIDTH)) + height = int(video_capture.get(cv.CAP_PROP_FRAME_HEIGHT)) + fourcc = cv.VideoWriter_fourcc(*"mp4v") + fps = video_capture.get(cv.CAP_PROP_FPS) + + sift_ans = False + while True: + if not sift_ans: + is_writing = False + + else: + if not is_writing: + is_writing = True + game_num += 1 + out = cv.VideoWriter(video_file + game_set[game_num] + ".mp4", fourcc, fps, (width, height), 1) + + out.write(frame_color) + # cv.imshow("EditedFrame", frame_color) + + ret, frame_color = video_capture.read() + if not ret: + break + frame_gray = cv.cvtColor(frame_color, cv.COLOR_BGR2GRAY) + width_end, height_end = frame_gray.shape + + width_start = round(780 / 1080 * width_end) + height_start = round(1620 / 1920 * height_end) + + frame_resize = frame_gray[width_start: width_end, height_start: height_end] + + # Showing video. + # cv.imshow("VideoFrame", frame_gray) + + if video_capture.get(cv.CAP_PROP_POS_FRAMES) % fps == 0: + print("start comparing..." + str(video_capture.get(cv.CAP_PROP_POS_FRAMES))) + sift_ans = sift_algorithm(frame_resize, compare_image) + checker.append([video_capture.get(cv.CAP_PROP_POS_FRAMES), sift_ans]) + + # Stopping video. + # if cv.waitKey(1) > 0: + # break + + # write_txt(checker) + out.release() + video_capture.release() + cv.destroyAllWindows() + + +def sift_algorithm(frame_resize: np.ndarray, compare_image: np.ndarray) -> bool: + """ + Using sift algorithm to compare video's capture and image + + Args: + frame_resize: Resized frame for compare + compare_image: Image file for compare + + Returns: + If list name of good has 30 or more values, returns 1. (It means this frame is ingame) + If not, returns 0. (It means this frame isn't ingame) + + Raises: + N/A + """ + sift = cv.xfeatures2d.SIFT_create() + + keypoint_1, descriptor_1 = sift.detectAndCompute(frame_resize, None) + keypoint_2, descriptor_2 = sift.detectAndCompute(compare_image, None) + + bf = cv.BFMatcher() + matches = bf.knnMatch(descriptor_1, descriptor_2, 2) + + good = [] + for m, n in matches: + if m.distance < 0.75 * n.distance: + good.append([m]) + + # Showing plt. + # plt_image = cv.drawMatchesKnn(frame_resize, keypoint_1, compare_image, keypoint_2, good, None, flags=2) + # plt.imshow(plt_image) + # plt.show() + + if len(good) > 15: + print("this frame is ingame.") + return True + else: + print("this frame isn't ingame.") + return False + + +def write_txt(checker: list) -> None: + """ + Writing the value that the frame has. + Now, it wasn't needed - 2020/08/02 + + Args: + checker: This list has current frame number and that's status. + + Returns: + N/A + + Raises: + N/A + """ + print("start writeing...") + f = open("checker.txt", "w") + for data in checker: + f.writelines(str(data) + "\n") + f.close() + + +def make_resource(path: str, type: int) -> np.ndarray: + """ + Making a resource with path, according to type. + + Args: + path: File's local path. + type: File's type, 0 is video file, 1 is image file. + + Returns: + If type is 0, returns video capture. + If type is 1, returns image which convert gray. + + Raises: + N/A + """ + if type == 0: + return cv.VideoCapture(path) + elif type == 1: + return cv.imread(path, cv.COLOR_BGR2GRAY) + + +def main() -> None: + image_path = "../resources/standardization/sample_image" + video_path = "../resources/standardization/sample_video" + + video_list = os.listdir(video_path) + for video_file in video_list: + new_video_path = video_path + "/" + video_file + video_capture = make_resource(new_video_path, 0) + + minimap_file = image_path + "/minimap.png" + minimap_image = make_resource(minimap_file, 1) + + matching(video_file[0:len(video_file) - 4], video_capture, video_path, minimap_image) + + +if __name__ == '__main__': + main() diff --git a/minimap/cognition_inGame.py b/minimap/cognition_inGame.py new file mode 100644 index 0000000..45c156c --- /dev/null +++ b/minimap/cognition_inGame.py @@ -0,0 +1,127 @@ +""" +# File Name: cognition_inGame.py +# Team: standardization +# Programmer: tjswodud +# Start Date: 07/07/20 +# Last Update: September 28, 2020 +# Purpose: Full video of LCK will be given in this program. +# And compare frame and minimap image (template) per frame, using sift_algorithm. +# (if it success for compare, that frame is ingame, if not, that frame is not ingame.) +# Finally, this program will return edited video, except for frame that is not ingame. +""" + +import cognition_pause as pause +import cv2 as cv +import numpy as np +import searching_upperleft_banner as upperleft + +def match_template(video_capture: np.ndarray, template: np.ndarray, pause_image: np.ndarray, compare_images: list, video_file: str, video_path: str) -> None: + """ + Compare captured video and template image (minimap image) with sift_algorithm + , and then write video frame that is in_game + Args: + video_capture: captured video using VideoCapture in __main__ + template: a template image (minimap image) to compare with video_capture + video_file: name of video file in string type + video_path: path of output_video (output_video will be stored this path) + Returns: + None + Raises: + N/A + """ + is_writing = False + + file_name = video_file.replace('.mp4', '') + + width = int(video_capture.get(cv.CAP_PROP_FRAME_WIDTH)) + height = int(video_capture.get(cv.CAP_PROP_FRAME_HEIGHT)) + fourcc = cv.VideoWriter_fourcc(*"mp4v") + fps = video_capture.get(cv.CAP_PROP_FPS) + output = cv.VideoWriter((video_path + '/' + file_name + '_output' + '.mp4'), fourcc, fps, (width, height), 1) + + # sift_ans = False + while True: + ret, frame = video_capture.read() + if not ret: + break + + frame_gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) + width_end, height_end = frame_gray.shape # 1080, 1920 + # width_end_2, height_end_2 = 638, 1138 + + width_start = round(780 / 1080 * width_end) # 780 + height_start = round(1620 / 1920 * height_end) # 1620 + # width_start_2 = round(442 / 1080 * width_end) # 442 + # height_start_2 = round(782 / 1920 * height_end) # 782 + + frame_resize = frame_gray[width_start: width_end, height_start: height_end] + frame_resize_center = frame_gray[442: 638, 782: 1138] + + total_frames = int(video_capture.get(cv.CAP_PROP_FRAME_COUNT)) + + if video_capture.get(cv.CAP_PROP_POS_FRAMES) % int(fps) == 0: + current_frame = int(video_capture.get(cv.CAP_PROP_POS_FRAMES)) + percentage = (current_frame / total_frames) * 100 + # print('{}/{} - {}%'.format(current_frame, total_frames, percentage)) + print(end='\r') + print('Processing... {}%\r'.format(round(percentage, 2)), end = '') + + sift_ans = sift_algorithm(frame_resize, template) + pause_ans = pause.sift_algorithm(frame_resize_center, pause_image) + replay_ans = upperleft.check_algorithm(upperleft.frame_resize(frame_gray, 0), compare_images[0]) + highlight_ans = upperleft.check_algorithm(upperleft.frame_resize(frame_gray, 1), compare_images[1]) + proview_ans = upperleft.check_algorithm(upperleft.frame_resize(frame_gray, 2), compare_images[2]) + + if (sift_ans and pause_ans and replay_ans and highlight_ans and proview_ans): + is_writing = True + else: + is_writing = False + + if is_writing: + output.write(frame) + else: + continue + + output.release() + video_capture.release() + cv.destroyAllWindows() + +def sift_algorithm(frame_resize: np.ndarray, template: np.ndarray) -> bool: + """ + Compare video's frame and template image, using sift_algorithm + Args: + frame_resize: each of video's frame that is resized to template image + template: a template image (minimap image) to compare with video_capture + Returns: + [bool type] + if frame_resize and template match more than 15 points, return True (this frame is ingame.) + if not, return False (this frame is not ingame.) + Raises: + N/A + """ + sift = cv.xfeatures2d.SIFT_create() + + keypoint_1, descriptor_1 = sift.detectAndCompute(frame_resize, None) + keypoint_2, descriptor_2 = sift.detectAndCompute(template, None) + + bf_matcher = cv.BFMatcher() + match = bf_matcher.knnMatch(descriptor_1, descriptor_2, 2) + + success_match = [] + for m, n in match: + if m.distance < n.distance * 0.75: + success_match.append([m]) + + # plot_image = cv.drawMatchesKnn(frame_resize, keypoint_1, template, keypoint_2, success_match, None, flags=2) + # plot.imshow(plot_image) + # plot.show() + + if len(success_match) > 15: + # print('this frame is ingame.') + return True + else: + # print('this frame is not ingame.') + return False + +def create_capture(path: str): + return cv.VideoCapture(path) diff --git a/minimap/cognition_pause.py b/minimap/cognition_pause.py new file mode 100644 index 0000000..05109af --- /dev/null +++ b/minimap/cognition_pause.py @@ -0,0 +1,52 @@ +""" +# File Name: cognition_pause.py +# Team: standardization +# Programmer: tjswodud +# Start Date: 07/07/20 +# Last Update: September 28, 2020 +# Purpose: This file will be used module of cognition_inGame.py. +# compare every frame and pause_image, and then cut the frame that has a pause_image. +""" + +import cv2 as cv +# import matplotlib.pyplot as plot +import numpy as np + + +def sift_algorithm(frame_resize: np.ndarray, pause_image: np.ndarray) -> bool: + """ + Compare video's frame and pause image, using sift_algorithm + + Args: + frame_resize: each of video's frame that is resized to template image + pause_image: a image (pause_image) to compare with video_capture + + Returns: + [bool type] + if frame_resize and pause_image match more than 15 points, return False (this frame isn't ingame.) + if not, return True (this frame is ingame. -> match with template_image) + + Raises: + N/A + """ + sift = cv.xfeatures2d.SIFT_create() + + keypoint_1, descriptor_1 = sift.detectAndCompute(frame_resize, None) + keypoint_2, descriptor_2 = sift.detectAndCompute(pause_image, None) + + bf_matcher = cv.BFMatcher() + match = bf_matcher.knnMatch(descriptor_1, descriptor_2, 2) + + success_match = [] + for m, n in match: + if m.distance < n.distance * 0.75: + success_match.append([m]) + + # plot_image = cv.drawMatchesKnn(frame_resize, keypoint_1, pause_image, keypoint_2, success_match, None, flags=2) + # plot.imshow(plot_image) + # plot.show() + + if len(success_match) > 15: + return False + else: + return True \ No newline at end of file diff --git a/minimap/cut_highlights.py b/minimap/cut_highlights.py new file mode 100644 index 0000000..7dda315 --- /dev/null +++ b/minimap/cut_highlights.py @@ -0,0 +1,174 @@ +# File Name: cut_highlights.py +# Team: standardization +# Programmer: ssw03270 +# Start Date: 07/08/20 +# Last Update: August 2, 2020 +# Purpose: Almost highlight video has 3 game. +# So we have to cut it to compare with our highlights. +# This program help to do it. + +# 1620, 780 (1920, 1080) : minimap start point in edit video, raw video size +# If you want to see visual working process, erase #(notes) under the code. + +import cv2 as cv +import numpy as np +import os +from matplotlib import pyplot as plt + + +def matching(video_file: str, video_capture: np.ndarray, video_path: str, compare_image: np.ndarray) -> None: + """ + For comparing video's capture and image + Args: + video_capture: One frame of video for compare + video_path: Video's path that user input + compare_image: Image file for compare + Returns: + N/A + Raises: + N/A + """ + checker = [] + is_writing = False + game_set = ["_GAME1", "_GAME2", "_GAME3", "_GAME4", "_GAME5"] + game_num = -1 + + width = int(video_capture.get(cv.CAP_PROP_FRAME_WIDTH)) + height = int(video_capture.get(cv.CAP_PROP_FRAME_HEIGHT)) + fourcc = cv.VideoWriter_fourcc(*"mp4v") + fps = video_capture.get(cv.CAP_PROP_FPS) + + sift_ans = False + while True: + if not sift_ans: + is_writing = False + + else: + if not is_writing: + is_writing = True + game_num += 1 + out = cv.VideoWriter(video_file + game_set[game_num] + ".mp4", fourcc, fps, (width, height), 1) + + out.write(frame_color) + # cv.imshow("EditedFrame", frame_color) + + ret, frame_color = video_capture.read() + if not ret: + break + frame_gray = cv.cvtColor(frame_color, cv.COLOR_BGR2GRAY) + width_end, height_end = frame_gray.shape + + width_start = round(780 / 1080 * width_end) + height_start = round(1620 / 1920 * height_end) + + frame_resize = frame_gray[width_start: width_end, height_start: height_end] + + # Showing video. + # cv.imshow("VideoFrame", frame_gray) + + if video_capture.get(cv.CAP_PROP_POS_FRAMES) % fps == 0: + print("start comparing..." + str(video_capture.get(cv.CAP_PROP_POS_FRAMES))) + sift_ans = sift_algorithm(frame_resize, compare_image) + checker.append([video_capture.get(cv.CAP_PROP_POS_FRAMES), sift_ans]) + + # Stopping video. + # if cv.waitKey(1) > 0: + # break + + # write_txt(checker) + out.release() + video_capture.release() + cv.destroyAllWindows() + + +def sift_algorithm(frame_resize: np.ndarray, compare_image: np.ndarray) -> bool: + """ + Using sift algorithm to compare video's capture and image + Args: + frame_resize: Resized frame for compare + compare_image: Image file for compare + Returns: + If list name of good has 30 or more values, returns 1. (It means this frame is ingame) + If not, returns 0. (It means this frame isn't ingame) + Raises: + N/A + """ + sift = cv.xfeatures2d.SIFT_create() + + keypoint_1, descriptor_1 = sift.detectAndCompute(frame_resize, None) + keypoint_2, descriptor_2 = sift.detectAndCompute(compare_image, None) + + bf = cv.BFMatcher() + matches = bf.knnMatch(descriptor_1, descriptor_2, 2) + + good = [] + for m, n in matches: + if m.distance < 0.75 * n.distance: + good.append([m]) + + # Showing plt. + # plt_image = cv.drawMatchesKnn(frame_resize, keypoint_1, compare_image, keypoint_2, good, None, flags=2) + # plt.imshow(plt_image) + # plt.show() + + if len(good) > 15: + print("this frame is ingame.") + return True + else: + print("this frame isn't ingame.") + return False + + +def write_txt(checker: list) -> None: + """ + Writing the value that the frame has. + Now, it wasn't needed - 2020/08/02 + Args: + checker: This list has current frame number and that's status. + Returns: + N/A + Raises: + N/A + """ + print("start writeing...") + f = open("checker.txt", "w") + for data in checker: + f.writelines(str(data) + "\n") + f.close() + + +def make_resource(path: str, type: int) -> np.ndarray: + """ + Making a resource with path, according to type. + Args: + path: File's local path. + type: File's type, 0 is video file, 1 is image file. + Returns: + If type is 0, returns video capture. + If type is 1, returns image which convert gray. + Raises: + N/A + """ + if type == 0: + return cv.VideoCapture(path) + elif type == 1: + return cv.imread(path, cv.COLOR_BGR2GRAY) + + +def main() -> None: + image_path = "../resources/standardization/sample_image" + video_path = "../resources/standardization/sample_video" + + video_list = os.listdir(video_path) + for video_file in video_list: + new_video_path = video_path + "/" + video_file + video_capture = make_resource(new_video_path, 0) + + minimap_file = image_path + "/minimap.png" + minimap_image = make_resource(minimap_file, 1) + + matching(video_file[0:len(video_file) - 4], video_capture, video_path, minimap_image) + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/minimap/cut_not_inGame.py b/minimap/cut_not_inGame.py new file mode 100644 index 0000000..be3a6b8 --- /dev/null +++ b/minimap/cut_not_inGame.py @@ -0,0 +1,55 @@ +""" +# File Name: cut_not_inGame.py +# Team: standardization +# Programmer: tjswodud +# Start Date: 07/07/20 +# Last Update: September 28, 2020 +# Purpose: Full video of LCK will be given in this program. +# And compare frame and compare_image (minimap, pause, upperleft banner) per frame, using sift_algorithm. +# (if it success for compare, that frame is ingame, if not, that frame is not ingame.) +# Finally, this program will return edited video, except for frame that is not ingame. +""" + +import cognition_inGame as ingame +import cv2 as cv +import os +import searching_upperleft_banner as upperleft +import time + +start_time = time.time() + +# in Windows OS +resource_path = "E:/video/resources" +output_path = "E:/video/outputs" + +# in Ubuntu OS +# resource_path = "/media/cogongnam/f8447e77-84e5-43a2-a0f0-e1b1977f1322/video/resources" +# output_path = "/media/cogongnam/f8447e77-84e5-43a2-a0f0-e1b1977f1322/video/outputs" + +replay_banner_path = "../resources/replay_banner.png" +replay_banner = upperleft.resource(replay_banner_path) +highlight_banner_path = "../resources/highlight.png" +highlight_banner = upperleft.resource(highlight_banner_path) +pro_view_banner_path = "../resources/pro view.png" +pro_view_banner = upperleft.resource(pro_view_banner_path) + +video_list = os.listdir(resource_path) +template_image = cv.imread("../resources/minimap_templ.png", cv.COLOR_BGR2GRAY) +pause_image = cv.imread("../resources/pause_image.png", cv.COLOR_BGR2GRAY) + +compare_images = [] +compare_images.append(replay_banner) +compare_images.append(highlight_banner) +compare_images.append(pro_view_banner) + +video_num = 1 +for video_file in video_list: + new_video_path = resource_path + '/' + video_file + video_capture = ingame.create_capture(new_video_path) + print('[No.{} video is editing...]'.format(video_num)) + ingame.match_template(video_capture, template_image, pause_image, compare_images, video_file, output_path) + video_num += 1 + +end_time = time.time() +exe_time = round((end_time - start_time), 1) +print('time : {} s.'.format(exe_time)) \ No newline at end of file diff --git a/resources/highlight.png b/resources/highlight.png new file mode 100644 index 0000000..16a1f69 Binary files /dev/null and b/resources/highlight.png differ diff --git a/resources/minimap_templ.png b/resources/minimap_templ.png new file mode 100644 index 0000000..93580a9 Binary files /dev/null and b/resources/minimap_templ.png differ diff --git a/resources/pause_image.png b/resources/pause_image.png new file mode 100644 index 0000000..2f0210b Binary files /dev/null and b/resources/pause_image.png differ diff --git a/resources/pro view.png b/resources/pro view.png new file mode 100644 index 0000000..c46a788 Binary files /dev/null and b/resources/pro view.png differ diff --git a/resources/replay_banner.png b/resources/replay_banner.png new file mode 100644 index 0000000..2bb9310 Binary files /dev/null and b/resources/replay_banner.png differ diff --git a/resources/standardization/sample_image/2020-07-05 (1).png b/resources/standardization/sample_image/2020-07-05 (1).png new file mode 100644 index 0000000..2ba7bda Binary files /dev/null and b/resources/standardization/sample_image/2020-07-05 (1).png differ diff --git a/resources/standardization/sample_image/2020-07-05 (2).png b/resources/standardization/sample_image/2020-07-05 (2).png new file mode 100644 index 0000000..2ab3a11 Binary files /dev/null and b/resources/standardization/sample_image/2020-07-05 (2).png differ diff --git a/resources/standardization/sample_image/minimap.png b/resources/standardization/sample_image/minimap.png new file mode 100644 index 0000000..d969a5f Binary files /dev/null and b/resources/standardization/sample_image/minimap.png differ diff --git a/resources/standardization/sample_image/replay.png b/resources/standardization/sample_image/replay.png new file mode 100644 index 0000000..9dc8f28 Binary files /dev/null and b/resources/standardization/sample_image/replay.png differ diff --git a/resources/standardization/sample_image/replay_game.png b/resources/standardization/sample_image/replay_game.png new file mode 100644 index 0000000..58569af Binary files /dev/null and b/resources/standardization/sample_image/replay_game.png differ diff --git a/searching_upperleft_banner/checker.txt b/searching_upperleft_banner/checker.txt new file mode 100644 index 0000000..05dbd9c --- /dev/null +++ b/searching_upperleft_banner/checker.txt @@ -0,0 +1,2397 @@ +[0, 0] +[30, 0] +[60, 0] +[90, 0] +[120, 0] +[150, 0] +[180, 0] +[210, 0] +[240, 0] +[270, 0] +[300, 0] +[330, 0] +[360, 0] +[390, 0] +[420, 0] +[450, 0] +[480, 0] +[510, 0] +[540, 0] +[570, 0] +[600, 0] +[630, 0] +[660, 0] +[690, 0] +[720, 0] +[750, 0] +[780, 0] +[810, 0] +[840, 0] +[870, 0] +[900, 0] +[930, 0] +[960, 0] +[990, 0] +[1020, 0] +[1050, 0] +[1080, 0] +[1110, 0] +[1140, 0] +[1170, 0] +[1200, 0] +[1230, 0] +[1260, 0] +[1290, 0] +[1320, 0] +[1350, 0] +[1380, 0] +[1410, 0] +[1440, 0] +[1470, 0] +[1500, 0] +[1530, 0] +[1560, 0] +[1590, 0] +[1620, 0] +[1650, 0] +[1680, 0] +[1710, 0] +[1740, 0] +[1770, 0] +[1800, 0] +[1830, 0] +[1860, 0] +[1890, 0] +[1920, 0] +[1950, 0] +[1980, 0] +[2010, 0] +[2040, 0] +[2070, 0] +[2100, 0] +[2130, 0] +[2160, 0] +[2190, 0] +[2220, 0] +[2250, 0] +[2280, 0] +[2310, 0] +[2340, 0] +[2370, 0] +[2400, 0] +[2430, 0] +[2460, 0] +[2490, 0] +[2520, 0] +[2550, 0] +[2580, 0] +[2610, 0] +[2640, 0] +[2670, 0] +[2700, 0] +[2730, 0] +[2760, 0] +[2790, 0] +[2820, 0] +[2850, 0] +[2880, 0] +[2910, 0] +[2940, 0] +[2970, 0] +[3000, 0] +[3030, 0] +[3060, 0] +[3090, 0] +[3120, 0] +[3150, 0] +[3180, 0] +[3210, 0] +[3240, 0] +[3270, 0] +[3300, 0] +[3330, 0] +[3360, 0] +[3390, 0] +[3420, 0] +[3450, 0] +[3480, 0] +[3510, 0] +[3540, 0] +[3570, 0] +[3600, 0] +[3630, 0] +[3660, 0] +[3690, 0] +[3720, 0] +[3750, 0] +[3780, 0] +[3810, 0] +[3840, 0] +[3870, 0] +[3900, 0] +[3930, 0] +[3960, 0] +[3990, 0] +[4020, 0] +[4050, 0] +[4080, 0] +[4110, 0] +[4140, 0] +[4170, 0] +[4200, 0] +[4230, 0] +[4260, 0] +[4290, 0] +[4320, 0] +[4350, 0] +[4380, 0] +[4410, 0] +[4440, 0] +[4470, 0] +[4500, 0] +[4530, 0] +[4560, 0] +[4590, 0] +[4620, 0] +[4650, 0] +[4680, 0] +[4710, 0] +[4740, 0] +[4770, 0] +[4800, 0] +[4830, 0] +[4860, 0] +[4890, 0] +[4920, 0] +[4950, 0] +[4980, 0] +[5010, 0] +[5040, 0] +[5070, 0] +[5100, 0] +[5130, 0] +[5160, 0] +[5190, 0] +[5220, 0] +[5250, 0] +[5280, 0] +[5310, 0] +[5340, 0] +[5370, 0] +[5400, 0] +[5430, 0] +[5460, 0] +[5490, 0] +[5520, 0] +[5550, 0] +[5580, 0] +[5610, 0] +[5640, 0] +[5670, 0] +[5700, 0] +[5730, 0] +[5760, 0] +[5790, 0] +[5820, 0] +[5850, 0] +[5880, 0] +[5910, 0] +[5940, 0] +[5970, 0] +[6000, 0] +[6030, 0] +[6060, 0] +[6090, 0] +[6120, 0] +[6150, 0] +[6180, 0] +[6210, 0] +[6240, 0] +[6270, 0] +[6300, 0] +[6330, 0] +[6360, 0] +[6390, 0] +[6420, 0] +[6450, 0] +[6480, 0] +[6510, 0] +[6540, 0] +[6570, 0] +[6600, 0] +[6630, 0] +[6660, 0] +[6690, 0] +[6720, 0] +[6750, 0] +[6780, 0] +[6810, 0] +[6840, 0] +[6870, 0] +[6900, 0] +[6930, 0] +[6960, 0] +[6990, 0] +[7020, 0] +[7050, 0] +[7080, 0] +[7110, 0] +[7140, 0] +[7170, 0] +[7200, 0] +[7230, 0] +[7260, 0] +[7290, 0] +[7320, 0] +[7350, 0] +[7380, 0] +[7410, 0] +[7440, 0] +[7470, 0] +[7500, 0] +[7530, 0] +[7560, 0] +[7590, 0] +[7620, 0] +[7650, 0] +[7680, 0] +[7710, 0] +[7740, 0] +[7770, 0] +[7800, 0] +[7830, 0] +[7860, 0] +[7890, 0] +[7920, 0] +[7950, 0] +[7980, 0] +[8010, 0] +[8040, 0] +[8070, 0] +[8100, 0] +[8130, 0] +[8160, 0] +[8190, 0] +[8220, 0] +[8250, 0] +[8280, 0] +[8310, 0] +[8340, 0] +[8370, 0] +[8400, 0] +[8430, 0] +[8460, 0] +[8490, 0] +[8520, 0] +[8550, 0] +[8580, 0] +[8610, 0] +[8640, 0] +[8670, 0] +[8700, 0] +[8730, 0] +[8760, 0] +[8790, 0] +[8820, 0] +[8850, 0] +[8880, 0] +[8910, 0] +[8940, 0] +[8970, 0] +[9000, 0] +[9030, 0] +[9060, 0] +[9090, 0] +[9120, 0] +[9150, 0] +[9180, 0] +[9210, 0] +[9240, 0] +[9270, 0] +[9300, 0] +[9330, 0] +[9360, 0] +[9390, 0] +[9420, 0] +[9450, 0] +[9480, 0] +[9510, 0] +[9540, 0] +[9570, 0] +[9600, 0] +[9630, 0] +[9660, 0] +[9690, 0] +[9720, 0] +[9750, 0] +[9780, 0] +[9810, 0] +[9840, 0] +[9870, 0] +[9900, 0] +[9930, 0] +[9960, 0] +[9990, 0] +[10020, 0] +[10050, 0] +[10080, 0] +[10110, 0] +[10140, 0] +[10170, 0] +[10200, 0] +[10230, 0] +[10260, 0] +[10290, 0] +[10320, 0] +[10350, 0] +[10380, 0] +[10410, 0] +[10440, 0] +[10470, 0] +[10500, 0] +[10530, 0] +[10560, 0] +[10590, 0] +[10620, 0] +[10650, 0] +[10680, 0] +[10710, 0] +[10740, 0] +[10770, 0] +[10800, 0] +[10830, 0] +[10860, 0] +[10890, 0] +[10920, 0] +[10950, 0] +[10980, 0] +[11010, 0] +[11040, 0] +[11070, 0] +[11100, 0] +[11130, 0] +[11160, 0] +[11190, 0] +[11220, 0] +[11250, 0] +[11280, 0] +[11310, 0] +[11340, 0] +[11370, 0] +[11400, 0] +[11430, 0] +[11460, 0] +[11490, 0] +[11520, 0] +[11550, 0] +[11580, 0] +[11610, 0] +[11640, 0] +[11670, 0] +[11700, 0] +[11730, 0] +[11760, 0] +[11790, 0] +[11820, 0] +[11850, 0] +[11880, 0] +[11910, 0] +[11940, 0] +[11970, 0] +[12000, 0] +[12030, 0] +[12060, 0] +[12090, 0] +[12120, 0] +[12150, 0] +[12180, 0] +[12210, 0] +[12240, 0] +[12270, 0] +[12300, 0] +[12330, 0] +[12360, 0] +[12390, 0] +[12420, 0] +[12450, 0] +[12480, 0] +[12510, 0] +[12540, 0] +[12570, 0] +[12600, 0] +[12630, 0] +[12660, 0] +[12690, 0] +[12720, 0] +[12750, 0] +[12780, 0] +[12810, 0] +[12840, 0] +[12870, 0] +[12900, 0] +[12930, 0] +[12960, 0] +[12990, 0] +[13020, 0] +[13050, 0] +[13080, 0] +[13110, 0] +[13140, 0] +[13170, 0] +[13200, 0] +[13230, 0] +[13260, 0] +[13290, 0] +[13320, 0] +[13350, 0] +[13380, 0] +[13410, 0] +[13440, 0] +[13470, 0] +[13500, 0] +[13530, 0] +[13560, 0] +[13590, 0] +[13620, 0] +[13650, 0] +[13680, 0] +[13710, 0] +[13740, 0] +[13770, 0] +[13800, 0] +[13830, 0] +[13860, 0] +[13890, 0] +[13920, 0] +[13950, 0] +[13980, 0] +[14010, 0] +[14040, 0] +[14070, 0] +[14100, 0] +[14130, 0] +[14160, 0] +[14190, 0] +[14220, 0] +[14250, 0] +[14280, 0] +[14310, 0] +[14340, 0] +[14370, 0] +[14400, 0] +[14430, 0] +[14460, 0] +[14490, 0] +[14520, 0] +[14550, 0] +[14580, 0] +[14610, 0] +[14640, 0] +[14670, 0] +[14700, 0] +[14730, 0] +[14760, 0] +[14790, 0] +[14820, 0] +[14850, 0] +[14880, 0] +[14910, 0] +[14940, 0] +[14970, 0] +[15000, 0] +[15030, 0] +[15060, 0] +[15090, 0] +[15120, 0] +[15150, 0] +[15180, 0] +[15210, 0] +[15240, 0] +[15270, 0] +[15300, 0] +[15330, 0] +[15360, 0] +[15390, 0] +[15420, 0] +[15450, 0] +[15480, 0] +[15510, 0] +[15540, 0] +[15570, 0] +[15600, 0] +[15630, 0] +[15660, 0] +[15690, 0] +[15720, 0] +[15750, 0] +[15780, 0] +[15810, 0] +[15840, 0] +[15870, 0] +[15900, 0] +[15930, 0] +[15960, 0] +[15990, 0] +[16020, 0] +[16050, 0] +[16080, 0] +[16110, 0] +[16140, 0] +[16170, 0] +[16200, 0] +[16230, 0] +[16260, 0] +[16290, 0] +[16320, 0] +[16350, 0] +[16380, 0] +[16410, 0] +[16440, 0] +[16470, 0] +[16500, 0] +[16530, 0] +[16560, 0] +[16590, 0] +[16620, 0] +[16650, 0] +[16680, 0] +[16710, 0] +[16740, 0] +[16770, 0] +[16800, 0] +[16830, 0] +[16860, 0] +[16890, 0] +[16920, 0] +[16950, 0] +[16980, 0] +[17010, 0] +[17040, 0] +[17070, 0] +[17100, 0] +[17130, 0] +[17160, 0] +[17190, 0] +[17220, 0] +[17250, 0] +[17280, 0] +[17310, 0] +[17340, 0] +[17370, 0] +[17400, 0] +[17430, 0] +[17460, 0] +[17490, 0] +[17520, 0] +[17550, 0] +[17580, 0] +[17610, 0] +[17640, 0] +[17670, 0] +[17700, 0] +[17730, 0] +[17760, 0] +[17790, 0] +[17820, 0] +[17850, 0] +[17880, 0] +[17910, 0] +[17940, 0] +[17970, 0] +[18000, 0] +[18030, 0] +[18060, 0] +[18090, 0] +[18120, 0] +[18150, 0] +[18180, 0] +[18210, 0] +[18240, 0] +[18270, 0] +[18300, 0] +[18330, 0] +[18360, 0] +[18390, 0] +[18420, 0] +[18450, 0] +[18480, 0] +[18510, 0] +[18540, 0] +[18570, 0] +[18600, 0] +[18630, 0] +[18660, 0] +[18690, 0] +[18720, 0] +[18750, 0] +[18780, 0] +[18810, 0] +[18840, 0] +[18870, 0] +[18900, 0] +[18930, 0] +[18960, 0] +[18990, 0] +[19020, 0] +[19050, 0] +[19080, 0] +[19110, 0] +[19140, 0] +[19170, 0] +[19200, 0] +[19230, 0] +[19260, 0] +[19290, 0] +[19320, 0] +[19350, 0] +[19380, 0] +[19410, 0] +[19440, 0] +[19470, 0] +[19500, 0] +[19530, 0] +[19560, 0] +[19590, 0] +[19620, 0] +[19650, 0] +[19680, 0] +[19710, 0] +[19740, 0] +[19770, 0] +[19800, 0] +[19830, 0] +[19860, 0] +[19890, 0] +[19920, 0] +[19950, 0] +[19980, 0] +[20010, 0] +[20040, 0] +[20070, 0] +[20100, 0] +[20130, 0] +[20160, 0] +[20190, 0] +[20220, 0] +[20250, 0] +[20280, 0] +[20310, 0] +[20340, 0] +[20370, 0] +[20400, 0] +[20430, 0] +[20460, 0] +[20490, 0] +[20520, 0] +[20550, 0] +[20580, 0] +[20610, 0] +[20640, 0] +[20670, 0] +[20700, 0] +[20730, 0] +[20760, 0] +[20790, 0] +[20820, 0] +[20850, 0] +[20880, 0] +[20910, 0] +[20940, 0] +[20970, 0] +[21000, 0] +[21030, 0] +[21060, 0] +[21090, 0] +[21120, 0] +[21150, 0] +[21180, 0] +[21210, 0] +[21240, 0] +[21270, 0] +[21300, 0] +[21330, 0] +[21360, 1] +[21390, 1] +[21420, 1] +[21450, 1] +[21480, 1] +[21510, 1] +[21540, 1] +[21570, 1] +[21600, 1] +[21630, 1] +[21660, 1] +[21690, 1] +[21720, 1] +[21750, 1] +[21780, 1] +[21810, 1] +[21840, 1] +[21870, 1] +[21900, 1] +[21930, 1] +[21960, 1] +[21990, 0] +[22020, 0] +[22050, 0] +[22080, 0] +[22110, 0] +[22140, 0] +[22170, 0] +[22200, 0] +[22230, 0] +[22260, 0] +[22290, 0] +[22320, 0] +[22350, 0] +[22380, 0] +[22410, 0] +[22440, 0] +[22470, 0] +[22500, 0] +[22530, 0] +[22560, 0] +[22590, 0] +[22620, 0] +[22650, 0] +[22680, 0] +[22710, 0] +[22740, 0] +[22770, 0] +[22800, 0] +[22830, 0] +[22860, 0] +[22890, 0] +[22920, 0] +[22950, 0] +[22980, 0] +[23010, 0] +[23040, 0] +[23070, 0] +[23100, 0] +[23130, 0] +[23160, 0] +[23190, 0] +[23220, 0] +[23250, 0] +[23280, 0] +[23310, 0] +[23340, 0] +[23370, 0] +[23400, 0] +[23430, 0] +[23460, 0] +[23490, 0] +[23520, 0] +[23550, 0] +[23580, 0] +[23610, 0] +[23640, 0] +[23670, 0] +[23700, 0] +[23730, 0] +[23760, 0] +[23790, 0] +[23820, 0] +[23850, 0] +[23880, 0] +[23910, 0] +[23940, 0] +[23970, 0] +[24000, 0] +[24030, 0] +[24060, 0] +[24090, 0] +[24120, 0] +[24150, 0] +[24180, 0] +[24210, 0] +[24240, 0] +[24270, 0] +[24300, 0] +[24330, 0] +[24360, 0] +[24390, 0] +[24420, 0] +[24450, 0] +[24480, 0] +[24510, 0] +[24540, 0] +[24570, 0] +[24600, 0] +[24630, 0] +[24660, 0] +[24690, 0] +[24720, 0] +[24750, 0] +[24780, 0] +[24810, 0] +[24840, 0] +[24870, 0] +[24900, 0] +[24930, 0] +[24960, 0] +[24990, 0] +[25020, 0] +[25050, 0] +[25080, 0] +[25110, 0] +[25140, 0] +[25170, 0] +[25200, 0] +[25230, 0] +[25260, 0] +[25290, 0] +[25320, 0] +[25350, 0] +[25380, 0] +[25410, 0] +[25440, 0] +[25470, 0] +[25500, 0] +[25530, 0] +[25560, 0] +[25590, 0] +[25620, 0] +[25650, 0] +[25680, 0] +[25710, 0] +[25740, 0] +[25770, 0] +[25800, 0] +[25830, 0] +[25860, 0] +[25890, 0] +[25920, 0] +[25950, 0] +[25980, 0] +[26010, 0] +[26040, 0] +[26070, 0] +[26100, 0] +[26130, 0] +[26160, 0] +[26190, 0] +[26220, 1] +[26250, 1] +[26280, 1] +[26310, 1] +[26340, 1] +[26370, 1] +[26400, 1] +[26430, 1] +[26460, 1] +[26490, 1] +[26520, 1] +[26550, 1] +[26580, 1] +[26610, 1] +[26640, 1] +[26670, 1] +[26700, 1] +[26730, 1] +[26760, 1] +[26790, 1] +[26820, 1] +[26850, 1] +[26880, 1] +[26910, 1] +[26940, 1] +[26970, 1] +[27000, 1] +[27030, 1] +[27060, 1] +[27090, 1] +[27120, 1] +[27150, 1] +[27180, 1] +[27210, 1] +[27240, 1] +[27270, 1] +[27300, 1] +[27330, 1] +[27360, 1] +[27390, 1] +[27420, 0] +[27450, 0] +[27480, 0] +[27510, 0] +[27540, 0] +[27570, 0] +[27600, 0] +[27630, 0] +[27660, 0] +[27690, 0] +[27720, 0] +[27750, 0] +[27780, 0] +[27810, 0] +[27840, 0] +[27870, 0] +[27900, 0] +[27930, 0] +[27960, 0] +[27990, 0] +[28020, 0] +[28050, 0] +[28080, 0] +[28110, 0] +[28140, 0] +[28170, 0] +[28200, 0] +[28230, 0] +[28260, 0] +[28290, 0] +[28320, 0] +[28350, 0] +[28380, 0] +[28410, 0] +[28440, 0] +[28470, 0] +[28500, 0] +[28530, 0] +[28560, 0] +[28590, 0] +[28620, 0] +[28650, 0] +[28680, 0] +[28710, 0] +[28740, 0] +[28770, 0] +[28800, 0] +[28830, 0] +[28860, 0] +[28890, 0] +[28920, 0] +[28950, 0] +[28980, 0] +[29010, 0] +[29040, 0] +[29070, 0] +[29100, 0] +[29130, 0] +[29160, 0] +[29190, 0] +[29220, 0] +[29250, 0] +[29280, 0] +[29310, 0] +[29340, 0] +[29370, 0] +[29400, 0] +[29430, 0] +[29460, 0] +[29490, 0] +[29520, 0] +[29550, 0] +[29580, 0] +[29610, 0] +[29640, 0] +[29670, 0] +[29700, 0] +[29730, 0] +[29760, 0] +[29790, 0] +[29820, 0] +[29850, 0] +[29880, 0] +[29910, 0] +[29940, 0] +[29970, 0] +[30000, 0] +[30030, 0] +[30060, 0] +[30090, 0] +[30120, 0] +[30150, 0] +[30180, 0] +[30210, 0] +[30240, 0] +[30270, 0] +[30300, 0] +[30330, 0] +[30360, 0] +[30390, 0] +[30420, 0] +[30450, 0] +[30480, 0] +[30510, 0] +[30540, 0] +[30570, 0] +[30600, 0] +[30630, 0] +[30660, 0] +[30690, 0] +[30720, 0] +[30750, 0] +[30780, 0] +[30810, 0] +[30840, 0] +[30870, 0] +[30900, 1] +[30930, 1] +[30960, 1] +[30990, 1] +[31020, 1] +[31050, 1] +[31080, 1] +[31110, 1] +[31140, 1] +[31170, 1] +[31200, 1] +[31230, 1] +[31260, 1] +[31290, 1] +[31320, 1] +[31350, 1] +[31380, 1] +[31410, 1] +[31440, 1] +[31470, 1] +[31500, 1] +[31530, 1] +[31560, 1] +[31590, 1] +[31620, 1] +[31650, 1] +[31680, 1] +[31710, 0] +[31740, 0] +[31770, 0] +[31800, 0] +[31830, 0] +[31860, 0] +[31890, 0] +[31920, 0] +[31950, 0] +[31980, 0] +[32010, 0] +[32040, 0] +[32070, 0] +[32100, 0] +[32130, 0] +[32160, 0] +[32190, 0] +[32220, 0] +[32250, 0] +[32280, 0] +[32310, 0] +[32340, 0] +[32370, 0] +[32400, 0] +[32430, 0] +[32460, 0] +[32490, 0] +[32520, 0] +[32550, 0] +[32580, 0] +[32610, 0] +[32640, 0] +[32670, 0] +[32700, 0] +[32730, 0] +[32760, 0] +[32790, 0] +[32820, 0] +[32850, 0] +[32880, 0] +[32910, 0] +[32940, 0] +[32970, 0] +[33000, 0] +[33030, 0] +[33060, 0] +[33090, 0] +[33120, 0] +[33150, 0] +[33180, 0] +[33210, 0] +[33240, 0] +[33270, 0] +[33300, 0] +[33330, 0] +[33360, 0] +[33390, 0] +[33420, 0] +[33450, 0] +[33480, 0] +[33510, 0] +[33540, 0] +[33570, 0] +[33600, 0] +[33630, 0] +[33660, 0] +[33690, 0] +[33720, 0] +[33750, 0] +[33780, 0] +[33810, 0] +[33840, 0] +[33870, 0] +[33900, 0] +[33930, 0] +[33960, 0] +[33990, 0] +[34020, 0] +[34050, 0] +[34080, 0] +[34110, 0] +[34140, 0] +[34170, 0] +[34200, 0] +[34230, 0] +[34260, 0] +[34290, 0] +[34320, 0] +[34350, 0] +[34380, 0] +[34410, 0] +[34440, 0] +[34470, 0] +[34500, 0] +[34530, 0] +[34560, 0] +[34590, 0] +[34620, 0] +[34650, 0] +[34680, 0] +[34710, 0] +[34740, 0] +[34770, 0] +[34800, 0] +[34830, 0] +[34860, 0] +[34890, 0] +[34920, 0] +[34950, 0] +[34980, 0] +[35010, 0] +[35040, 0] +[35070, 0] +[35100, 0] +[35130, 0] +[35160, 0] +[35190, 0] +[35220, 1] +[35250, 1] +[35280, 1] +[35310, 1] +[35340, 1] +[35370, 1] +[35400, 1] +[35430, 1] +[35460, 1] +[35490, 1] +[35520, 1] +[35550, 1] +[35580, 1] +[35610, 1] +[35640, 1] +[35670, 1] +[35700, 1] +[35730, 1] +[35760, 1] +[35790, 1] +[35820, 1] +[35850, 1] +[35880, 1] +[35910, 1] +[35940, 1] +[35970, 1] +[36000, 1] +[36030, 1] +[36060, 1] +[36090, 1] +[36120, 1] +[36150, 1] +[36180, 1] +[36210, 1] +[36240, 1] +[36270, 1] +[36300, 1] +[36330, 1] +[36360, 1] +[36390, 1] +[36420, 1] +[36450, 1] +[36480, 1] +[36510, 0] +[36540, 0] +[36570, 0] +[36600, 0] +[36630, 0] +[36660, 0] +[36690, 0] +[36720, 0] +[36750, 0] +[36780, 0] +[36810, 0] +[36840, 0] +[36870, 0] +[36900, 0] +[36930, 0] +[36960, 0] +[36990, 0] +[37020, 0] +[37050, 0] +[37080, 0] +[37110, 0] +[37140, 0] +[37170, 0] +[37200, 0] +[37230, 0] +[37260, 0] +[37290, 0] +[37320, 0] +[37350, 0] +[37380, 0] +[37410, 0] +[37440, 0] +[37470, 0] +[37500, 0] +[37530, 0] +[37560, 0] +[37590, 0] +[37620, 0] +[37650, 0] +[37680, 0] +[37710, 0] +[37740, 0] +[37770, 0] +[37800, 0] +[37830, 0] +[37860, 0] +[37890, 0] +[37920, 0] +[37950, 0] +[37980, 0] +[38010, 0] +[38040, 0] +[38070, 0] +[38100, 0] +[38130, 0] +[38160, 0] +[38190, 0] +[38220, 0] +[38250, 0] +[38280, 0] +[38310, 0] +[38340, 0] +[38370, 0] +[38400, 0] +[38430, 0] +[38460, 0] +[38490, 0] +[38520, 0] +[38550, 0] +[38580, 0] +[38610, 0] +[38640, 0] +[38670, 0] +[38700, 0] +[38730, 0] +[38760, 0] +[38790, 0] +[38820, 0] +[38850, 0] +[38880, 0] +[38910, 0] +[38940, 0] +[38970, 0] +[39000, 0] +[39030, 0] +[39060, 0] +[39090, 0] +[39120, 0] +[39150, 0] +[39180, 0] +[39210, 0] +[39240, 0] +[39270, 0] +[39300, 0] +[39330, 0] +[39360, 0] +[39390, 0] +[39420, 0] +[39450, 0] +[39480, 0] +[39510, 0] +[39540, 0] +[39570, 0] +[39600, 0] +[39630, 0] +[39660, 0] +[39690, 0] +[39720, 0] +[39750, 0] +[39780, 0] +[39810, 0] +[39840, 0] +[39870, 0] +[39900, 0] +[39930, 0] +[39960, 0] +[39990, 0] +[40020, 0] +[40050, 0] +[40080, 0] +[40110, 0] +[40140, 0] +[40170, 0] +[40200, 0] +[40230, 0] +[40260, 0] +[40290, 0] +[40320, 0] +[40350, 0] +[40380, 0] +[40410, 0] +[40440, 0] +[40470, 0] +[40500, 0] +[40530, 0] +[40560, 0] +[40590, 0] +[40620, 0] +[40650, 0] +[40680, 0] +[40710, 0] +[40740, 0] +[40770, 0] +[40800, 0] +[40830, 0] +[40860, 0] +[40890, 0] +[40920, 0] +[40950, 0] +[40980, 0] +[41010, 0] +[41040, 0] +[41070, 0] +[41100, 0] +[41130, 0] +[41160, 0] +[41190, 0] +[41220, 0] +[41250, 0] +[41280, 0] +[41310, 0] +[41340, 0] +[41370, 0] +[41400, 0] +[41430, 0] +[41460, 0] +[41490, 0] +[41520, 0] +[41550, 0] +[41580, 0] +[41610, 0] +[41640, 0] +[41670, 0] +[41700, 0] +[41730, 0] +[41760, 0] +[41790, 1] +[41820, 1] +[41850, 1] +[41880, 1] +[41910, 1] +[41940, 1] +[41970, 1] +[42000, 1] +[42030, 1] +[42060, 1] +[42090, 1] +[42120, 1] +[42150, 1] +[42180, 1] +[42210, 1] +[42240, 1] +[42270, 1] +[42300, 1] +[42330, 1] +[42360, 1] +[42390, 1] +[42420, 1] +[42450, 1] +[42480, 1] +[42510, 1] +[42540, 1] +[42570, 1] +[42600, 1] +[42630, 1] +[42660, 1] +[42690, 1] +[42720, 1] +[42750, 1] +[42780, 1] +[42810, 1] +[42840, 1] +[42870, 1] +[42900, 1] +[42930, 1] +[42960, 0] +[42990, 0] +[43020, 0] +[43050, 0] +[43080, 0] +[43110, 0] +[43140, 0] +[43170, 0] +[43200, 0] +[43230, 0] +[43260, 0] +[43290, 0] +[43320, 0] +[43350, 0] +[43380, 0] +[43410, 0] +[43440, 0] +[43470, 0] +[43500, 0] +[43530, 0] +[43560, 0] +[43590, 0] +[43620, 0] +[43650, 0] +[43680, 0] +[43710, 0] +[43740, 0] +[43770, 0] +[43800, 0] +[43830, 0] +[43860, 0] +[43890, 0] +[43920, 0] +[43950, 0] +[43980, 0] +[44010, 0] +[44040, 0] +[44070, 0] +[44100, 0] +[44130, 0] +[44160, 0] +[44190, 0] +[44220, 0] +[44250, 0] +[44280, 0] +[44310, 0] +[44340, 0] +[44370, 0] +[44400, 0] +[44430, 0] +[44460, 0] +[44490, 0] +[44520, 0] +[44550, 0] +[44580, 0] +[44610, 0] +[44640, 0] +[44670, 0] +[44700, 0] +[44730, 0] +[44760, 0] +[44790, 0] +[44820, 0] +[44850, 0] +[44880, 0] +[44910, 0] +[44940, 0] +[44970, 0] +[45000, 0] +[45030, 0] +[45060, 0] +[45090, 0] +[45120, 0] +[45150, 0] +[45180, 0] +[45210, 0] +[45240, 0] +[45270, 0] +[45300, 0] +[45330, 0] +[45360, 0] +[45390, 0] +[45420, 0] +[45450, 0] +[45480, 0] +[45510, 0] +[45540, 0] +[45570, 0] +[45600, 0] +[45630, 0] +[45660, 0] +[45690, 0] +[45720, 0] +[45750, 0] +[45780, 0] +[45810, 0] +[45840, 0] +[45870, 0] +[45900, 0] +[45930, 0] +[45960, 0] +[45990, 0] +[46020, 0] +[46050, 0] +[46080, 0] +[46110, 0] +[46140, 0] +[46170, 0] +[46200, 0] +[46230, 0] +[46260, 0] +[46290, 0] +[46320, 0] +[46350, 0] +[46380, 0] +[46410, 0] +[46440, 0] +[46470, 0] +[46500, 0] +[46530, 0] +[46560, 0] +[46590, 0] +[46620, 0] +[46650, 0] +[46680, 0] +[46710, 0] +[46740, 0] +[46770, 0] +[46800, 0] +[46830, 0] +[46860, 0] +[46890, 0] +[46920, 0] +[46950, 0] +[46980, 0] +[47010, 0] +[47040, 0] +[47070, 0] +[47100, 0] +[47130, 0] +[47160, 0] +[47190, 0] +[47220, 0] +[47250, 0] +[47280, 0] +[47310, 0] +[47340, 0] +[47370, 0] +[47400, 0] +[47430, 0] +[47460, 0] +[47490, 0] +[47520, 0] +[47550, 0] +[47580, 0] +[47610, 0] +[47640, 0] +[47670, 0] +[47700, 0] +[47730, 0] +[47760, 0] +[47790, 0] +[47820, 0] +[47850, 0] +[47880, 0] +[47910, 0] +[47940, 0] +[47970, 0] +[48000, 0] +[48030, 0] +[48060, 1] +[48090, 1] +[48120, 1] +[48150, 1] +[48180, 1] +[48210, 1] +[48240, 1] +[48270, 1] +[48300, 1] +[48330, 1] +[48360, 1] +[48390, 1] +[48420, 1] +[48450, 1] +[48480, 1] +[48510, 1] +[48540, 1] +[48570, 1] +[48600, 1] +[48630, 1] +[48660, 1] +[48690, 1] +[48720, 1] +[48750, 1] +[48780, 1] +[48810, 1] +[48840, 1] +[48870, 1] +[48900, 1] +[48930, 1] +[48960, 1] +[48990, 1] +[49020, 1] +[49050, 1] +[49080, 1] +[49110, 1] +[49140, 1] +[49170, 1] +[49200, 1] +[49230, 1] +[49260, 1] +[49290, 1] +[49320, 1] +[49350, 1] +[49380, 1] +[49410, 1] +[49440, 1] +[49470, 1] +[49500, 1] +[49530, 1] +[49560, 1] +[49590, 1] +[49620, 1] +[49650, 1] +[49680, 1] +[49710, 1] +[49740, 1] +[49770, 1] +[49800, 1] +[49830, 1] +[49860, 1] +[49890, 1] +[49920, 1] +[49950, 0] +[49980, 0] +[50010, 0] +[50040, 0] +[50070, 0] +[50100, 0] +[50130, 0] +[50160, 0] +[50190, 0] +[50220, 0] +[50250, 0] +[50280, 0] +[50310, 0] +[50340, 0] +[50370, 0] +[50400, 0] +[50430, 0] +[50460, 0] +[50490, 0] +[50520, 0] +[50550, 0] +[50580, 0] +[50610, 0] +[50640, 0] +[50670, 0] +[50700, 0] +[50730, 0] +[50760, 0] +[50790, 0] +[50820, 0] +[50850, 0] +[50880, 0] +[50910, 0] +[50940, 0] +[50970, 0] +[51000, 0] +[51030, 0] +[51060, 0] +[51090, 0] +[51120, 0] +[51150, 0] +[51180, 0] +[51210, 0] +[51240, 0] +[51270, 0] +[51300, 0] +[51330, 0] +[51360, 0] +[51390, 0] +[51420, 0] +[51450, 0] +[51480, 0] +[51510, 0] +[51540, 0] +[51570, 0] +[51600, 0] +[51630, 0] +[51660, 0] +[51690, 0] +[51720, 0] +[51750, 0] +[51780, 0] +[51810, 0] +[51840, 0] +[51870, 0] +[51900, 0] +[51930, 0] +[51960, 0] +[51990, 0] +[52020, 0] +[52050, 0] +[52080, 0] +[52110, 0] +[52140, 0] +[52170, 0] +[52200, 0] +[52230, 0] +[52260, 0] +[52290, 0] +[52320, 0] +[52350, 0] +[52380, 0] +[52410, 0] +[52440, 0] +[52470, 0] +[52500, 0] +[52530, 0] +[52560, 0] +[52590, 0] +[52620, 0] +[52650, 0] +[52680, 0] +[52710, 0] +[52740, 0] +[52770, 0] +[52800, 0] +[52830, 0] +[52860, 0] +[52890, 0] +[52920, 0] +[52950, 0] +[52980, 0] +[53010, 0] +[53040, 0] +[53070, 0] +[53100, 0] +[53130, 0] +[53160, 0] +[53190, 0] +[53220, 0] +[53250, 0] +[53280, 0] +[53310, 0] +[53340, 0] +[53370, 0] +[53400, 0] +[53430, 0] +[53460, 0] +[53490, 0] +[53520, 0] +[53550, 0] +[53580, 0] +[53610, 0] +[53640, 0] +[53670, 0] +[53700, 0] +[53730, 0] +[53760, 0] +[53790, 0] +[53820, 0] +[53850, 0] +[53880, 0] +[53910, 0] +[53940, 0] +[53970, 0] +[54000, 0] +[54030, 0] +[54060, 0] +[54090, 0] +[54120, 0] +[54150, 0] +[54180, 0] +[54210, 0] +[54240, 0] +[54270, 0] +[54300, 0] +[54330, 0] +[54360, 0] +[54390, 0] +[54420, 0] +[54450, 0] +[54480, 0] +[54510, 0] +[54540, 0] +[54570, 0] +[54600, 0] +[54630, 0] +[54660, 0] +[54690, 0] +[54720, 0] +[54750, 0] +[54780, 0] +[54810, 0] +[54840, 0] +[54870, 0] +[54900, 0] +[54930, 0] +[54960, 0] +[54990, 0] +[55020, 0] +[55050, 0] +[55080, 0] +[55110, 0] +[55140, 0] +[55170, 0] +[55200, 0] +[55230, 0] +[55260, 0] +[55290, 0] +[55320, 0] +[55350, 0] +[55380, 0] +[55410, 0] +[55440, 0] +[55470, 0] +[55500, 0] +[55530, 0] +[55560, 0] +[55590, 0] +[55620, 0] +[55650, 0] +[55680, 0] +[55710, 0] +[55740, 0] +[55770, 0] +[55800, 0] +[55830, 0] +[55860, 0] +[55890, 0] +[55920, 0] +[55950, 0] +[55980, 0] +[56010, 0] +[56040, 0] +[56070, 0] +[56100, 0] +[56130, 0] +[56160, 0] +[56190, 0] +[56220, 0] +[56250, 0] +[56280, 0] +[56310, 0] +[56340, 0] +[56370, 0] +[56400, 0] +[56430, 0] +[56460, 0] +[56490, 0] +[56520, 0] +[56550, 0] +[56580, 0] +[56610, 0] +[56640, 0] +[56670, 0] +[56700, 0] +[56730, 0] +[56760, 0] +[56790, 0] +[56820, 0] +[56850, 0] +[56880, 0] +[56910, 0] +[56940, 0] +[56970, 0] +[57000, 0] +[57030, 0] +[57060, 0] +[57090, 0] +[57120, 0] +[57150, 0] +[57180, 0] +[57210, 0] +[57240, 0] +[57270, 0] +[57300, 0] +[57330, 0] +[57360, 0] +[57390, 0] +[57420, 0] +[57450, 1] +[57480, 1] +[57510, 1] +[57540, 1] +[57570, 1] +[57600, 1] +[57630, 1] +[57660, 1] +[57690, 1] +[57720, 1] +[57750, 1] +[57780, 1] +[57810, 1] +[57840, 1] +[57870, 1] +[57900, 1] +[57930, 1] +[57960, 1] +[57990, 1] +[58020, 1] +[58050, 1] +[58080, 1] +[58110, 1] +[58140, 1] +[58170, 1] +[58200, 1] +[58230, 1] +[58260, 1] +[58290, 1] +[58320, 1] +[58350, 1] +[58380, 1] +[58410, 1] +[58440, 1] +[58470, 1] +[58500, 1] +[58530, 1] +[58560, 1] +[58590, 1] +[58620, 0] +[58650, 0] +[58680, 0] +[58710, 0] +[58740, 0] +[58770, 0] +[58800, 0] +[58830, 0] +[58860, 0] +[58890, 0] +[58920, 0] +[58950, 0] +[58980, 0] +[59010, 0] +[59040, 0] +[59070, 0] +[59100, 0] +[59130, 0] +[59160, 0] +[59190, 0] +[59220, 0] +[59250, 0] +[59280, 0] +[59310, 0] +[59340, 0] +[59370, 0] +[59400, 0] +[59430, 0] +[59460, 0] +[59490, 0] +[59520, 0] +[59550, 0] +[59580, 0] +[59610, 0] +[59640, 0] +[59670, 0] +[59700, 0] +[59730, 0] +[59760, 0] +[59790, 0] +[59820, 0] +[59850, 0] +[59880, 0] +[59910, 0] +[59940, 0] +[59970, 0] +[60000, 0] +[60030, 0] +[60060, 0] +[60090, 0] +[60120, 0] +[60150, 0] +[60180, 0] +[60210, 0] +[60240, 0] +[60270, 0] +[60300, 0] +[60330, 0] +[60360, 0] +[60390, 0] +[60420, 0] +[60450, 0] +[60480, 0] +[60510, 0] +[60540, 0] +[60570, 0] +[60600, 0] +[60630, 0] +[60660, 0] +[60690, 0] +[60720, 0] +[60750, 0] +[60780, 0] +[60810, 0] +[60840, 0] +[60870, 0] +[60900, 0] +[60930, 0] +[60960, 0] +[60990, 0] +[61020, 0] +[61050, 0] +[61080, 0] +[61110, 0] +[61140, 0] +[61170, 0] +[61200, 0] +[61230, 0] +[61260, 0] +[61290, 0] +[61320, 0] +[61350, 0] +[61380, 0] +[61410, 0] +[61440, 0] +[61470, 0] +[61500, 0] +[61530, 0] +[61560, 0] +[61590, 0] +[61620, 0] +[61650, 0] +[61680, 0] +[61710, 0] +[61740, 0] +[61770, 0] +[61800, 0] +[61830, 0] +[61860, 0] +[61890, 0] +[61920, 0] +[61950, 0] +[61980, 0] +[62010, 0] +[62040, 0] +[62070, 0] +[62100, 0] +[62130, 0] +[62160, 0] +[62190, 0] +[62220, 0] +[62250, 0] +[62280, 0] +[62310, 0] +[62340, 0] +[62370, 0] +[62400, 0] +[62430, 0] +[62460, 0] +[62490, 0] +[62520, 0] +[62550, 0] +[62580, 0] +[62610, 0] +[62640, 0] +[62670, 0] +[62700, 0] +[62730, 0] +[62760, 0] +[62790, 0] +[62820, 0] +[62850, 0] +[62880, 0] +[62910, 0] +[62940, 0] +[62970, 0] +[63000, 0] +[63030, 0] +[63060, 0] +[63090, 0] +[63120, 0] +[63150, 0] +[63180, 0] +[63210, 0] +[63240, 0] +[63270, 0] +[63300, 0] +[63330, 0] +[63360, 0] +[63390, 0] +[63420, 0] +[63450, 0] +[63480, 0] +[63510, 0] +[63540, 0] +[63570, 0] +[63600, 0] +[63630, 0] +[63660, 0] +[63690, 0] +[63720, 0] +[63750, 0] +[63780, 0] +[63810, 0] +[63840, 0] +[63870, 0] +[63900, 0] +[63930, 0] +[63960, 0] +[63990, 0] +[64020, 0] +[64050, 0] +[64080, 0] +[64110, 0] +[64140, 0] +[64170, 0] +[64200, 0] +[64230, 0] +[64260, 0] +[64290, 0] +[64320, 0] +[64350, 0] +[64380, 0] +[64410, 0] +[64440, 0] +[64470, 0] +[64500, 0] +[64530, 0] +[64560, 0] +[64590, 0] +[64620, 0] +[64650, 0] +[64680, 0] +[64710, 0] +[64740, 0] +[64770, 0] +[64800, 0] +[64830, 0] +[64860, 0] +[64890, 0] +[64920, 0] +[64950, 0] +[64980, 0] +[65010, 0] +[65040, 0] +[65070, 0] +[65100, 0] +[65130, 0] +[65160, 0] +[65190, 0] +[65220, 0] +[65250, 0] +[65280, 0] +[65310, 0] +[65340, 0] +[65370, 0] +[65400, 0] +[65430, 0] +[65460, 0] +[65490, 0] +[65520, 0] +[65550, 0] +[65580, 0] +[65610, 0] +[65640, 0] +[65670, 0] +[65700, 0] +[65730, 0] +[65760, 0] +[65790, 0] +[65820, 0] +[65850, 0] +[65880, 0] +[65910, 0] +[65940, 0] +[65970, 0] +[66000, 0] +[66030, 0] +[66060, 0] +[66090, 0] +[66120, 0] +[66150, 0] +[66180, 0] +[66210, 0] +[66240, 0] +[66270, 0] +[66300, 0] +[66330, 0] +[66360, 0] +[66390, 1] +[66420, 1] +[66450, 1] +[66480, 1] +[66510, 1] +[66540, 1] +[66570, 1] +[66600, 1] +[66630, 1] +[66660, 1] +[66690, 1] +[66720, 1] +[66750, 1] +[66780, 1] +[66810, 1] +[66840, 1] +[66870, 1] +[66900, 1] +[66930, 1] +[66960, 1] +[66990, 1] +[67020, 1] +[67050, 1] +[67080, 1] +[67110, 1] +[67140, 1] +[67170, 1] +[67200, 1] +[67230, 0] +[67260, 0] +[67290, 0] +[67320, 0] +[67350, 0] +[67380, 0] +[67410, 0] +[67440, 0] +[67470, 0] +[67500, 0] +[67530, 0] +[67560, 0] +[67590, 0] +[67620, 0] +[67650, 0] +[67680, 0] +[67710, 0] +[67740, 0] +[67770, 0] +[67800, 0] +[67830, 0] +[67860, 0] +[67890, 0] +[67920, 0] +[67950, 0] +[67980, 0] +[68010, 0] +[68040, 0] +[68070, 0] +[68100, 0] +[68130, 0] +[68160, 0] +[68190, 0] +[68220, 0] +[68250, 0] +[68280, 0] +[68310, 0] +[68340, 0] +[68370, 0] +[68400, 0] +[68430, 0] +[68460, 0] +[68490, 0] +[68520, 0] +[68550, 0] +[68580, 0] +[68610, 0] +[68640, 0] +[68670, 0] +[68700, 0] +[68730, 0] +[68760, 0] +[68790, 0] +[68820, 0] +[68850, 0] +[68880, 0] +[68910, 0] +[68940, 0] +[68970, 0] +[69000, 0] +[69030, 0] +[69060, 0] +[69090, 0] +[69120, 0] +[69150, 0] +[69180, 0] +[69210, 0] +[69240, 0] +[69270, 0] +[69300, 0] +[69330, 0] +[69360, 0] +[69390, 0] +[69420, 0] +[69450, 0] +[69480, 0] +[69510, 0] +[69540, 0] +[69570, 0] +[69600, 0] +[69630, 0] +[69660, 0] +[69690, 0] +[69720, 0] +[69750, 0] +[69780, 0] +[69810, 0] +[69840, 0] +[69870, 0] +[69900, 0] +[69930, 0] +[69960, 0] +[69990, 0] +[70020, 0] +[70050, 0] +[70080, 0] +[70110, 0] +[70140, 0] +[70170, 0] +[70200, 0] +[70230, 0] +[70260, 0] +[70290, 0] +[70320, 0] +[70350, 0] +[70380, 0] +[70410, 0] +[70440, 0] +[70470, 0] +[70500, 0] +[70530, 0] +[70560, 0] +[70590, 0] +[70620, 0] +[70650, 0] +[70680, 0] +[70710, 0] +[70740, 0] +[70770, 0] +[70800, 0] +[70830, 0] +[70860, 0] +[70890, 0] +[70920, 0] +[70950, 0] +[70980, 0] +[71010, 0] +[71040, 0] +[71070, 0] +[71100, 0] +[71130, 0] +[71160, 0] +[71190, 0] +[71220, 0] +[71250, 0] +[71280, 0] +[71310, 0] +[71340, 0] +[71370, 0] +[71400, 0] +[71430, 0] +[71460, 0] +[71490, 0] +[71520, 0] +[71550, 0] +[71580, 0] +[71610, 0] +[71640, 0] +[71670, 0] +[71700, 0] +[71730, 0] +[71760, 0] +[71790, 0] +[71820, 0] +[71850, 0] +[71880, 0] diff --git a/searching_upperleft_banner/searching_upperleft_banner.py b/searching_upperleft_banner/searching_upperleft_banner.py new file mode 100644 index 0000000..8b9637c --- /dev/null +++ b/searching_upperleft_banner/searching_upperleft_banner.py @@ -0,0 +1,222 @@ +""" +# File Name: searching_left_banner +# Team: standardization +# Programmer: wpdudH +# Start Date: 07/15/20 +#Last Update: September 28, 2020 +# Purpose: Raw video consists of in-game videos and replay videos. +# So we need to distinguish between in-game videos and replay videos. +# This program carries out that work. +""" + +import cv2 as cv +import numpy as np +# from matplotlib import pyplot as plt + +def check_algorithm(frame_resize: np.ndarray, compare_image: np.ndarray) -> bool: + """ + Comparing video's capture to replay banner image to use sift algorithm + Args: + frame_resize: Resized frame for compare + compare_image: Image file for comparison + Returns: + If list name of good has more than 30 values, return 1 (It means this frame is replay) + If not, returns 0 (It means this frame is in-game) + Raises: + N/A + """ + sift = cv.xfeatures2d.SIFT_create() + + # frame_resize = cv.cvtColor(frame_resize, cv.COLOR_BGR2GRAY) + + keypoint_1, descriptor_1 = sift.detectAndCompute(frame_resize, None) + keypoint_2, descriptor_2 = sift.detectAndCompute(compare_image, None) + + bf = cv.BFMatcher() + matches = bf.knnMatch(descriptor_1, descriptor_2, k=2) + + good = [] + for m, n in matches: + if m.distance < 0.75 * n.distance: + good.append([m]) + + # plt_image = cv.drawMatchesKnn(frame_resize, keypoint_1, compare_image, keypoint_2, good, None, flags=2) + # plt.imshow(plt_image) + # plt.show() + + if len(good) > 30: + return False + else: + return True + +''' +def checklist_writer(compare_result:list) -> None: + """ + Write check file consisting of results comparing video's capture to replay banner image + Args: + compare_result: list of result of compare + Returns: + None + Raises: + N/A + """ + classified = [] + for i in range(len(compare_result)): + classified.append("[{}, {}]".format(i * 30, compare_result[i])) + # Store the video's play time and result of check_algorithm in the list named classified + + with open("checker.txt", 'w') as file: + for i in range(len(classified)): + text = classified[i] + file.writelines(text+'\n') + # Write csv file consisting of values of list named classified +''' + +def frame_resize(frame: np.ndarray, image: int) -> np.ndarray: + """ + Resize frame to be compared + Args: + frame: Frame of video + image: Determinist of frame resize value + If image value is 0, frame will be resized to the same size as the replay banner + If image value is 1, frame will be resized to the same size as the highlight banner + If image value is 2, frame will be resized to the same size as the pro view banner + Returns: + frame_resize: Resized frame + Raises: + N/A + """ + height, width = frame.shape + + if image == 0: + start_height = round(45 / 1080 * height) + start_width = 0 + end_width = round(254 / 1920 * width) + end_height = round(122 / 1080 * height) + # replay_banner start point : (0,45) + # replay_banner end point : (254,122) + elif image == 1: + start_height = round(45 / 1080 * height) + start_width = 0 + end_width = round(339 / 1920 * width) + end_height = round(122 / 1080 * height) + # highlight_banner start point : (0,45) + # highlight_banner end point : (339,122) + else: + start_height = round(45 / 1080 * height) + start_width = round(1592 / 1920 * width) + end_width = 1920 + end_height = round(122 / 1080 * height) + # pro_view_banner start point : (1592,45) + # pro_view_banner end point : (1920,122) + + frame_resize = frame[start_height:end_height, start_width:end_width] + # resizing frame to reduce the computation + + return frame_resize + +''' +def store_video(video_name:str, video_path:str, compare_images: list ) -> None: + """ + Storing in-game video + Args: + video_path:Video's path to be stored + compare_image: Image comparing with frame + video_name: File name of video + Returns: + None + Raises: + N/A + """ + # compare_result = [] + video_capture = cv.VideoCapture(video_path) + + total_frames = video_capture.get(cv.CAP_PROP_FRAME_COUNT) + fps = video_capture.get(cv.CAP_PROP_FPS) + width = video_capture.get(cv.CAP_PROP_FRAME_WIDTH) + height = video_capture.get(cv.CAP_PROP_FRAME_HEIGHT) + + fourcc = cv.VideoWriter_fourcc(*"mp4v") + output_video = cv.VideoWriter(video_name+".mp4", fourcc, fps, (int(width), int(height))) + + check = False + # If check is True, start storing frame + # If check is False, stop storing frame + + print("here") + + while True: + ret, frame = video_capture.read() + + if not ret: + print("There is no frame.Check the video file") + break + + + if video_capture.get(cv.CAP_PROP_POS_FRAMES) % int(fps) == 0: + if check_algorithm(frame_resize(frame, 0), compare_images[0]) == 1 or check_algorithm(frame_resize(frame, 2), compare_images[2]) == 1: + # compare frame with replay_banner and pro view banner + # compare_result.append('1') + check = False + print("replay") + else: + if video_capture.get(cv.CAP_PROP_POS_FRAMES) > total_frames - (240 * fps): + if check_algorithm(frame_resize(frame, 1), compare_images[1]) == 1 or check_algorithm(frame_resize(frame, 2), compare_images[2]) == 1: + # compare frame with highlight_banner and pro view banner + break + # compare_result.append('0') + check = True + print("ingame") + + if check == True: + output_video.write(frame) + # cv.imshow("output", frame) + + # if cv.waitKey(1) > 0: break + + if video_capture.get(cv.CAP_PROP_POS_FRAMES) == video_capture.get(cv.CAP_PROP_FRAME_COUNT): + break + + video_capture.release() + cv.destroyAllWindows() + + # checklist_writer(compare_result) + ''' + +def resource(path:str) -> np.ndarray: + """ + Changing the type of picture file with path + Args: + path: File's local path + Returns: + black-and-white image + Raises: + N/A + """ + return cv.imread(path, cv.IMREAD_GRAYSCALE) + +""" +def main() -> None: + replay_banner_path = "C:/Users/82102/PycharmProjects/LoL-eSports-Highlight-Extractor/resources/replay_banner.png" + replay_banner = resource(replay_banner_path) + highlight_banner_path = "C:/Users/82102/PycharmProjects/LoL-eSports-Highlight-Extractor/resources/highlight.png" + highlight_banner = resource(highlight_banner_path) + pro_view_banner_path = "C:/Users/82102/PycharmProjects/LoL-eSports-Highlight-Extractor/resources/pro view.png" + pro_view_banner = resource(pro_view_banner_path) + + + compare_images = [] + compare_images.append(replay_banner) + compare_images.append(highlight_banner) + compare_images.append(pro_view_banner) + + video_path = "./resources/standardization/sample_video" + video_list = os.listdir(video_path) + + for video_file in video_list: + new_video_path = video_path + "/" + video_file + store_video(video_file[0:len(video_file) - 4], new_video_path, compare_images) + +if __name__ == '__main__': + main() + """ \ No newline at end of file