Feature #473 » imageReader.py
| 1 |
#Sivashankar Athiraj - Made the Image reading code for the picture
|
|---|---|
| 2 |
# ˅˅˅˅˅
|
| 3 |
from configure_reader import Configure_Reader |
| 4 |
import cv2 |
| 5 |
|
| 6 |
# Image is changed from RGB to RGBA
|
| 7 |
class ImageReader(object): |
| 8 |
# Constructor
|
| 9 |
def __init__(self): |
| 10 |
|
| 11 |
pass
|
| 12 |
|
| 13 |
def getImage(self): |
| 14 |
|
| 15 |
imagePath = [] |
| 16 |
CR = Configure_Reader() |
| 17 |
imageLeft = cv2.imread(CR.isImageLeft()) |
| 18 |
imagePath.append(imageLeft) |
| 19 |
imageRight = cv2.imread(CR.isImageRight()) |
| 20 |
imagePath.append(imageRight) |
| 21 |
|
| 22 |
# Return the image which is RGBA in numpy array format
|
| 23 |
return imagePath |