示例#1
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent, titleText="Workbench", buttonStartCallback=None, description="_(Workbench description)"):
        ExpandablePanel.__init__(self, parent, titleText, hasUndo=False, hasRestore=False)

        self.buttonStartCallback = buttonStartCallback
        self.description = description

        self.parametersBox = wx.BoxSizer(wx.VERTICAL)
        self.buttonsPanel = wx.Panel(self.content)

        self.buttonEdit = wx.ToggleButton(self.buttonsPanel, wx.NewId(), label=_("Edit"))
        self.buttonEdit.SetMinSize((0,-1))
        self.buttonDefault = wx.Button(self.buttonsPanel, wx.NewId(), label=_("Default"))
        self.buttonDefault.SetMinSize((0,-1))
        self.buttonStart = wx.Button(self.buttonsPanel, wx.NewId(), label=_("Start"))
        self.buttonStart.SetMinSize((0,-1))
        self.buttonStart.SetToolTip(wx.ToolTip(description))

        self.contentBox.Add(self.parametersBox, 1, wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
        self.hbox = wx.BoxSizer(wx.HORIZONTAL)
        self.hbox.Add(self.buttonEdit, 2, wx.ALL|wx.EXPAND, 3)
        self.hbox.Add(self.buttonDefault, 2, wx.ALL|wx.EXPAND, 3)
        self.hbox.Add(self.buttonStart, 3, wx.ALL|wx.EXPAND, 3)
        self.buttonsPanel.SetSizer(self.hbox)
        self.contentBox.Add(self.buttonsPanel, 0, wx.ALL|wx.EXPAND, 3)

        self.buttonEdit.Bind(wx.EVT_TOGGLEBUTTON, self.onButtonEditPressed)
        self.buttonDefault.Bind(wx.EVT_BUTTON, self.onButtonDefaultPressed)
        self.buttonStart.Bind(wx.EVT_BUTTON, self.onButtonStartPressed)

        self.Layout()
示例#2
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Pattern Settings"),
                                 hasUndo=False)

        self.cameraIntrinsics = calibration.CameraIntrinsics.Instance()
        self.simpleLaserTriangulation = calibration.SimpleLaserTriangulation.Instance(
        )
        self.laserTriangulation = calibration.LaserTriangulation.Instance()
        self.platformExtrinsics = calibration.PlatformExtrinsics.Instance()

        self.clearSections()
        section = self.createSection('pattern_settings')
        section.addItem(TextBox, 'square_width')
        section.addItem(TextBox,
                        'pattern_rows',
                        tooltip=_('Number of corner rows in the pattern'))
        section.addItem(TextBox,
                        'pattern_columns',
                        tooltip=_('Number of corner columns in the pattern'))
        section.addItem(
            TextBox,
            'pattern_distance',
            tooltip=
            _("Minimum distance between the origin of the pattern (bottom-left corner) and the pattern's base surface"
              ))
示例#3
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Scan Parameters"),
                                 hasUndo=False,
                                 hasRestore=False)

        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()
        self.parent = parent
        self.lastScan = profile.getProfileSetting('scan_type')

        self.clearSections()
        section = self.createSection('scan_parameters')
        section.addItem(
            ComboBox,
            'scan_type',
            tooltip=
            _("Simple Scan algorithm captures only the geometry using one image. Texture Scan algorithm captures also the texture using two images"
              ))
        section.addItem(ComboBox, 'use_laser')
        if os.name != 'nt':
            section.addItem(CheckBox, 'fast_scan')
