Ask Your Question

differences betweek java and c++

asked 2014-03-17 07:44:23 -0600

thdrksdfthmn gravatar image

Hi, I have done a morphology operation Top Hat on one image, in C++, and the result is a little different than the morphology operation Top Hat from OpenCV on Java. Is it possible that the OpenCV 248 for Java may be different than the OpenCV 248 for C++?

I did

cv::Mat ker = cv::Mat::ones(17, 17, CV_8UC1);
cv::morphologyEx(img, img, cv::MORPH_TOPHAT, ker);

and in Java it is

final Mat kernel = Mat.ones(17, 17, CvType.CV_8UC1);
final Mat dst = new Mat(img.size(), img.type());
Imgproc.morphologyEx(img, dst, Imgproc.MORPH_TOPHAT, kernel);
edit retag flag offensive close merge delete


Could you show your results, respectively?

Will Stewart gravatar imageWill Stewart ( 2014-03-17 11:12:32 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-24 08:16:47 -0600

thdrksdfthmn gravatar image

I do not think so, I was having some differences. And if there were, they should be some kind of approximation stuffs.

edit flag offensive delete link more

Question Tools


Asked: 2014-03-17 07:44:23 -0600

Seen: 766 times

Last updated: Jun 24 '14