javacv

Exporting Executable jar file that uses opencv

杀马特。学长 韩版系。学妹 提交于 2019-11-28 05:37:34
问题 While exporting in eclipse I choose "Package required libraries into generated jar". The jar file works only in my machine. However, when I test it on other machine it gives this Exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) at com.googlecode.javacpp.Loader.loadLibrary

Javacv UnsatisfiedLinkError in windows 7

守給你的承諾、 提交于 2019-11-28 00:20:06
In my project I want to capture image from my webcam. I configured step by step following the instructions from this "OpenCV-JavaCV : eclipse project configuration windows 7" blog post . After configuration is finished, i tested samples codes and the application found my webcam SETUP: Setting up device 0 SETUP: Namuga 1.3M Webcam SETUP: Couldn't find preview pin using SmartTee SETUP: Capture callback set SETUP: Device is setup and ready to capture. and then i got an error which is .dll error. I use windows 7 x64. Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: C:\Users

Returning Mat object from native code to java in OpenCV

我们两清 提交于 2019-11-27 12:55:57
I have an OpenCV Android app. Most of its code is in Java but I have one function that is in C. The function gets a Mat object and returns a new one. My question is how do I return a Mat from the native code to Java? Couldn't find any example of that. Thanks. Today I had to return a Mat from native code. I started with "Tutorial 2 Advanced - 2. Mix Java+Native OpenCV" it already passes two Mat (Images captured from camera) objects to the native code. But I wanted to return extracted feature, thus I added jlong addrDescriptor to the signature: extern "C" { JNIEXPORT void JNICALL Java_org_opencv

Where to get the jar for openCV? [closed]

别说谁变了你拦得住时间么 提交于 2019-11-27 12:27:51
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . Where are the Java jar libraries for the openCV core extensions so that I can import it in my java code? I cannot find a single place where they have taught how to get everything set up properly. I am using Ubuntu 12.04 and I have openCV installed. I want to use it in eclipse IDE, and eclipse needs

Capturing a single image from my webcam in Java or Python

自闭症网瘾萝莉.ら 提交于 2019-11-27 09:59:31
问题 I want to capture a single image from my webcam and save it to disk. I want to do this in Java or Python (preferably Java). I want something that will work on both 64-bit Win7 and 32-bit Linux. EDIT: I use Python 3.x, not 2.x Because everywhere else I see this question asked people manage to get confused, I'm going to state a few things explicitly: I do not want to use Processing I do not want to use any language other than those stated above I do want to display this image on my screen in

How to set a mask image for grabCut in OpenCV?

与世无争的帅哥 提交于 2019-11-27 07:14:19
问题 How can I set a mask image for the grabCut function in OpenCV? I want to do GC_INIT_WITH_MASK with the options GC_BGD = 0, GC_FGD = 1, GC_PR_BGD = 2, GC_PR_FGD = 3, If you can answer this with JavaCV it would be great as I am doing this in Scala/Java. 回答1: Input images (lena.png, lena_mask.png): Code (JAVA) : import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.highgui.Highgui;

Filling holes inside a binary object

ⅰ亾dé卋堺 提交于 2019-11-27 06:59:08
I have a problem with filling white holes inside a black coins so that I can have only 0-255 binary image with filled black coins.. I have used Median filter to accomplish it but in that case connection bridge between coins grows and it goes impossible to recognize them after several times of erosion... So I need a simple floodFill like method in opencv Here is my image with holes: EDIT: floodfill like function must fill holes in big components without prompting X,Y coordinates as a seed... EDIT: I tried to use cvDrawContours function but I doesn't fill contours inside bigger ones. Here is my

Reshaping noisy coin into a circle form

本小妞迷上赌 提交于 2019-11-27 04:01:28
I'm doing a coin detection using JavaCV (OpenCV wrapper) but I have a little problem when the coins are connected. If I try to erode them to separate these coins they loose their circle form and if I try to count pixels inside each coin there can be problems so that some coins can be miscounted as one that bigger. What I want to do is firstly to reshape them and make them like a circle (equal with the radius of that coin) and then count pixels inside them. Here is my thresholded image: And here is eroded image: Any suggestions? Or is there any better way to break bridges between coins? Quentin

how to convert images into video in android using javacv?

ぃ、小莉子 提交于 2019-11-27 01:25:31
问题 i want to convert the sdcard images into video in android.After many of searching i found it is possible in javacv.when i try simple javacv sample in pure java,its working perfectly in my eclipse.but when i turn into android,the same sample does not run in android.i download and add all the .jar files and .so files in myproject->libs/armeabi folder.my project doesn't show any errors.but error occcured during the runtime. i try with this class, package com.example.ndkfoo_sample; import static

Filling holes inside a binary object

六月ゝ 毕业季﹏ 提交于 2019-11-26 22:15:53
问题 I have a problem with filling white holes inside a black coins so that I can have only 0-255 binary image with filled black coins.. I have used Median filter to accomplish it but in that case connection bridge between coins grows and it goes impossible to recognize them after several times of erosion... So I need a simple floodFill like method in opencv Here is my image with holes: EDIT: floodfill like function must fill holes in big components without prompting X,Y coordinates as a seed...