video-processing

How to detect object in a video using SURF and C?

為{幸葍}努か 提交于 2019-12-24 03:27:08
问题 I used a SURF program from a tutorial to detect object in a video frame. but that detects all the key points and descriptors. how i change the program to detect only specific object? CvSeq *imageKeypoints = 0, *imageDescriptors = 0; int i; CvSURFParams params = cvSURFParams(500, 1); cvExtractSURF( image, 0, &imageKeypoints, &imageDescriptors, storage, params ); printf("Image Descriptors: %d\n", imageDescriptors->total); for( i = 0; i < imageKeypoints->total; i++ ) { CvSURFPoint* r =

Breaking a video into frames with python

久未见 提交于 2019-12-24 00:48:23
问题 I am trying to write a program that deletes frames of a video that don't have a particular symbol in them. My general plan: Split the audio from the video Split the video into frames Run the frames through a subroutine that looks for the symbol, by checking the pixels where it should be for being the correct color, and logging the ones that don't. Delete those frames and corresponding audio seconds Splices it all back together. I need some help finding libraries that can do this. I was

Writing data into file: fflush() takes a lot of time

你离开我真会死。 提交于 2019-12-23 18:40:18
问题 I have a requirement wherein I have to buffer a lot of data (in GBs), for future use. Since there isn't enough RAM available for buffering such huge amount of data, I decided to go for storing the data in a file. Now the pitfall here is that while I am writing the data to the file, other threads might need that "buffered" data and so I have to flush the file stream every time I write something to it. Precisely, the data is video frames that I buffer as pre-recorded data (like a TiVo) and

Wanting to live-mirror video in OpenCV on OSX, not sure where to start

爱⌒轻易说出口 提交于 2019-12-23 13:05:08
问题 If it isn't already obvious, this is my first day playing around with OpenCV. What I am hoping to do is mirror frame2, and then upsample it. I am not sure how to use a matrix operation on these frames which are of type IplImage. How could I mirror my frame2, and then upsample it to the Webcam2 window? Below is my code: #include "cv.h" #include "highgui.h" #include <stdio.h> // A Simple Camera Capture Framework int main() { CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY ); if ( !capture ) {

Region of Interest in Video File

一个人想着一个人 提交于 2019-12-23 10:53:08
问题 This is my first time posting here and hoping for a positive result since my research is near its conclusion. I want to add in my code a function that will process only the defined region of interest of a video file. (I can't post image since I don't have yet a reputation but same question is posted here ---> http://answers.opencv.org/question/18619/region-of-interest-in-video-file/) Storyboard: I'm making a program in C++/OpenCV that will make the pedestrians and vehicles look that they are

C# extract frames from part of a video file

巧了我就是萌 提交于 2019-12-23 09:05:23
问题 Using AForge ffmpeg wrapper you can extract frames from a video using the VideoFileReader class and save it as a bitmap. See this for the exemple: Extracting frames of a .avi file My problem with that is that you cannot specified where to start reading the frames. It always starts from the beginning of the video file. But what if i wanted to extract frames that are in the middle of a two hours long video file. Using that class you'd have to parse the whole first hour juste to get to those

How can I detect direction and number of objects using Emgu?

本小妞迷上赌 提交于 2019-12-23 02:28:11
问题 How can I detect direction and number of objects using Emgu? Objects are moving in all directions (2D); and a camera is seeing these objects (on a 2D surface). Object may have little differences in shape but are similar enough. Thanks 回答1: Invoke cvAbsDiff on successive frames (may be on each n -th and (n - gap) -th frame) to detect changes and use thresholding in order to get a changes mask For each frame call cvUpdateMotionHistory and pass obtained mask as an argument To get motion segments

How to determine the distance between upper lip and lower lip by using webcam in Processing?

你说的曾经没有我的故事 提交于 2019-12-23 02:18:25
问题 Where should I start? I can see plenty of face recognition and analysis using Python, Java script but how about Processing ? I want to determine the distance by using 2 points between upper and lower lip at their highest and lowest point via webcam to use it in further project. any help would be appreciated 回答1: If you want to do it in Processing alone you can use Greg Borenstein's OpenCV for Processing library: You can start with the Face Detection example Once you detect a face, you can

opencv - videowriter control bitrate

人盡茶涼 提交于 2019-12-23 01:47:06
问题 I have a working python script that uses the video writer from opencv. source https://gist.github.com/stanchiang/b4e4890160a054a9c1d65f9152172600 If i take in a file, and regardless of whether I simply pass the video frame through to the writer (effectively duplicating the file) or if i try to edit the frame, the file is always larger. I would like for it to be no larger than the original (since if you read my script i'm blurring a lot of stuff). After checking their metadata, with ffprobe -v

FFMPEG Motion Compensation and Search

空扰寡人 提交于 2019-12-23 01:45:19
问题 I'm trying to modify the motion detection part of FFMPEG. What I want to do is to extend the search space, so that whenever the macroblock hit the right most edge of the frame, I need it to still move the block towards the left-most as if they are connected (in my example videos, the right edge is actually a continue of the left edge). Can someone help me to point where exactly I can modify it within FFMPEG source code or x265, or x264? I took H265 as an example from here . It has a motion