צריך לפעול לפי ההוראות הבאות כדי לפתח אפליקציות לדוגמה לשורת הפקודה C++ עם
של MediaPipe Framework. למידע נוסף על האפליקציות לדוגמה, מתחילים בשלום
עולם! ב-C++.
פיתוח אפליקציות לדוגמה לשורת הפקודה C++
אפשרות 1: הרצה על המעבד (CPU)
כדי ליצור, למשל, את האפליקציה לדוגמה של C++ של MediaPipe Hand מדור קודם.
פתרון זיהוי עם מעבד (CPU), מפעילים:
הפעולה הזו תפתח את מצלמת האינטרנט כל עוד היא מחוברת ופועלת. שגיאות כלשהן
סביר שהסיבה לכך היא שלא ניתן לגשת למצלמת האינטרנט, או שלא הוגדרו מנהלי התקנים של GPU
כראוי.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-24 (שעון UTC)."],[],[],null,["# MediaPipe Framework in C++\n\nPlease follow instructions below to build C++ command-line example apps with\nMediaPipe Framework. To learn more about these example apps, start from [Hello\nWorld! in C++](./hello_world_cpp.md).\n\nBuilding C++ command-line example apps\n--------------------------------------\n\n### Option 1: Running on CPU\n\n1. To build, for example, the C++ example app of the legacy MediaPipe Hand\n Detection solution with CPU, run:\n\n bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu\n\n2. To run the application:\n\n GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_cpu \\\n --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_desktop_live.pbtxt\n\n This will open up your webcam as long as it is connected and on. Any errors\n is likely due to your webcam being not accessible.\n\n### Option 2: Running on GPU\n\n| **Note:** This currently works only on Linux, and please first follow [OpenGL ES\n| Setup on Linux Desktop](./gpu_support.md#opengl-es-setup-on-linux-desktop).\n\n1. To build, for example, the C++ example app of the legacy MediaPipe Hand\n Detection solution with GPU, run:\n\n bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \\\n mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu\n\n2. To run the application:\n\n GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_gpu \\\n --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_desktop_live_gpu.pbtxt\n\n This will open up your webcam as long as it is connected and on. Any errors\n is likely due to your webcam being not accessible, or GPU drivers not setup\n properly."]]