Using DTW to align video sequences - python

I'm working on a project where I have to match one video sequence with the other. The actions and motions of the two videos are similar, since the video that I'm matching with is doing the exact same movement as the other one. And currently, I'm leaning towards using dynamic time warping(DTW) to align those two videos, but I have some trouble coming up with an idea to do so. So I'm wondering if you guys have any source code that I can work with or any ideas on how to dissect this problem. Thank you

a starting point would be to understand DTW https://www.cs.unm.edu/~mueen/DTW.pdf

Related

How to properly process 3D Point Cloud data in python?

I am new to this forum, so this will be my first question ever (by having used the forum for several years now :D).
What's my Problem:
I am working in a Company now, where we want to automate processes like finding lowest and/or highest points/lines in classified 3d point cloud data (such as walls, roofs, ...). So I have a classified point cloud where I don't want to draw the lines myself of the lowest and highest points of walls or roofs or anythin, but figure out how python could do the job for me instead!
What I'd like to know:
To start, I'd like to know what is the best and proper way to process point cloud data using python? I came up with several ideas by simply google searching (such as laspy, open3d, ...) but I am very confused, which one might be the library I'd need for my mission or where I should really start to put effort in learning to deal with a certain package..
So, I am grateful for your answers and suggestions (maybe there exists a similar entry which I haven't found already?).
Thanks
Max
You might want to check out the Open3D Tutorials found here.
There isn't one that does exactly what you're looking for, but pretty dam close (IMO).
I'm not interested in doing what you're doing, but if I was this is where I'd figure it out.

Breaking Down 3D models up to lines and curves

I'm working on a project to breakdown 3D models but I'm quite lost. I hope you can help me.
I'm getting a 3D model from Autodesk BIM and the format could be native or generic CAD formats (.stp, .igs, .x_t, .stl). Then, I need to "measure" somehow the maximum dimensions to model a raw material body, it will always have the shape of a huge panel. Once I get both bodies, I will get the difference to extract the solids I need to analyze; and, on each of these bodies, I need to extract the faces, and then the lines or curves of each face.
This sounds something really easy to do on a CAD software, but the idea is to automate this process. I was looking into openSCAD, but seems that works only to model geometry and it doesn't handle well imported solids. I'm leaving a picture with the idea of what I need to do in the link below.
So, Any idea how can I do this? which langue and library can help in this project?
I can see this automation possible with a few in between steps:
OpenSCAD can handle differences well, so your "Extract Bodies" seems plausible
1.5 Before going further, you'll have to explain how you "filtered out" the cylinder. Will you do this manually? If you don't, you will have it considered for analysis and have a lot of faces as a result.
I don't think openSCAD provides you a vertex array. However, it can save to .STL, which is kinda easy to parse with the programming language of your choice, you'll have to study .stl file structure a bit (this sounds much more frightening than it is - if you open an stl with an editor you will probably immediately realize what's happening).
Since you've parsed the file, you can now calculate lines with high school math.
This is not an easy, GUI way to do what you ask, but if you have a few skills you'll have your automation, and depending on the amount of your projects it may be worth it.
I have been working in this project, and foundt the library "trimesh" is better to solve this concern. Give it a shot, and save some time.

Detecting a noise in an audio stream

My goal is to be able to detect a specific noise that comes through the speakers of a PC using Python. That means the following, in pseudo code:
Sound is being played out of the speakers, by applications such as games for example,
ny "audio to detect" sound happens, and I want to detect that, and take an action
The specific sound I want to detect can be found here.
If I break that down, i believe I need two things:
A way to sample the audio that is being streamed to an audio device
I actually have this bit working -- with the code found here : https://gist.github.com/renegadeandy/8424327f471f52a1b656bfb1c4ddf3e8 -- it is based off of sounddevice example plot - which I combine with an audio loopback device. This allows my code, to receive a callback with data that is played to the speakers.
A way to compare each sample with my "audio to detect" sound file.
The detection does not need to be exact - it just needs to be close. For example there will be lots of other noises happening at the same time, so its more being able to detect the footprint of the "audio to detect" within the audio stream of a variety of sounds.
Having investigated this, I found technologies mentioned in this post on SO and also this interesting article on Chromaprint. The Chromaprint article uses fpcalc to generate fingerprints, but because my "audio to detect" is around 1 - 2 seconds, fpcalc can't generate the fingerprint. I need something which works across smaller timespaces.
Can somebody help me with the problem #2 as detailed above?
How should I attempt this comparison (ideally with a little example), based upon my sampling using sounddevice in the audio_callback function.
Many thanks in advance.

How to recognize predefined gesture from feature points

I'm working on a hand gesture recognition project. Till now I'm able to detect the centre of the hand and able to track the hand for some consecutive frames and I'm able to get a list of points Like
1
2
Now I want to recognize the path as a gesture like for #1 RIGHT for #2 CIRCLE
How should I do it ? and It should include a method to add other gestures to . Can I use SVM for this purpose? I feel it can be done by using FSM but I can't get how to implement it . I'm using Python and Opencv . Thanx in Advance!
There are various ways to approach this, but I believe that the easiest is to use a template matching approach.
For each gesture, have a sample that you compare to, and the result is simply the one most resembling the current sample.
For the comparison between a sample and a template, a good and simple to implement algorithm is the Dynamic Time Warping (DTW)
https://en.wikipedia.org/wiki/Dynamic_time_warping

Object extraction from Images with python

I want to object extraction from Images. for example i want to count of human in a picture or find similar picture in great data base(like google example) or finding field of picture (Nature of Office or Home) and etc.
did you know any python library or module for do this work.
If you can link me
tutrial or instruction to this work
similar example project
Perhaps using simplecv?
Here is a video of a presenter at pycon who runs through a quick tutorial of how to use simplecv. About half-way through, at 9:50, she demonstrates how to detect faces in an image, which you might be able to use for your project.
Try this out: https://github.com/CMU-Perceptual-Computing-Lab/openpose
I used it to detect multiple persons and extract the skeleton joints. It's also a little sensitive, so post-processing needs to be done to remove outliers caused due to reflections on the floor, glass walls, etc.

Categories

Resources