示例#4
0
    def __init__(self, parent, titleText="Workbench", buttonStartCallback=None, description="_(Workbench description)"):
        ExpandablePanel.__init__(self, parent, titleText, hasUndo=False, hasRestore=False)

        self.buttonStartCallback = buttonStartCallback
        self.description = description

        self.parametersBox = wx.BoxSizer(wx.VERTICAL)
        self.buttonsPanel = wx.Panel(self.content)

        self.buttonEdit = wx.ToggleButton(self.buttonsPanel, wx.NewId(), label=_("Edit"))
        self.buttonEdit.SetMinSize((0,-1))
        self.buttonDefault = wx.Button(self.buttonsPanel, wx.NewId(), label=_("Default"))
        self.buttonDefault.SetMinSize((0,-1))
        self.buttonStart = wx.Button(self.buttonsPanel, wx.NewId(), label=_("Start"))
        self.buttonStart.SetMinSize((0,-1))
        self.buttonStart.SetToolTip(wx.ToolTip(description))

        self.contentBox.Add(self.parametersBox, 1, wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
        self.hbox = wx.BoxSizer(wx.HORIZONTAL)
        self.hbox.Add(self.buttonEdit, 2, wx.ALL|wx.EXPAND, 3)
        self.hbox.Add(self.buttonDefault, 2, wx.ALL|wx.EXPAND, 3)
        self.hbox.Add(self.buttonStart, 3, wx.ALL|wx.EXPAND, 3)
        self.buttonsPanel.SetSizer(self.hbox)
        self.contentBox.Add(self.buttonsPanel, 0, wx.ALL|wx.EXPAND, 3)

        self.buttonEdit.Bind(wx.EVT_TOGGLEBUTTON, self.onButtonEditPressed)
        self.buttonDefault.Bind(wx.EVT_BUTTON, self.onButtonDefaultPressed)
        self.buttonStart.Bind(wx.EVT_BUTTON, self.onButtonStartPressed)

        self.Layout()
示例#5
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Image Acquisition"))

        self.driver = Driver.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()
        self.last_resolution = profile.getProfileSetting('resolution_scanning')
        
        self.clearSections()
        section = self.createSection('camera_scanning')
        section.addItem(Slider, 'brightness_scanning', tooltip=_('Image luminosity. Low values are better for environments with high ambient light conditions. High values are recommended for poorly lit places'))
        section.addItem(Slider, 'contrast_scanning', tooltip=_('Relative difference in intensity between an image point and its surroundings. Low values are recommended for black or very dark colored objects. High values are better for very light colored objects'))
        section.addItem(Slider, 'saturation_scanning', tooltip=_('Purity of color. Low values will cause colors to disappear from the image. High values will show an image with very intense colors'))
        section.addItem(Slider, 'laser_exposure_scanning', tooltip=_('Amount of light per unit area. It is controlled by the time the camera sensor is exposed during a frame capture. High values are recommended for poorly lit places'))
        section.addItem(Slider, 'color_exposure_scanning', tooltip=_('Amount of light per unit area. It is controlled by the time the camera sensor is exposed during a frame capture. High values are recommended for poorly lit places'))
        section.addItem(ComboBox, 'framerate_scanning', tooltip=_('Number of frames captured by the camera every second. Maximum frame rate is recommended'))
        section.addItem(ComboBox, 'resolution_scanning', tooltip=_('Size of the video. Maximum resolution is recommended'))
        section.addItem(CheckBox, 'use_distortion_scanning', tooltip=_("This option applies lens distortion correction to the video. This process slows the video feed from the camera"))

        if sys.isDarwin():
            section = self.sections['camera_scanning'].disable('framerate_scanning')
            section = self.sections['camera_scanning'].disable('resolution_scanning')
示例#6
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Image Acquisition"))

        self.driver = Driver.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()
        self.last_resolution = profile.getProfileSetting('resolution_scanning')

        self.clearSections()
        section = self.createSection('camera_scanning')
        section.addItem(
            Slider,
            'brightness_scanning',
            tooltip=
            _('Image luminosity. Low values are better for environments with high ambient light conditions. High values are recommended for poorly lit places'
              ))
        section.addItem(
            Slider,
            'contrast_scanning',
            tooltip=
            _('Relative difference in intensity between an image point and its surroundings. Low values are recommended for black or very dark colored objects. High values are better for very light colored objects'
              ))
        section.addItem(
            Slider,
            'saturation_scanning',
            tooltip=
            _('Purity of color. Low values will cause colors to disappear from the image. High values will show an image with very intense colors'
              ))
        section.addItem(
            Slider,
            'laser_exposure_scanning',
            tooltip=
            _('Amount of light per unit area. It is controlled by the time the camera sensor is exposed during a frame capture. High values are recommended for poorly lit places'
              ))
        section.addItem(
            Slider,
            'color_exposure_scanning',
            tooltip=
            _('Amount of light per unit area. It is controlled by the time the camera sensor is exposed during a frame capture. High values are recommended for poorly lit places'
              ))
        section.addItem(
            ComboBox,
            'framerate_scanning',
            tooltip=
            _('Number of frames captured by the camera every second. Maximum frame rate is recommended'
              ))
        section.addItem(
            ComboBox,
            'resolution_scanning',
            tooltip=_('Size of the video. Maximum resolution is recommended'))
        section.addItem(
            CheckBox,
            'use_distortion_scanning',
            tooltip=
            _("This option applies lens distortion correction to the video. This process slows the video feed from the camera"
              ))
示例#7
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Laser Settings"))

        self.driver = Driver.Instance()
        self.laserTriangulation = calibration.LaserTriangulation.Instance()

        self.initialize()
示例#8
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Camera Control"))

        self.driver = Driver.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.initialize()
示例#9
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("LDR Control"), hasUndo=False, hasRestore=False)
        
        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('ldr_control')
        section.addItem(LDRSection, 'ldr_value')
