FASText icon indicating copy to clipboard operation
FASText copied to clipboard

which version is the opencv need?

Open likezjuisee opened this issue 4 years ago • 3 comments

4%] Building CXX object src/CMakeFiles/FTreader.dir/segm/flood_fill.cpp.o /home/ubuntu/like/FASText/src/segm/flood_fill.cpp: In function ‘int cmp::floodFill(std::vectorcmp::CvFFillSegment&, cv::InputOutputArray, cv::InputOutputArray, cv::Point, int, double, int&, long int, int, int, cv::Mat&, cv::Mat&, cv::Rect&, int&, std::unordered_map<int, int>&, std::vector&, bool, bool, int, cv::Scalar, cv::Scalar)’: /home/ubuntu/like/FASText/src/segm/flood_fill.cpp:468:34: error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested CvMat c_image = _image.getMat(); ^ /home/ubuntu/like/FASText/src/segm/flood_fill.cpp:469:38: error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested CvMat c_imageId = imageId.getMat(); ^ /home/ubuntu/like/FASText/src/segm/flood_fill.cpp:480:140: error: could not convert ‘seedPoint’ from ‘cv::Point {aka cv::Point}’ to ‘CvPoint’ floodFillC(buffer, &c_imageId, &c_image, seedPoint, channel, compCounter, loDiff, upDiff, &ccomp, threshold, maxSize, segmMap, gradFill); ^ /home/ubuntu/like/FASText/src/segm/flood_fill.cpp: In instantiation of ‘void cmp::icvFloodGrad_CnIR(uchar*, int, uchar*, int, CvSize, CvPoint, int, CvConnectedComp*, std::vectorcmp::CvFFillSegment, long int, int, long int ()(const _Tp*, const _Tp*), cv::Mat&) [with Tp = unsigned char; uchar = unsigned char; CvSize = CvSize; CvPoint = CvPoint; CvConnectedComp = CvConnectedComp]’: /home/ubuntu/like/FASText/src/segm/flood_fill.cpp:411:184: required from here /home/ubuntu/like/FASText/src/segm/flood_fill.cpp:232:23: error: no match for ‘operator=’ (operand types are ‘CvScalar’ and ‘cv::Scalar {aka cv::Scalar}’) region->value = cv::Scalar(newVal);

likezjuisee avatar Jun 12 '20 10:06 likezjuisee

It worked on 2.4 (this is really old project)

MichalBusta avatar Jun 12 '20 10:06 MichalBusta

I have tried 2.4.0 and 2.4.13, both failed. Could you give me the specific version?

likezjuisee avatar Jun 12 '20 11:06 likezjuisee

I can compile it now on Ubuntu 18.04 Using OpenCV from /usr/share/OpenCV, include dirs: /usr/include;/usr/include/opencv 3 exact version is 3.2.0

MichalBusta avatar Jun 12 '20 12:06 MichalBusta