Ryan Lee
commited on
Commit
·
9e2f141
1
Parent(s):
f735931
Fix spelling, spacing, and unused variables (#236)
Browse files* Fix spelling, spacing, and unused variables
* Fixed typo in 3 more models
* Added open back
* Remove setBackendAndTarget functions from C++ demos, which are unused functionality.
demo.cpp
CHANGED
|
@@ -43,14 +43,6 @@ public:
|
|
| 43 |
this->anchors = getMediapipeAnchor();
|
| 44 |
}
|
| 45 |
|
| 46 |
-
void setBackendAndTarget(dnn::Backend bId, dnn::Target tId)
|
| 47 |
-
{
|
| 48 |
-
this->backendId = bId;
|
| 49 |
-
this->targetId = tId;
|
| 50 |
-
this->net.setPreferableBackend(this->backendId);
|
| 51 |
-
this->net.setPreferableTarget(this->targetId);
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
pair<Mat, Size> preprocess(Mat img)
|
| 55 |
{
|
| 56 |
Mat blob;
|
|
@@ -237,10 +229,9 @@ int main(int argc, char** argv)
|
|
| 237 |
backendTargetPairs[backendTargetid].first, backendTargetPairs[backendTargetid].second);
|
| 238 |
//! [Open a video file or an image file or a camera stream]
|
| 239 |
if (!cap.isOpened())
|
| 240 |
-
CV_Error(Error::StsError, "Cannot
|
| 241 |
|
| 242 |
static const std::string kWinName = "MPPersonDet Demo";
|
| 243 |
-
int nbInference = 0;
|
| 244 |
while (waitKey(1) < 0)
|
| 245 |
{
|
| 246 |
cap >> frame;
|
|
|
|
| 43 |
this->anchors = getMediapipeAnchor();
|
| 44 |
}
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
pair<Mat, Size> preprocess(Mat img)
|
| 47 |
{
|
| 48 |
Mat blob;
|
|
|
|
| 229 |
backendTargetPairs[backendTargetid].first, backendTargetPairs[backendTargetid].second);
|
| 230 |
//! [Open a video file or an image file or a camera stream]
|
| 231 |
if (!cap.isOpened())
|
| 232 |
+
CV_Error(Error::StsError, "Cannot open video or file");
|
| 233 |
|
| 234 |
static const std::string kWinName = "MPPersonDet Demo";
|
|
|
|
| 235 |
while (waitKey(1) < 0)
|
| 236 |
{
|
| 237 |
cap >> frame;
|