简体   繁体   中英

medianBlur not working in opencv4android

I developed an OpenCV application using C++ on my desktop computer, where everything works as expected.

Then I included the C++ code in an android application using android NDK. It builds and runs, however, the result is different than the one on my desktop.

After debugging, I found that the following line makes the difference:

cv::medianBlur(img, filteredImage, 9);

In fact, medianBlur seems broken on my android device. Consider the following image:

中位数之前的图像

which is transformed to

中位数后的图像

The device I am using a Samsung Galaxy Note 3 running Android 5.0. The OpenCV version is 3.0.0.

Do you have any ideas why this happens?

I did not find out how to solve the problem with opencv4android 3.0.0.

However, after downgrading to version 2.4.11 medianBlur works as expected.

Still, if anyone finds a solution for version 3.0.0 please let me know.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM