Get the names of the output layers
| 271 | |
| 272 | // Get the names of the output layers |
| 273 | std::vector<cv::String> CVObjectDetection::getOutputsNames(const cv::dnn::Net& net) |
| 274 | { |
| 275 | static std::vector<cv::String> names; |
| 276 | |
| 277 | //Get the indices of the output layers, i.e. the layers with unconnected outputs |
| 278 | std::vector<int> outLayers = net.getUnconnectedOutLayers(); |
| 279 | |
| 280 | //get the names of all the layers in the network |
| 281 | std::vector<cv::String> layersNames = net.getLayerNames(); |
| 282 | |
| 283 | // Get the names of the output layers in names |
| 284 | names.resize(outLayers.size()); |
| 285 | for (size_t i = 0; i < outLayers.size(); ++i) |
| 286 | names[i] = layersNames[outLayers[i] - 1]; |
| 287 | return names; |
| 288 | } |
| 289 | |
| 290 | CVDetectionData CVObjectDetection::GetDetectionData(size_t frameId){ |
| 291 | // Check if the stabilizer info for the requested frame exists |