Esempio n. 1
0
 def on_selected(self):
     current_video.updating = True
     current_video.sync()
     # Update mode settings
     current_video.mode = profile.settings['capture_mode_scanning']
     texture_mode = image_capture.texture_mode
     texture_mode.set_brightness(
         profile.settings['brightness_texture_scanning'])
     texture_mode.set_contrast(
         profile.settings['contrast_texture_scanning'])
     texture_mode.set_saturation(
         profile.settings['saturation_texture_scanning'])
     texture_mode.set_exposure(
         profile.settings['exposure_texture_scanning'])
     laser_mode = image_capture.laser_mode
     laser_mode.set_brightness(
         profile.settings['brightness_laser_scanning'])
     laser_mode.set_contrast(profile.settings['contrast_laser_scanning'])
     laser_mode.set_saturation(
         profile.settings['saturation_laser_scanning'])
     laser_mode.set_exposure(profile.settings['exposure_laser_scanning'])
     image_capture.set_remove_background(
         profile.settings['remove_background_scanning'])
     profile.settings['current_video_mode_adjustment'] = current_video.mode
     profile.settings['current_panel_adjustment'] = 'scan_capture'
     current_video.flush()
     current_video.updating = False
Esempio n. 2
0
 def on_selected(self):
     current_video.updating = True
     current_video.sync()
     # Update mode settings
     current_video.mode = 'Gray'
     profile.settings['current_video_mode_adjustment'] = current_video.mode
     profile.settings[
         'current_panel_adjustment'] = 'calibration_segmentation'
     laser_mode = image_capture.laser_mode
     laser_mode.set_brightness(
         profile.settings['brightness_laser_calibration'])
     laser_mode.set_contrast(profile.settings['contrast_laser_calibration'])
     laser_mode.set_saturation(
         profile.settings['saturation_laser_calibration'])
     laser_mode.set_exposure(profile.settings['exposure_laser_calibration'])
     image_capture.set_remove_background(
         profile.settings['remove_background_calibration'])
     laser_segmentation.set_red_channel(
         profile.settings['red_channel_calibration'])
     laser_segmentation.set_threshold_value(
         profile.settings['threshold_value_calibration'])
     laser_segmentation.set_threshold_enable(
         profile.settings['threshold_enable_calibration'])
     laser_segmentation.set_blur_value(
         profile.settings['blur_value_calibration'])
     laser_segmentation.set_blur_enable(
         profile.settings['blur_enable_calibration'])
     laser_segmentation.set_window_value(
         profile.settings['window_value_calibration'])
     laser_segmentation.set_window_enable(
         profile.settings['window_enable_calibration'])
     laser_segmentation.set_refinement_method(
         profile.settings['refinement_calibration'])
     current_video.flush()
     current_video.updating = False
Esempio n. 3
0
 def on_selected(self):
     current_video.updating = True
     current_video.sync()
     # Update mode settings
     current_video.mode = profile.settings['capture_mode_calibration']
     profile.settings['current_video_mode_adjustment'] = current_video.mode
     profile.settings['current_panel_adjustment'] = 'calibration_capture'
     image_capture.set_remove_background(
         profile.settings['remove_background_calibration'])
     pattern_mode = image_capture.pattern_mode
     pattern_mode.set_brightness(
         profile.settings['brightness_pattern_calibration'])
     pattern_mode.set_contrast(
         profile.settings['contrast_pattern_calibration'])
     pattern_mode.set_saturation(
         profile.settings['saturation_pattern_calibration'])
     pattern_mode.set_exposure(
         profile.settings['exposure_pattern_calibration'])
     laser_mode = image_capture.laser_mode
     laser_mode.set_brightness(
         profile.settings['brightness_laser_calibration'])
     laser_mode.set_contrast(profile.settings['contrast_laser_calibration'])
     laser_mode.set_saturation(
         profile.settings['saturation_laser_calibration'])
     laser_mode.set_exposure(profile.settings['exposure_laser_calibration'])
     current_video.flush()
     current_video.updating = False