示例#10
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Gcode Control"), hasUndo=False, hasRestore=False)
        
        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('gcode_control')
        section.addItem(GcodeSection, 'gcode_gui')
示例#11
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Image Segmentation"))

        self.driver = Driver.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()

        self.initialize()
示例#12
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Point Cloud Generation"))

        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.initialize()
示例#13
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Motor Control"),
                                 hasUndo=False)

        self.driver = Driver.Instance()

        self.initialize()
示例#14
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Pattern Settings"))

        self.cameraIntrinsics = calibration.CameraIntrinsics.Instance()
        self.simpleLaserTriangulation = calibration.SimpleLaserTriangulation.Instance()
        self.laserTriangulation = calibration.LaserTriangulation.Instance()
        self.platformExtrinsics = calibration.PlatformExtrinsics.Instance()

        self.initialize()
示例#15
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Laser Control"), hasUndo=False, hasRestore=False)
        
        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('laser_control')
        section.addItem(ToggleButton, 'left_button')
        section.addItem(ToggleButton, 'right_button')
示例#16
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("LDR Value"),
                                 hasUndo=False,
                                 hasRestore=False)

        self.driver = Driver.Instance()

        self.initialize()
示例#17
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Laser Settings"), hasUndo=False, hasRestore=False)

        self.driver = Driver.Instance()
        self.laserTriangulation = calibration.LaserTriangulation.Instance()

        self.clearSections()
        section = self.createSection('laser_settings')
        # section.addItem(Slider, 'laser_threshold_value', self.laserTriangulation.setThreshold)
        section.addItem(ToggleButton, 'left_button')
        section.addItem(ToggleButton, 'right_button')
示例#18
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Laser Settings"), hasUndo=False, hasRestore=False)

        self.driver = Driver.Instance()
        self.laserTriangulation = calibration.LaserTriangulation.Instance()

        self.clearSections()
        section = self.createSection('laser_settings')
        # section.addItem(Slider, 'laser_threshold_value', self.laserTriangulation.setThreshold)
        section.addItem(ToggleButton, 'left_button')
        section.addItem(ToggleButton, 'right_button')
示例#19
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Gcode Control"),
                                 hasUndo=False,
                                 hasRestore=False)

        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('gcode_control')
        section.addItem(GcodeSection, 'gcode_gui')
示例#20
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("LDR Value"),
                                 hasUndo=False,
                                 hasRestore=False)

        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('ldr_control')
        section.addItem(LDRSection, 'ldr_value')
示例#21
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Motor Control"), hasUndo=False)
        
        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('motor_control')
        section.addItem(TextBox, 'step_degrees_control')
        section.addItem(TextBox, 'feed_rate_control')
        section.addItem(TextBox, 'acceleration_control')
        section.addItem(CallbackButton, 'move_button')
        section.addItem(ToggleButton, 'enable_button')
示例#22
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Laser Control"),
                                 hasUndo=False,
                                 hasRestore=False)

        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('laser_control')
        section.addItem(ToggleButton, 'left_button')
        section.addItem(ToggleButton, 'right_button')
示例#23
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Rotative Platform"),
                                 hasUndo=False)

        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.initialize()
示例#24
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Point Cloud Generation"))
        
        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.clearSections()
        section = self.createSection('point_cloud_generation')
        section.addItem(CheckBox, 'view_roi', tooltip=_("View the Region Of Interest (ROI). This cylindrical region is the one being scanned. All information outside won't be taken into account during the scanning process"))
        section.addItem(Slider, 'roi_diameter')
        section.addItem(Slider, 'roi_height')
        section.addItem(Button, 'point_cloud_color')
示例#25
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Rotative Platform"), hasUndo=False)
        
        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.clearSections()
        section = self.createSection('motor_scanning')
        section.addItem(TextBox, 'step_degrees_scanning')
        section.addItem(TextBox, 'feed_rate_scanning')
        section.addItem(TextBox, 'acceleration_scanning')
示例#26
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Point Cloud Generation"))
        
        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.clearSections()
        section = self.createSection('point_cloud_generation')
        section.addItem(CheckBox, 'view_roi', tooltip=_("View the Region Of Interest (ROI). This cylindrical region is the one being scanned. All information outside won't be taken into account during the scanning process"))
        section.addItem(Slider, 'roi_diameter')
        section.addItem(Slider, 'roi_height')
        section.addItem(Button, 'point_cloud_color')
