<jupyter_start><jupyter_text>Profile Usagep = cProfile()p.runcall(vsm, tags[0], tags[1])p.print_stats()<jupyter_code>from matplotlib.pyplot import imshow
%matplotlib inline
IMG = './292.bmp'
img = cv2.imread(IMG)
#print('Image Dimensions :', img.shape)
#imshow(img)
g_img = cv2.imread(IMG, cv2.IMREAD_GRAYSCALE)
print('Image Dimensions :', g_img.shape)
#imshow(img)
#cProfile.run("for i in range(1000) : cv2.morphologyEx(g_img, cv2.MORPH_OPEN, (5,5))")
#imshow(m_img, cmap='gray')
t1 = timer()
ttt = cv2.morphologyEx(g_img, cv2.MORPH_OPEN, (5,5))
t2 = timer()
print("Time Used", t2 - t1, "second")
t1 = time.time()
ttt = cv2.morphologyEx(g_img, cv2.MORPH_OPEN, (5,5))
t2 = time.time()
print("Time Used", t2 - t1, "second")
t1 = time.process_time()
ttt = cv2.morphologyEx(g_img, cv2.MORPH_OPEN, (5,5))
t2 = time.process_time()
print("Time Used", t2 - t1, "second")<jupyter_output>Time Used 0.0007050049999999253 second
{'fraction_non_alphanumeric': 0.1821155943293348, 'fraction_numerical': 0.06543075245365322, 'mean_word_length': 6.463414634146342, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '597415', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 435, 'n_tokens_neox': 414, 'n_words': 76, 'path': 'OpenCV/morphology/cv2_morphology_profile.ipynb', 'repo_name': 'alexhegit/TryTryTry', 'size': '917'}