<jupyter_start><jupyter_text>**LETS <NAME>RE(VIP) JANUARY 2022**  **IMAGE TO PENCIL SKETCH WITH PYTHON**  **IMPORTING LIBRARIES**<jupyter_code>import cv2
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>**LOADING IMAGE**<jupyter_code>from google.colab import files
upload=files.upload()
pic = cv2.imread("lion (1).jpg")
pic<jupyter_output><empty_output><jupyter_text>**ORGINAL IMAGE**<jupyter_code>plt.imshow(pic[:,:,::-1])
plt.axis(False)
plt.show()
plt.imshow(pic)
plt.axis(False)
plt.show()
RGB_pic = cv2.cvtColor(pic, cv2.COLOR_BGR2RGB)
plt.imshow(RGB_pic)
plt.axis(False)
plt.show()
grey_pic =cv2.cvtColor(pic, cv2.COLOR_BGR2GRAY)
invert_pic =cv2.bitwise_not(grey_pic)
blur_pic =cv2.GaussianBlur(invert_pic, (111,111),0)
invblur_pic =cv2.bitwise_not(blur_pic)
sketch_pic = cv2.divide(grey_pic, invblur_pic, scale=256.0)<jupyter_output><empty_output><jupyter_text>**PENCIL SKETCH**<jupyter_code>plt.figure(figsize=(14,8))
plt.subplot(1,2,1)
plt.title('Orginal', size=18)
plt.imshow(RGB_pic)
plt.axis('off')
plt.subplot(1,2,2)
plt.title('Pencil Sketch', size=18)
rgb_sketch=cv2.cvtColor(sketch_pic, cv2.COLOR_BGR2RGB)
plt.imshow(rgb_sketch)
plt.axis('off')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16802610114192496, 'fraction_numerical': 0.0367047308319739, 'mean_word_length': 10.36111111111111, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '637453', 'license': 'Unlicense', 'n_tokens_mistral': 599, 'n_tokens_neox': 558, 'n_words': 67, 'path': 'Lets_Grow_More_Task_2(Image_to_Sketch).ipynb', 'repo_name': 'Saiteja2812/LGM-TASK-2', 'size': '1227'}