示例#27
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Rotative Platform"), hasUndo=False)
        
        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()

        self.clearSections()
        section = self.createSection('motor_scanning')
        section.addItem(TextBox, 'step_degrees_scanning')
        section.addItem(TextBox, 'feed_rate_scanning')
        section.addItem(TextBox, 'acceleration_scanning')
示例#28
0
文件: panels.py 项目: Claude59/horus
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Pattern Settings"), hasUndo=False)

        self.cameraIntrinsics = calibration.CameraIntrinsics.Instance()
        self.simpleLaserTriangulation = calibration.SimpleLaserTriangulation.Instance()
        self.laserTriangulation = calibration.LaserTriangulation.Instance()
        self.platformExtrinsics = calibration.PlatformExtrinsics.Instance()

        self.clearSections()
        section = self.createSection('pattern_settings')
        section.addItem(TextBox, 'square_width')
        section.addItem(TextBox, 'pattern_rows', tooltip=_('Number of corner rows in the pattern'))
        section.addItem(TextBox, 'pattern_columns', tooltip=_('Number of corner columns in the pattern'))
        section.addItem(TextBox, 'pattern_distance', tooltip=_("Minimum distance between the origin of the pattern (bottom-left corner) and the pattern's base surface"))
示例#29
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self,
                                 parent,
                                 _("Motor Control"),
                                 hasUndo=False)

        self.driver = Driver.Instance()

        self.clearSections()
        section = self.createSection('motor_control')
        section.addItem(TextBox, 'step_degrees_control')
        section.addItem(TextBox, 'feed_rate_control')
        section.addItem(TextBox, 'acceleration_control')
        section.addItem(CallbackButton, 'move_button')
        section.addItem(ToggleButton, 'enable_button')
示例#30
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Scan Parameters"))
        
        self.driver = Driver.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.main = self.GetParent().GetParent().GetParent().GetParent()
        self.parent = parent
        self.lastScan = profile.getProfileSetting('scan_type')

        self.clearSections()
        section = self.createSection('scan_parameters')
        section.addItem(ComboBox, 'scan_type', tooltip=_("Simple Scan algorithm captures only the geometry using one image. Texture Scan algorithm captures also the texture using two images"))
        section.addItem(ComboBox, 'use_laser')
        if os.name != 'nt':
            section.addItem(CheckBox, 'fast_scan')
示例#31
0
文件: panels.py 项目: wanglch/ciclop
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Image Segmentation"))
        
        self.driver = Driver.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()

        self.clearSections()
        section = self.createSection('image_segmentation_simple', None, tag='Simple Scan')
        section.addItem(CheckBox, 'use_cr_threshold', tooltip=_("Threshold is a function used to remove the noise when scanning. It removes a pixel if its intensity is less than the threshold value"))
        section.addItem(Slider, 'cr_threshold_value')
        section = self.createSection('image_segmentation_texture', None, tag='Texture Scan')
        section.addItem(CheckBox, 'use_open', tooltip=_("Open is an operation used to remove the noise when scanning. The higher its value, the lower the noise but also the lower the detail in the image"))
        section.addItem(Slider, 'open_value')
        section.addItem(CheckBox, 'use_threshold', tooltip=_("Threshold is a function used to remove the noise when scanning. It removes a pixel if its intensity is less than the threshold value"))
        section.addItem(Slider, 'threshold_value')
示例#32
0
    def __init__(self, parent):
        """"""
        ExpandablePanel.__init__(self, parent, _("Image Segmentation"))
        
        self.driver = Driver.Instance()
        self.pcg = PointCloudGenerator.Instance()
        self.simpleScan = SimpleScan.Instance()
        self.textureScan = TextureScan.Instance()

        self.clearSections()
        section = self.createSection('image_segmentation_simple', None, tag='Simple Scan')
        section.addItem(CheckBox, 'use_cr_threshold', tooltip=_("Threshold is a function used to remove the noise when scanning. It removes a pixel if its intensity is less than the threshold value"))
        section.addItem(Slider, 'cr_threshold_value')
        section = self.createSection('image_segmentation_texture', None, tag='Texture Scan')
        section.addItem(CheckBox, 'use_open', tooltip=_("Open is an operation used to remove the noise when scanning. The higher its value, the lower the noise but also the lower the detail in the image"))
        section.addItem(Slider, 'open_value')
        section.addItem(CheckBox, 'use_threshold', tooltip=_("Threshold is a function used to remove the noise when scanning. It removes a pixel if its intensity is less than the threshold value"))
        section.addItem(Slider, 'threshold_value')