Merge branch 'Exception-handling' into working-single

This commit is contained in:
HeshamTB 2018-11-22 02:19:49 +03:00
commit b0ae2b55a5
4 changed files with 60 additions and 4 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
*.[Jj][Pp][Gg]
*.[Jj][Pp][Gg]
*.pyc
*.suo

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{c5bcf1ad-e7a4-41be-8f0e-28db4b669eec}</ProjectGuid>
<ProjectHome />
<StartupFile>main.py</StartupFile>
<SearchPath />
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<ProjectTypeGuids>{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids>
<LaunchProvider>Standard Python launcher</LaunchProvider>
<InterpreterId />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
<PropertyGroup Condition="'$(Configuration)' == 'Release'" />
<PropertyGroup>
<VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="main.py" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
</Project>

View File

@ -0,0 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.102
MinimumVisualStudioVersion = 10.0.40219.1
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "FaceRecognition-python", "FaceRecognition-python.pyproj", "{C5BCF1AD-E7A4-41BE-8F0E-28DB4B669EEC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5BCF1AD-E7A4-41BE-8F0E-28DB4B669EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5BCF1AD-E7A4-41BE-8F0E-28DB4B669EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {29568353-A5E1-4ECF-9F70-31492869FB0D}
EndGlobalSection
EndGlobal

12
main.py
View File

@ -1,11 +1,17 @@
from time import sleep
from picamera import PiCamera
import cv2
import numpy as np
from io import BytesIO
import os
import serial
try:
import numpy as np
from picamera import PiCamera
import cv2
except Exception as ex:
print('[ Error ] some depandincies are missing\n'+ str(ex.args))
def init():
go = True