javacv

FFmpegFrameRecorder videoBroadcasting audio comes faster than video frame in 3G Network

末鹿安然 提交于 2019-12-03 17:08:19
I'm using FFmpegFrameRecorder for video broadcast.Problem is audio comes faster than video frame.I'm using following code but unable to produce complete video there is problem in audio video timestamp. Java Code: import static com.googlecode.javacv.cpp.opencv_core.IPL_DEPTH_8U; import java.io.IOException; import java.nio.ShortBuffer; import android.app.Activity; import android.content.Context; import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.Canvas; import android.hardware.Camera; import android.hardware.Camera.PreviewCallback; import android

Javacv Blob detection

别说谁变了你拦得住时间么 提交于 2019-12-03 14:02:29
问题 I would like to use some blob detection in my application which is written in Java and thus using JavaCV instead of OpenCV . I found many classes like: SimpleBlobDetector , CvBlobDetector , CvBlob , ... but I can't find any tutorial or demo/example code to use these in Java. Could anyone please tell me how to use these as I can't figure it out and there's no good documentation for them. Thanks! 回答1: I am just in this moment working on the same problem and have a first solution. There's a lot

Recording video on Android using JavaCV (Updated 2014 02 17)

折月煮酒 提交于 2019-12-03 13:29:38
问题 I'm trying to record a video in Android using the JavaCV lib. I need to record the video in 640x360. I have installed everything as described in README.txt file and I followed the example as below: https://code.google.com/p/javacv/source/browse/samples/RecordActivity.java In this example, the video size is this: private int imageWidth = 320; private int imageHeight = 240; In my case, I need to record a video in 640x360 H.264. (UPDATE) I have reverted my code and kept exactly like in the

What are the parameters passed to cvFindContours() in JavaCV?

谁说我不能喝 提交于 2019-12-03 13:04:30
问题 Please can some one explain about cvFindContours method and what are the parameters that it required? For example, here's code using OpenCV: hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) Please can some one explain how to write this using JavaCV? 回答1: As comments mentioned by Mohammad those three parameters are header_size , mode and method . You can use this method as follows IplImage src = cvLoadImage(path);//hear path is actual path to image IplImage

Is there a way to detect the main ROI?

不打扰是莪最后的温柔 提交于 2019-12-03 08:43:00
i want detect the important ROI Element in a picture. (i want to get the position) I've tested a reverted SeamCarving-Method . I hoped, that the most importand Area in a picture have the most energylevel. I've generated one vertical and one horizontal Seam and took the intersection. But this method don't seem to be perfect. Some examples: good detection: good detection http://img713.imageshack.us/img713/2928/seamcastle.jpg good detection http://img39.imageshack.us/img39/9584/seamente.jpg good detection http://img193.imageshack.us/img193/2693/seamwuffi.jpg near aceptable; good detection http:/

IplImage Pixel Access JavaCV

怎甘沉沦 提交于 2019-12-03 07:42:42
I'm trying to access Pixel by Pixel of an IplImage. Im using Java and Processing, and sometimes I need to access pixel by pixel. I've done this so far, but I don't know what's wrong: public IplImage PImageToIplImage(PImage imageSrc) { IplImage imageDst; if(imageSrc.format==RGB) { imageDst = IplImage.create(imageSrc.width, imageSrc.height, IPL_DEPTH_8U, 3); ByteBuffer imagePixels=imageDst.getByteBuffer(); int locPImage, locIplImage, x, y; for(y=0; y<imageSrc.height; y++) for(x=0; x<imageSrc.width; x++) { locPImage = x + y * width; locIplImage=y*imageDst.widthStep()+3*x; imagePixels.put

opencv/javacv: How to iterate over contours for shape identification?

大憨熊 提交于 2019-12-03 06:25:20
I'm developing a shape identification project using JavaCV and I have found some OpenCV code to identify U shapes in a particular image. I have tried to convert it into JavaCV but it doesn't give the same output. Can you please help me to convert this OpenCV code into JavaCV? This is the OpenCV code: import cv2 import numpy as np img = cv2.imread('sofud.jpg') gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) ret,thresh = cv2.threshold(gray,127,255,1) contours,hierarchy = cv2.findContours(thresh,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE) for cnt in contours: x,y,w,h = cv2.boundingRect(cnt) if 10 < w

Learning JavaCV in pure Java [closed]

你。 提交于 2019-12-03 05:38:38
问题 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 3 years ago . I am trying to learn JavaCV. As you all know, the lack of educational materials on this subject is a very big problem. In JavCV home page, they have provided lot of examples for the C++ examples in book "OpenCV CookBook". But the case is, they are not Java, they are in SCALA!!!! Now I have already gone crazy! I

How to install JavaCV on Android and use FrameGrabber

二次信任 提交于 2019-12-03 04:06:59
Could someone tell me where I'm doing wrong? These are the steps that I have followed: Downloaded the adt-bundle-windows from android developer website Created a new project and a libs/armeabi folder Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.3-android-arm.zip, and ffmpeg-1.0-android-arm.zip directly into the newly created "libs/armeabi" folder, without creating any new subdirectories. (A part that I don't understand is "Extract all the *.so files from javacv-android-arm.jar" , I simply inserted the javacv-android-arm.jar file inside libs/armeabi folder) Navigated to

Javacv Blob detection

守給你的承諾、 提交于 2019-12-03 04:00:40
I would like to use some blob detection in my application which is written in Java and thus using JavaCV instead of OpenCV . I found many classes like: SimpleBlobDetector , CvBlobDetector , CvBlob , ... but I can't find any tutorial or demo/example code to use these in Java. Could anyone please tell me how to use these as I can't figure it out and there's no good documentation for them. Thanks! happyburnout I am just in this moment working on the same problem and have a first solution. There's a lot of approaches out there but unfortunately most of them are ugly and slow. My main goal to this