def capture(self):
        '''
        Function to capture the images and give them the names
        according to their captured time and date.
        '''
        camera = self.ids['camera']
        camera.export_to_png("captured.png")
        print("\nCaptured")

        # Start performing object detection using Google Vision API
        # Loads the image into memory
        with io.open(file_name, 'rb') as image_file:
            content = image_file.read()

        image = types.Image(content=content)

        # Performs label detection on the image file
        response = visionClient.label_detection(image=image)
        labels = response.label_annotations

        optionLayout = Window.get_parent_window().children[0].ids.optionlayout
        optionLayout.ids.option1.text = labels[0].description
        optionLayout.ids.option2.text = labels[1].description
        optionLayout.ids.option3.text = labels[2].description

        print('Labels:')
        for label in labels:
            print(label.description)

        self.manager.current = 'optionlayout'