javacv

opencv manager package was not found?? how install automatcally?

二次信任 提交于 2020-06-09 17:55:26
问题 I am working on openCV, and whenever i run code it gives me package manager is not installed, So how can i installed this through my application.Is it compulsory to download it from play store or we can installed it automatically in device. please help me. thanks in advance. 回答1: You need to use static initialization to include all OpenCV binaries in the apk. Please refer this documentation: Application Development with Static Initialization 回答2: 1- after you download Opencv library from this

Java OpenCV 模版匹配

只谈情不闲聊 提交于 2020-05-08 15:58:24
函数: Imgproc.matchTemplate(Mat image, Mat templ, Mat result, int method) 参数说明: image:源图像 templ:模板图像 result:比较结果 method:匹配算法 匹配算法: TM_SQDIFF 平方差匹配法:该方法采用平方差来进行匹配;最好的匹配值为0;匹配越差,匹配值越大。 TM_CCORR 相关匹配法:该方法采用乘法操作;数值越大表明匹配程度越好。 TM_CCOEFF 相关系数匹配法:1表示完美的匹配;-1表示最差的匹配。 TM_SQDIFF_NORMED 归一化平方差匹配法。 TM_CCORR_NORMED 归一化相关匹配法。 TM_CCOEFF_NORMED 归一化相关系数匹配法 原图像: 自己分割一个图像: 依赖: <!-- https: // mvnrepository.com/artifact/org.bytedeco/javacv-platform --> <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.4.2</version> </dependency> 代码: public class MatchTemplate { private

java 视频处理获取时长,截取帧数,类型转换

人走茶凉 提交于 2020-03-18 11:25:24
某厂面试归来,发现自己落伍了!>>> 所需要的jar 1、mov 视频转码为 mp4 compile group: 'ws.schild', name: 'jave-core', version: '2.7.1' compile group: 'ws.schild', name: 'jave-nativebin-linux64', version: '2.7.1' compile group: 'ws.schild', name: 'jave-nativebin-win64', version: '2.7.1' 2、获取时长、截取帧数 compile group: 'org.bytedeco', name: 'javacv', version: '1.3.1' compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg-platform', version: '3.2.1-1.3' /** * 作者: 王彦宝 * 时间: 2019年6月27日上午10:48:58 * 描述:截取视频上传第10帧 * @param file * @param framefile * @throws Exception * void */ public long fetchFrame(String file, String framefile

JavaCV configuration in Android Studio

我怕爱的太早我们不能终老 提交于 2020-01-22 12:40:08
问题 I know there is a lot of similiar questions to this, but a lot of them seem to be out of date because of the development of libraries such JavaCV. I used the code from Video Creation with Images and Audio in Android to create movie, but I have a problem with lib imports. I did as JavaCV page says, I put dependency in gradle : compile group: 'org.bytedeco', name: 'javacv', version: '0.9' now, I don't know if I have to do something else? I have used these imports : import org.bytedeco.javacpp

FFmpegFrameGrabber crashes 100% of time attempting to compress video on Android

感情迁移 提交于 2020-01-15 12:17:07
问题 I am attempting to use javacv/ffmpeg to compress video on an Android device prior to upload. I am using this code: FrameGrabber grabber = new FFmpegFrameGrabber(inputFile.getAbsolutePath()); grabber.start(); FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputFile.getAbsolutePath(), grabber.getImageWidth(), grabber.getImageHeight(), grabber.getAudioChannels()); recorder.setVideoCodec(com.googlecode.javacv.cpp.avcodec.AV_CODEC_ID_MPEG4); recorder.setAudioCodec(com.googlecode.javacv

Can javaCV be used with GAE(Google App Engine)?

≡放荡痞女 提交于 2020-01-15 11:21:56
问题 Can i use javaCV with GAE?? Now, i try to import javaCV jar to GAE,GWT project in Eclipse But it wasn't work... First, I makes GAE project in Eclipse that was installed GAE plug-in and add javaCV jar file to /war/WEB-INF/lib and config jar Build path so it wasn't confirm error in source But when i run WebApplication(local) some errors occur.. like this [ERROR] [jebal] - Line 72: No source code is available for type com.googlecode.javacv.cpp.opencv_core.IplImage; did you forget to inherit a

White Screen is appearing in javaFx application & its getting stuck

心已入冬 提交于 2020-01-13 06:21:09
问题 We are developing video streaming app using JavaFx and JavaCv, While playing Stream into gridPane(8X8), we are occasionally facing splashing White Screen issue and it's continuous. Details:- new Thread(new Runnable() { @Override public void run() { frameGrabber = new FFmpegFrameGrabber(Url); frameGrabber.setVideoOption("preset","ultrafast"); frameGrabber.setOption("rtsp_transport","tcp"); frameGrabber.setOption("stimeout" , "60000"); frameGrabber.setAudioChannels(0); frameGrabber

What is the meaning of following code line in opencv?

我是研究僧i 提交于 2020-01-12 03:39:09
问题 What does this code line means and how can I convert this code into javacv? gray = Scalar::all(255); This is whole code which related to this code line. Mat src = imread("in.jpg"), gray; cvtColor(src, gray, CV_BGR2GRAY); threshold(gray, gray, 230, 255, THRESH_BINARY_INV); vector<Vec4i> hierarchy; vector<vector<Point> > contours; findContours(gray, contours, hierarchy, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE); gray = Scalar::all(255); Please can some one explain about this ? 回答1: As I mentioned

Exception initialization error javacv

浪子不回头ぞ 提交于 2020-01-06 18:41:19
问题 I am using javacv for my project, in my project i want to use opencv_highui.cvLoadImage function I have added javacv.jar,javacpp.jar in libs folder,and extract all so files in libs/armebi-v7a folder but when i run my project it gives me error of exceptionintialization error is there any other steps to follow for opencv Please give me some suggestion here is me code import static com.googlecode.javacv.cpp.opencv_highgui.*; import android.os.Bundle; import android.app.Activity; import android

pupil Detection and cvHoughCircles?

牧云@^-^@ 提交于 2020-01-05 13:43:34
问题 I'm trying to improve my pupil detection (I'm using Javacv). At the moment, I have this method below where I draw rectangle around the found pupil. I want to try to have something like a circle across the iris and a dot on the pupil to make it more accurate. Maybe by finding the iris using (hough circle) -> then find the largest blob within the iris. How do I go about that? private void drawPupilRect(Graphics2D g2, CvRect eye) // draw outline rectangle around the pupil+iris { CvRect pupil =