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

Fixes to run with OpenCV 3.14 #24

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: 3 additions & 1 deletion src/cvdrawwatershed.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <stdio.h>
#include <string>

#include <opencv2/imgproc.hpp>

// marker's shape is like circle
// just for imageclipper.cpp for now
CvRect cvDrawWatershed(IplImage* img, const CvRect circle)
Expand Down Expand Up @@ -68,7 +70,7 @@ inline CvRect cvShowImageAndWatershed(const char* w_name, const IplImage* img, c
{
IplImage* clone = cvCloneImage(img);
CvRect rect = cvDrawWatershed(clone, circle);
cvRectangle(clone, cvPoint(rect.x, rect.y), cvPoint(rect.x + rect.width, rect.y + rect.height), CV_RGB(255, 255, 0), 1);
cvRectangle(clone, cvPoint(rect.x, rect.y), cvPoint(rect.x + rect.width, rect.y + rect.height), cvScalar(0, 255, 255), 1);
cvShowImage(w_name, clone);
cvReleaseImage(&clone);
return rect;
Expand Down
4 changes: 2 additions & 2 deletions src/opencvx/cvdrawrectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
CVAPI(void) cvDrawRectangle(IplImage* img,
CvRect32f rect32f = cvRect32f(0, 0, 1, 1, 0),
CvPoint2D32f shear = cvPoint2D32f(0, 0),
CvScalar color = CV_RGB(255, 255, 255),
CvScalar color = cvScalar(255, 255, 255),
int thickness = 1,
int line_type = 8,
int shift = 0);
CVAPI(void) cvShowImageAndRectangle(const char* w_name, const IplImage* img,
CvRect32f rect32f = cvRect32f(0, 0, 1, 1, 0),
CvPoint2D32f shear = cvPoint2D32f(0, 0),
CvScalar color = CV_RGB(255, 255, 0),
CvScalar color = cvScalar(0, 255, 255),
int thickness = 1, int line_type = 8,
int shift = 0);

Expand Down