google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.

Home Page:https://mediapipe.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

implementing the code on aarch64 nvidia jetson [linux]

AndreV84 opened this issue · comments

Hi Guys,
You mentioned Android & IoS devices;
I am just wondering if the code will run on arm 64 nvidia jetson [ tegra linux];

You need to modify the code a little bit to make MediaPipe on jetso. For glog: #304. For GPU support: #305

glog and gpu helloworld I can bypass and run;
However, I can not find a clue how to build and run hand-tracking example;

Can you build it by running the following command?

bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \
    mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu

To have a video-in-video-out demo, you can do

GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_gpu \
    --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_mobile.pbtxt \
    --input_video_path=/path/to/input \
    --output_video_path=/path/to/output

@jiuqiant Thank you for your response!
` bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \

mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu`

seems to output:
INFO: Elapsed time: 263.756s, Critical Path: 101.82s INFO: 796 processes: 796 linux-sandbox. INFO: Build completed successfully, 798 total actions
trying with the file
https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_30MB.mp4
output.txt

the output is attached;
tail:
I0429 14:58:04.549345 29960 demo_run_graph_main_gpu.cc:57] Initialize the calculator graph. I0429 14:58:04.555438 29960 demo_run_graph_main_gpu.cc:61] Initialize the GPU. I0429 14:58:04.574745 29960 gl_context_egl.cc:158] Successfully initialized EGL. Major : 1 Minor: 5 I0429 14:58:04.626211 29969 gl_context.cc:324] GL version: 3.2 (OpenGL ES 3.2 NVIDIA 32.4.2) I0429 14:58:04.626678 29960 demo_run_graph_main_gpu.cc:67] Initialize the camera or load the video. E0429 14:58:04.639760 29960 demo_run_graph_main_gpu.cc:186] Failed to run the graph: ; capture.isOpened()(mediapipe/examples/desktop/demo_run_graph_main_gpu.cc:75)
could you also point out how to take inputs from video camera? like from /dev/video* pr from CSI camera?

it seems like an opencv installation issue by now
fatal error: opencv2/opencv.hpp: No such file or directory #include "opencv2/opencv.hpp"
reference #246

reinstalling opencv with
`
opencv43pkgconfig.txt

`

renstalled opencv;
g++ will build with opencv4 lib;
the situation with executing the hand example did not change

`GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_gpu --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_mobile.pbtxt --input_video_path=/home/nvidia/Downloads/Big_Buck_Bunny_1080_10s_30MB.mp4 --output_video_path=/home/nvidia/Downloads/output.mp4

I0430 06:23:11.340766 18936 demo_run_graph_main_gpu.cc:88] Start running the calculator graph.
I0430 06:23:11.341584 18936 demo_run_graph_main_gpu.cc:93] Start grabbing and processing frames.
INFO: Created TensorFlow Lite delegate for GPU.
I0430 06:23:18.483409 18936 demo_run_graph_main_gpu.cc:160] Prepare video writer.
I0430 06:23:35.421818 18936 demo_run_graph_main_gpu.cc:175] Shutting down.
I0430 06:23:37.163611 18936 demo_run_graph_main_gpu.cc:189] Success!
Segmentation fault (core dumped)
`

it provides output;
however also it would be reat to know how to get numeric coordinates of lines and dots/joints? not a graphical representation, but coordinates? is it possible?
Also how to get input from webcamera and direct it to file? to display? to text coordinates?
Thanks

it provides output;
however also it would be reat to know how to get numeric coordinates of lines and dots/joints? not a graphical representation, but coordinates? is it possible?
Also how to get input from webcamera and direct it to file? to display? to text coordinates?
Thanks

It's possible to get the coordinates/landmarks out of the graph. The solution is to observe the "hand_landmarks" stream in the main function by using an output stream poller. Here is a similar issue for your reference: #200. If you are looking for some example code, please take a look at #200 (comment).

https://storage.googleapis.com/media-001/output.mp4?authuser=0

Looks great! Just want to double check that it's running on Nvidia Jetson, right?

https://storage.googleapis.com/media-001/output.mp4?authuser=0

Looks nice!
Just FYI, there is a multi-hand tracking demo already available in mediapipe that would better suit that test video:
https://mediapipe.readthedocs.io/en/latest/multi_hand_tracking_desktop.html?highlight=multi#tensorflow-lite-multi-hand-tracking-demo-with-webcam-gpu

It would also be great if you could document concisely what all you had to do for getting things running on Nvidia Jetson. We are interested in officially supporting that platform, and others could benefit from your experience. .

exactly! it was executed on nvidia jetson.
In the future, I will try running it on various jetson models.
They typically have CSI Bayers camera which is not accessible through v4l2l, unless via v4l2loopback where they can be converted to I420/RGB, whatever

