├── .editorconfig ├── .gitattributes ├── .gitignore ├── CameraHelper ├── AssemblyInfo.cpp ├── CameraHelper.cpp ├── CameraHelper.h ├── CameraHelper.vcxproj ├── CameraHelper.vcxproj.filters ├── Debug │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cpp │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cpp │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.obj │ ├── AssemblyInfo.obj │ ├── CameraHelper.Build.CppClean.log │ ├── CameraHelper.log │ ├── CameraHelper.obj │ ├── CameraHelper.pch │ ├── CameraHelper.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── CameraHelper.lastbuildstate │ │ ├── link.17368-cvtres.read.1.tlog │ │ ├── link.17368-cvtres.write.1.tlog │ │ ├── link.17368-rc.read.1.tlog │ │ ├── link.17368-rc.write.1.tlog │ │ ├── link.17368.read.1.tlog │ │ ├── link.17368.write.1.tlog │ │ ├── link.3912-cvtres.read.1.tlog │ │ ├── link.3912-cvtres.write.1.tlog │ │ ├── link.3912-rc.read.1.tlog │ │ ├── link.3912-rc.write.1.tlog │ │ ├── link.3912.read.1.tlog │ │ ├── link.3912.write.1.tlog │ │ ├── link.command.1.tlog │ │ ├── link.read.1.tlog │ │ ├── link.write.1.tlog │ │ ├── metagen.read.1.tlog │ │ ├── metagen.write.1.tlog │ │ ├── rc.command.1.tlog │ │ ├── rc.read.1.tlog │ │ ├── rc.write.1.tlog │ │ └── unsuccessfulbuild │ ├── CameraHelper.vcxproj.AssemblyReference.cache │ ├── CameraHelper.vcxproj.FileListAbsolute.txt │ ├── CameraHelper.vcxprojAssemblyReference.cache │ ├── app.res │ ├── pch.obj │ └── vc143.pdb ├── Release │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cpp │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.obj │ ├── AssemblyInfo.obj │ ├── CameraHelper.log │ ├── CameraHelper.obj │ ├── CameraHelper.pch │ ├── CameraHelper.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── CameraHelper.lastbuildstate │ │ ├── link.16240-cvtres.read.1.tlog │ │ ├── link.16240-cvtres.write.1.tlog │ │ ├── link.16240-rc.read.1.tlog │ │ ├── link.16240-rc.write.1.tlog │ │ ├── link.16240.read.1.tlog │ │ ├── link.16240.write.1.tlog │ │ ├── link.command.1.tlog │ │ ├── link.read.1.tlog │ │ ├── link.write.1.tlog │ │ ├── metagen.read.1.tlog │ │ ├── metagen.write.1.tlog │ │ ├── rc.command.1.tlog │ │ ├── rc.read.1.tlog │ │ ├── rc.write.1.tlog │ │ └── unsuccessfulbuild │ ├── CameraHelper.vcxproj.AssemblyReference.cache │ ├── app.res │ ├── pch.obj │ └── vc143.pdb ├── Resource.h ├── app.aps ├── app.ico ├── app.rc ├── pch.cpp └── pch.h ├── CameraHelperTest ├── App.config ├── CameraHelperTest.csproj ├── Program.cs └── Properties │ └── AssemblyInfo.cs ├── Debug ├── CameraHelper.dll └── CameraHelper.pdb ├── README.md ├── Release ├── CameraHelper.dll └── CameraHelper.pdb ├── UpgradeLog.htm ├── chuni-hands.sln ├── chuni-hands.sln.DotSettings ├── chuni-hands ├── App.config ├── App.xaml ├── App.xaml.cs ├── ChuniCanvas.cs ├── ChuniIO.cs ├── Config.cs ├── Helpers.cs ├── License-LGPL.txt ├── Logger.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Sensor.cs ├── Styles.xaml ├── chuni-hands.csproj ├── chuni-hands_TemporaryKey.pfx └── packages.config └── screenshot.png /.editorconfig: -------------------------------------------------------------------------------- 1 | # Remove the line below if you want to inherit .editorconfig settings from higher directories 2 | root = true 3 | 4 | # C# files 5 | [*.cs] 6 | 7 | #### Core EditorConfig Options #### 8 | 9 | # Indentation and spacing 10 | indent_size = 4 11 | indent_style = space 12 | tab_width = 4 13 | 14 | # New line preferences 15 | end_of_line = crlf 16 | insert_final_newline = false 17 | 18 | #### .NET Coding Conventions #### 19 | 20 | # Organize usings 21 | dotnet_separate_import_directive_groups = false 22 | dotnet_sort_system_directives_first = false 23 | 24 | # this. and Me. preferences 25 | dotnet_style_qualification_for_event = false:silent 26 | dotnet_style_qualification_for_field = false:silent 27 | dotnet_style_qualification_for_method = false:silent 28 | dotnet_style_qualification_for_property = false:silent 29 | 30 | # Language keywords vs BCL types preferences 31 | dotnet_style_predefined_type_for_locals_parameters_members = true:silent 32 | dotnet_style_predefined_type_for_member_access = true:silent 33 | 34 | # Parentheses preferences 35 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent 36 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent 37 | dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent 38 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent 39 | 40 | # Modifier preferences 41 | dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent 42 | 43 | # Expression-level preferences 44 | dotnet_style_coalesce_expression = true:suggestion 45 | dotnet_style_collection_initializer = true:suggestion 46 | dotnet_style_explicit_tuple_names = true:suggestion 47 | dotnet_style_null_propagation = true:suggestion 48 | dotnet_style_object_initializer = true:suggestion 49 | dotnet_style_prefer_auto_properties = true:none 50 | dotnet_style_prefer_compound_assignment = true:suggestion 51 | dotnet_style_prefer_conditional_expression_over_assignment = true:silent 52 | dotnet_style_prefer_conditional_expression_over_return = true:silent 53 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion 54 | dotnet_style_prefer_inferred_tuple_names = true:suggestion 55 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion 56 | 57 | # Field preferences 58 | dotnet_style_readonly_field = true:suggestion 59 | 60 | # Parameter preferences 61 | dotnet_code_quality_unused_parameters = all:suggestion 62 | 63 | #### C# Coding Conventions #### 64 | 65 | # var preferences 66 | csharp_style_var_elsewhere = false:silent 67 | csharp_style_var_for_built_in_types = false:silent 68 | csharp_style_var_when_type_is_apparent = false:silent 69 | 70 | # Expression-bodied members 71 | csharp_style_expression_bodied_accessors = true:silent 72 | csharp_style_expression_bodied_constructors = false:silent 73 | csharp_style_expression_bodied_indexers = true:silent 74 | csharp_style_expression_bodied_lambdas = true:silent 75 | csharp_style_expression_bodied_local_functions = false:silent 76 | csharp_style_expression_bodied_methods = false:silent 77 | csharp_style_expression_bodied_operators = false:silent 78 | csharp_style_expression_bodied_properties = true:silent 79 | 80 | # Pattern matching preferences 81 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 82 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 83 | csharp_style_prefer_switch_expression = true:suggestion 84 | 85 | # Null-checking preferences 86 | csharp_style_conditional_delegate_call = true:suggestion 87 | 88 | # Modifier preferences 89 | csharp_prefer_static_local_function = true:suggestion 90 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async 91 | 92 | # Code-block preferences 93 | csharp_prefer_braces = true:silent 94 | csharp_prefer_simple_using_statement = true:suggestion 95 | 96 | # Expression-level preferences 97 | csharp_prefer_simple_default_expression = true:suggestion 98 | csharp_style_deconstructed_variable_declaration = true:suggestion 99 | csharp_style_inlined_variable_declaration = true:suggestion 100 | csharp_style_pattern_local_over_anonymous_function = true:suggestion 101 | csharp_style_prefer_index_operator = true:suggestion 102 | csharp_style_prefer_range_operator = true:suggestion 103 | csharp_style_throw_expression = true:suggestion 104 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 105 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 106 | 107 | # 'using' directive preferences 108 | csharp_using_directive_placement = outside_namespace:silent 109 | 110 | #### C# Formatting Rules #### 111 | 112 | # New line preferences 113 | csharp_new_line_before_catch = true 114 | csharp_new_line_before_else = true 115 | csharp_new_line_before_finally = true 116 | csharp_new_line_before_members_in_anonymous_types = true 117 | csharp_new_line_before_members_in_object_initializers = true 118 | csharp_new_line_before_open_brace = none 119 | csharp_new_line_between_query_expression_clauses = true 120 | 121 | # Indentation preferences 122 | csharp_indent_block_contents = true 123 | csharp_indent_braces = false 124 | csharp_indent_case_contents = true 125 | csharp_indent_case_contents_when_block = true 126 | csharp_indent_labels = one_less_than_current 127 | csharp_indent_switch_labels = true 128 | 129 | # Space preferences 130 | csharp_space_after_cast = false 131 | csharp_space_after_colon_in_inheritance_clause = true 132 | csharp_space_after_comma = true 133 | csharp_space_after_dot = false 134 | csharp_space_after_keywords_in_control_flow_statements = true 135 | csharp_space_after_semicolon_in_for_statement = true 136 | csharp_space_around_binary_operators = before_and_after 137 | csharp_space_around_declaration_statements = false 138 | csharp_space_before_colon_in_inheritance_clause = true 139 | csharp_space_before_comma = false 140 | csharp_space_before_dot = false 141 | csharp_space_before_open_square_brackets = false 142 | csharp_space_before_semicolon_in_for_statement = false 143 | csharp_space_between_empty_square_brackets = false 144 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 145 | csharp_space_between_method_call_name_and_opening_parenthesis = false 146 | csharp_space_between_method_call_parameter_list_parentheses = false 147 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 148 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 149 | csharp_space_between_method_declaration_parameter_list_parentheses = false 150 | csharp_space_between_parentheses = false 151 | csharp_space_between_square_brackets = false 152 | 153 | # Wrapping preferences 154 | csharp_preserve_single_line_blocks = true 155 | csharp_preserve_single_line_statements = true 156 | 157 | #### Naming styles #### 158 | 159 | # Naming rules 160 | 161 | dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion 162 | dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface 163 | dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i 164 | 165 | dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion 166 | dotnet_naming_rule.types_should_be_pascal_case.symbols = types 167 | dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case 168 | 169 | dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion 170 | dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members 171 | dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case 172 | 173 | # Symbol specifications 174 | 175 | dotnet_naming_symbols.interface.applicable_kinds = interface 176 | dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 177 | dotnet_naming_symbols.interface.required_modifiers = 178 | 179 | dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum 180 | dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 181 | dotnet_naming_symbols.types.required_modifiers = 182 | 183 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method 184 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 185 | dotnet_naming_symbols.non_field_members.required_modifiers = 186 | 187 | # Naming styles 188 | 189 | dotnet_naming_style.pascal_case.required_prefix = 190 | dotnet_naming_style.pascal_case.required_suffix = 191 | dotnet_naming_style.pascal_case.word_separator = 192 | dotnet_naming_style.pascal_case.capitalization = pascal_case 193 | 194 | dotnet_naming_style.begins_with_i.required_prefix = I 195 | dotnet_naming_style.begins_with_i.required_suffix = 196 | dotnet_naming_style.begins_with_i.word_separator = 197 | dotnet_naming_style.begins_with_i.capitalization = pascal_case 198 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | bin/ 3 | obj/ 4 | packages/ 5 | *.user 6 | -------------------------------------------------------------------------------- /CameraHelper/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | using namespace System; 4 | using namespace System::Reflection; 5 | using namespace System::Runtime::CompilerServices; 6 | using namespace System::Runtime::InteropServices; 7 | using namespace System::Security::Permissions; 8 | 9 | [assembly:AssemblyTitleAttribute(L"CameraHelper")]; 10 | [assembly:AssemblyDescriptionAttribute(L"")]; 11 | [assembly:AssemblyConfigurationAttribute(L"")]; 12 | [assembly:AssemblyCompanyAttribute(L"")]; 13 | [assembly:AssemblyProductAttribute(L"CameraHelper")]; 14 | [assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2020")]; 15 | [assembly:AssemblyTrademarkAttribute(L"")]; 16 | [assembly:AssemblyCultureAttribute(L"")]; 17 | 18 | [assembly:AssemblyVersionAttribute("1.0.*")]; 19 | 20 | [assembly:ComVisible(false)]; 21 | 22 | [assembly:CLSCompliantAttribute(true)]; 23 | -------------------------------------------------------------------------------- /CameraHelper/CameraHelper.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "CameraHelper.h" 8 | 9 | 10 | using namespace System; 11 | using namespace System::Collections::Generic; 12 | using namespace CameraHelper; 13 | 14 | List^ ::CameraHelper::CameraHelper::GetCameras() { 15 | auto list = gcnew List; 16 | 17 | HRESULT hr; 18 | ICreateDevEnum* pSysDevEnum; 19 | hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, 20 | IID_ICreateDevEnum, (void**)&pSysDevEnum); 21 | if (FAILED(hr)) { 22 | return list; 23 | } 24 | 25 | IEnumMoniker *pEnumCat; 26 | hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnumCat, 0); 27 | if (hr != S_OK) { 28 | pSysDevEnum->Release(); 29 | return list; 30 | } 31 | 32 | IMoniker *pMoniker; 33 | ULONG cFetched; 34 | auto id = 0; 35 | while(pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK) { 36 | IPropertyBag* pPropBag; 37 | hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPropBag); 38 | if (SUCCEEDED(hr)) { 39 | VARIANT varName; 40 | VariantInit(&varName); 41 | hr = pPropBag->Read(L"FriendlyName", &varName, 0); 42 | if (SUCCEEDED(hr)) { 43 | auto info = gcnew CameraInfo; 44 | info->Id = id++; 45 | info->Name = gcnew String(varName.bstrVal); 46 | list->Add(info); 47 | } 48 | VariantClear(&varName); 49 | pPropBag->Release(); 50 | } 51 | pMoniker->Release(); 52 | } 53 | pEnumCat->Release(); 54 | 55 | return list; 56 | } -------------------------------------------------------------------------------- /CameraHelper/CameraHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | using namespace System; 4 | 5 | namespace CameraHelper { 6 | public ref class CameraInfo { 7 | public: 8 | property int Id; 9 | property String^ Name; 10 | }; 11 | 12 | public ref class CameraHelper { 13 | public: 14 | static System::Collections::Generic::List^ GetCameras(); 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /CameraHelper/CameraHelper.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F} 24 | v4.7.2 25 | ManagedCProj 26 | CameraHelper 27 | 10.0 28 | 29 | 30 | 31 | DynamicLibrary 32 | true 33 | v143 34 | true 35 | Unicode 36 | 37 | 38 | DynamicLibrary 39 | false 40 | v143 41 | true 42 | Unicode 43 | 44 | 45 | DynamicLibrary 46 | true 47 | v143 48 | true 49 | Unicode 50 | 51 | 52 | DynamicLibrary 53 | false 54 | v143 55 | true 56 | Unicode 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | bin\$(Platform)\$(Configuration)\ 78 | obj\$(Platform)\$(Configuration)\ 79 | 80 | 81 | bin\$(Platform)\$(Configuration)\ 82 | obj\$(Platform)\$(Configuration)\ 83 | 84 | 85 | 86 | Use 87 | pch.h 88 | Level3 89 | NDEBUG;%(PreprocessorDefinitions) 90 | 91 | 92 | Strmiids.lib;ole32.lib;OleAut32.lib 93 | 94 | 95 | 96 | 97 | Use 98 | pch.h 99 | Level3 100 | WIN32;_DEBUG;%(PreprocessorDefinitions) 101 | 102 | 103 | Emgu.CV.Runtime\Windows\Emgu.CV.Runtime.Windows 104 | 105 | 106 | 107 | 108 | Use 109 | pch.h 110 | Level3 111 | _DEBUG;%(PreprocessorDefinitions) 112 | 113 | 114 | Strmiids.lib;ole32.lib;OleAut32.lib 115 | 116 | 117 | 118 | 119 | Use 120 | pch.h 121 | Level3 122 | WIN32;NDEBUG;%(PreprocessorDefinitions) 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | Create 138 | Create 139 | Create 140 | Create 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /CameraHelper/CameraHelper.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | 40 | 41 | Resource Files 42 | 43 | 44 | 45 | 46 | Resource Files 47 | 48 | 49 | -------------------------------------------------------------------------------- /CameraHelper/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cpp: -------------------------------------------------------------------------------- 1 | #using 2 | [assembly: System::Runtime::Versioning::TargetFrameworkAttribute(L".NETFramework,Version=v4.5", FrameworkDisplayName=L".NET Framework 4.5")]; 3 | -------------------------------------------------------------------------------- /CameraHelper/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cpp: -------------------------------------------------------------------------------- 1 | #using 2 | [assembly: System::Runtime::Versioning::TargetFrameworkAttribute(L".NETFramework,Version=v4.7.2", FrameworkDisplayName=L".NET Framework 4.7.2")]; 3 | -------------------------------------------------------------------------------- /CameraHelper/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.obj -------------------------------------------------------------------------------- /CameraHelper/Debug/AssemblyInfo.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/AssemblyInfo.obj -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.Build.CppClean.log: -------------------------------------------------------------------------------- 1 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.pch 2 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\vc143.pdb 3 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\pch.obj 4 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.obj 5 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\assemblyinfo.obj 6 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\.netframework,version=v4.7.2.assemblyattributes.obj 7 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\app.res 8 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.vcxproj.assemblyreference.cache 9 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\debug\camerahelper.pdb 10 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\cl.command.1.tlog 11 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\cl.read.1.tlog 12 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\cl.write.1.tlog 13 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.1760-cvtres.read.1.tlog 14 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.1760-cvtres.write.1.tlog 15 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.1760-rc.read.1.tlog 16 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.1760-rc.write.1.tlog 17 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.1760.read.1.tlog 18 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.1760.write.1.tlog 19 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.4668-cvtres.read.1.tlog 20 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.4668-cvtres.write.1.tlog 21 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.4668-rc.read.1.tlog 22 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.4668-rc.write.1.tlog 23 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.4668.read.1.tlog 24 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.4668.write.1.tlog 25 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.command.1.tlog 26 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.read.1.tlog 27 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\link.write.1.tlog 28 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\metagen.read.1.tlog 29 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\metagen.write.1.tlog 30 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\rc.command.1.tlog 31 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\rc.read.1.tlog 32 | c:\users\sam20\desktop\chuni-hands-dependabot-nuget-chuni-hands-newtonsoft.json-13.0.1\camerahelper\debug\camerahelper.tlog\rc.write.1.tlog 33 | -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.log: -------------------------------------------------------------------------------- 1 | LINK : fatal error LNK1104: 無法開啟檔案 'Emgu.CV.Runtime\Windows\Emgu.CV.Runtime.Windows' 2 | -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.obj -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.pch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.pch -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/CameraHelper.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.35.32215:TargetPlatformVersion=10.0.22000.0:TargetFrameworkVersion=v4.7.2::EnableManagedIncrementalBuild=true: 2 | Debug|Win32|C:\Users\sam20\Desktop\chuni-hands-dependabot-nuget-chuni-hands-Newtonsoft.Json-13.0.1\| 3 | -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.17368-cvtres.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.17368-cvtres.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.17368-cvtres.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.17368-cvtres.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.17368-rc.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.17368-rc.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.17368-rc.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.17368-rc.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.17368.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.17368.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.17368.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.17368.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.3912-cvtres.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.3912-cvtres.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.3912-cvtres.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.3912-cvtres.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.3912-rc.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.3912-rc.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.3912-rc.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.3912-rc.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.3912.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.3912.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.3912.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.3912.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/metagen.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/metagen.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/metagen.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/metagen.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/rc.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/rc.command.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/rc.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/rc.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/rc.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/rc.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.vcxproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.vcxproj.AssemblyReference.cache -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.vcxproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.vcxproj.FileListAbsolute.txt -------------------------------------------------------------------------------- /CameraHelper/Debug/CameraHelper.vcxprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/CameraHelper.vcxprojAssemblyReference.cache -------------------------------------------------------------------------------- /CameraHelper/Debug/app.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/app.res -------------------------------------------------------------------------------- /CameraHelper/Debug/pch.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/pch.obj -------------------------------------------------------------------------------- /CameraHelper/Debug/vc143.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Debug/vc143.pdb -------------------------------------------------------------------------------- /CameraHelper/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cpp: -------------------------------------------------------------------------------- 1 | #using 2 | [assembly: System::Runtime::Versioning::TargetFrameworkAttribute(L".NETFramework,Version=v4.7.2", FrameworkDisplayName=L".NET Framework 4.7.2")]; 3 | -------------------------------------------------------------------------------- /CameraHelper/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.obj -------------------------------------------------------------------------------- /CameraHelper/Release/AssemblyInfo.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/AssemblyInfo.obj -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.log: -------------------------------------------------------------------------------- 1 |  pch.cpp 2 | AssemblyInfo.cpp 3 | CameraHelper.cpp 4 | 正在產生程式碼... 5 | .NETFramework,Version=v4.7.2.AssemblyAttributes.cpp 6 | AssemblyInfo.obj : 發現 MSIL 模組。MSIL 的累加連結已停用。正在執行完整連結 7 | CameraHelper.obj : error LNK2028: 無法解析的語彙基元 (0A000074) "extern "C" long __stdcall VariantClear(struct tagVARIANT *)" (?VariantClear@@$$J14YGJPAUtagVARIANT@@@Z) 在函式 "public: static class System::Collections::Generic::List ^ __clrcall CameraHelper::CameraHelper::GetCameras(void)" (?GetCameras@CameraHelper@1@$$FSMP$AAV?$List@P$AAVCameraInfo@CameraHelper@@@Generic@Collections@System@@XZ) 中被參考 8 | CameraHelper.obj : error LNK2028: 無法解析的語彙基元 (0A000078) "extern "C" void __stdcall VariantInit(struct tagVARIANT *)" (?VariantInit@@$$J14YGXPAUtagVARIANT@@@Z) 在函式 "public: static class System::Collections::Generic::List ^ __clrcall CameraHelper::CameraHelper::GetCameras(void)" (?GetCameras@CameraHelper@1@$$FSMP$AAV?$List@P$AAVCameraInfo@CameraHelper@@@Generic@Collections@System@@XZ) 中被參考 9 | CameraHelper.obj : error LNK2020: 無法解析的語彙基元 (0A00007D) CLSID_VideoInputDeviceCategory 10 | CameraHelper.obj : error LNK2020: 無法解析的語彙基元 (0A00007F) CLSID_SystemDeviceEnum 11 | CameraHelper.obj : error LNK2020: 無法解析的語彙基元 (0A000080) IID_ICreateDevEnum 12 | CameraHelper.obj : error LNK2028: 無法解析的語彙基元 (0A000081) "extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown@@K0PAPAX@Z) 在函式 "public: static class System::Collections::Generic::List ^ __clrcall CameraHelper::CameraHelper::GetCameras(void)" (?GetCameras@CameraHelper@1@$$FSMP$AAV?$List@P$AAVCameraInfo@CameraHelper@@@Generic@Collections@System@@XZ) 中被參考 13 | CameraHelper.obj : error LNK2001: 無法解析的外部符號 _CLSID_SystemDeviceEnum 14 | CameraHelper.obj : error LNK2001: 無法解析的外部符號 _IID_ICreateDevEnum 15 | CameraHelper.obj : error LNK2019: 在函式 "extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown@@K0PAPAX@Z)"public: static class System::Collections::Generic::List ^ __clrcall CameraHelper::CameraHelper::GetCameras(void)" (?GetCameras@CameraHelper@1@$$FSMP$AAV?$List@P$AAVCameraInfo@CameraHelper@@@Generic@Collections@System@@XZ) 中參考了無法解析的外部符號 16 | CameraHelper.obj : error LNK2001: 無法解析的外部符號 _CLSID_VideoInputDeviceCategory 17 | CameraHelper.obj : error LNK2019: 在函式 "extern "C" void __stdcall VariantInit(struct tagVARIANT *)" (?VariantInit@@$$J14YGXPAUtagVARIANT@@@Z)"public: static class System::Collections::Generic::List ^ __clrcall CameraHelper::CameraHelper::GetCameras(void)" (?GetCameras@CameraHelper@1@$$FSMP$AAV?$List@P$AAVCameraInfo@CameraHelper@@@Generic@Collections@System@@XZ) 中參考了無法解析的外部符號 18 | CameraHelper.obj : error LNK2019: 在函式 "extern "C" long __stdcall VariantClear(struct tagVARIANT *)" (?VariantClear@@$$J14YGJPAUtagVARIANT@@@Z)"public: static class System::Collections::Generic::List ^ __clrcall CameraHelper::CameraHelper::GetCameras(void)" (?GetCameras@CameraHelper@1@$$FSMP$AAV?$List@P$AAVCameraInfo@CameraHelper@@@Generic@Collections@System@@XZ) 中參考了無法解析的外部符號 19 | C:\Users\sam20\Desktop\chuni-hands-dependabot-nuget-chuni-hands-Newtonsoft.Json-13.0.1\Release\CameraHelper.dll : fatal error LNK1120: 12 個無法解析的外部符號 20 | -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.obj -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.pch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.pch -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/CameraHelper.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.35.32215:TargetPlatformVersion=10.0.22000.0:TargetFrameworkVersion=v4.7.2::EnableManagedIncrementalBuild=true: 2 | Release|Win32|C:\Users\sam20\Desktop\chuni-hands-dependabot-nuget-chuni-hands-Newtonsoft.Json-13.0.1\| 3 | -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.16240-cvtres.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.16240-cvtres.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.16240-cvtres.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.16240-cvtres.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.16240-rc.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.16240-rc.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.16240-rc.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.16240-rc.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.16240.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.16240.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.16240.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.16240.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/metagen.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/metagen.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/metagen.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/metagen.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/rc.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/rc.command.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/rc.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/rc.read.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/rc.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/rc.write.1.tlog -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /CameraHelper/Release/CameraHelper.vcxproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/CameraHelper.vcxproj.AssemblyReference.cache -------------------------------------------------------------------------------- /CameraHelper/Release/app.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/app.res -------------------------------------------------------------------------------- /CameraHelper/Release/pch.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/pch.obj -------------------------------------------------------------------------------- /CameraHelper/Release/vc143.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/Release/vc143.pdb -------------------------------------------------------------------------------- /CameraHelper/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by app.rc 4 | -------------------------------------------------------------------------------- /CameraHelper/app.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/app.aps -------------------------------------------------------------------------------- /CameraHelper/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/app.ico -------------------------------------------------------------------------------- /CameraHelper/app.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/CameraHelper/app.rc -------------------------------------------------------------------------------- /CameraHelper/pch.cpp: -------------------------------------------------------------------------------- 1 | // pch.cpp: source file corresponding to the pre-compiled header 2 | 3 | #include "pch.h" 4 | 5 | // When you are using pre-compiled headers, this source file is necessary for compilation to succeed. 6 | -------------------------------------------------------------------------------- /CameraHelper/pch.h: -------------------------------------------------------------------------------- 1 | // pch.h: This is a precompiled header file. 2 | // Files listed below are compiled only once, improving build performance for future builds. 3 | // This also affects IntelliSense performance, including code completion and many code browsing features. 4 | // However, files listed here are ALL re-compiled if any one of them is updated between builds. 5 | // Do not add files here that you will be updating frequently as this negates the performance advantage. 6 | 7 | #ifndef PCH_H 8 | #define PCH_H 9 | 10 | // add headers that you want to pre-compile here 11 | 12 | #endif //PCH_H 13 | -------------------------------------------------------------------------------- /CameraHelperTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CameraHelperTest/CameraHelperTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {13F60778-2DF6-4723-BB87-2A433B822307} 8 | Exe 9 | CameraHelperTest 10 | CameraHelperTest 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | true 36 | bin\x64\Debug\ 37 | DEBUG;TRACE 38 | full 39 | x64 40 | 7.3 41 | prompt 42 | MinimumRecommendedRules.ruleset 43 | true 44 | 45 | 46 | bin\x64\Release\ 47 | TRACE 48 | true 49 | pdbonly 50 | x64 51 | 7.3 52 | prompt 53 | MinimumRecommendedRules.ruleset 54 | true 55 | 56 | 57 | 58 | ..\Debug\CameraHelper.dll 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /CameraHelperTest/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CameraHelperTest { 8 | class Program { 9 | static void Main(string[] args) { 10 | var cameras = CameraHelper.CameraHelper.GetCameras(); 11 | foreach (var camera in cameras) { 12 | Console.WriteLine($"{camera.Id} {camera.Name}"); 13 | } 14 | 15 | Console.ReadLine(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /CameraHelperTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CameraHelperTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CameraHelperTest")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("13f60778-2df6-4723-bb87-2a433b822307")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Debug/CameraHelper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/Debug/CameraHelper.dll -------------------------------------------------------------------------------- /Debug/CameraHelper.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/Debug/CameraHelper.pdb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | chuni-hands 2 | --- 3 | 4 | Mysterious tool that detects things. 5 | 6 | A modded version from [Chuni-hands](https://github.com/logchan/chuni-hands) that can be customizable sensitivity settings for different detection points and support for NEW+/SUN 7 | 8 | 一個修改自 [Chuni-hands](https://github.com/logchan/chuni-hands) 的版本,可以個別設定偵測點靈敏度及支援NEW+/SUN 9 | 10 | ## User requirements 11 | 12 | - Camera 13 | - .Net Framework 4.7.1 14 | 15 | ## Build requirements 16 | 17 | - VS2022 18 | - [emgucv](https://github.com/emgucv/emgucv) 19 | 20 | ![image](https://github.com/Sam20060720/chuni-hands-mod/blob/master/screenshot.png) 21 | -------------------------------------------------------------------------------- /Release/CameraHelper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/Release/CameraHelper.dll -------------------------------------------------------------------------------- /Release/CameraHelper.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/Release/CameraHelper.pdb -------------------------------------------------------------------------------- /UpgradeLog.htm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 移轉報告 5 |

