{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport glob as glob\nimport cv2\nimport matplotlib.pyplot as plt","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cover = glob.glob('../input/alaska2-image-steganalysis/Cover/*')\njmipod = glob.glob('../input/alaska2-image-steganalysis/JMiPOD/*')\njuniward = glob.glob('../input/alaska2-image-steganalysis/JUNIWARD/*')\nuerd = glob.glob('../input/alaska2-image-steganalysis/UERD/*')\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"fig=plt.figure(figsize=(20, 20))\ncolumns = 4\nrows = 5\nfor j in ('cover','jmipod','juniward','uerd'):\n    for i in range(1, columns*rows +1):\n        img = cv2.imread(cover[i])\n        fig.add_subplot(rows, columns, i)\n        plt.title(cover[i].split('/')[-1])\n        plt.imshow(img)\nplt.suptitle('Samples from Cover Images', fontsize=14)\nplt.show()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"fig, ax = plt.subplots(nrows=3, ncols=4, figsize=(20, 15))\nfor i in range(3):\n    '''\n    If you want to print more images just change the values in range and ncols in subplot\n    \n    '''\n    cvimg = cv2.imread(cover[i])\n    uniimg = cv2.imread(juniward[i])\n    jpodimg = cv2.imread(jmipod[i])\n    uerdimg = cv2.imread(uerd[i])\n    \n    ax[i,0].imshow(cvimg)\n    ax[i,0].set_title('Cover_IMG')\n    ax[i,1].imshow(uniimg)\n    ax[i,1].set_title('JNIWARD_IMG')\n    ax[i,2].imshow(jpodimg)\n    ax[i,2].set_title('JMiPOD_IMG')\n    ax[i,3].imshow(uerdimg)\n    ax[i,3].set_title('UERD_IMG')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"img_cover = cv2.imread(cover[i])\nimg_juniward = cv2.imread(juniward[i])\nimg_jmipod = cv2.imread(jmipod[i])\nimg_uerd = cv2.imread(uerd[i])\n    \n\nfig, ax = plt.subplots(nrows=3, ncols=4, figsize=(16, 12))\nax[0,0].imshow(img_jmipod)\nax[0,1].imshow((img_cover == img_jmipod).astype(int)[:,:,0])\nax[0,1].set_title( 'Channel 0')\n\nax[0,2].imshow((img_cover == img_jmipod).astype(int)[:,:,1])\nax[0,2].set_title('Channel 1')\nax[0,3].imshow((img_cover == img_jmipod).astype(int)[:,:,2])\nax[0,3].set_title('Channel 2')\nax[0,0].set_ylabel('JMiPOD', rotation=90, size='large', fontsize=14)\n\n\nax[1,0].imshow(img_juniward)\nax[1,1].imshow((img_cover == img_juniward).astype(int)[:,:,0])\nax[1,2].imshow((img_cover == img_juniward).astype(int)[:,:,1])\nax[1,3].imshow((img_cover == img_juniward).astype(int)[:,:,2])\nax[1,0].set_ylabel('JUNIWARD', rotation=90, size='large', fontsize=14)\n\nax[2,0].imshow(img_uerd)\nax[2,1].imshow((img_cover == img_uerd).astype(int)[:,:,0])\nax[2,2].imshow((img_cover == img_uerd).astype(int)[:,:,1])\nax[2,3].imshow((img_cover == img_uerd).astype(int)[:,:,2])\nax[2,0].set_ylabel('UERD', rotation=90, size='large', fontsize=14)\n\nplt.suptitle('Pixel Deviation from Cover Image', fontsize=14)\n\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":4}