here are the steps
https://github.com/AndreV84/Jetson/blob/master/madiapipe.sh
then I install opencv 4.3
https://github.com/AndreV84/Jetson/blob/master/opencv43
then edit file WORKSPACES
`new_local_repository(
name = "linux_opencv",
build_file = "@//third_party:opencv_linux.BUILD",
path = "/usr/local/opencv-4.3.0-dev/",

then edit the file third-party/
cc_library(
name = "opencv",
srcs = glob(
[
"lib/libopencv_core.so",
"lib/libopencv_calib3d.so",
"lib/libopencv_features2d.so",
"lib/libopencv_highgui.so",
"lib/libopencv_imgcodecs.so",
"lib/libopencv_imgproc.so",
"lib/libopencv_video.so",
"lib/libopencv_videoio.so",
],
),
hdrs = glob(["include/opencv4/**/.h"]),
includes = ["include/opencv4"],
linkstatic = 1,
visibility = ["//visibility:public"],
)

then I can execute
bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu

GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_gpu --calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_mobile.pbtxt --input_video_path=/home/nvidia/Downloads/Big_Buck_Bunny_1080_10s_30MB.mp4 --output_video_path=/home/nvidia/Downloads/output.mp4
bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \ mediapipe/examples/desktop/multi_hand_tracking:multi_hand_tracking_gpu
GLOG_logtostderr=1 bazel-bin/mediapipe/examples/desktop/multi_hand_tracking/multi_hand_tracking_gpu \ --calculator_graph_config_file=mediapipe/graphs/hand_tracking/multi_hand_tracking_mobile.pbtxt
the latter will throw an error though as video0 is csi Bayers sensor;
How do I say to it to read from /dev/video2 instead?
In order to get CSI Bayers into loopback I am doing the following:
`cd /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9

dropped in latter release##make modules_prepare

mkdir v4l2loopback
git clone https://github.com/umlaeute/v4l2loopback.git v4l2loopback
cd v4l2loopback && git checkout -b v0.10.0
make
make install
apt-get install -y v4l2loopback-dkms v4l2loopback-utils
modprobe v4l2loopback devices=1 video_nr=2 exclusive_caps=1
echo options v4l2loopback devices=1 video_nr=2 exclusive_caps=1 > /etc/modprobe.d/v4l2loopback.conf
echo v4l2loopback > /etc/modules
update-initramfs -uu may find the method posted here https://www.viziochron.com/xavier#h.p__yIE9-ovqscA then I start the loopback to map the CSI device to /dev/video2gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1' ! nvvidconv ! 'video/x-raw, width=640, height=480, format=I420, framerate=30/1' ! videoconvert ! identity drop-allocation=1 ! 'video/x-raw, width=640, height=480, format=RGB, framerate=30/1' ! v4l2sink device=/dev/video2`

The outputs are as follows; though I do not see any output, but text
bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 mediapipe/examples/desktop/multi_hand_tracking:multi_hand_tracking_gpu INFO: Analyzed target //mediapipe/examples/desktop/multi_hand_tracking:multi_hand_tracking_gpu (0 packages loaded, 0 targets configured). INFO: Found 1 target... Target //mediapipe/examples/desktop/multi_hand_tracking:multi_hand_tracking_gpu up-to-date: bazel-bin/mediapipe/examples/desktop/multi_hand_tracking/multi_hand_tracking_gpu INFO: Elapsed time: 0.808s, Critical Path: 0.01s INFO: 0 processes. INFO: Build completed successfully, 1 total action (venv) nvidia@nvidia-desktop:~/mediapipe$

will --input_video_path=/dev/video2 be a correct link to webcam?

will --input_video_path=/dev/video2 be a correct link to webcam?

If you don't specify input_video_path, it will ask opencv video capture to get frames from the webcam directly. See this logic at https://gist.github.com/eknight7/d4a57504c8f866fc80c0eb2c61ff6b4f#file-multi_hand_tracking_run_graph_cpu_main-cc-L52.

@jiuqiant by default opencv reads from /dev/video0 - it doesn't work for webcam mode as it is CSI Bayer's sensor device. webcam on jetsons would be on /dev/video1[2] etc
from the CSI sensor I can read with opencv e.g. with the code below

`#include <unistd.h>
#include <iostream>
#include <signal.h>

#include <opencv2/opencv.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>


static cv::VideoCapture *capPtr=NULL;
void my_handler(int s){
           printf("Caught signal %d\n",s);
       if(capPtr)
        capPtr->release();
           exit(1); 
}

int main()
{
    /* Install handler for catching Ctrl-C and close camera so that Argus keeps ok */
    struct sigaction sigIntHandler;
    sigIntHandler.sa_handler = my_handler;
    sigemptyset(&sigIntHandler.sa_mask);
    sigIntHandler.sa_flags = 0;
    sigaction(SIGINT, &sigIntHandler, NULL);


    const char* gst =  "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=640, height=480 !  nvvidconv ! video/x-raw,format=I420 ! appsink";
    capPtr = new cv::VideoCapture(gst, cv::CAP_GSTREAMER);
    if(!capPtr->isOpened()) {
    std::cout<<"Failed to open camera."<<std::endl;
    return (-1);
    }

    cv::namedWindow("MyCameraPreview", cv::WINDOW_AUTOSIZE);
    cv::Mat frame_in;
    while(1)
    {
        if (!capPtr->read(frame_in)) {
        std::cout<<"Capture read error"<<std::endl;
        break;
    }
    else  {
        cv::cvtColor(frame_in, frame_in, cv::COLOR_YUV2BGR_I420);
        cv::imshow("MyCameraPreview",frame_in);
        if((char)cv::waitKey(1) == (char)27)
            break;
    }    
    }

    capPtr->release();
    delete capPtr;
    return 0;
}`

otherwise /dev/vide0 will be unreadable, and only /dev/video2 will work as webcam

in the file https://gist.github.com/eknight7/d4a57504c8f866fc80c0eb2c61ff6b4f#file-multi_hand_tracking_run_graph_cpu_main-cc-L52
I would have to edit the line 56
from -capture.open(0);
to + capture.open(2);