267 | 移轉報告 -

-------------------------------------------------------------------------------- /chuni-hands.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29728.190 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chuni-hands", "chuni-hands\chuni-hands.csproj", "{F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}" 7 | EndProject 8 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Emgu.CV.Runtime.Windows", "C:\Emgu\emgucv-windesktop 4.2.0.3662\Emgu.CV.Runtime\Windows\Emgu.CV.Runtime.Windows.shproj", "{ADC3C8E5-EBCD-4D3C-B3A4-20CFE0E42FC1}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CameraHelper", "CameraHelper\CameraHelper.vcxproj", "{720D3AF0-6A71-422B-8A93-1DEECE9E330F}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CameraHelperTest", "CameraHelperTest\CameraHelperTest.csproj", "{13F60778-2DF6-4723-BB87-2A433B822307}" 13 | EndProject 14 | Global 15 | GlobalSection(SharedMSBuildProjectFiles) = preSolution 16 | C:\Emgu\emgucv-windesktop 4.2.0.3662\Emgu.CV.Runtime\Windows\Emgu.CV.Runtime.Windows.projitems*{adc3c8e5-ebcd-4d3c-b3a4-20cfe0e42fc1}*SharedItemsImports = 13 17 | C:\Emgu\emgucv-windesktop 4.2.0.3662\Emgu.CV.Runtime\Windows\Emgu.CV.Runtime.Windows.projitems*{f1fdd6c6-7b45-403d-9a53-8e9ca600bc3f}*SharedItemsImports = 4 18 | EndGlobalSection 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Any CPU = Debug|Any CPU 21 | Debug|x64 = Debug|x64 22 | Debug|x86 = Debug|x86 23 | Release|Any CPU = Release|Any CPU 24 | Release|x64 = Release|x64 25 | Release|x86 = Release|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Debug|x64.ActiveCfg = Debug|x64 31 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Debug|x64.Build.0 = Debug|x64 32 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Debug|x86.ActiveCfg = Debug|x86 33 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Debug|x86.Build.0 = Debug|x86 34 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Release|x64.ActiveCfg = Release|x64 37 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Release|x64.Build.0 = Release|x64 38 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Release|x86.ActiveCfg = Release|x86 39 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F}.Release|x86.Build.0 = Release|x86 40 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Debug|Any CPU.ActiveCfg = Debug|Win32 41 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Debug|x64.ActiveCfg = Debug|x64 42 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Debug|x64.Build.0 = Debug|x64 43 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Debug|x86.ActiveCfg = Debug|Win32 44 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Debug|x86.Build.0 = Debug|Win32 45 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Release|Any CPU.ActiveCfg = Release|Win32 46 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Release|x64.ActiveCfg = Release|x64 47 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Release|x64.Build.0 = Release|x64 48 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Release|x86.ActiveCfg = Release|Win32 49 | {720D3AF0-6A71-422B-8A93-1DEECE9E330F}.Release|x86.Build.0 = Release|Win32 50 | {13F60778-2DF6-4723-BB87-2A433B822307}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 51 | {13F60778-2DF6-4723-BB87-2A433B822307}.Debug|Any CPU.Build.0 = Debug|Any CPU 52 | {13F60778-2DF6-4723-BB87-2A433B822307}.Debug|x64.ActiveCfg = Debug|Any CPU 53 | {13F60778-2DF6-4723-BB87-2A433B822307}.Debug|x64.Build.0 = Debug|Any CPU 54 | {13F60778-2DF6-4723-BB87-2A433B822307}.Debug|x86.ActiveCfg = Debug|Any CPU 55 | {13F60778-2DF6-4723-BB87-2A433B822307}.Debug|x86.Build.0 = Debug|Any CPU 56 | {13F60778-2DF6-4723-BB87-2A433B822307}.Release|Any CPU.ActiveCfg = Release|Any CPU 57 | {13F60778-2DF6-4723-BB87-2A433B822307}.Release|Any CPU.Build.0 = Release|Any CPU 58 | {13F60778-2DF6-4723-BB87-2A433B822307}.Release|x64.ActiveCfg = Release|x64 59 | {13F60778-2DF6-4723-BB87-2A433B822307}.Release|x64.Build.0 = Release|x64 60 | {13F60778-2DF6-4723-BB87-2A433B822307}.Release|x86.ActiveCfg = Release|Any CPU 61 | {13F60778-2DF6-4723-BB87-2A433B822307}.Release|x86.Build.0 = Release|Any CPU 62 | EndGlobalSection 63 | GlobalSection(SolutionProperties) = preSolution 64 | HideSolutionNode = FALSE 65 | EndGlobalSection 66 | GlobalSection(ExtensibilityGlobals) = postSolution 67 | SolutionGuid = {F6A72ED9-3F5E-4A27-84DB-FB8BCC2AD38F} 68 | EndGlobalSection 69 | EndGlobal 70 | -------------------------------------------------------------------------------- /chuni-hands.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /chuni-hands/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /chuni-hands/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /chuni-hands/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace chuni_hands { 4 | /// 5 | /// Interaction logic for App.xaml 6 | /// 7 | public partial class App : Application { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /chuni-hands/ChuniCanvas.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | using System.Windows.Media; 7 | 8 | namespace chuni_hands { 9 | internal sealed class ChuniCanvas : Canvas { 10 | 11 | private const double SensorThickness = 4.0; 12 | 13 | public int select_th = 0; 14 | 15 | public IEnumerable Sensors { get; set; } 16 | 17 | public ImageSource Image { 18 | get => (ImageSource)GetValue(ImageProperty); 19 | set => SetValue(ImageProperty, value); 20 | } 21 | 22 | public static readonly DependencyProperty ImageProperty = 23 | DependencyProperty.Register("Image", typeof(ImageSource), typeof(ChuniCanvas), new PropertyMetadata(null)); 24 | 25 | public bool DrawImage { 26 | get { return (bool)GetValue(DrawImageProperty); } 27 | set { SetValue(DrawImageProperty, value); } 28 | } 29 | 30 | public static readonly DependencyProperty DrawImageProperty = 31 | DependencyProperty.Register("DrawImage", typeof(bool), typeof(ChuniCanvas), new PropertyMetadata(false)); 32 | 33 | protected override void OnRender(DrawingContext dc) { 34 | base.OnRender(dc); 35 | 36 | dc.DrawRectangle(Brushes.LightGray, null, new Rect(0, 0, ActualWidth, ActualHeight)); 37 | var image = Image; 38 | if (image == null) { 39 | return; 40 | } 41 | 42 | var factor = ActualWidth / image.Width; 43 | factor = Math.Min(factor, ActualHeight / image.Height); 44 | var paddingX = (ActualWidth - image.Width * factor) / 2; 45 | var paddingY = (ActualHeight - image.Height * factor) / 2; 46 | var imageRect = new Rect(paddingX, paddingY, image.Width * factor, image.Height * factor); 47 | 48 | if (DrawImage) { 49 | dc.DrawImage(image, imageRect); 50 | } 51 | 52 | DrawSensors(dc, factor, paddingX, paddingY); 53 | } 54 | 55 | [Obsolete] 56 | private void DrawSensors(DrawingContext dc, double factor, double paddingX, double paddingY) { 57 | if (Sensors == null) { 58 | return; 59 | } 60 | 61 | foreach (var sensor in Sensors) { 62 | var brush = sensor.Active ? (sensor.Id == select_th ? Brushes.Blue : Brushes.Green) : (sensor.Id == select_th ? Brushes.Gray : Brushes.Red); 63 | var sz = sensor.Size; 64 | var x = paddingX + (sensor.X - sz / 2) * factor; 65 | var y = paddingY + (sensor.Y - sz / 2) * factor; 66 | 67 | dc.DrawRectangle(null, new Pen(brush, SensorThickness), 68 | new Rect(x - SensorThickness / 2, y - SensorThickness / 2, sz * factor + SensorThickness, sz * factor + SensorThickness)); 69 | 70 | if (sensor.diffp != -1) { 71 | FormattedText formattedText = new FormattedText( 72 | System.Math.Round(sensor.diffp, 2).ToString(), 73 | CultureInfo.GetCultureInfo("en-us"), 74 | FlowDirection.LeftToRight, 75 | new Typeface("Altra"), 76 | 12, 77 | Brushes.Gray); 78 | 79 | dc.DrawText(formattedText, new Point(x - SensorThickness / 2 + 40, y - SensorThickness / 2)); 80 | } 81 | 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /chuni-hands/ChuniIO.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO.MemoryMappedFiles; 3 | using System.Security.Principal; 4 | 5 | namespace chuni_hands { 6 | internal static class ChuniIO { 7 | 8 | public static MemoryMappedFile sharedBuffer; 9 | public static MemoryMappedViewAccessor sharedBufferAccessor; 10 | 11 | private static bool _init = false; 12 | private static readonly int[] SensorMap = new int[] { 1, 0, 3, 2, 5, 4 }; 13 | public static void Send(IList sensors) { 14 | if (!_init) { 15 | Initialize(); 16 | } 17 | 18 | 19 | var data = new byte[6]; 20 | for (var i = 0; i < 6; ++i) { 21 | data[SensorMap[i]] = (byte)(sensors[i].Active ? 1 : 0); 22 | } 23 | 24 | 25 | sharedBufferAccessor.WriteArray(0, data, 0, 6); 26 | 27 | 28 | //byte[] readarr = new byte[50]; 29 | //sharedBufferAccessor.ReadArray(0, readarr, 0, 49); 30 | //for (int bufi = 0; bufi <= 6; bufi++) { 31 | // Console.Write(readarr[bufi]); 32 | //} 33 | //Console.WriteLine(); 34 | 35 | } 36 | 37 | private static void Initialize() { 38 | MemoryMappedFileSecurity CustomSecurity = new MemoryMappedFileSecurity(); 39 | SecurityIdentifier sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null); 40 | var acct = sid.Translate(typeof(NTAccount)) as NTAccount; 41 | CustomSecurity.AddAccessRule(new System.Security.AccessControl.AccessRule(acct.ToString(), MemoryMappedFileRights.FullControl, System.Security.AccessControl.AccessControlType.Allow)); 42 | sharedBuffer = MemoryMappedFile.CreateOrOpen("Local\\BROKENITHM_SHARED_BUFFER", 1024, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None, CustomSecurity, System.IO.HandleInheritability.Inheritable); 43 | sharedBufferAccessor = sharedBuffer.CreateViewAccessor(); 44 | _init = true; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /chuni-hands/Config.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace chuni_hands { 4 | public sealed class Config : Helpers.PropertyChangedInvoker { 5 | static Config() { 6 | Helpers.PatchNotifyPropertyChanged(); 7 | } 8 | 9 | public int OffsetX { get; set; } 10 | public int OffsetY { get; set; } 11 | public int Exposure { get; set; } = -6; 12 | public int SensorSize { get; set; } = 21; 13 | public double[] Threshold { get; set; } = { 10, 10, 10, 10, 10, 10 }; 14 | public int Distance { get; set; } = 40; 15 | 16 | public int CameraId { get; set; } = 0; 17 | public int BootstrapSeconds { get; set; } = 2; 18 | public int CaptureWidth { get; set; } = 640; 19 | public int CaptureHeight { get; set; } = 480; 20 | public int Fps { get; set; } = 60; 21 | public bool LogDiff { get; set; } 22 | public string SendKeyMode { get; set; } = "chuni_io"; 23 | public string EndPoint { get; set; } = "http://10.233.3.22:4420/update_air"; 24 | public bool ShowVideo { get; set; } = true; 25 | 26 | [JsonIgnore] 27 | public bool FreezeVideo { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /chuni-hands/Helpers.cs: -------------------------------------------------------------------------------- 1 | using Harmony; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.ComponentModel; 5 | using System.Diagnostics; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Reflection; 9 | using System.Windows.Threading; 10 | 11 | 12 | namespace chuni_hands { 13 | public static class Helpers { 14 | public static T Deserialize(string path) { 15 | var content = File.ReadAllText(path); 16 | return JsonConvert.DeserializeObject(content); 17 | } 18 | 19 | public static void Serialize(object o, string path) { 20 | var content = JsonConvert.SerializeObject(o, Formatting.Indented); 21 | File.WriteAllText(path, content); 22 | } 23 | 24 | public static string GetVersion() { 25 | return FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion; 26 | } 27 | 28 | private static HarmonyInstance _harmony = HarmonyInstance.Create("co.logu.chuni-hands.helpers"); 29 | 30 | public static void PatchNotifyPropertyChanged() where T : PropertyChangedInvoker { 31 | var type = typeof(T); 32 | var patch = typeof(Helpers).GetMethod("PropertyChangedPostfix", BindingFlags.NonPublic | BindingFlags.Static); 33 | Debug.Assert(patch != null, nameof(patch) + " != null"); 34 | patch = patch.MakeGenericMethod(type); 35 | 36 | foreach (var method in type.GetProperties().Select(p => p.SetMethod)) { 37 | _harmony.Patch(method, new HarmonyMethod(patch)); 38 | } 39 | } 40 | 41 | // ReSharper disable InconsistentNaming 42 | // ReSharper disable once UnusedMember.Local 43 | private static void PropertyChangedPostfix(MethodBase __originalMethod, T __instance) where T : PropertyChangedInvoker { 44 | __instance.InvokePropertyChanged(__originalMethod.Name.Substring(4)); // remove set_ 45 | } 46 | // ReSharper restore InconsistentNaming 47 | 48 | public abstract class PropertyChangedInvoker : INotifyPropertyChanged { 49 | public event PropertyChangedEventHandler PropertyChanged; 50 | public virtual void InvokePropertyChanged(string propertyName) { 51 | Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => { 52 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 53 | })); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /chuni-hands/License-LGPL.txt: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 489 | 490 | Also add information on how to contact you by electronic and paper mail. 491 | 492 | You should also get your employer (if you work as a programmer) or your 493 | school, if any, to sign a "copyright disclaimer" for the library, if 494 | necessary. Here is a sample; alter the names: 495 | 496 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 497 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 498 | 499 | , 1 April 1990 500 | Ty Coon, President of Vice 501 | 502 | That's all there is to it! 503 | 504 | 505 | 506 | 507 | -------------------------------------------------------------------------------- /chuni-hands/Logger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace chuni_hands { 4 | public static class Logger { 5 | public delegate void LogHandler(string log); 6 | 7 | public static event LogHandler LogAdded; 8 | 9 | public static void Log(LogLevel level, string msg) { 10 | var time = DateTime.Now.ToString("HH:mm:ss.ff"); 11 | var log = $"{time} [{level}] {msg}"; 12 | 13 | LogAdded?.Invoke(log); 14 | } 15 | 16 | public static void Info(string msg) { 17 | Log(LogLevel.Info, msg); 18 | } 19 | 20 | public static void Warning(string msg) { 21 | Log(LogLevel.Warning, msg); 22 | } 23 | 24 | public static void Error(string msg) { 25 | Log(LogLevel.Error, msg); 26 | } 27 | 28 | public enum LogLevel { 29 | Info, 30 | Warning, 31 | Error 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /chuni-hands/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 是否顯示相機 31 | 32 | 靈敏度 33 | 34 | 0 35 | 1 36 | 2 37 | 3 38 | 4 39 | 5 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 區塊密度 49 | 50 | 51 | 52 | X 53 | 54 | 55 | 56 | Y 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 凍結相機(暫停判斷) 68 | 顯示diff紀錄 (不建議開啟) 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /chuni-hands/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Emgu.CV; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Net.Http; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using System.Windows; 10 | using System.Windows.Controls; 11 | using System.Windows.Data; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | 15 | namespace chuni_hands { 16 | public partial class MainWindow : Window { 17 | private const string ConfigFile = "chuni-hands.json"; 18 | 19 | private VideoCapture _capture; 20 | private readonly List _sensors = new List(6); 21 | private Mat _mat = new Mat(); 22 | private byte[] _matData = new byte[0]; 23 | private bool _hasPendingReset = false; 24 | 25 | private Task _captureTask; 26 | private volatile bool _closing = false; 27 | 28 | private readonly Config _config = new Config(); 29 | private readonly HttpClient _http = new HttpClient(); 30 | 31 | public Config Config => _config; 32 | 33 | public int logcount = 0; 34 | 35 | 36 | 37 | public MainWindow() { 38 | if (File.Exists(ConfigFile)) { 39 | _config = Helpers.Deserialize(ConfigFile); 40 | } 41 | 42 | for (var i = 0; i < 6; ++i) { 43 | _sensors.Add(new Sensor(i, _config)); 44 | } 45 | 46 | InitializeComponent(); 47 | Title += " version " + Helpers.GetVersion() + " (Sam07205 Modded For New+/Sun)"; 48 | 49 | TheCanvas.Sensors = _sensors; 50 | RefreshCameras(); 51 | 52 | Logger.LogAdded += log => { 53 | if (logcount >= 100) { 54 | LogBox.Document.Blocks.Remove(LogBox.Document.Blocks.FirstBlock); //First line 55 | } 56 | else { 57 | logcount += 1; 58 | } 59 | 60 | LogBox.AppendText(log); 61 | LogBox.AppendText(Environment.NewLine); 62 | LogBox.ScrollToEnd(); 63 | }; 64 | ThresholdIndexComboBox.SelectedIndex = 0; 65 | ThresholdBox.SetBinding(TextBox.TextProperty, new Binding("Config.Threshold[0]") { ElementName = "TheWindow" }); 66 | 67 | TheCanvas.select_th = 0; 68 | Logger.Info("\n綠色:並非正在設定的區塊偵測到手\n紅色:並非正在設定的區塊未偵測到手\n藍色:正在設定的區塊偵測到手\n灰色:正在設定的區塊未偵測到手"); 69 | 70 | } 71 | 72 | private void FrameUpdate() { 73 | 74 | // compute 75 | 76 | foreach (var sensor in _sensors) { 77 | sensor.Update(_mat, _hasPendingReset); 78 | } 79 | _hasPendingReset = false; 80 | 81 | // send key 82 | 83 | SendKey(); 84 | 85 | // update display 86 | 87 | var length = _mat.Rows * _mat.Cols * _mat.NumberOfChannels; 88 | if (_matData.Length < length) { 89 | _matData = new byte[length]; 90 | } 91 | 92 | _mat.CopyTo(_matData); 93 | 94 | var bm = BitmapSource.Create(_mat.Cols, _mat.Rows, 96, 96, PixelFormats.Bgr24, null, _matData, _mat.Cols * _mat.NumberOfChannels); 95 | TheCanvas.Image = bm; 96 | TheCanvas.InvalidateVisual(); 97 | } 98 | 99 | private void SendKey() { 100 | if (IsActive) { 101 | return; 102 | } 103 | 104 | if (_sensors.All(s => !s.StateChanged)) { 105 | return; 106 | } 107 | 108 | switch (_config.SendKeyMode) { 109 | case "be": { 110 | var airKeys = String.Concat(from sensor in _sensors select sensor.Active ? "1" : "0"); 111 | _http.GetAsync(_config.EndPoint + "?k=" + airKeys); 112 | break; 113 | } 114 | case "chuni_io": { 115 | ChuniIO.Send(_sensors); 116 | break; 117 | } 118 | default: 119 | throw new Exception("unknown SendKeyMode"); 120 | } 121 | } 122 | 123 | private void Window_Loaded(object sender, RoutedEventArgs e) { 124 | StartCapture(); 125 | } 126 | 127 | private void RefreshCameras() { 128 | var cameras = CameraHelper.CameraHelper.GetCameras(); 129 | CameraCombo.Items.Clear(); 130 | foreach (var cam in cameras) { 131 | CameraCombo.Items.Add($"[{cam.Id}] {cam.Name}"); 132 | } 133 | 134 | if (_config.CameraId >= 0 && _config.CameraId < CameraCombo.Items.Count) { 135 | CameraCombo.SelectedIndex = _config.CameraId; 136 | } 137 | else { 138 | _config.CameraId = 0; 139 | } 140 | } 141 | 142 | private void StartCapture() { 143 | var cap = new VideoCapture(_config.CameraId, VideoCapture.API.DShow); 144 | if (!cap.IsOpened) { 145 | Logger.Error("Failed to start video capture"); 146 | return; 147 | } 148 | 149 | Logger.Info("Video capture started"); 150 | cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameWidth, _config.CaptureWidth); 151 | cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameHeight, _config.CaptureHeight); 152 | cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.Autofocus, 0); 153 | cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.Exposure, _config.Exposure); 154 | 155 | _capture = cap; 156 | _capture.Read(_mat); 157 | _config.CaptureWidth = _mat.Cols; 158 | _config.CaptureHeight = _mat.Rows; 159 | 160 | _captureTask = Task.Run(CaptureLoop); 161 | } 162 | 163 | private void StopCapture() { 164 | Logger.Info("Stopping capture"); 165 | 166 | _closing = true; 167 | _captureTask?.Wait(); 168 | _captureTask = null; 169 | 170 | _capture?.Stop(); 171 | _capture?.Dispose(); 172 | _capture = null; 173 | 174 | _closing = false; 175 | } 176 | 177 | private void CaptureLoop() { 178 | // give camera some time to auto adjust, so user don't need to press reset right after start 179 | var bootstrapFrames = _config.BootstrapSeconds * _config.Fps; 180 | 181 | while (!_closing) { 182 | if (bootstrapFrames > 0) { 183 | _capture.Read(_mat); 184 | --bootstrapFrames; 185 | } 186 | else { 187 | if (!_config.FreezeVideo) { 188 | _capture.Read(_mat); 189 | } 190 | 191 | Dispatcher?.BeginInvoke(new Action(FrameUpdate)); 192 | } 193 | 194 | // what the...?? well, it works 195 | Thread.Sleep(1000 / _config.Fps); 196 | } 197 | } 198 | 199 | private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { 200 | StopCapture(); 201 | Helpers.Serialize(_config, ConfigFile); 202 | } 203 | 204 | private void ResetButton_Click(object sender, RoutedEventArgs e) { 205 | _hasPendingReset = true; 206 | } 207 | 208 | private void SetThresholdButton_Click(object sender, RoutedEventArgs e) { 209 | if (int.TryParse(ThresholdBox.Text, out int v)) { 210 | int index = ThresholdIndexComboBox.SelectedIndex; 211 | _config.Threshold[index] = v; 212 | Logger.Info($"Threshold[{index}] = {v}"); 213 | } 214 | else { 215 | Logger.Error("Invalid input"); 216 | } 217 | } 218 | private void SetThresholdButton_ALL_Click(object sender, RoutedEventArgs e) { 219 | if (int.TryParse(ThresholdBox.Text, out int v)) { 220 | for (int i = 0; i <= 5; i++) { 221 | _config.Threshold[i] = v; 222 | } 223 | Logger.Info($"ALL Threshold = {v}"); 224 | } 225 | else { 226 | Logger.Error("Invalid input"); 227 | } 228 | } 229 | 230 | 231 | 232 | private void ThresholdIndexComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { 233 | int index = ThresholdIndexComboBox.SelectedIndex; 234 | TheCanvas.select_th = index; 235 | ThresholdBox.SetBinding(TextBox.TextProperty, new Binding($"Config.Threshold[{index}]") { ElementName = "TheWindow" }); 236 | } 237 | 238 | private void CenterButton_Click(object sender, RoutedEventArgs e) { 239 | _config.OffsetX = 0; 240 | _config.OffsetY = 0; 241 | } 242 | 243 | private void SetCameraBtn_Click(object sender, RoutedEventArgs e) { 244 | StopCapture(); 245 | 246 | _config.CameraId = CameraCombo.SelectedIndex; 247 | StartCapture(); 248 | } 249 | 250 | private void RefreshCameraBtn_Click(object sender, RoutedEventArgs e) { 251 | RefreshCameras(); 252 | } 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /chuni-hands/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Windows; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("chuni-hands")] 9 | [assembly: AssemblyDescription("chuni sensor simulator")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("chuni-hands")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | //In order to begin building localizable applications, set 23 | //CultureYouAreCodingWith in your .csproj file 24 | //inside a . For example, if you are using US english 25 | //in your source files, set the to en-US. Then uncomment 26 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 27 | //the line below to match the UICulture setting in the project file. 28 | 29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 30 | 31 | 32 | [assembly: ThemeInfo( 33 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 34 | //(used if a resource is not found in the page, 35 | // or application resource dictionaries) 36 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 37 | //(used if a resource is not found in the page, 38 | // app, or any theme specific resource dictionaries) 39 | )] 40 | 41 | 42 | // Version information for an assembly consists of the following four values: 43 | // 44 | // Major Version 45 | // Minor Version 46 | // Build Number 47 | // Revision 48 | // 49 | // You can specify all the values or you can default the Build and Revision Numbers 50 | // by using the '*' as shown below: 51 | // [assembly: AssemblyVersion("1.0.*")] 52 | [assembly: AssemblyVersion("0.4.0.0")] 53 | [assembly: AssemblyFileVersion("0.4.0.0")] 54 | -------------------------------------------------------------------------------- /chuni-hands/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace chuni_hands.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("chuni_hands.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /chuni-hands/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /chuni-hands/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace chuni_hands.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /chuni-hands/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /chuni-hands/Sensor.cs: -------------------------------------------------------------------------------- 1 | using Emgu.CV; 2 | using Emgu.CV.Structure; 3 | using System; 4 | 5 | namespace chuni_hands { 6 | internal sealed class Sensor { 7 | public int X { get; private set; } 8 | public int Y { get; private set; } 9 | public bool Active { get; private set; } 10 | public bool StateChanged { get; private set; } 11 | public int Size => _config.SensorSize; 12 | public int Id => _id; 13 | 14 | public double diffp = 0; 15 | 16 | 17 | private Mat _startValue; 18 | private readonly Config _config; 19 | private readonly int _id; 20 | 21 | public Sensor(int id, Config config) { 22 | _id = id; 23 | _config = config; 24 | } 25 | 26 | private Mat GetPartial(Mat frame) { 27 | var sz = _config.SensorSize; 28 | return new Mat(frame, new Range(Y - sz / 2, Y + sz / 2 + 1), new Range(X - sz / 2, X + sz / 2 + 1)); 29 | } 30 | 31 | public void Update(Mat frame, bool forceInit) { 32 | 33 | // reposition 34 | 35 | X = _config.CaptureWidth / 2 + _config.OffsetX; 36 | X = Math.Max(Math.Min(X, _config.CaptureWidth - _config.SensorSize), _config.SensorSize); 37 | 38 | Y = _config.CaptureHeight - (_config.CaptureHeight / 2 + _config.OffsetY + _id * _config.Distance); 39 | Y = Math.Max(Math.Min(Y, _config.CaptureHeight - _config.SensorSize), _config.SensorSize); 40 | 41 | // check area 42 | 43 | var pixels = GetPartial(frame); 44 | 45 | if (_startValue == null || forceInit) { 46 | _startValue = new Mat(pixels.Size, Emgu.CV.CvEnum.DepthType.Cv64F, pixels.NumberOfChannels); 47 | pixels.ConvertTo(_startValue, _startValue.Depth); 48 | _startValue /= 255; 49 | 50 | Active = false; 51 | StateChanged = false; 52 | return; 53 | } 54 | 55 | var pixelsD = new Mat(pixels.Size, Emgu.CV.CvEnum.DepthType.Cv64F, pixels.NumberOfChannels); 56 | pixels.ConvertTo(pixelsD, pixelsD.Depth); 57 | pixelsD /= 255; 58 | 59 | var matDiff = pixelsD - _startValue; 60 | var diff = matDiff.Dot(matDiff); 61 | 62 | if (_config.LogDiff) { 63 | //Logger.Info($"diff ({Id}): {diff}"); 64 | diffp = diff; 65 | } 66 | else { 67 | diffp = -1; 68 | } 69 | 70 | var active = diff > _config.Threshold[Id]; 71 | StateChanged = active != Active; 72 | Active = active; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /chuni-hands/Styles.xaml: -------------------------------------------------------------------------------- 1 |  4 | 7 | 10 | -------------------------------------------------------------------------------- /chuni-hands/chuni-hands.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F1FDD6C6-7B45-403D-9A53-8E9CA600BC3F} 8 | WinExe 9 | chuni_hands 10 | chuni-hands 11 | v4.7.2 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | false 18 | 19 | 20 | true 21 | C:\Users\sam20\Desktop\chuni-hands\ 22 | true 23 | Disk 24 | false 25 | Foreground 26 | 7 27 | Days 28 | false 29 | false 30 | true 31 | 1 32 | 1.0.0.%2a 33 | false 34 | true 35 | true 36 | 37 | 38 | AnyCPU 39 | true 40 | full 41 | false 42 | bin\Debug\ 43 | DEBUG;TRACE 44 | prompt 45 | 4 46 | true 47 | 48 | 49 | AnyCPU 50 | pdbonly 51 | true 52 | bin\Release\ 53 | TRACE 54 | prompt 55 | 4 56 | true 57 | 58 | 59 | true 60 | bin\x64\Debug\ 61 | DEBUG;TRACE 62 | full 63 | x64 64 | 7.3 65 | prompt 66 | MinimumRecommendedRules.ruleset 67 | true 68 | 69 | 70 | bin\x64\Release\ 71 | TRACE 72 | true 73 | pdbonly 74 | x64 75 | 7.3 76 | prompt 77 | MinimumRecommendedRules.ruleset 78 | true 79 | true 80 | 81 | 82 | 74E43E8737451D6244EE7C10B678D0B0F2187E32 83 | 84 | 85 | chuni-hands_TemporaryKey.pfx 86 | 87 | 88 | true 89 | 90 | 91 | true 92 | 93 | 94 | 95 | ..\packages\Lib.Harmony.1.2.0.1\lib\net472\0Harmony.dll 96 | 97 | 98 | ..\Debug\CameraHelper.dll 99 | 100 | 101 | ..\packages\Emgu.CV.4.4.0.4077\lib\netstandard2.0\Emgu.CV.Platform.NetStandard.dll 102 | 103 | 104 | ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll 105 | 106 | 107 | ..\packages\Splat.1.6.2\lib\Net45\Splat.dll 108 | 109 | 110 | 111 | 112 | 113 | 114 | ..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll 115 | True 116 | True 117 | 118 | 119 | ..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll 120 | True 121 | True 122 | 123 | 124 | ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll 125 | True 126 | True 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 4.0 137 | 138 | 139 | 140 | 141 | 142 | ..\packages\ZedGraph.5.1.7\lib\net35-Client\ZedGraph.dll 143 | 144 | 145 | 146 | 147 | MSBuild:Compile 148 | Designer 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | MSBuild:Compile 158 | Designer 159 | 160 | 161 | App.xaml 162 | Code 163 | 164 | 165 | MainWindow.xaml 166 | Code 167 | 168 | 169 | Designer 170 | MSBuild:Compile 171 | 172 | 173 | 174 | 175 | Code 176 | 177 | 178 | True 179 | True 180 | Resources.resx 181 | 182 | 183 | True 184 | Settings.settings 185 | True 186 | 187 | 188 | ResXFileCodeGenerator 189 | Resources.Designer.cs 190 | 191 | 192 | 193 | 194 | SettingsSingleFileGenerator 195 | Settings.Designer.cs 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | False 204 | Microsoft .NET Framework 4.7.2 %28x86 和 x64%29 205 | true 206 | 207 | 208 | False 209 | .NET Framework 3.5 SP1 210 | false 211 | 212 | 213 | 214 | 215 | {13f60778-2df6-4723-bb87-2a433b822307} 216 | CameraHelperTest 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 228 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /chuni-hands/chuni-hands_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/chuni-hands/chuni-hands_TemporaryKey.pfx -------------------------------------------------------------------------------- /chuni-hands/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sam20060720/chuni-hands-mod/e3500b4f19f834afa80111017a4feef021c58436/screenshot.png --------------------------------------------------------------------------------