Opencv with hadoop
Hi, Is it possible to make an hive udf that runs opencv code (java)? When I try to run the function from hive I get error ClassNotFoundException: org.opencv I think its something about the native library but I not able to solve it or maybe its just impossible to run it on hive.
i can't help you, but this is for sure not the exact error msg.
please be more precise, on what you're doing, and the output of it.
For now im just trying to run a hive udf that does nothing but can use opencv library. I wrote java code that include opencv jar (linux version). my code is just: public string evaluate (string a) { MatOfRect matType = new MatOfRect(); return null; }
I run this function on a table column in hive. When I outline the MatOfRect type line I get null as expected. When the MatOfRect type line is included the function fails. So look like the function cant load the opencv library propertly.
On windows I had to load the opencv.dll as native library, now im running on linux is there any folder I need to load?
sure, you need a native opencv_java310.so on linux, too.
I have added system.load("%path%/libopencv_java2413.so") to my project (this line passed without error) but still I get ClassNotFoundException: org.opencv.core.MatOfRect error
it won't be able to expand the path var by magic, also
%path%
is only valid on windows.then, your error still means, that the opencv jar file was not found (the so would be the next problem)
sorry, I meant the %path% only in this comment to not spam the full location here. In the code I gave the complete path