but which file do I edit in the mediapipe folder? is there any way to read from csi bayers sensor directly? e.g. via incorporating the gst nvargussrc from the excerpt above?

could you also advise regarding if it is possible to use mediapipe to localize gaze position x, y from image? can you get through the implementation of it with jetson?

in the file https://gist.github.com/eknight7/d4a57504c8f866fc80c0eb2c61ff6b4f#file-multi_hand_tracking_run_graph_cpu_main-cc-L52
I would have to edit the line 56
from -capture.open(0);
to + capture.open(2);

but which file do I edit in the mediapipe folder? is there any way to read from csi bayers sensor directly? e.g. via incorporating the gst nvargussrc from the excerpt above?

If you build mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu, please modify this file:
https://github.com/google/mediapipe/blob/master/mediapipe/examples/desktop/demo_run_graph_main_gpu.cc#L68

I can get 1 hand with v4l2loopback from sensor 0 - > 2
Somehow the loop may be omitted to read from 0 directly;
It will speed up dramatically the process;

what are the options to 'sink'/write the output stream to a file? or to forward it further to a virtual device? what can be done with arguments? passed through the command line? for the output stream?

what are the options to 'sink'/write the output stream to a file? or to forward it further to a virtual device? what can be done with arguments? passed through the command line? for the output stream?

I mentioned an approach to get landmarks data in #655 (comment). Are you able to do this in the main function already? If yes, it's pretty easy to sink this to a file by using std::ofstream.

I missed it; was focusing on redirection of the video stream;
I shall try following your direction again
thank you for pointing out.

Do I have to build the code from https://github.com/mgyong/mediapipe-issue200 ?
for object detection example? in order to be able to read the landmark coordinates from outpput stream?
I am trying to get the code to read from nvargus directly without v4l2loopback:

`LOG(INFO) << "Initialize the camera or load the video.";
  cv::VideoCapture capture;
  const bool load_video = !FLAGS_input_video_path.empty();
  const char* gst =  "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=1280, height=720 !  nvvidconv ! video/x-raw,format=I420 ! appsink";
  
if (load_video) {
    capture.open(FLAGS_input_video_path);
  } else {
    capture.open(gst, cv::CAP_GSTREAMER);
  }
  RET_CHECK(capture.isOpened());

  cv::VideoWriter writer;
  const bool save_video = !FLAGS_output_video_path.empty();
  if (!save_video) {
    cv::namedWindow(kWindowName, /*flags=WINDOW_AUTOSIZE*/ 1);
#if (CV_MAJOR_VERSION >= 3) && (CV_MINOR_VERSION >= 2)
    capture.set(cv::CAP_PROP_FRAME_WIDTH, 1280);
    capture.set(cv::CAP_PROP_FRAME_HEIGHT, 720);
    capture.set(cv::CAP_PROP_FPS, 120);
#endif`

`I0502 07:25:12.988380 27443 demo_run_graph_main_gpu.cc:57] Initialize the calculator graph.
I0502 07:25:12.994838 27443 demo_run_graph_main_gpu.cc:61] Initialize the GPU.
I0502 07:25:13.021072 27443 gl_context_egl.cc:158] Successfully initialized EGL. Major : 1 Minor: 5
I0502 07:25:13.069461 27452 gl_context.cc:324] GL version: 3.2 (OpenGL ES 3.2 NVIDIA 32.4.2)
I0502 07:25:13.069752 27443 demo_run_graph_main_gpu.cc:67] Initialize the camera or load the video.
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 2592 x 1458 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 22000, max 358733000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120.000005 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[ WARN:0] global /home/nvidia/opencv-4.3.0/modules/videoio/src/cap_gstreamer.cpp (935) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 2592 x 1944 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 2592 x 1458 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 22000, max 358733000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120.000005 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[ WARN:0] global /home/nvidia/opencv-4.3.0/modules/videoio/src/cap_gstreamer.cpp (1759) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module nvarguscamerasrc0 reported: Internal data stream error.
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
[ WARN:0] global /home/nvidia/opencv-4.3.0/modules/videoio/src/cap_gstreamer.cpp (515) startPipeline OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/nvidia/opencv-4.3.0/modules/videoio/src/cap_gstreamer.cpp (1057) setProperty OpenCV | GStreamer warning: no pipeline
[ WARN:0] global /home/nvidia/opencv-4.3.0/modules/videoio/src/cap_gstreamer.cpp (1057) setProperty OpenCV | GStreamer warning: no pipeline
I0502 07:25:14.172400 27443 demo_run_graph_main_gpu.cc:90] Start running the calculator graph.
I0502 07:25:14.173106 27443 demo_run_graph_main_gpu.cc:95] Start grabbing and processing frames.
I0502 07:25:14.173178 27443 demo_run_graph_main_gpu.cc:177] Shutting down.
INFO: Created TensorFlow Lite delegate for GPU.
[ WARN:0] global /home/nvidia/opencv-4.3.0/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
I0502 07:25:14.768599 27443 demo_run_graph_main_gpu.cc:191] Success!`

Yes, the current example code only outputs images. If you plan to retrieve detection as well as landmarks data from a MediaPipe graph, it's necessary to modify the main file to observe the detection and/or landmark output stream. The combination of https://gist.github.com/mgyong/7353474eb3e57ba95621632af274911a and https://gist.github.com/mgyong/be027a075a5e7b082c566a78c3bc0d90 is the way to do this.

