简体   繁体   English

medianBlur无法在opencv4android中工作

[英]medianBlur not working in opencv4android

I developed an OpenCV application using C++ on my desktop computer, where everything works as expected. 我在台式计算机上使用C ++开发了一个OpenCV应用程序,其中一切都按预期工作。

Then I included the C++ code in an android application using android NDK. 然后我在使用android NDK的Android应用程序中包含了C ++代码。 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. 事实上,medianBlur似乎在我的Android设备上被破坏了。 Consider the following image: 请考虑以下图像:

中位数之前的图像

which is transformed to 转化为

中位数后的图像

The device I am using a Samsung Galaxy Note 3 running Android 5.0. 该设备我正在使用运行Android 5.0的三星Galaxy Note 3。 The OpenCV version is 3.0.0. OpenCV版本是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. 我没有找到如何解决opencv4android 3.0.0的问题。

However, after downgrading to version 2.4.11 medianBlur works as expected. 但是,在降级到版本2.4.11之后,中位数Brl按预期工作。

Still, if anyone finds a solution for version 3.0.0 please let me know. 不过,如果有人找到3.0.0版的解决方案,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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