Project

General

Profile

Feature #489 » ImageReader.py

Anonymous, 01/12/2022 11:04 PM

 
1
import cv2 as cv
2
import numpy as np
3
from ConfigureReader import ConfigureReader
4

    
5
CR = ConfigureReader()
6

    
7
##
8
# @brief
9
#
10
# This class reads images and normalize them into numpy array tuple.
11
# This class is made by Shiva, Doxygened by Rikuto Momoi
12
#
13

    
14

    
15
class ImageReader(object):
16

    
17
    # The constructer
18
    def __init__(self):
19
        pass
20

    
21
    ##
22
    # @brief 
23
    # Get image in numpy array
24
    # @return normalized numpy array
25
    def getImage(self):
26
        return np.array(cv.imread(CR.getImageName()[0]))/255, np.array(cv.imread(CR.getImageName()[1]))/255
(1-1/2)