示例#1
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')
示例#2
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"
              ))
示例#3
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()
示例#4
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()
示例#5
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()
示例#6
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')
示例#7
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')
示例#8
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')
示例#9
0
    def __init__(self,
                 parent,
                 buttonPrevCallback=None,
                 buttonNextCallback=None):
        WizardPage.__init__(self,
                            parent,
                            title=_("Scanning"),
                            buttonPrevCallback=buttonPrevCallback,
                            buttonNextCallback=buttonNextCallback)

        self.driver = Driver.Instance()
        self.pcg = PointCloudGenerator.Instance()

        value = abs(float(profile.getProfileSetting('step_degrees_scanning')))
        if value > 1.35:
            value = _("Low")
        elif value > 0.625:
            value = _("Medium")
        else:
            value = _("High")
        self.resolutionLabel = wx.StaticText(self.panel, label=_("Resolution"))
        self.resolutionComboBox = wx.ComboBox(
            self.panel,
            wx.ID_ANY,
            value=value,
            choices=[_("High"), _("Medium"), _("Low")],
            style=wx.CB_READONLY)

        self.laserLabel = wx.StaticText(self.panel, label=_("Laser"))
        use_laser = profile.getProfileSettingObject('use_laser').getType()
        self.laserComboBox = wx.ComboBox(
            self.panel,
            wx.ID_ANY,
            value=profile.getProfileSetting('use_laser'),
            choices=[_(use_laser[0]),
                     _(use_laser[1]),
                     _(use_laser[2])],
            style=wx.CB_READONLY)

        self.scanTypeLabel = wx.StaticText(self.panel, label=_("Scan Type"))
        scan_type = profile.getProfileSettingObject('scan_type').getType()
        self.scanTypeComboBox = wx.ComboBox(
            self.panel,
            wx.ID_ANY,
            value=profile.getProfileSetting('scan_type'),
            choices=[_(scan_type[0]), _(scan_type[1])],
            style=wx.CB_READONLY)

        self.skipButton.Hide()

        #-- Layout
        vbox = wx.BoxSizer(wx.VERTICAL)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.resolutionLabel, 0, wx.ALL ^ wx.BOTTOM | wx.EXPAND, 18)
        hbox.Add(self.resolutionComboBox, 1, wx.ALL ^ wx.BOTTOM | wx.EXPAND,
                 12)
        vbox.Add(hbox, 0, wx.ALL | wx.EXPAND, 5)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.laserLabel, 0, wx.ALL ^ wx.BOTTOM | wx.EXPAND, 18)
        hbox.Add(self.laserComboBox, 1, wx.ALL ^ wx.BOTTOM | wx.EXPAND, 12)
        vbox.Add(hbox, 0, wx.ALL | wx.EXPAND, 5)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.scanTypeLabel, 0, wx.ALL ^ wx.BOTTOM | wx.EXPAND, 18)
        hbox.Add(self.scanTypeComboBox, 1, wx.ALL ^ wx.BOTTOM | wx.EXPAND, 12)
        vbox.Add(hbox, 0, wx.ALL | wx.EXPAND, 5)
        self.panel.SetSizer(vbox)
        self.Layout()

        self.resolutionComboBox.Bind(wx.EVT_COMBOBOX,
                                     self.onResolutionComboBoxChanged)
        self.laserComboBox.Bind(wx.EVT_COMBOBOX, self.onLaserComboBoxChanged)
        self.scanTypeComboBox.Bind(wx.EVT_COMBOBOX,
                                   self.onScanTypeComboBoxChanged)
        self.Bind(wx.EVT_SHOW, self.onShow)

        self.videoView.setMilliseconds(20)
        self.videoView.setCallback(self.getFrame)