Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENCV 4 support added for Non-Matlab building. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/deltille/DetectorTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void stretchIntensities(cv::InputArray input, cv::OutputArray output);
template <typename FloatPoint>
void subpixel_marker(cv::Mat &img, const FloatPoint &pt, float sz,
const cv::Scalar &color, int thickness = 1,
int lineType = CV_AA) {
int lineType = cv::LINE_AA) {
const int shift = 16;
const float ss = (1 << shift);
cv::rectangle(img, cv::Point(int((pt.x - sz) * ss), int((pt.y - sz) * ss)),
Expand All @@ -197,7 +197,7 @@ void subpixel_marker(cv::Mat &img, const FloatPoint &pt, float sz,
template <typename FloatPoint>
void subpixel_line(cv::Mat &img, const FloatPoint &pt1, const FloatPoint &pt2,
const cv::Scalar &color, int thickness = 1,
int lineType = CV_AA) {
int lineType = cv::LINE_AA) {
const int shift = 16;
const float ss = (1 << shift);
cv::line(img, cv::Point(int(pt1.x * ss), int(pt1.y * ss)),
Expand Down
2 changes: 1 addition & 1 deletion include/deltille/PolynomialSaddleDetectorContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ struct PolynomialSaddleDetectorContext {
if (img.getMat().channels() == 3)
// convert to a single channel first, keep original intensity range for
// now...
cvtColor(img, gray_img, CV_RGB2GRAY);
cvtColor(img, gray_img, cv::COLOR_RGB2GRAY);
else
gray_img = img.getMat();

Expand Down
2 changes: 1 addition & 1 deletion include/deltille/target_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ FindBoards(const cv::Mat &I, const cv::Size &board_size,
case cv::DataType<uint16_t>::type:
return FindBoardsHelper<SaddlePointType, FloatImageType, uint16_t>(
I, board_size, boards);
case cv::DataType<uint32_t>::type:
case cv::DataType<int32_t>::type:
return FindBoardsHelper<SaddlePointType, FloatImageType, uint32_t>(
I, board_size, boards);
case cv::DataType<float>::type:
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
## License along with this library; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

find_package(OpenCV 3 CONFIG REQUIRED COMPONENTS core highgui imgproc imgcodecs)
find_package(OpenCV 4 CONFIG REQUIRED COMPONENTS core highgui imgproc imgcodecs)
add_library(opencv INTERFACE IMPORTED)
set_target_properties(opencv PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OpenCV_INCLUDE_DIRS}"
Expand Down