简体   繁体   中英

How do I use meanshift in the NDK with opencv?

I'm trying to develop an app that uses meanshift to track an object. I got the code working in python and decided to integrate it into the android app instead of sending the data to a server for processing. I set up the ndk and imported opencv into the project. Everything worked fine until I got to the meanshift. Meanshift does not show up as an option in the IDE even though the documentation lists it as present. Camshift also doesn't show up. Strangely, however, pyrMeanShiftFiltering does show up as an option, but that's not what I'm looking for. Also, in the activity Video.MeanShift() works, but I'd prefer to stay in the native library rather than doing any big calculations in java for the sake of speed. Any help would be greatly appreciated.

Screen shot of available functions relating to "mean"

在此处输入图片说明

Turns out that this line was missing from my header file. Oops! #include <opencv2/video.hpp>

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