javacv

How to make a video from set of images in android like flipagram

送分小仙女□ 提交于 2019-11-29 11:57:35
I have searched for the solution and found - Java CV - FFmpeg Need step by step to integrate them like this Steps for Integrating FFMPEG (1.) Download ffmpeg from here: http://bambuser.com/opensource . It contains scripts to build ffmpeg for android. (2.) Modify build.sh. Replace "com.bambuser.broadcaster" with your package name. You also need to set the ffmpeg flags to enable to codecs you're interested in. (3.) Run build.sh, and copy the build/ffmpeg directory into your apps jni/lib directory. (4.) Use fasaxc's makefile from the SO post. (5.) Create a native.c file in your jni directory and

Java基于百度AI+JavaCV+OpenCV 实现摄像头人数动态统计

瘦欲@ 提交于 2019-11-29 05:53:18
【Java】人流量统计-动态版之视频转图识别请访问 http://ai.baidu.com/forum/topic/show/940413 本文是基于上一篇进行迭代的。本文主要是以摄像头画面进行人流量统计。并对返回图像进行展示。需要额外了解 JavaCV OpenCV swing awt等 也许JavaCV OpenCV 不需要也可以实现效果。但是小帅丶就先用这样的方式实现了。别的方式大家就自己尝试吧 有可能显示的in out不对。请设置帧率试试。鄙人不是专业的。所以对帧率也不是很懂。以下代码加入也没有明显的变化。 grabber.setFrameRate(10); grabber.setFrameNumber(10); 项目代码地址 https://gitee.com/xshuai/bodyTrack 注意的问题 1.动态识别的area参数为矩阵的4个顶点的xy坐标(即像素) 顺序是 上左下右 也就是顺时针一圈4个点的坐标点 2.case_id 为int 请不要给大于int范围的值。或非int类型的值 即正整数就行 3.area的值不要大于图片本身的宽高 需要用到的jar 通过maven引入(下载的jar较多。需要等待较长时间) <properties> <project.build.sourceEncoding>UTF-8</project.build

Android Computer Vision JavaCV OpenCV FastCV comparison

被刻印的时光 ゝ 提交于 2019-11-29 03:29:32
问题 I am working on school project and part of it should be about current situation about computer vision libraries for Android. I went to it with large enthusiasm because computer vision seems like fascinating subject but I have been searching for more then a week and I did not find much. I would like to be able to provide information about libraries themselves and about comparison between them. I will share what I found so far. OpenCV seems like the most advanced one and the most popular.

JavaCV FFmpegFrameRecorder properties explanation needed

非 Y 不嫁゛ 提交于 2019-11-29 01:38:58
问题 I'm using FFmpegFrameRecorder to get the video input from my webcam and record it into a video file. The problem is that I'm building my application using a few different demo source codes that I found and I use properties some of which are not completely clear to me. First, here is my code snippet : FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(FILENAME, grabber.getImageWidth(),grabber.getImageHeight()); recorder.setVideoCodec(13); recorder.setFormat("mp4"); recorder.setPixelFormat

Javacv: Decoding H.264 “live” stream coming from red5 server on android device

被刻印的时光 ゝ 提交于 2019-11-28 23:56:21
Here is my problem, I have implemented a server side application using Red5, which sends H.264 encoded live stream, on client side the stream is received as byte[] In order to decode it on Android client side i have followed the Javacv-FFmpeg library. The code for decoding is as follows public Frame decodeVideo(byte[] data,long timestamp){ frame.image = null; frame.samples = null; avcodec.av_init_packet(pkt); BytePointer video_data = new BytePointer(data); avcodec.AVCodec codec = avcodec.avcodec_find_decoder(codec_id); video_c = null; video_c = avcodec.avcodec_alloc_context3(codec); video_c

Detect orientation of a recorded video in android

倾然丶 夕夏残阳落幕 提交于 2019-11-28 23:21:38
I want to make my custom media player and requires orientation info of video (for detecting it is recorded from front or back camera). for jpeg images i can use ExifInterface.TAG_ORIENTATION but for video how i can find this information. I tried to grab frame from video file and convert it into jpeg but again it always provides orientation 0 in all cases. Please help me. Thanks in advance. Api level 17 later, we can extract the orientation of video: MediaMetadataRetriever MediaMetadataRetriever m = new MediaMetadataRetriever(); m.setDataSource(path); Bitmap thumbnail = m.getFrameAtTime(); //

How to identify square or rectangle with variable lengths and width by using javacv?

巧了我就是萌 提交于 2019-11-28 18:59:52
I'm developing project using java to identify components using opencv package but I'm new to javacv and I just want to know how to identify rectangles in a particular source image please can some experience person give some basic guide line to archive this task. I try to use template matching on here but it can identify exact size rectangle only. But In my case I need to identify variable length rectangle ? import java.util.Arrays; import static com.googlecode.javacv.cpp.opencv_core.*; import static com.googlecode.javacv.cpp.opencv_imgproc.*; import static com.googlecode.javacv.cpp.opencv

Capturing a single image from my webcam in Java or Python

匆匆过客 提交于 2019-11-28 16:51:05
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 any way, shape or form I do not want to display a live video feed from my webcam on my screen, or save

How to set a mask image for grabCut in OpenCV?

混江龙づ霸主 提交于 2019-11-28 12:38:10
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. Working example in OpenCV: //Fill with the background value Mat mask = cv::Mat::ones(src.size(), CV_8U) * cv::GC_BGD; //Fill a smaller rectangle with the probably-foreground value. Rect area; area.x=10; area.y=10; area.width=250; area.height=250; rectangle(mask, area , cv::Scalar(cv::GC_PR_FGD),-1,8,0); //Fill a smaller rectangle with the

how to convert images into video in android using javacv?

六眼飞鱼酱① 提交于 2019-11-28 06:38:08
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 com.googlecode.javacv.cpp.opencv_core.cvReleaseImage; import static com.googlecode.javacv.cpp.opencv