<jupyter_start><jupyter_text>Importing the libraries<jupyter_code>import numpy as np
import cv2<jupyter_output><empty_output><jupyter_text>Storing Image1 in a variable & displaying it<jupyter_code>image1 = cv2.imread("image1.jpg")
cv2.imshow("1st Image", image1)
cv2.waitKey()
cv2.destroyAllWindows()<jupyter_output><empty_output><jupyter_text>Storing Image2 in a variable & displaying it<jupyter_code>image2 = cv2.imread("image2.jpg")
cv2.imshow("2nd Image", image2)
cv2.waitKey()
cv2.destroyAllWindows()<jupyter_output><empty_output><jupyter_text>Cropping 1st Image & showing only the photo frame<jupyter_code>image1_cropped = image1[60:410,190:610]
cv2.imshow("1st Cropped Image", image1_cropped)
cv2.waitKey()
cv2.destroyAllWindows()<jupyter_output><empty_output><jupyter_text>Cropping 2nd Image & showing only the photo frame<jupyter_code>image2_cropped = image2[110:385,200:564]
cv2.imshow("2nd Cropped Image", image2_cropped)
cv2.waitKey()
cv2.destroyAllWindows()<jupyter_output><empty_output><jupyter_text>Resizing both cropped frames<jupyter_code>image1_resized = cv2.resize(image1_cropped,(image2_cropped.shape[1],image2_cropped.shape[0]))
image2_resized = cv2.resize(image2_cropped,(image1_cropped.shape[1],image1_cropped.shape[0]))<jupyter_output><empty_output><jupyter_text>Swapping the photo frame & Showing 1st updated image<jupyter_code>image1[60:410,190:610] = image2_resized
cv2.imshow("1st Image", image1)
cv2.waitKey()
cv2.destroyAllWindows()<jupyter_output><empty_output><jupyter_text>Swapping the photo frame & Showing 1st updated image<jupyter_code>image2[110:385,200:564] = image1_resized
cv2.imshow("1st Image", image2)
cv2.waitKey()
cv2.destroyAllWindows()<jupyter_output><empty_output><jupyter_text>Saving both the new images<jupyter_code>cv2.imwrite("image1_new.jpg", image1)
cv2.imwrite("image2_new.jpg", image2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12399786210582577, 'fraction_numerical': 0.06253340459647247, 'mean_word_length': 11.910344827586206, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '499134', 'license': 'MIT', 'n_tokens_mistral': 768, 'n_tokens_neox': 728, 'n_words': 99, 'path': 'Swapping Images.ipynb', 'repo_name': 'raktim00/Basic_Image_Processing_Cv2', 'size': '1871'}