Reputation: 153
I am using OpenCV4Android. I know it OpenCV functions are available in android via Java wrappers. Now i have an issue with function "addWeighted". I want to access its C++ code so that i can make a change in it and get my desired results. Can any one tell me where is its C++ code. I did lot of search/google but did not get function implementation in C++.
Upvotes: 1
Views: 1015
Reputation: 1255
if you just needs to know where is the source code. I check my opencv(2.4.5 for PC) and find it here: \modules\core\src\arithm.cpp.
void cv::addWeighted( InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, int dtype )
{
double scalars[] = {alpha, beta, gamma};
arithm_op(src1, src2, dst, noArray(), dtype, addWeightedTab, true, scalars);
}
compile opencv yourself and add the path to source directories. then you can check the code easily in your IDE and even debug inside opencv codes.
opencv source codes(cpp) wrapped to android java code through jni, I don't think it worth modifying the opencv source codes and compile a opencv_java.so yourself. Instead, you can just past the Mat through jni and write your own addWeighted() function in cpp.
Upvotes: 4