diff --git a/build/processes/lock_track_plus b/build/processes/lock_track_plus deleted file mode 100644 index e69de29..0000000 diff --git a/build/processes/processes_track_plus b/build/processes/processes_track_plus deleted file mode 100644 index 7bf7810..0000000 --- a/build/processes/processes_track_plus +++ /dev/null @@ -1,129 +0,0 @@ - -ӳ������ PID �Ự�� �Ự# �ڴ�ʹ�� -========================= ======== ================ =========== ============ -System Idle Process 0 Services 0 4 K -System 4 Services 0 280,376 K -smss.exe 344 Services 0 16 K -csrss.exe 448 Services 0 1,488 K -wininit.exe 524 Services 0 564 K -csrss.exe 532 Console 1 7,996 K -winlogon.exe 600 Console 1 1,208 K -services.exe 668 Services 0 4,156 K -lsass.exe 688 Services 0 7,224 K -svchost.exe 772 Services 0 10,732 K -svchost.exe 836 Services 0 7,064 K -dwm.exe 948 Console 1 50,816 K -svchost.exe 1000 Services 0 29,852 K -svchost.exe 1008 Services 0 12,844 K -svchost.exe 304 Services 0 14,784 K -svchost.exe 1040 Services 0 15,532 K -svchost.exe 1048 Services 0 4,568 K -WUDFHost.exe 1132 Services 0 1,940 K -svchost.exe 1228 Services 0 14,372 K -igfxCUIService.exe 1252 Services 0 3,316 K -WUDFHost.exe 1428 Services 0 2,900 K -spoolsv.exe 1764 Services 0 2,096 K -svchost.exe 1772 Services 0 17,828 K -AppleMobileDeviceService. 424 Services 0 2,032 K -AppleOSSMgr.exe 1096 Services 0 852 K -SkypeC2CPNRSvc.exe 1332 Services 0 772 K -SkypeC2CAutoUpdateSvc.exe 1392 Services 0 1,012 K -AdAppMgrSvc.exe 1492 Services 0 7,036 K -ddmgr.exe 1808 Services 0 1,168 K -svchost.exe 1548 Services 0 12,712 K -LiveUpdate.exe 2160 Services 0 1,372 K -kpcoresvc.exe 2176 Services 0 960 K -mitsijm.exe 2268 Services 0 1,112 K -pcas.exe 2344 Services 0 2,564 K -PnkBstrA.exe 2452 Services 0 992 K -svchost.exe 2608 Services 0 2,140 K -svchost.exe 2736 Services 0 11,468 K -svchost.exe 2772 Services 0 4,268 K -MsMpEng.exe 2780 Services 0 106,676 K -MiRouter.exe 2824 Services 0 1,180 K -NisSrv.exe 3528 Services 0 11,960 K -taskhostw.exe 3720 Console 1 9,956 K -sihost.exe 3744 Console 1 17,540 K -PresentationFontCache.exe 3820 Services 0 2,744 K -ChsIME.exe 3892 Console 1 19,908 K -explorer.exe 3792 Console 1 81,256 K -RemindersServer.exe 4200 Console 1 6,364 K -igfxEM.exe 4312 Console 1 4,072 K -igfxHK.exe 4328 Console 1 1,024 K -SearchIndexer.exe 4912 Services 0 41,932 K -ShellExperienceHost.exe 5012 Console 1 31,544 K -SearchUI.exe 4364 Console 1 42,724 K -RuntimeBroker.exe 4684 Console 1 31,664 K -TSVNCache.exe 5284 Console 1 2,212 K -dllhost.exe 5480 Console 1 6,140 K -svchost.exe 5592 Console 1 20,032 K -MpCmdRun.exe 3032 Services 0 6,800 K -SettingSyncHost.exe 6196 Console 1 12,452 K -SearchProtocolHost.exe 6216 Services 0 7,604 K -ApplicationFrameHost.exe 5852 Console 1 21,320 K -Bootcamp.exe 6532 Console 1 4,744 K -TiltWheelMouse.exe 6724 Console 1 1,668 K -kuaipan.exe 6860 Console 1 48,068 K -Thunder.exe 6996 Console 1 25,340 K -StikyNot.exe 4476 Console 1 2,464 K -ThunderPlatform.exe 7504 Console 1 11,304 K -LMS.exe 7528 Services 0 1,864 K -StandardCollector.Service 3704 Services 0 16,124 K -Video.UI.exe 10216 Console 1 60 K -onenoteim.exe 8644 Console 1 164 K -Microsoft.Msn.News.exe 9968 Console 1 108 K -Microsoft.Msn.Weather.exe 1188 Console 1 132 K -Calculator.exe 10352 Console 1 64 K -WinStore.Mobile.exe 10588 Console 1 104 K -Microsoft.Photos.exe 1184 Console 1 124 K -synergyd.exe 8788 Services 0 1,236 K -mDNSResponder.exe 12792 Services 0 1,712 K -ssh-agent.exe 2420 Console 1 720 K -Steam.exe 13360 Console 1 33,912 K -DataExchangeHost.exe 13136 Console 1 1,024 K -steamwebhelper.exe 14132 Console 1 5,944 K -SteamService.exe 11992 Services 0 2,320 K -SpeechRuntime.exe 14644 Console 1 1,252 K -sublime_text.exe 9856 Console 1 11,328 K -plugin_host.exe 440 Console 1 7,428 K -chrome.exe 4696 Console 1 167,452 K -chrome.exe 13488 Console 1 26,904 K -chrome.exe 8244 Console 1 9,536 K -chrome.exe 9324 Console 1 81,936 K -chrome.exe 12904 Console 1 2,532 K -chrome.exe 12376 Console 1 2,660 K -chrome.exe 14316 Console 1 27,500 K -chrome.exe 8528 Console 1 19,364 K -chrome.exe 14952 Console 1 14,556 K -chrome.exe 11988 Console 1 11,388 K -chrome.exe 13848 Console 1 9,224 K -SystemSettingsBroker.exe 11076 Console 1 2,492 K -dllhost.exe 11784 Services 0 1,204 K -wlanext.exe 8988 Services 0 1,644 K -conhost.exe 10496 Services 0 600 K -dasHost.exe 11332 Services 0 668 K -InputPersonalization.exe 4884 Console 1 3,284 K -steamwebhelper.exe 14924 Console 1 3,848 K -wwbizsrv.exe 9392 Services 0 11,556 K -taskhostw.exe 10508 Console 1 6,688 K -devenv.exe 14200 Console 1 335,460 K -VsHub.exe 5140 Console 1 44,976 K -Microsoft.VsHub.Server.Ht 6280 Console 1 70,060 K -conhost.exe 9612 Console 1 4,952 K -Taskmgr.exe 9340 Console 1 36,488 K -MSBuild.exe 12876 Console 1 33,504 K -conhost.exe 12760 Console 1 4,060 K -chrome.exe 14420 Console 1 59,956 K -audiodg.exe 8164 Services 0 10,600 K -Microsoft.VsHub.Server.Ht 12880 Console 1 65,404 K -conhost.exe 9792 Console 1 5,396 K -WmiPrvSE.exe 10880 Services 0 10,112 K -menu_plus.exe 9088 Console 1 38,536 K -menu_plus.exe 14572 Console 1 30,376 K -menu_plus.exe 10004 Console 1 24,208 K -track_plus.exe 7312 Console 1 118,356 K -conhost.exe 7368 Console 1 6,056 K -menu_plus.exe 5104 Console 1 24,048 K -SearchFilterHost.exe 12664 Services 0 7,968 K -cmd.exe 7384 Console 1 3,408 K -tasklist.exe 8040 Console 1 7,204 K diff --git a/track_plus_core/track_plus/mono_processor_new.cpp b/track_plus_core/track_plus/mono_processor_new.cpp index bcf4ae6..4ce466a 100644 --- a/track_plus_core/track_plus/mono_processor_new.cpp +++ b/track_plus_core/track_plus/mono_processor_new.cpp @@ -469,6 +469,10 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name //------------------------------------------------------------------------------------------------------------------------------ + float hand_angle = value_store->get_float("hand_angle", 0); + float hand_angle_old = hand_angle; + + //------------------------------------------------------------------------------------------------------------------------------ Mat image_very_small; resize(image_active_hand, image_very_small, Size(WIDTH_MIN / 2, HEIGHT_MIN / 2), 0, 0, INTER_LINEAR); @@ -498,9 +502,11 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name x_min_ivst += 2; x_max_ivst += 2; + const float mask_ratio = 0.5; + const int i_max = x_max_ivst; const int j_max = y_max_ivst; - for (int i = (x_max_ivst - x_min_ivst) * 0.7 + x_min_ivst; i < i_max; ++i) + for (int i = (x_max_ivst - x_min_ivst) * mask_ratio + x_min_ivst; i < i_max; ++i) for (int j = y_min_ivst; j < j_max; ++j) image_very_small.ptr(j, i)[0] = 0; @@ -518,9 +524,11 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name multiplier = map_val(multiplier, 0, 10, 2, 1); palm_radius *= multiplier * 1.5; + const int x_offset = hand_angle > 0 ? 0 : (palm_radius / 2); + Point palm_point_new = max_loc * 4; palm_point.y = palm_point_new.y; - palm_point.x = palm_point_raw.x + (palm_radius / 2); + palm_point.x = palm_point_raw.x + x_offset; } low_pass_filter->compute(palm_radius, 0.1, "palm_radius"); @@ -535,9 +543,6 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name Point pivot = value_store->get_point("pivot"); - float hand_angle = value_store->get_float("hand_angle", 0); - float hand_angle_old = hand_angle; - if (!value_store->get_bool("hand_angle_set", false)) { static Point pt_intersection_hand_direction_stereo = Point(0, 0); @@ -581,9 +586,9 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name float dist1 = get_distance(pt1, palm_point, false); float dist2 = get_distance(pt2, palm_point, false); - if (dist0 <= dist1 && dist0 <= dist2) + if (dist0 < dist1 && dist0 < dist2) concave_points_indexed_raw.push_back(Point3f(pt0.x, pt0.y, i)); - else if (dist0 >= dist1 && dist0 >= dist2) + else if (dist0 > dist1 && dist0 > dist2) convex_points_indexed_raw.push_back(Point3f(pt0.x, pt0.y, i)); } } @@ -755,9 +760,9 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name float dist1 = get_distance(pt1, palm_point, false); float dist2 = get_distance(pt2, palm_point, false); - if (dist0 <= dist1 && dist0 <= dist2) + if (dist0 < dist1 && dist0 < dist2) concave_points_indexed_raw.push_back(Point3f(pt0.x, pt0.y, i)); - else if (dist0 >= dist1 && dist0 >= dist2) + else if (dist0 > dist1 && dist0 > dist2) convex_points_indexed_raw.push_back(Point3f(pt0.x, pt0.y, i)); } } @@ -795,15 +800,15 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name if ((pt_concave_indexed.z > index_begin && pt_concave_indexed.z < index_end) || (pt_concave_indexed.z < index_begin && pt_concave_indexed.z > index_end)) { - /*float dist_to_convex0 = get_distance(Point(pt_concave_indexed.x, pt_concave_indexed.y), + float dist_to_convex0 = get_distance(Point(pt_concave_indexed.x, pt_concave_indexed.y), Point(pt_convex_indexed0.x, pt_convex_indexed0.y), true); float dist_to_convex1 = get_distance(Point(pt_concave_indexed.x, pt_concave_indexed.y), Point(pt_convex_indexed1.x, pt_convex_indexed1.y), true); float dist_to_convex_max = max(dist_to_convex0, dist_to_convex1); - if (dist_to_convex_max <= 5) - continue;*/ + if (dist_to_convex_max < 5) + continue; Point pt0 = to_pt(pt_concave_indexed); Point pt1 = to_pt(pt_convex_indexed0); @@ -819,13 +824,11 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name float dist0 = get_distance(to_pt(pt_concave_indexed), pt_palm, false); float dist1 = get_distance(to_pt(pt_convex_indexed0), pt_palm, false); float dist2 = get_distance(to_pt(pt_convex_indexed1), pt_palm, false); - if (!(dist0 < dist1 && dist0 < dist2)) - continue; float dist_smallest = min(min(dist0, dist1), dist2); float dist_largest = max(max(dist0, dist1), dist2); float dist_diff = dist_largest - dist_smallest; - if (dist_diff <= 5)//mark3 + if (dist_diff < 5)//mark3 continue; float dist = get_distance(Point(pt_concave_indexed.x, pt_concave_indexed.y), palm_point, false); @@ -844,43 +847,6 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name break; sort(concave_points_indexed.begin(), concave_points_indexed.end(), compare_point_z()); - - int concave_x_min_index = -1; - Point3f concave_x_min_point = Point3f(9999, 9999, 9999); - - int index = -1; - for (Point3f& pt : concave_points_indexed) - { - ++index; - if (pt.x < concave_x_min_point.x) - { - concave_x_min_index = index; - concave_x_min_point = pt; - } - } - - vector line_vec; - bresenham_line(concave_x_min_point.x, concave_x_min_point.y, pt_palm.x, pt_palm.y, line_vec, 1000); - - bool black_hit = false; - for (Point& pt : line_vec) - if (image_active_hand.ptr(pt.y, pt.x)[0] == 0) - { - black_hit = true; - break; - } - - // if (black_hit) - // concave_points_indexed.erase(concave_points_indexed.begin() + concave_x_min_index); - - Mat image_test = image_active_hand.clone(); - - // circle(image_test, Point(concave_x_min_point.x, concave_x_min_point.y), 3, Scalar(127), 2); - - for (Point3f& pt : concave_points_indexed) - circle(image_test, Point(pt.x, pt.y), 3, Scalar(127), -1); - - imshow("image_test" + name, image_test); } //------------------------------------------------------------------------------------------------------------------------------ @@ -1181,7 +1147,7 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name return false; sort(fingertip_blobs.begin(), fingertip_blobs.end(), compare_blob_angle(pt_palm)); - bool has_all_fingers = fingertip_blobs.size() >= 5;//mark + bool has_all_fingers = fingertip_blobs.size() >= 5; //------------------------------------------------------------------------------------------------------------------------------ @@ -1681,17 +1647,8 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name //------------------------------------------------------------------------------------------------------------------------------ - {//mark - for (BlobNew& blob : fingertip_blobs) - { - vector blob_contour; - for (Point& pt : contour_sorted) - if (blob.image_atlas.ptr(pt.y, pt.x)[0] == blob.atlas_id) - blob_contour.push_back(pt); - - fill_mat(blob_contour, image_visualization, 127); - } - + {//mark2 + imshow("image_palm", image_palm); } // stereo_matching_points = contour_sorted; @@ -1991,8 +1948,8 @@ bool MonoProcessorNew::compute(HandSplitterNew& hand_splitter, const string name //------------------------------------------------------------------------------------------------------------------------------ - // if (blob_dist_min != NULL && !verify_detection(blob_dist_min, value_store)) - // blob_dist_min = NULL; + if (blob_dist_min != NULL && !verify_detection(blob_dist_min, value_store)) + blob_dist_min = NULL; //------------------------------------------------------------------------------------------------------------------------------