Some users do not know how to setup OpenCV in Eclipse (A pre requisite to Object tracking OpenCV tutorial I published earlier) , so I decided to make a small tutorial.
STEPS
STEPS
1.Create a Java Project from "New"
2. Right click on the project and select "Properties"

3.Navigate to "Java Build path" section, and select the "Libraries" tab.
4. Click "Add External Jar"
5. Navigate to "Your OpenCV directory\build\java" and select "opencv-249.jar"
5. Navigate to "Your OpenCV directory\build\java" and select "opencv-249.jar"
6. Not done yet, You have to set path to native library.
7. Expand the opencv-249.jar as shown and select "Native library location". Click Edit button.
7. Expand the opencv-249.jar as shown and select "Native library location". Click Edit button.
8. Point to "Your OpenCV directory\build\java\x86" for 32Bit Processor OR "Your OpenCV directory\build\java\x64" for 64Bit Processor
Hello,
ReplyDeleteI have a problem to read file video at :
VideoCapture camera = new VideoCapture("D:\\Videos\\ball.avi");
How am i going to fix it?
This can be due to various problems.
Delete1. The input video file ball.avi is not present at D:\\Videos\\ . Your path or drive might be different
2. Your computer does not have decoders. Try using ffdshow codecs
3. OpenCV's native Library path must be set as in steps 7&8
i am also facing the same issue.
DeleteThis comment has been removed by the author.
ReplyDeleteThank you very much...
ReplyDeleteYour Explanation helped me to run a ready code which i was trying to run from last week.
thanks a lot for such a wonderful explanation.