File size: 735 Bytes
a1074ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import cv2
import os
import matplotlib.pyplot as plt

class DifferencesCalculate:
  def display(input_folder, result_folder):
    dir = os.getcwd()
    img_input = DifferencesCalculate.imread(dir + "\\" + input_folder)
    img_output = DifferencesCalculate.imread(dir + "\\" + result_folder)
    fig = plt.figure(figsize=(25, 10))
    ax1 = fig.add_subplot(1, 2, 1) 
    plt.title('Original Image (In)', fontsize=16)
    ax1.axis('off')
    ax2 = fig.add_subplot(1, 2, 2)
    plt.title('High Quality (Out)', fontsize=16)
    ax2.axis('off')
    ax1.imshow(img_input)
    ax2.imshow(img_output)
  
  def imread(img_path):
    img = cv2.imread(img_path)
    img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    return img