Example #1
0
    def cam3(self):
        """Generator to read image files for cam0 (RGB right)."""
        impath = os.path.join(self.sequence_path, 'image_3', '*.png')
        imfiles = sorted(glob.glob(impath))
        # Subselect the chosen range of frames, if any
        if self.frames is not None:
            imfiles = [imfiles[i] for i in self.frames]

        # Return a generator yielding the images
        return utils.get_images(imfiles, self.imformat)
Example #2
0
    def cam2(self):
        """Generator to read image files for cam2 (RGB left)."""
        impath = os.path.join(self.data_path, 'image_02', 'data',
                              '*.{}'.format(self.imtype))
        imfiles = sorted(glob.glob(impath))
        # Subselect the chosen range of frames, if any
        if self.frames is not None:
            imfiles = [imfiles[i] for i in self.frames]

        # Return a generator yielding the images
        return utils.get_images(imfiles, self.imformat)