def __init__(self, parent, title='Video page', start_callback=None, cancel_callback=None): Page.__init__(self, parent, title=title, desc=_("Put the pattern on the platform as shown in the " "picture and press \"Start\""), left=_("Cancel"), right=_("Start"), button_left_callback=cancel_callback, button_right_callback=start_callback, view_progress=True) # Elements image_view = ImageView(self.panel, quality=wx.IMAGE_QUALITY_HIGH) image_view.set_image( wx.Image(resources.get_path_for_image("pattern-position.png"))) self.video_view = VideoView(self.panel, self.get_image) # Layout self.panel_box.Add(image_view, 3, wx.ALL | wx.EXPAND, 3) self.panel_box.Add(self.video_view, 2, wx.ALL | wx.EXPAND, 3) self.Layout()
def add_pages(self): self.add_page('video_view', VideoView(self, self.get_image)) self.add_page( 'camera_intrinsics_pages', CameraIntrinsicsPages(self, start_callback=self.disable_panels, exit_callback=self.update_panels)) self.add_page( 'scanner_autocheck_pages', ScannerAutocheckPages(self, start_callback=self.disable_panels, exit_callback=self.update_panels)) self.add_page( 'laser_triangulation_pages', LaserTriangulationPages(self, start_callback=self.disable_panels, exit_callback=self.update_panels)) self.add_page( 'platform_extrinsics_pages', PlatformExtrinsicsPages(self, start_callback=self.disable_panels, exit_callback=self.update_panels)) self.pages_collection['camera_intrinsics_pages'].Hide() self.pages_collection['scanner_autocheck_pages'].Hide() self.pages_collection['laser_triangulation_pages'].Hide() self.pages_collection['platform_extrinsics_pages'].Hide() self.pages_collection['camera_intrinsics_pages'].Disable() self.pages_collection['scanner_autocheck_pages'].Disable() self.pages_collection['laser_triangulation_pages'].Disable() self.pages_collection['platform_extrinsics_pages'].Disable() if not profile.settings['view_mode_advanced']: self.panels_collection.expandable_panels['video_settings'].Hide() self.panels_collection.expandable_panels['camera_intrinsics'].Hide( ) if profile.settings['current_panel_calibration'] == 'video_settings' or \ profile.settings['current_panel_calibration'] == 'camera_intrinsics': self.on_pattern_settings_selected() self.panels_collection.expandable_panels[profile.settings[ 'current_panel_calibration']].on_title_clicked(None)
def __init__(self, parent, get_image): wx.SplitterWindow.__init__(self, parent, style=wx.SP_3D) # | wx.SP_LIVE_UPDATE) self.get_image = get_image self.video_view = VideoView(self, get_image) self.scene_panel = wx.Panel(self) self.scene_view = SceneView(self.scene_panel) self.gauge = wx.Gauge(self.scene_panel, size=(-1, 30)) self.gauge.Hide() # Layout vbox = wx.BoxSizer(wx.VERTICAL) vbox.Add(self.scene_view, 1, wx.ALL | wx.EXPAND, 0) vbox.Add(self.gauge, 0, wx.ALL | wx.EXPAND, 0) self.scene_panel.SetSizer(vbox) self.SplitVertically(self.video_view, self.scene_panel) self.SetMinimumPaneSize(200) # Video view selector _choices = [] choices = profile.settings.get_possible_values('video_scanning') for i in choices: _choices.append(_(i)) self.video_views_dict = dict(list(zip(_choices, choices))) self.combo_video_views = wx.ComboBox(self.video_view, value=_('Texture'), choices=_choices, style=wx.CB_READONLY, size=(100, -1), pos=(0, -1)) self.combo_video_views.Hide() self.combo_video_views.Bind(wx.EVT_COMBOBOX, self.on_combo_box_video_views_select) # Events self.video_view.Bind(wx.EVT_SHOW, self.on_show)
def __init__(self, parent, start_callback=None): Page.__init__(self, parent, title=_("Camera intrinsics (advanced)"), desc=_("Default values are recommended. To perform the calibration, " "click over the video panel and press " "space bar to perform the captures."), left=_("Reset"), right=_("Start"), button_left_callback=self.initialize, button_right_callback=start_callback, view_progress=True) self.right_button.Hide() # Elements self.video_view = VideoView(self.panel, self.get_image) self.rows, self.columns = 3, 5 self.panel_grid = [] self.current_grid = 0 self.image_grid_panel = wx.Panel(self.panel) self.grid_sizer = wx.GridSizer(self.rows, self.columns, 3, 3) for panel in xrange(self.rows * self.columns): self.panel_grid.append(ImageView(self.image_grid_panel)) self.panel_grid[panel].Bind(wx.EVT_KEY_DOWN, self.on_key_press) self.grid_sizer.Add(self.panel_grid[panel], 0, wx.ALL | wx.EXPAND) self.image_grid_panel.SetSizer(self.grid_sizer) # Layout self.panel_box.Add(self.video_view, 2, wx.ALL | wx.EXPAND, 2) self.panel_box.Add(self.image_grid_panel, 3, wx.ALL | wx.EXPAND, 3) self.Layout() # Events self.Bind(wx.EVT_KEY_DOWN, self.on_key_press) self.video_view.Bind(wx.EVT_KEY_DOWN, self.on_key_press) self.image_grid_panel.Bind(wx.EVT_KEY_DOWN, self.on_key_press)
def add_pages(self): self.add_page('video_view', VideoView(self, self._video_frame))
def add_pages(self): self.add_page('video_view', VideoView(self, self._video_frame, wxtimer=False)) self.panels_collection.expandable_panels[profile.settings[ 'current_panel_adjustment']].on_title_clicked(None)
def add_pages(self): self.add_page('video_view', VideoView(self, self._video_frame)) self.panels_collection.expandable_panels[ profile.settings['current_panel_control']].on_title_clicked(None)