Skip to content

Commit ad80fe5

Browse files
authored
Interactive Face Detection (G-API): Fix the input stream limit (#3861)
- There's output wrte limit mistakenly used as an input limit in the G-API IFD demo. - Also removed an unnecessary capture initialization before the actual start of the pipeline.
1 parent a1820e7 commit ad80fe5

File tree

1 file changed

+1
-8
lines changed
  • demos/interactive_face_detection_demo/cpp_gapi

1 file changed

+1
-8
lines changed

demos/interactive_face_detection_demo/cpp_gapi/main.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -590,15 +590,8 @@ int main(int argc, char* argv[]) {
590590
const cv::Point THROUGHPUT_METRIC_POSITION{10, 30};
591591
std::unique_ptr<Presenter> presenter;
592592

593-
/** Get information about frame **/
594-
std::shared_ptr<ImagesCapture> cap = openImagesCapture(FLAGS_i, FLAGS_loop);
595-
const auto tmp = cap->read();
596-
cap.reset();
597-
if (!tmp.data) {
598-
throw std::runtime_error("Couldn't grab first frame");
599-
}
600-
cap = openImagesCapture(FLAGS_i, FLAGS_loop, read_type::safe, 0, FLAGS_lim);
601593
/** ---------------- The execution part ---------------- **/
594+
std::shared_ptr<ImagesCapture> cap = openImagesCapture(FLAGS_i, FLAGS_loop, read_type::safe, 0);
602595
stream.setSource<custom::CommonCapSrc>(cap);
603596

604597
/** Save output result **/

0 commit comments

Comments
 (0)