Esempio n. 4
0
 def setup_engine(self):
     self._enable_tool_scan(self.play_tool, True)
     self._enable_tool_scan(self.stop_tool, False)
     self._enable_tool_scan(self.pause_tool, False)
     driver.camera.set_frame_rate(int(profile.settings['frame_rate']))
     driver.camera.set_resolution(
         profile.settings['camera_width'], profile.settings['camera_height'])
     driver.camera.set_rotate(profile.settings['camera_rotate'])
     driver.camera.set_hflip(profile.settings['camera_hflip'])
     driver.camera.set_vflip(profile.settings['camera_vflip'])
     driver.camera.set_luminosity(profile.settings['luminosity'])
     image_capture.set_mode_texture()
     texture_mode = image_capture.texture_mode
     texture_mode.set_brightness(profile.settings['brightness_texture_scanning'])
     texture_mode.set_contrast(profile.settings['contrast_texture_scanning'])
     texture_mode.set_saturation(profile.settings['saturation_texture_scanning'])
     texture_mode.set_exposure(profile.settings['exposure_texture_scanning'])
     laser_mode = image_capture.laser_mode
     laser_mode.brightness = profile.settings['brightness_laser_scanning']
     laser_mode.contrast = profile.settings['contrast_laser_scanning']
     laser_mode.saturation = profile.settings['saturation_laser_scanning']
     laser_mode.exposure = profile.settings['exposure_laser_scanning']
     image_capture.set_use_distortion(profile.settings['use_distortion'])
     image_capture.set_remove_background(profile.settings['remove_background_scanning'])
     laser_segmentation.red_channel = profile.settings['red_channel_scanning']
     laser_segmentation.threshold_enable = profile.settings['threshold_enable_scanning']
     laser_segmentation.threshold_value = profile.settings['threshold_value_scanning']
     laser_segmentation.blur_enable = profile.settings['blur_enable_scanning']
     laser_segmentation.set_blur_value(profile.settings['blur_value_scanning'])
     laser_segmentation.window_enable = profile.settings['window_enable_scanning']
     laser_segmentation.window_value = profile.settings['window_value_scanning']
     laser_segmentation.refinement_method = profile.settings['refinement_scanning']
     width, height = driver.camera.get_resolution()
     calibration_data.set_resolution(width, height)
     calibration_data.camera_matrix = profile.settings['camera_matrix']
     calibration_data.distortion_vector = profile.settings['distortion_vector']
     calibration_data.laser_planes[0].distance = profile.settings['distance_left']
     calibration_data.laser_planes[0].normal = profile.settings['normal_left']
     calibration_data.laser_planes[1].distance = profile.settings['distance_right']
     calibration_data.laser_planes[1].normal = profile.settings['normal_right']
     calibration_data.platform_rotation = profile.settings['rotation_matrix']
     calibration_data.platform_translation = profile.settings['translation_vector']
     ciclop_scan.capture_texture = profile.settings['capture_texture']
     use_laser = profile.settings['use_laser']
     ciclop_scan.set_use_left_laser(use_laser == 'Left' or use_laser == 'Both')
     ciclop_scan.set_use_right_laser(use_laser == 'Right' or use_laser == 'Both')
     ciclop_scan.motor_step = profile.settings['motor_step_scanning']
     ciclop_scan.motor_speed = profile.settings['motor_speed_scanning']
     ciclop_scan.motor_acceleration = profile.settings['motor_acceleration_scanning']
     profile_point_cloud_color = profile.settings['point_cloud_color']
     ciclop_scan.color = profile_point_cloud_color
     #ciclop_scan.color = struct.unpack('BBB', profile.settings['point_cloud_color'].encode())
     ciclop_scan.set_scan_sleep(profile.settings['scan_sleep'])
     point_cloud_roi.set_show_center(profile.settings['show_center'])
     point_cloud_roi.set_use_roi(profile.settings['use_roi'])
     point_cloud_roi.set_diameter(profile.settings['roi_diameter'])
     point_cloud_roi.set_height(profile.settings['roi_height'])
Esempio n. 5
0
 def setup_engine(self):
     driver.camera.set_frame_rate(int(profile.settings['frame_rate']))
     driver.camera.set_resolution(profile.settings['camera_width'],
                                  profile.settings['camera_height'])
     driver.camera.set_rotate(profile.settings['camera_rotate'])
     driver.camera.set_hflip(profile.settings['camera_hflip'])
     driver.camera.set_vflip(profile.settings['camera_vflip'])
     driver.camera.set_luminosity(profile.settings['luminosity'])
     image_capture.set_mode_pattern()
     pattern_mode = image_capture.pattern_mode
     pattern_mode.set_brightness(
         profile.settings['brightness_pattern_calibration'])
     pattern_mode.set_contrast(
         profile.settings['contrast_pattern_calibration'])
     pattern_mode.set_saturation(
         profile.settings['saturation_pattern_calibration'])
     pattern_mode.set_exposure(
         profile.settings['exposure_pattern_calibration'])
     laser_mode = image_capture.laser_mode
     laser_mode.brightness = profile.settings[
         'brightness_laser_calibration']
     laser_mode.contrast = profile.settings['contrast_laser_calibration']
     laser_mode.saturation = profile.settings[
         'saturation_laser_calibration']
     laser_mode.exposure = profile.settings['exposure_laser_calibration']
     image_capture.set_use_distortion(profile.settings['use_distortion'])
     image_capture.set_remove_background(
         profile.settings['remove_background_calibration'])
     laser_segmentation.red_channel = profile.settings[
         'red_channel_calibration']
     laser_segmentation.threshold_enable = profile.settings[
         'threshold_enable_calibration']
     laser_segmentation.threshold_value = profile.settings[
         'threshold_value_calibration']
     laser_segmentation.blur_enable = profile.settings[
         'blur_enable_calibration']
     laser_segmentation.set_blur_value(
         profile.settings['blur_value_calibration'])
     laser_segmentation.window_enable = profile.settings[
         'window_enable_calibration']
     laser_segmentation.window_value = profile.settings[
         'window_value_calibration']
     laser_segmentation.refinement_method = profile.settings[
         'refinement_calibration']
     pattern.rows = profile.settings['pattern_rows']
     pattern.columns = profile.settings['pattern_columns']
     pattern.square_width = profile.settings['pattern_square_width']
     pattern.origin_distance = profile.settings['pattern_origin_distance']
     width, height = driver.camera.get_resolution()
     calibration_data.set_resolution(width, height)
     calibration_data.camera_matrix = profile.settings['camera_matrix']
     calibration_data.distortion_vector = profile.settings[
         'distortion_vector']