Project

General

Profile

Feature #461 » imageReader_v0.2.py

Anonymous, 01/04/2022 07:45 PM

 
1
# Vaibhav GUPTA - Made the skeleton python code for reading the image
2
# ˅˅˅˅˅
3
    from configure_reader import ConfigureReader
4
    import cv2
5

    
6
    # Image is converted from RGB to RGBA
7
    class ImageReader(object):
8
        # Constructor
9
        def __init__(self):
10
            pass
11

    
12
        def getImage(self):
13
            imagePath = []   
14

    
15
            # Imported from "configure_reader" file or any file name responsible for configuring it
16
            cR = Config_Reader()
17

    
18
            imageLeft = cv2.imread(cR.getImageLeftPath())
19
            imagePath.append(imageLeft)
20
            imageRight = cv2.imread(cR.getImageRightPath())
21
            imagePath.append(imageRight)
22

    
23
            # Return RGBA image in numpy array format
24
            return imagePath
25
# ˄˄˄˄˄
(1-1/2)