how to Track object from video using c# [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to code a project in which I track a tennis ball across a court after a serve and work out its speed. The user uploads a video of them serving and then the program works it out. Is it possible to track an object within an uploaded video using C#? And is it also possible to identify the lines of the court?

Its 18.29 meters from the baseline to the service line. If we assume a ball speed of 100 mph (slower than in Wimbledon and nowhere near what I see on hobby courts), the ball needs 0.4 seconds from the baseline to the service line (completely disregarding the drop in speed after it is hit by the racket).
If you film with 25fps, you will have a ball on circa 10 single pictures.
Filming from the top, I'd say motion blur will make it almost impossible to correctly track it and approximate the speed.
Filming from behind, thinking about motion blur, the net, the player, the racket... I'd say, it's near impossible.
Try one of these.

Do you know OPEN CV ? http://opencv.org/
I think you can use it with C#

Related

How would I keep track of the Player and AI's positions for a racing game? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Summary:
So, as the question suggests I'm trying to develop a racing game. Although, I need to create a system to keep track of what positions the Player and AI are in. Positions as in first place, second place, third place, etc.
What I've tried:
At first I was going to use a system that was made by Jimmy Vegas in one of his tutorials for developing a racing game, but this system only works with two cars and an enclosed track/circuit. My game is an off road racing game, this means the track is open and the player will be able to make there own shortcuts and no walls will restrict the player's ability to roam the map. This renders Jimmy Vegas's system useless for my type of racing game. I tried to mess around with the code to find a way to still use his system, but I'm afraid it won't work. Any help would be greatly appreciated!
Possible Solution
I won't be writing the code for this as it's too implementation-specific, but here's some checklist pseudo-code.
Use the following to compute relative positions between two players:
Compare first by laps.
If same laps, compare by checkpoints.
If same checkpoints, compare using a distance function to next checkpoint. This function may be as simple as Euclidean distance, but I'd recommend whatever you're using for your AI pathfinding.
If you want absolute positions of all players, make an array, and sort it using laps, then breaking ties with checkpoints, and finally breaking ties with distance.
Even a hundred-entity race running this every frame shouldn't have any problems.

Unity: AI suggestions for "Tiny Wings" like game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm working on game similar to the mobile game "Tiny Wings".
Image of Tiny Wings
Like shown in the image you are supposed to land on the downhill part of a mountain. If you are fast and high enough you can fly past mountains without having to land and slide down. How can I create an AI that knows when to land and when to fly past the hill? (I'm using "AddForce" to push the "bird" down when the player decides he wants to land) Thanks!
This is not a simple problem that can be solved in a single answer.(At least I don't feel this to be the case.) But i can give a couple pointers as to how i would attack this problem. So it could get more complicated than this but this seems like a good place to start.
First I would have a range of optimal angles for landing the bird in the "butter zone"
Second you will have to keep track of the birds rotation/angle in relation to the ground
Third you will have to build a system based on the birds velocity to seek out a "target" landing spot
Fourth you will have to adjust the angle of the bird to be as close to parallel with the landing spot as possible.
Hopefully this will get you started, but this seems like it's going to be a somewhat hefty task. Good luck.

How do I extract 'features' from the FFT data [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have an audio visualiser which currently represents 3RGB LEDs through an Arduino. I send a value for each channel of light and this currently works well.
I change the intensity of each channel based on how bassy the audio is and I cycle from 1 to 360 in Hue and convert HSV to RGB which gets sent to the Arduino.
What is a better way to represent the audio which is more "dynamic" instead of just cycling between 1 and 360
You have a lot of ways to represent audio features, it all depends on what you want.
Beat detection algorithms would be the way to go for what you're trying to do I think How to detect the BPM of a song in php
You also have other algorithms to detect the tunes and other things but I don't think it is suitable here.
Also you can adapt the intensity values so that they aren't linear.
Try to have a logarithmic scale for those values, it will give better results (since the human ear has a "logarithmic perception" if I can say)

Trigger for tower game in C# for wp7 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I was thinking about building a tower defence game and was trying to find the best way
to find the shortest path to the other side.
How can i do this?
I know I need to re evaluate the path on every move due to people adding more towers.
I am thinking I need to use visualtreehelper to find what is in the way.
This might be better asked at https://gamedev.stackexchange.com/
You don't need to re-calculate the path all the time, only when a tower is created or destroyed.
The A* algorithm would be commonly used, there are many samples around. Making your game tile-based would simplify its use, as each tile would be a node, and it's trivial to work out the connections (i.e. up/down/left/right, providing the node isn't blocked).

Multiplayer game: how to sync FPS of different PC? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
i'm wondering how can i "sync" the speed (obviously, to the less fast) of different PC ?
My is a 2d racing game, written in C# + SDL.NET.
How to "move" object on screen at the "same" speed on all PCs sending "state" variable only 3 times per second (for instance) ?
Thanks
This is the friendliest article I've read on the matter. You should look at all the game physics articles from this guy (GafferOnGames)
Fix Your Timestep!
Even an RK4 integrator is sensitive to
the amount of time you step when
integrating. Decouple your physics
timestep from the display framerate so
that your simulation behaves exactly
the same way each time it is run.
...then continue with this one:
What every programmer needs to know
about game networking
A brief overview of the history of PC
multiplayer games. Discover how RTS
games were able to synchronize
thousands of units over a 28k modem,
and how first person shooters hide lag
with client side prediction and
latency compensation.
Hope you'll find it as eye-opening as I did.

Categories

Resources