ho:Howto: C++ Puntatore Funzione con valori di default
typedef void (*RespExtractor) (const cv::Mat & image, cv::Mat & resp);
virtual void predict_image(const cv::Mat & src,
cv::Mat & img_detect,cv::Size patch_size,
RespExtractor);
void create_hough_features(const cv::Mat & image, cv::Mat & resp, FeatureParams & params = FeatureParams());
come faccio a definire il RespExtractor di accettare una funzione con parametri di default, come posso chiamare:
predict_image(im_in,im_out,create_hough_features);
ho provato seguente , senza successo:
typedef void (*RespExtractor) (const cv::Mat & image, cv::Mat & resp,FeatureParams params, FeatureParams());
Parametri di default non fanno parte della firma funzione di ... –
così non posso raggiungere quello che voglio ? –
Non in questo modo. Considera invece std :: function – Lol4t0