c++ - Function inpaint "was not declare in this scope" -
i'm trying use inpaint function in opencv, i'm getting error
loadimg.cpp: in function 'int main(int, char**)': loadimg.cpp:19:28: error: 'inpaint_telea' not member of 'cv' loadimg.cpp:19:45: error: 'inpaint' not declared in scope from typing this:
c:\users\francesco\desktop\prova>g++ -i"c:\opencv\build\include" -l"c:\opencv\build\x86\mingw\lib" loadimg.cpp -lopencv_core245 -lopencv_highgui245 -lopencv_img proc245 -o loadimg this code:
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <opencv/cv.h> #include <stdlib.h> #include <stdio.h> #include <iostream> using namespace cv; using namespace std; int main(int argc, char** argv) { mat src = cv::imread("prova.jpg"); mat mask; cvtcolor(src, mask, cv_rgb2gray); threshold(mask, mask, 220, 255, cv_thresh_binary); mat dst; inpaint(src, mask, dst, 1, cv::inpaint_telea); imshow("image", dst); waitkey(0); return 0; } can me? thank much.
cv::inpaint() declared in photo module. need #include <opencv2/photo/photo.hpp> . alternatively, #include <opencv2/opencv.hpp>, includes of opencv's functionality.
Comments
Post a Comment