def test_from_rgb_float_works_with_expected_range(self):
        low = (0.0, 0.25, 0.5)
        high = (0.5, 0.75, 1.0)
        expected_low = (127, 63, 0)
        expected_high = (255, 191, 127)

        laser_detector = LaserDetector.from_rgb_float(low, high)

        self.assertEquals(laser_detector.low_bgr, expected_low)
        self.assertEquals(laser_detector.high_bgr, expected_high)
    def test_from_rgb_float_works_with_expected_range(self):
        low = (0.0, 0.25, 0.5)
        high = (0.5, 0.75, 1.0)
        expected_low = (127, 63, 0)
        expected_high = (255, 191, 127)

        laser_detector = LaserDetector.from_rgb_float(low, high)

        self.assertEquals(laser_detector.low_bgr, expected_low)
        self.assertEquals(laser_detector.high_bgr, expected_high)
Exemple #3
0
 def configure_laser_detector(self, low_rbg_float, high_rgb_float):
     self.laser_detector = LaserDetector.from_rgb_float(
         low_rbg_float, high_rgb_float)
     self.video_processor.laser_detector = self.laser_detector
 def configure_laser_detector(self, low_rbg_float, high_rgb_float):
     self.laser_detector = LaserDetector.from_rgb_float(low_rbg_float, high_rgb_float)
     self.video_processor.laser_detector = self.laser_detector