I'm using dlib for object detection, labeling and training dataset is completed using HOG+SVM, it is able to detect the object, but now
- I need extract chip from the image
I would like to add label to detected area on win_overlay. my working code snippet here, i searched for both of this, but I could not find for object detection.
typedef scan_fhog_pyramid<pyramid_down<6> > image_scanner_type; image_scanner_type scanner; object_detector<image_scanner_type> detector; deserialize(argv[2]) >> detector; array2d<unsigned char> img; image_window win; load_image(img, "test.jpg"); std::vector<rectangle> dets = detector(img); if (dets.size() > 0) { win.clear_overlay(); win.set_image(img); win.add_overlay(dets, rgb_pixel(255, 0, 0)); }
above snippet is highlighting detection, but i would like to label detected are on "win.add_overlay()" and extract chip(detected area) and save as image.