-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How opentracker calls openpose To use web camera?thanks #35
Comments
./trackerscompare.bin --ip_camera "rtsp://admin:[email protected]//Streaming/Channels/1" (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:18895): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed Error: Coming from:
|
openpose did not work in the opentracker,how did I do? |
the original openpose library is updated recently, but mine is not yet, so if you wanna use it here, try to use my forked version: https://github.com/rockkingjy/openpose . |
I used the openpose:https://github.com/rockkingjy/openpose ,but didi not work. (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed (trackerscompare.bin:19716): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed Error: Coming from:
Coming from:
Aborted (core dumped) How can I do ? |
can you say some details about opentraker to connect openpose? |
I used the openpose:https://github.com/rockkingjy/openpose.It did not work.I have the same error.Can you tell me some details about how opentracker to connect to openpose.Trank you very much.I need you help.
|
it seems that you it cant' find your camera, all the details in Opentracker/inputs/openpose.hpp and .cc, or you could check the original openpose repository for more details. |
openpose:
cd build/
sudo make install
OpenTracker:
CMakeLists.txt:
find_package(OpenPose REQUIRED)
include_directories(${OpenPose_INCLUDE_DIRS})
add_executable(example.bin example.cpp)
target_link_libraries(example.bin ${OpenPose_LIBS})
./makefile set
OPENPOSE=1
Opentracker set trackerscompaere.cpp
#include "kcf/kcftracker.hpp"
#include "eco/eco.hpp"
#include "eco/parameters.hpp"
#ifdef USE_CAFFE
#include "goturn/network/regressor.h"
#include "goturn/tracker/tracker.h"
#endif
#include "inputs/readdatasets.hpp"
#include "inputs/readvideo.hpp"
#include "inputs/openpose.hpp"
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp>
#include <opencv2/core/ocl.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include
#include
#include
using namespace cv;
using namespace std;
// Convert to string
int main(int argc, char **argv)
{
// ::google::InitGoogleLogging(argv[0]);
/* cv::Rect2f bboxGroundtruth;
cv::Mat frame, frameDraw;
ReadDatasets readdatasets;
readdatasets.IniRead(bboxGroundtruth, frame);
frame.copyTo(frameDraw);
readdatasets.DrawGroundTruth(bboxGroundtruth, frameDraw);
*/
// Init the trackers=================================================
// Create Opencv tracker:
string trackerTypes[6] = {"BOOSTING", "MIL", "KCF", "TLD", "MEDIANFLOW", "GOTURN"};
string trackerType = trackerTypes[2];
Ptrcv::Tracker opencvtracker;
if (trackerType == "BOOSTING")
opencvtracker = cv::TrackerBoosting::create();
if (trackerType == "MIL")
opencvtracker = cv::TrackerMIL::create();
if (trackerType == "KCF")
opencvtracker = cv::TrackerKCF::create();
if (trackerType == "TLD")
opencvtracker = cv::TrackerTLD::create();
if (trackerType == "MEDIANFLOW")
opencvtracker = cv::TrackerMedianFlow::create();
if (trackerType == "GOTURN")
opencvtracker = cv::TrackerGOTURN::create();
Rect2d opencvbbox((int)bboxGroundtruth.x, (int)bboxGroundtruth.y, (int)bboxGroundtruth.width, (int)bboxGroundtruth.height);
opencvtracker->init(frame, opencvbbox);
#ifdef USE_CAFFE
// Create GOTURN tracker:
const string model_file = "goturn/nets/deploy.prototxt";
const string pretrain_file = "goturn/nets/goturun_tracker.caffemodel";
int gpu_id = 0;
Regressor regressor(model_file, pretrain_file, gpu_id, false);
goturn::Tracker goturntracker(false);
cv::Rect goturnbbox(bboxGroundtruth.x, bboxGroundtruth.y, bboxGroundtruth.width, bboxGroundtruth.height);
BoundingBox bbox_gt;
BoundingBox bbox_estimate_uncentered;
bbox_gt.getRect(goturnbbox);
goturntracker.Init(frame, bbox_gt, ®ressor);
#endif
#ifdef USE_CAFFE
//GOTURN=====================
double timergoturn = (double)getTickCount();
goturntracker.Track(frame, ®ressor, &bbox_estimate_uncentered);
bbox_estimate_uncentered.putRect(goturnbbox);
float fpsgoturn = getTickFrequency() / ((double)getTickCount() - timergoturn);
rectangle(frameDraw, goturnbbox, Scalar(255, 255, 0), 2, 1);
#endif
#ifdef USE_CAFFE
putText(frameDraw, "GOTURN ", cv::Point(frameDraw.cols - 180, 150), FONT_HERSHEY_SIMPLEX, 0.75, Scalar(255, 255, 0), 2);
line(frameDraw, cv::Point(frameDraw.cols - 100, 150), cv::Point(frameDraw.cols - 10, 150), Scalar(255, 255, 0), 2, 1);
#endif
// Display frameDraw.=========================================================
//cvNamedWindow("Tracking", CV_WINDOW_NORMAL);
imshow("OpenTracker", frameDraw);
/* Read from dataset /
// readdatasets.ReadNextFrame(bboxGroundtruth, frame);
/ Read from video and choose a bbox /
/ capture >> frame;
if (frame.empty())
return false;*/
#ifdef USE_MULTI_THREAD
void *status;
int rc = pthread_join(ecotracker.thread_train_, &status);
if (rc)
{
cout << "Error:unable to join," << rc << std::endl;
exit(-1);
}
#endif
cvDestroyWindow("OpenTracker");
return 0;
}
The text was updated successfully, but these errors were encountered: