video-processing

What is a fast way to generate and draw video in WPF?

一曲冷凌霜 提交于 2019-11-29 22:36:16
问题 I am writing a video player to play back frames captured by our ASIC. They are in a custom format, and I have been provided with a function that decodes the ASIC states. The video can be any size from 640x480 to 2560x1200 (!!!). The output of each state cycle is a 16x16 blocks of pixels, which I have to get into a video on the screen. Every time the screen needs to be updated, I have the following information: Block width Block height X coordinate of block start Y coordinate of block start A

PHP and FFMPEG - Performing intelligent video conversion

别等时光非礼了梦想. 提交于 2019-11-29 22:34:11
I have an oddly difficult task to perform. I thought it would be easy, but all my efforts have been fruitless. I'm converting videos uploaded to a php script from various formats (.avi, .mpg, .wmv, .mov, etc.) to a single .flv format. The conversion is working great but what I'm having trouble with is the resolution of the videos. This is the command I'm currently running (with PHP vars): ffmpeg -i $original -ab 96k -b 700k -ar 44100 -s 640x480 -acodec mp3 $converted Both $original and $converted contain the full paths to those files. My problem is that this always converts to 640x480 (like I

Use Kalman filter to track the position of an object, but need to know the position of that object as an input of Kalman filter. What is going on?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 21:56:06
I am trying to study how to use Kalman filter in tracking an object (ball) moving in a video sequence by myself so please explain it to me as I am a child. By some algorithms (color analysis, optical flow...), I am able to get a binary image of each video frame in which there is the tracking object ( white pixels) and background (black pixels) -> I know the object size, object centroid, object position -> Just simple draw a bounding box around the object --> Finish. Why do I need to use Kalman filter here? Ok, somebody told me that because I can not detect the object in each video frame

Reverse video in android

最后都变了- 提交于 2019-11-29 17:30:03
问题 I have recorded a video from camera in my app and saved in device storage.Now I want to reverse the video such that it plays from backwards.i.e. if video is of 10 seconds then the last frame at 10th second will become first frame and it starts playing from there to 1st second first frame.I want to save the reversed video in a file.How should i proceed in that? 回答1: If you are prepared to use ffmpeg you can use this approach - it essentially breaks the video into frames and then builds it

How to overlay one video on another in iOS?

你。 提交于 2019-11-29 15:46:19
问题 I am trying to crop an already taken video into a circle in iOS. How might I go about doing this. I know how I would do it with AVCaptureSession but I don't know to pass in an already taken video as an AVCaptureDevice? Is there a way to crop a video into a circle. I want to overlay it on top of another video so it has to have a transparent background as well. Thanks. 回答1: I guess you want to produce something like this: You don't want an AVCaptureSession , because you're not capturing video.

Python scene change detection

╄→гoц情女王★ 提交于 2019-11-29 14:53:38
问题 I am wondering if anyone has any experience with Python and video processing. Essentially, I would like to know if there are any libraries that would allow me to do scene detection in a video? If not, are there any that can allow me to split the video up into a series of frames and let me mess about with the pixels? Thanks! 回答1: OpenCV has Python bindings; I don't think it has any scene boundary algorithms / functions built it, but you can definitely use it to write your own. 回答2: You can use

Reading a video with openCV

ぃ、小莉子 提交于 2019-11-29 13:41:15
I have a video engine2.avi that I want to read and show with openCV. Here's my code: #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace cv; int main(int argc, char** argv) { string filename = "D:\\BMDvideos\\engine2.avi"; VideoCapture capture(filename); Mat frame; if( !capture.isOpened() ) throw "Error when reading steam_avi"; namedWindow("w", 1); for( ; ; ) { capture >> frame; //if(!frame) // break; imshow("w", frame); waitKey(20); // waits to display frame } waitKey(0); } This code doesn't work if my file has the codec YUV 4:2:2 (UYVY)

splitting video into images in matlab

旧时模样 提交于 2019-11-29 13:03:09
I am on a problem. My problem is that I want to split all image frames from an avi video. First of all I used aviread() function it gives me the out of memory error. Then from online help I were using mmreader() and read() function to split image frames, but the problem is read images from read() function could not be showed with imshow() function. I have the following code snippet, function test() A='G:\ims\avi\nh.avi'; B=mmreader(A); ims=read(B,[2000 2200]); figure(1),imshow(ims(1)); end I hoped this code would show the first image frame but it does not. In this code I am free of out of

Getting individual frames using CV_CAP_PROP_POS_FRAMES in cvSetCaptureProperty

眉间皱痕 提交于 2019-11-29 12:57:57
问题 I am trying to jump to a specific frame by setting the CV_CAP_PROP_POS_FRAMES property and then reading the frame like this: cvSetCaptureProperty( input_video, CV_CAP_PROP_POS_FRAMES, current_frame ); frame = cvQueryFrame( input_video ); The problem I am facing is that, OpenCV 2.1 returns the same frame for the 12 consecutive values of current_frame whereas I want to read each individual frame, not just the key frames. Can anyone please tell me what's wrong? I did some research and found out

Writing a video file using H.264 compression in OpenCV

旧城冷巷雨未停 提交于 2019-11-29 12:41:01
问题 How do I write a video using H.264 compression with the VideoWriter class in OpenCV? I basically want to get a video from the webcam and save it after a character is pressed. The ouput video file is huge when using MPEG4 Part 2 compression. 回答1: You can certainly use the VideoWriter class, but you need to use the correct FourCC code that represents the the H264 standard. FourCC stands for Four Character Code, which is an identifier for a video codec, compression format, colour or pixel format