Thank you for sharing

@AndreV84 We would like to get your help to document step by step in a .md file how to get MediaPipe examples to run on Nvidia Jetson so that we can include it as part of our official documentation to help other users. If you are willing, put the .md file in your public github repo and share link in this issue.

@mgyong Thank you for your message. I will try to get the existing draft more clear. There is still much of variability which might be messed by single Readme.md file; For example as of Opencv 4.3 installation which is a separate story as it will be up to individual which components to include in opencv installation. Also the issue of direct read from nvargus will still need to be investigated to avoid CPU expensive v4loopback iteration which is not really necessary.

I can probably pack it into a Docker file; for Jetson l4t

@AndreV84 Thanks. This is great. We will look into incorporating a link to this in our documentation.

We now have a community driven repo awesome MediaPipe mediapipe.orgI where we link related repos. I have invited you to make change to include your repo doc into the awesosme MediaPipe repo

If you have time, it would be great to include a cross compilation section (where folks can use a Docker file to build the MediaPipe example into a binary in container on desktop and deploy binary to the Nvidia device)

I am trying to revise and rebuild the mediapipe on newer Jetson OS release with newer opencv version; Once implemented I will update the guide. If there will be issues I will askk for help. Thanks

any idea?

export OPENCV_VERSION=opencv-4.3.0-dev
nvidia@nvidia-desktop:~/mediapipe$ export LD_LIBRARY_PATH=/usr/local/$OPENCV_VERSION/lib
nvidia@nvidia-desktop:~/mediapipe$ bazel build -c opt --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11  mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu
INFO: Analyzed target //mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: From ProtoCompile mediapipe/calculators/tflite/ssd_anchors_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/non_max_suppression_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/tool/calculator_graph_template.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/internal/callback_packet_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator_profile.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/gpu/gl_context_options.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmark_projection_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/internal/callback_packet_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/detections_to_rects_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/detections_to_render_data_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/annotation_overlay_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator_profile.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/tool/calculator_graph_template.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/gpu/gl_context_options.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmarks_to_render_data_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/rect_to_render_data_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/labels_to_render_data_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmarks_to_render_data_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/labels_to_render_data_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/annotation_overlay_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/rect_to_render_data_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/detections_to_render_data_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_inference_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/core/split_vector_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/non_max_suppression_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_converter_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/rect_transformation_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_inference_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/ssd_anchors_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/detections_to_rects_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/image/image_transformation_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_custom_op_resolver_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/detection_label_id_to_text_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/detection_label_id_to_text_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_converter_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From Compiling mediapipe/framework/calculator.pb.cc [for host]:
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc: In member function 'virtual google::protobuf::uint8* mediapipe::ProfilerConfig::_InternalSerialize(google::protobuf::uint8*, google::protobuf::io::EpsCopyOutputStream*) const':
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:1711:41: warning: 'bool mediapipe::ProfilerConfig::enable_input_output_latency() const' is deprecated [-Wdeprecated-declarations]
   if (this->enable_input_output_latency() != 0) {
                                         ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:2714:13: note: declared here
 inline bool ProfilerConfig::enable_input_output_latency() const {
             ^~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:1778:39: warning: 'bool mediapipe::ProfilerConfig::trace_log_duration_events() const' is deprecated [-Wdeprecated-declarations]
   if (this->trace_log_duration_events() != 0) {
                                       ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:2981:13: note: declared here
 inline bool ProfilerConfig::trace_log_duration_events() const {
             ^~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc: In member function 'virtual size_t mediapipe::ProfilerConfig::ByteSizeLong() const':
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:1860:41: warning: 'bool mediapipe::ProfilerConfig::enable_input_output_latency() const' is deprecated [-Wdeprecated-declarations]
   if (this->enable_input_output_latency() != 0) {
                                         ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:2714:13: note: declared here
 inline bool ProfilerConfig::enable_input_output_latency() const {
             ^~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:1915:39: warning: 'bool mediapipe::ProfilerConfig::trace_log_duration_events() const' is deprecated [-Wdeprecated-declarations]
   if (this->trace_log_duration_events() != 0) {
                                       ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:2981:13: note: declared here
 inline bool ProfilerConfig::trace_log_duration_events() const {
             ^~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc: In member function 'void mediapipe::ProfilerConfig::MergeFrom(const mediapipe::ProfilerConfig&)':
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:1976:40: warning: 'bool mediapipe::ProfilerConfig::enable_input_output_latency() const' is deprecated [-Wdeprecated-declarations]
   if (from.enable_input_output_latency() != 0) {
                                        ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:2714:13: note: declared here
 inline bool ProfilerConfig::enable_input_output_latency() const {
             ^~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:2003:38: warning: 'bool mediapipe::ProfilerConfig::trace_log_duration_events() const' is deprecated [-Wdeprecated-declarations]
   if (from.trace_log_duration_events() != 0) {
                                      ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:2981:13: note: declared here
 inline bool ProfilerConfig::trace_log_duration_events() const {
             ^~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc: In member function 'virtual google::protobuf::uint8* mediapipe::CalculatorGraphConfig_Node::_InternalSerialize(google::protobuf::uint8*, google::protobuf::io::EpsCopyOutputStream*) const':
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:2572:33: warning: 'bool mediapipe::CalculatorGraphConfig_Node::has_profiler_config() const' is deprecated [-Wdeprecated-declarations]
   if (this->has_profiler_config()) {
                                 ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:3835:13: note: declared here
 inline bool CalculatorGraphConfig_Node::has_profiler_config() const {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc: In member function 'virtual size_t mediapipe::CalculatorGraphConfig_Node::ByteSizeLong() const':
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:2708:33: warning: 'bool mediapipe::CalculatorGraphConfig_Node::has_profiler_config() const' is deprecated [-Wdeprecated-declarations]
   if (this->has_profiler_config()) {
                                 ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:3835:13: note: declared here
 inline bool CalculatorGraphConfig_Node::has_profiler_config() const {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc: In member function 'void mediapipe::CalculatorGraphConfig_Node::MergeFrom(const mediapipe::CalculatorGraphConfig_Node&)':
bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:2794:32: warning: 'bool mediapipe::CalculatorGraphConfig_Node::has_profiler_config() const' is deprecated [-Wdeprecated-declarations]
   if (from.has_profiler_config()) {
                                ^
In file included from bazel-out/host/bin/mediapipe/framework/calculator.pb.cc:4:0:
bazel-out/host/bin/mediapipe/framework/calculator.pb.h:3835:13: note: declared here
 inline bool CalculatorGraphConfig_Node::has_profiler_config() const {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From ProtoCompile mediapipe/calculators/util/rect_transformation_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_custom_op_resolver_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/image/image_transformation_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From Compiling mediapipe/util/tflite/tflite_gpu_runner.cc:
In file included from external/opencl_headers/CL/cl.h:32:0,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/api.h:42,
                 from ./mediapipe/util/tflite/tflite_gpu_runner.h:25,
                 from mediapipe/util/tflite/tflite_gpu_runner.cc:15:
external/opencl_headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
                                                                                                        ^
INFO: From ProtoCompile mediapipe/calculators/image/image_cropping_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_tensors_to_classification_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/thresholding_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmark_projection_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmarks_to_detection_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_tensors_to_landmarks_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/image/image_cropping_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_tensors_to_classification_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/core/split_vector_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/thresholding_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmarks_to_detection_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tflite/tflite_tensors_to_landmarks_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/core/gate_calculator.pb.h:
bazel-out/aarch64-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From Executing genrule //mediapipe/graphs/hand_tracking/subgraphs:hand_detection_gpu_graph:
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/text_format.cc:324] Warning parsing text-format mediapipe.CalculatorGraphConfig: 58:5: text format contains deprecated field "use_gpu"
INFO: From Executing genrule //mediapipe/graphs/hand_tracking/subgraphs:hand_landmark_gpu_graph:
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/text_format.cc:324] Warning parsing text-format mediapipe.CalculatorGraphConfig: 80:5: text format contains deprecated field "use_gpu"
INFO: From Compiling mediapipe/calculators/tflite/tflite_inference_calculator.cc:
In file included from external/opencl_headers/CL/cl.h:32:0,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/api.h:42,
                 from ./mediapipe/util/tflite/tflite_gpu_runner.h:25,
                 from mediapipe/calculators/tflite/tflite_inference_calculator.cc:45:
external/opencl_headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
                                                                                                        ^
INFO: From Compiling external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/converter.cc:
In file included from external/opencl_headers/CL/cl.h:32:0,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/api.h:42,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/spi.h:21,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/converter.h:22,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/converter.cc:16:
external/opencl_headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
                                                                                                        ^
INFO: From Compiling external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/api2.cc:
In file included from external/opencl_headers/CL/cl.h:32:0,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/api.h:42,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/api2.h:23,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/api2.cc:16:
external/opencl_headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
                                                                                                        ^
INFO: From Compiling external/org_tensorflow/tensorflow/lite/delegates/gpu/api.cc:
In file included from external/opencl_headers/CL/cl.h:32:0,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/api.h:42,
                 from external/org_tensorflow/tensorflow/lite/delegates/gpu/api.cc:16:
external/opencl_headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
                                                                                                        ^
ERROR: /home/nvidia/mediapipe/mediapipe/examples/desktop/hand_tracking/BUILD:36:10: Linking of rule '//mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc @bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_gpu-2.params

Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function cv::Mat::~Mat(): error: undefined reference to 'cv::fastFree(void*)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function cv::Mat::~Mat(): error: undefined reference to 'cv::Mat::deallocate()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::VideoCapture()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::open(int, int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::isOpened() const'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::VideoWriter()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::namedWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::set(int, double)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::set(int, double)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::set(int, double)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::operator>>(cv::Mat&)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::Mat::deallocate()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::fastFree(void*)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::isOpened() const'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::release()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::~VideoWriter()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::~VideoCapture()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::flip(cv::_InputArray const&, cv::_OutputArray const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::Mat::copyTo(cv::_OutputArray const&) const'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::getTickCount()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::getTickFrequency()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::isOpened() const'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::fourcc(char, char, char, char)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::get(int) const'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, double, cv::Size_<int>, bool)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::isOpened() const'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::write(cv::_InputArray const&)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::fastFree(void*)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::fastFree(void*)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::waitKey(int)'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::Mat::deallocate()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::Mat::deallocate()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoWriter::~VideoWriter()'
bazel-out/aarch64-opt/bin/mediapipe/examples/desktop/_objs/demo_run_graph_main_gpu/demo_run_graph_main_gpu.o:demo_run_graph_main_gpu.cc:function RunMPPGraph(): error: undefined reference to 'cv::VideoCapture::~VideoCapture()'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_cropping_calculator/image_cropping_calculator.o:image_cropping_calculator.cc:function mediapipe::ImageCroppingCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::boxPoints(cv::RotatedRect, cv::_OutputArray const&)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_cropping_calculator/image_cropping_calculator.o:image_cropping_calculator.cc:function mediapipe::ImageCroppingCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::Mat::updateContinuityFlag()'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_cropping_calculator/image_cropping_calculator.o:image_cropping_calculator.cc:function mediapipe::ImageCroppingCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::getPerspectiveTransform(cv::_InputArray const&, cv::_InputArray const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_cropping_calculator/image_cropping_calculator.o:image_cropping_calculator.cc:function mediapipe::ImageCroppingCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::warpPerspective(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_cropping_calculator/image_cropping_calculator.o:image_cropping_calculator.cc:function mediapipe::ImageCroppingCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::Mat::copyTo(cv::_OutputArray const&) const'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function cv::Mat::operator=(cv::Mat const&): error: undefined reference to 'cv::Mat::copySize(cv::Mat const&)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::rotate(cv::_InputArray const&, cv::_OutputArray const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::flip(cv::_InputArray const&, cv::_OutputArray const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::Mat::copyTo(cv::_OutputArray const&) const'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::rotate(cv::_InputArray const&, cv::_OutputArray const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::rotate(cv::_InputArray const&, cv::_OutputArray const&, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::getRotationMatrix2D_(cv::Point_<float>, double, double)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::Mat::updateContinuityFlag()'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::Mat::copyTo(cv::_OutputArray const&) const'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::warpAffine(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/image/_objs/image_transformation_calculator/image_transformation_calculator.o:image_transformation_calculator.cc:function mediapipe::ImageTransformationCalculator::RenderCpu(mediapipe::CalculatorContext*): error: undefined reference to 'cv::copyMakeBorder(cv::_InputArray const&, cv::_OutputArray const&, int, int, int, int, int, cv::Scalar_<double> const&)'
bazel-out/aarch64-opt/bin/mediapipe/framework/formats/_objs/image_frame_opencv/image_frame_opencv.o:image_frame_opencv.cc:function mediapipe::formats::MatView(mediapipe::ImageFrame const*): error: undefined reference to 'cv::Mat::Mat(int, int const*, int, void*, unsigned long const*)'
bazel-out/aarch64-opt/bin/external/org_tensorflow/tensorflow/lite/nnapi/_objs/nnapi_implementation/nnapi_implementation.o:nnapi_implementation.cc:function (anonymous namespace)::ASharedMemory_create(char const*, unsigned long): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
bazel-out/aarch64-opt/bin/mediapipe/calculators/util/_objs/annotation_overlay_calculator/annotation_overlay_calculator.o:annotation_overlay_calculator.cc:function mediapipe::AnnotationOverlayCalculator::CreateRenderTargetGpu(mediapipe::CalculatorContext*, std::unique_ptr<cv::Mat, std::default_delete<cv::Mat> >&): error: undefined reference to 'cv::Mat::create(int, int const*, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/util/_objs/annotation_overlay_calculator/annotation_overlay_calculator.o:annotation_overlay_calculator.cc:function mediapipe::AnnotationOverlayCalculator::CreateRenderTargetGpu(mediapipe::CalculatorContext*, std::unique_ptr<cv::Mat, std::default_delete<cv::Mat> >&): error: undefined reference to 'cv::Mat::operator=(cv::Scalar_<double> const&)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/util/_objs/annotation_overlay_calculator/annotation_overlay_calculator.o:annotation_overlay_calculator.cc:function mediapipe::AnnotationOverlayCalculator::CreateRenderTargetGpu(mediapipe::CalculatorContext*, std::unique_ptr<cv::Mat, std::default_delete<cv::Mat> >&): error: undefined reference to 'cv::Mat::create(int, int const*, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/util/_objs/annotation_overlay_calculator/annotation_overlay_calculator.o:annotation_overlay_calculator.cc:function mediapipe::AnnotationOverlayCalculator::CreateRenderTargetCpu(mediapipe::CalculatorContext*, std::unique_ptr<cv::Mat, std::default_delete<cv::Mat> >&, mediapipe::ImageFormat_Format*): error: undefined reference to 'cv::Mat::create(int, int const*, int)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/util/_objs/annotation_overlay_calculator/annotation_overlay_calculator.o:annotation_overlay_calculator.cc:function mediapipe::AnnotationOverlayCalculator::CreateRenderTargetCpu(mediapipe::CalculatorContext*, std::unique_ptr<cv::Mat, std::default_delete<cv::Mat> >&, mediapipe::ImageFormat_Format*): error: undefined reference to 'cv::Mat::operator=(cv::Scalar_<double> const&)'
bazel-out/aarch64-opt/bin/mediapipe/calculators/util/_objs/annotation_overlay_calculator/annotation_overlay_calculator.o:annotation_overlay_calculator.cc:function mediapipe::AnnotationOverlayCalculator::CreateRenderTargetCpu(mediapipe::CalculatorContext*, std::unique_ptr<cv::Mat, std::default_delete<cv::Mat> >&, mediapipe::ImageFormat_Format*): error: undefined reference to 'cv::Mat::create(int, int const*, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::AdoptImage(cv::Mat*): error: undefined reference to 'cv::Mat::copySize(cv::Mat const&)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::ellipse(cv::_InputOutputArray const&, cv::Point_<int>, cv::Size_<int>, double, double, double, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::ellipse(cv::_InputOutputArray const&, cv::Point_<int>, cv::Size_<int>, double, double, double, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::ellipse(cv::_InputOutputArray const&, cv::Point_<int>, cv::Size_<int>, double, double, double, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(cv::Mat, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int): error: undefined reference to 'cv::ellipse(cv::_InputOutputArray const&, cv::Point_<int>, cv::Size_<int>, double, double, double, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::RotatedRect::points(cv::Point_<float>*) const'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::rectangle(cv::_InputOutputArray const&, cv::Rect_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawFilledRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::RotatedRect::points(cv::Point_<float>*) const'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawFilledRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::fillConvexPoly(cv::_InputOutputArray const&, cv::Point_<int> const*, int, cv::Scalar_<double> const&, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawFilledRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::rectangle(cv::_InputOutputArray const&, cv::Rect_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawRoundedRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::Mat::copySize(cv::Mat const&)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawFilledRoundedRectangle(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::Mat::copySize(cv::Mat const&)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawPoint(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawGradientLine(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::LineIterator::LineIterator(cv::Mat const&, cv::Point_<int>, cv::Point_<int>, int, bool)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawGradientLine(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::rectangle(cv::_InputOutputArray const&, cv::Rect_<int>, cv::Scalar_<double> const&, int, int, int)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawText(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::getTextSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, double, int, int*)'
bazel-out/aarch64-opt/bin/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o:annotation_renderer.cc:function mediapipe::AnnotationRenderer::DrawText(mediapipe::RenderAnnotation const&): error: undefined reference to 'cv::putText(cv::_InputOutputArray const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
collect2: error: ld returned 1 exit status
Target //mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 754.408s, Critical Path: 451.38s
INFO: 2108 processes: 2108 linux-sandbox.
FAILED: Build did NOT complete successfully

we were able to get progress with it;
will try to do dockerized deployment at some point in the future with it

@jiuqiant by default opencv reads from /dev/video0 - it doesn't work for webcam mode as it is CSI Bayer's sensor device. webcam on jetsons would be on /dev/video1[2] etc
from the CSI sensor I can read with opencv e.g. with the code below

`#include <unistd.h>
#include <iostream>
#include <signal.h>

#include <opencv2/opencv.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>


static cv::VideoCapture *capPtr=NULL;
void my_handler(int s){
           printf("Caught signal %d\n",s);
       if(capPtr)
        capPtr->release();
           exit(1); 
}

int main()
{
    /* Install handler for catching Ctrl-C and close camera so that Argus keeps ok */
    struct sigaction sigIntHandler;
    sigIntHandler.sa_handler = my_handler;
    sigemptyset(&sigIntHandler.sa_mask);
    sigIntHandler.sa_flags = 0;
    sigaction(SIGINT, &sigIntHandler, NULL);


    const char* gst =  "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=640, height=480 !  nvvidconv ! video/x-raw,format=I420 ! appsink";
    capPtr = new cv::VideoCapture(gst, cv::CAP_GSTREAMER);
    if(!capPtr->isOpened()) {
    std::cout<<"Failed to open camera."<<std::endl;
    return (-1);
    }

    cv::namedWindow("MyCameraPreview", cv::WINDOW_AUTOSIZE);
    cv::Mat frame_in;
    while(1)
    {
        if (!capPtr->read(frame_in)) {
        std::cout<<"Capture read error"<<std::endl;
        break;
    }
    else  {
        cv::cvtColor(frame_in, frame_in, cv::COLOR_YUV2BGR_I420);
        cv::imshow("MyCameraPreview",frame_in);
        if((char)cv::waitKey(1) == (char)27)
            break;
    }    
    }

    capPtr->release();
    delete capPtr;
    return 0;
}`

otherwise /dev/vide0 will be unreadable, and only /dev/video2 will work as webcam

I tryied to implement the above code, up until the color conversion cv::cvtColor(frame_in, frame_in, cv::COLOR_YUV2BGR_I420); but then when i fed "frame_in" into mediapipe i just get an empty image
The olny difference is that mediapipe graph wnats a SRGBA image instead of RGB so i used the cv::COLOR_YUV2RGBA_I420 code
i also send a similar issue to nvidia.developer forum

@radisc
you may refer to the solution listed there : https://github.com/AndreV84/mediapipe
in particular the patched for CSI file is https://github.com/AndreV84/mediapipe/blob/master/demo_run_graph_main_gpu_mod.cc

@radisc
you may refer to the solution listed there : https://github.com/AndreV84/mediapipe
in particular the patched for CSI file is https://github.com/AndreV84/mediapipe/blob/master/demo_run_graph_main_gpu_mod.cc

Yes, thank you, i already saw that implementation, but i was trying to do something similar without using videoconvert, because as far as i know it is pretty CPU intensive and maybe use instead the nvvideoconvert plugin from the deepstream package

@radisc is your system - Jetson?
the patched file uses

   const char* gst =  "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=640, height=480 !  nvvidconv ! video/x-raw,format=I420 ! appsink";

there is no videoconvert

@radisc is your system - Jetson?
the patched file uses

   const char* gst =  "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=640, height=480 !  nvvidconv ! video/x-raw,format=I420 ! appsink";

there is no videoconvert
Yes, jetson NX

Oh, sorry i missed the patch, however i tried this also, and i manage to convert it and visualize it before feeding it to mediapipe.

Instead of cv::cvtColor(camera_frame_raw, camera_frame, cv::COLOR_BGR2RGB); i do cv::cvtColor(camera_frame_raw, camera_frame, cv:: cv::COLOR_YUV2RGBA_I420);

But mediapipe doens't seem to like it

the patched file uses

        cv::cvtColor(frame_in, frame_in, cv::COLOR_YUV2BGR_I420);

as long as you execute the patched file on jetson with CSI camera it shoudl work as is

Ok, i followed the link you provided https://github.com/AndreV84/mediapipe/blob/1aa89d348a91dad0d63e0b34b7ec50f668b4d232/demo_run_graph_main_gpu_mod.cc#L70
i can't see the patched code, however i will try later using RGB instead of RGBA and changing also SRGBA to SRGB

the file has

    cv::cvtColor(camera_frame_raw, camera_frame, cv::COLOR_BGR2RGB);

actually the file has the vcideoconvert that wasn't presented in the variant of the code quoted by you previously in earlier post that havent had the videoconvert

 const char* gst =  "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=1280, height=720, framerate=30/1 !  nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink";

once you got the default scenario to work you could try adjusting certain parameters then rebuilding

what is your hardware? jetson? which model? not jetson? arm? x86?

what is your hardware? jetson? which model? not jetson? arm? x86?

I'm using a Jetson Xavier NX, the link you provided has videoconvert in it, is there another file that i'm missing with the patched gstreamer part?

I can see a variant cited here #655 (comment)

yes, I tested on NX / AGX devices. the patched file should work as is. however you may try to improve it also

the best improvement would be adding #include "jetson-utils/videoSource.h" library probably, but it is a separate story

Yes, that is what i tried to do and it works, because i can visualize it correctly with imshow the problem is when i feed frame_in from cv::cvtColor(frame_in, frame_in, cv::COLOR_YUV2BGR_I420); to mediapipe here:

// Wrap Mat into an ImageFrame.
    auto input_frame = absl::make_unique<mediapipe::ImageFrame>(
        mediapipe::ImageFormat::SRGB, frame_in.cols, frame_in.rows,
        mediapipe::ImageFrame::kGlDefaultAlignmentBoundary);

    cv::Mat input_frame_mat = mediapipe::formats::MatView(input_frame.get());

    frame_in.copyTo(input_frame_mat);

Then it seems mediapipe can't process it correctly because and i get a blank screen from its output

Here is another thread with a bit more detail:
link

does it works as is before you start modifying the code?
does it process CSI? as long as it does it can be approached, right

there is a library jetson-util
trhat coulod benefit from CUDA cv:Mat etc
it could be integrated into the code likely
you may also try looking into it

Hi @AndreV84 , this is what i've done:
This is my vanilla gstreamer pipeline
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)4032, height=(int)3040, format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw,format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
I open it the classic way
capture.open(pipeline, cv::CAP_GSTREAMER);
and
while (grab_frames) { cv::Mat camera_frame_raw; // Capture opencv camera or video frame. capture >> camera_frame_raw; if (camera_frame_raw.empty()) break;
then i can
// Wrap Mat into an ImageFrame. auto input_frame = absl::make_unique<mediapipe::ImageFrame>( mediapipe::ImageFormat::SRGB, camera_frame_raw.cols, camera_frame_raw.rows, mediapipe::ImageFrame::kGlDefaultAlignmentBoundary); cv::Mat input_frame_mat = mediapipe::formats::MatView(input_frame.get()); camera_frame_raw.copyTo(input_frame_mat);
and this works fine
https://ibb.co/9bqFkbv

Then, to remove videoconvert i tried this:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)4032, height=(int)3040, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw,format=I420 ! appsink
then
cv::cvtColor(camera_frame_raw, camera_frame, cv::COLOR_YUV2BGR_I420);
from this i can imshow camera_frame correctly, lastly
auto input_frame = absl::make_unique<mediapipe::ImageFrame>( mediapipe::ImageFormat::SRGB, camera_frame_raw.cols, camera_frame_raw.rows, mediapipe::ImageFrame::kGlDefaultAlignmentBoundary); cv::Mat input_frame_mat = mediapipe::formats::MatView(input_frame.get()); cv::cvtColor(camera_frame, input_frame_mat, cv::COLOR_BGR2RGB);
The last cvtColor is not really needed but any way at this resolution all i got is a black image out of mediapipe graph.
I tried to lower the resolution (2048x1536) and i get this from the mediapipe graph:
https://ibb.co/YNVZTrz
That i believe is the very first frame of the stream on witch mediapipe keeps running the graph indefinitely
Sorry for the long post, yesterday i was home and couldn't go in with such a detail
I hope this clarify what i've done

there is a library jetson-util
trhat coulod benefit from CUDA cv:Mat etc
it could be integrated into the code likely
you may also try looking into it

Did you manage to include jetson_utils in bazel?

@radisc
sort of
it turned out that it worked after editing manually a source file adding to there an absolute path to the missed file
after that it assembled with bazel as I remember

@radisc
sort of
it turned out that it worked after editing manually a source file adding to there an absolute path to the missed file
after that it assembled with bazel as I remember

I tried to follow your instructions as here but i'm still getting glog errors