javacv

Finding image in specific area in image using Matching Template in javacv

空扰寡人 提交于 2019-12-25 06:31:29
问题 I am trying to find the location of image inside a specific area in another. I am using javacv to do this issue. But my code is giving an error when executing cvMatchTemplate function. I think I am miss using cvSetImageROI . This is how I am using it: public static void main(String c[]) { IplImage src = cvLoadImage("test.jpg", 0); IplImage tmp = cvLoadImage("tmp.png", 0); IplImage result = cvCreateImage(cvSize(src.width() - tmp.width() + 1, src.height() - tmp.height() + 1), IPL_DEPTH_32F,1);

Finding image in specific area in image using Matching Template in javacv

不想你离开。 提交于 2019-12-25 06:30:05
问题 I am trying to find the location of image inside a specific area in another. I am using javacv to do this issue. But my code is giving an error when executing cvMatchTemplate function. I think I am miss using cvSetImageROI . This is how I am using it: public static void main(String c[]) { IplImage src = cvLoadImage("test.jpg", 0); IplImage tmp = cvLoadImage("tmp.png", 0); IplImage result = cvCreateImage(cvSize(src.width() - tmp.width() + 1, src.height() - tmp.height() + 1), IPL_DEPTH_32F,1);

JavaCV - Unsatisfied Link

ぐ巨炮叔叔 提交于 2019-12-25 05:06:09
问题 Now i realise that is will be something dumb/moronic on my part in not referenceing libraries etc, however i've been play with this for a couple of hours now and I can't seem to fix it. When i attempt to use any libraries from JavaCV i get this: 2012-05-22 23:29:27.214: WARN:oejw.WebSocketConnectionRFC6455:java.lang.UnsatisfiedLinkError: /private/var/folders/lr/q3z8sl1x5_xcf1590495xh9r0000gn/T/libjniopencv_core4427354466625539453.dylib: Library not loaded: lib/libopencv_core.2.4.dylib

How to identify specific object using JavaCV

孤人 提交于 2019-12-24 19:25:06
问题 I am trying to detect doctor's tools from endoscopy video using the following code static void video_tracking(){ //read image IplImage orgImg = cvLoadImage("C:/Users/Ioanna/Desktop/pic.png"); IplImage thresholdImage = hsvThreshold(orgImg); cvSaveImage("hsvthreshold.jpg", thresholdImage); Dimension position = getCoordinates(thresholdImage); System.out.println("Dimension of original Image : " + thresholdImage.width() + " , " + thresholdImage.height()); System.out.println("Position of red spot :

Installation of javaCV [closed]

断了今生、忘了曾经 提交于 2019-12-24 04:17:32
问题 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 5 years ago . I am trying to follow the instructions for installing javaCV from here: https://code.google.com/p/javacv/. I ve already built opencv. Actually I locate the java folder with .jar file and .dll in opencv folder and I add them in the path of my project. When I am trying to run the SimpleSample.java I

BackgroundSubtractor throws 'Unrecognized or unsupported array type in function cvGetMat' Exception

北城余情 提交于 2019-12-24 02:04:44
问题 I have searched a lot for this problem, but I did not find any solution. I have a program which receives JPEG format file data through socket (in bytes), then I convert the byte array to OpenCV Mat object as below: Mat mat = Imgcodecs.imdecode(new MatOfByte(byteArray), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED); It converts well without any exception, then (for test case to ensure the data is OK) I convert the Mat object to BufferedImage and then show it in a JPanel , everything goes well without any

Convert IplImage to Mat in javacv

泪湿孤枕 提交于 2019-12-23 13:33:45
问题 I need help to convert my IplImage into Mat . I want to compute HOGDescriptor for my image and then classify it with SVM, but "compute" requires Mat type. Can you give some example of how to convert IplImage into Mat in java ? 回答1: Don't confuse the official OpenCV Java binding which is documented here and the JavaCV project which has no documentation. If you're using JavaCV , you don't need to convert your IplImage in order to use the HOGDescriptor , as you can see in the JavaCV source, the

to create video from image sequence on android

那年仲夏 提交于 2019-12-23 09:47:18
问题 I want to create video from image sequence (on android) by this code: opencv_core.IplImage image = cvLoadImage("/sdcard/mytest/testimage.jpg"); FFmpegFrameRecorder recorder = new FFmpegFrameRecorder("/sdcard/mytest/test.3gp",256,256); try { recorder.setCodecID( CODEC_ID_H263); recorder.setFormat("3gp"); recorder.setPixelFormat( PIX_FMT_YUV420P); recorder.start(); for (int i=0;i<10;i++) { recorder.record(image); } recorder.stop(); } catch (Exception e){ e.printStackTrace(); } But instead of my

cheap stereo vision camera + opencv [closed]

与世无争的帅哥 提交于 2019-12-23 04:58:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm trying to make an application that uses stereo vision with 20fps with javacv/opencv. I've seen some camera sterio vision, but all are expensive. I heard already talking about the Minoru 3D? Anyone know if it works with javacv? Does anyone have any idea what kind of is camera used for products like this? 回答1:

Overlay smaller image in a larger image in OpenCV

一世执手 提交于 2019-12-22 18:35:21
问题 I would like to replace a part of the image with my image in Opencv I used cvGetPerspectiveMatrix() with a warpmatrix and using cvAnd() and cvOr() but could not get it to work This is the code that is currently displaying the image and a white polygon for the replacement image. I would like to replace the white polygon for a pic with any dimension to be scaled and replaced with the region pointed. While the code is in javacv I could convert it to java even if c code is posted grabber.start();