config_camera.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Pigrow 作者: Pragmatismo 项目源码 文件源码
def capture_cam_image(self, e):
        target_ip = self.tb_ip.GetValue()
        target_user = self.tb_user.GetValue()
        target_pass = self.tb_pass.GetValue()
        cam_capture_choice = self.cam_combo.GetValue()
        s_val = str(self.tb_s.GetValue())
        c_val = str(self.tb_c.GetValue())
        g_val = str(self.tb_g.GetValue())
        b_val = str(self.tb_b.GetValue())
        x_dim = str(self.tb_x.GetValue())
        y_dim = str(self.tb_y.GetValue())
        cam_select = self.cam_select_cb.GetValue()
        if cam_capture_choice == 'fswebcam':
            ctrl_text_string = self.setting_string_tb.GetValue()
            ctrl_test_value = self.setting_value_tb.GetValue()
            cmd_str = self.cmds_string_tb.GetValue()
            if not ctrl_test_value == '':
                found_login, cam_output, output_file = take_test_image(target_ip, target_user, target_pass,
                                                                       s_val, c_val, g_val, b_val,
                                                                       x_dim, y_dim, cam_select,
                                                                       cam_capture_choice,
                                                                       ctrl_test_value=ctrl_test_value, ctrl_text_string=ctrl_text_string, cmd_str=cmd_str)
            else:
                found_login, cam_output, output_file = take_test_image(target_ip, target_user, target_pass,
                                                                       s_val, c_val, g_val, b_val,
                                                                       x_dim, y_dim, cam_select,
                                                                       cam_capture_choice, cmd_str=cmd_str)
        else:
            found_login, cam_output, output_file = take_test_image(target_ip, target_user, target_pass,
                                                                   s_val, c_val, g_val, b_val,
                                                                   x_dim, y_dim, cam_select,
                                                                   cam_capture_choice)
        photo_location = get_test_pic(target_ip, target_user, target_pass, output_file)
        self.main_image.SetBitmap(wx.BitmapFromImage(wx.Image(photo_location, wx.BITMAP_TYPE_ANY)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号