Develop into master #9
@@ -42,9 +42,11 @@ namespace computervision
|
|||||||
|
|
||||||
void OpenPoseVideo::setup() {
|
void OpenPoseVideo::setup() {
|
||||||
net = readNetFromCaffe(protoFile, weightsFile);
|
net = readNetFromCaffe(protoFile, weightsFile);
|
||||||
|
|
||||||
|
net.setPreferableBackend(DNN_TARGET_CPU);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenPoseVideo::movementSkeleton(Mat inputImage, std::function<void(std::vector<Point>,cv::Mat poinst_on_image)> f) {
|
void OpenPoseVideo::movementSkeleton(Mat& inputImage, std::function<void(std::vector<Point>&, cv::Mat& poinst_on_image)> f) {
|
||||||
std::cout << "movement skeleton start" << std::endl;
|
std::cout << "movement skeleton start" << std::endl;
|
||||||
|
|
||||||
int inWidth = 368;
|
int inWidth = 368;
|
||||||
@@ -67,6 +69,7 @@ namespace computervision
|
|||||||
|
|
||||||
std::cout << "done setting input to net" << std::endl;
|
std::cout << "done setting input to net" << std::endl;
|
||||||
Mat output = net.forward();
|
Mat output = net.forward();
|
||||||
|
std::cout << "time took to set input and forward: " << t << std::endl;
|
||||||
|
|
||||||
int H = output.size[2];
|
int H = output.size[2];
|
||||||
int W = output.size[3];
|
int W = output.size[3];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace computervision
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void movementSkeleton(Mat inputImage,std::function<void(std::vector<Point>, cv::Mat poinst_on_image)> f);
|
void movementSkeleton(Mat& inputImage, std::function<void(std::vector<Point>&, cv::Mat& poinst_on_image)> f);
|
||||||
void setup();
|
void setup();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,10 +87,11 @@ int main(void)
|
|||||||
|
|
||||||
// set up object detection
|
// set up object detection
|
||||||
//objDetect.setup();
|
//objDetect.setup();
|
||||||
cv::VideoCapture cam = objDetect.getCap();
|
//cv::VideoCapture cam = objDetect.getCap();
|
||||||
cv::Mat img;
|
cv::Mat img;
|
||||||
cam.read(img);
|
cv::VideoCapture cap = objDetect.getCap();
|
||||||
imshow("camera in main loop", img);
|
//cam.read(img);
|
||||||
|
//imshow("camera in main loop", img);
|
||||||
|
|
||||||
|
|
||||||
computervision::AsyncArmDetection as;
|
computervision::AsyncArmDetection as;
|
||||||
|
|||||||
Reference in New Issue
Block a user