ros/src/tl_detector/light_classification/tl_classifier.py
def save_labeled(self, image, state, diff):
        """Determines the color of the traffic light in the image
        Args:
            image (cv::Mat): image containing the traffic light
        Returns:
            int: ID of traffic light color (specified in styx_msgs/TrafficLight)
            :param state:
            :param image:
            :param diff:
        """
        if diff <= 60:
            if self.save_idx % SAVE_EVERY == 0:
                cv2.imwrite('./images/img_{0:01d}_{1:08d}_{2:08d}.png'.format(state, diff, self.save_idx / SAVE_EVERY),
                            image)
            self.save_idx += 1
        # TODO implement light color prediction
        return TrafficLight.UNKNOWN
Determines the color of the traffic light in the image
        Args:
            image (cv::Mat): image containing the traffic light
        Returns:
            int: ID of traffic light color (specified in styx_msgs/TrafficLight)
            :param state:
            :param image:
            :param diff:
        
Determines the color of the traffic light in the image
Determines the color of the traffic light in the image
def save_labeled(self, image, state, diff):
        if diff <= 60:
            if self.save_idx % SAVE_EVERY == 0:
                cv2.imwrite('./images/img_{0:01d}_{1:08d}_{2:08d}.png'.format(state, diff, self.save_idx / SAVE_EVERY),
                            image)
            self.save_idx += 1
        return TrafficLight.UNKNOWN
def save_labeled ( self , image , state , diff ) : if diff <= 60 : if self . save_idx % SAVE_EVERY == 0 : cv2 . imwrite ( './images/img_{0:01d}_{1:08d}_{2:08d}.png' . format ( state , diff , self . save_idx / SAVE_EVERY ) , image ) self . save_idx += 1 return TrafficLight . UNKNOWN
Determines the color of the traffic light in the image
Determines the color of the traffic light in the image
"""Determines the color of the traffic light in the image
        Args:
            image (cv::Mat): image containing the traffic light
        Returns:
            int: ID of traffic light color (specified in styx_msgs/TrafficLight)
            :param state:
            :param image:
            :param diff:
        """ # TODO implement light color prediction
ID of traffic light color (specified in styx_msgs/TrafficLight)
:param state:
:param image:
:param diff.
ID of traffic light color ( specified in styx_msgs / TrafficLight ) : param state : : param image : : param diff .
int
self
image
state
diff
image (cv
:Mat): image containing the traffic light
: Mat ) : image containing the traffic light