It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am suppose to detect if there is a head tilt in photos. These photos are identity card size photos or passport size photos. If a head tilt is detected, then I need to correct / rectify the tilt error by rotating the image clockwise or anticlockwise.
I want to know if there is any open source library or dll that can be used in the project that will help me detect face & facial features like eyes and ears.
The detection must be done on the fly as there will be a 1000's of images opened from a directory.
I've gone through http://www.codeproject.com/Articles/462527/Camera-Face-Detection-in-Csharp-Using-Emgu-CV-Open tutorial, but did not solve my problem. Also I've gone through EmguCV's eg. Example.FaceDetection.exe in the bin folder, but it does not detect the face. I tried loading other images as well, but still the same & no highlighting of face or facial features.
Use a library for face detection, look at the height of the eyes and establish the tilt of the face. If the angle is within +/-5 degrees of horizontal, apply the rotation to the image by drawing the image to a new new image with a rotation.
Face detection in C# example (easily converted to VB.NET) http://www.codeproject.com/Articles/462527/Camera-Face-Detection-in-Csharp-Using-Emgu-CV-Open
Note: it is assumed that you have pictures of people looking straight into the camera, such as passport photos, that you want to straighten. For a photo where a person is looking slightly sideways, the angle of the camera will make the eyes be non level even if the persons head is not tilted.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Could someone please give me some direction on how to spawn enemies in a circle (XNA Programming)?
I want the enemies to randomly spawn along the circumference of a circle that is just outside the bounds of the window. I want them to move in straight lines through the center of the window and out to the opposite side of where they started (or as close to that as possible).
Ideally this would create an environment where enemies are randomly coming across from seemingly all directions. Any help would be appreciated.
Just generate a random number between 0 and 360 (or 0 and 2π if it uses radians), and use trigonometry based on the radius of the circle you want.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm looking to create a simple voxel engine in C#. I know a lot of XNA but heard it would be better to do it in OpenGL / DirectX. Anybody know how I would accomplish such a thing? I do not want a library as I want to learn how to do it from scratch.
OpenGL and Direct3D are both "triangle" APIs - they aren't volumetric renderers. We need more information about what you want your voxel engine to do.
If you want to render voxels directly, then your best bet is to avoid OpenGL and Direct3D and write your own OpenCL or CUDA renderer (or even be 100% software on the CPU).
Rendering voxels to OpenGL or Direct3D would require converting the voxel world to triangles - using something like marching cubes. This technique can be efficient if the voxel world is fairly static and the voxels are large (like Minecraft). However this technique wouldn't work in massively-deformable worlds, for example, as you'd have to re-generate the triangle scene on a regular basis, which will be expensive.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I would like to write a program which captures motion using a Kinect and then saves the path of motion and then converts the image created into text.
I am not sure if OCR will be the best way to do it as in all probability the quality of the image will be quite low.
Is there some system anyone could suggest. Also any tips on how to achieve it. Cheers
edit:
Windows Journal does pretty much exactly what I want.
You need a sensor like Kinect and use its APIs to capture the motion. This is very specific to the sensor and motion capturing technology. I don't think you can write a motion capturing technology without third party API using C#.
I fail to see the advantage that the Kinect can give you here.
You have to define first what kind of input this system will have: Will it be the RGB image of a character for example or something more complicated like tracked hand position through time?
If you want to use the Kinect for its depth map, then what you are trying to do seems more like gesture recognition (and mapping of each gesture to a character) to me rather than OCR.
Edit for the gesture recognition way:
I haven't implemented anything myself on that, so I can not really give you clear directions or proposals. There exist a couple of papers on the subject (google scholar search) that take advantage of the available depth info rather than working with 2D images. I would guess that the DIY way would be to get as many training samples as possible for each gesture, train your classifier (wikipedia on supervised learning) and then test your new samples.
If you don't feel so adventurous, you could start by testing some code samples that exist:
The hand tracking sample from OpenNI -you can see an example here, I think it recognizes some gestures too- .
Candescent NUI "Hand and finger tracking with Kinect depth data", I don't think it includes any recognition, but maybe it can help you get better data.
The Kinect for Windows Developer Kit could contain something useful, but to tell you the truth I haven't checked it out.
I can see the gesture recognition approach being very tricky though. There has to be a significant variation between the gestures, otherwise, taking into acount the Kinect low resolution and noise issues, even if you get a very large number of training samples, it could still fail. Imagine writing 'i' or 'l' for example. Or the difference between 'o' and 'a' (depending on your handwriting of course). The scale is so small and the moving of hands so trivial that I don't know if a classifier -even a powerful one- could catch that kind of variations.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I made the camera position 10 units from an object, but not behind it. I dont want the camera position behind the object right away when it rotates, I want that when I will rotate the object, the camera position will move slowly until it will be behind the object.
Check out the Camera Sample in XNA App Hub: http://create.msdn.com/en-US/education/catalog/sample/chasecamera
It basically does what you describe: it's a chase camera that lags behind the object and follows it using a "spring like" behavior.
From the overview: "The motion of both the ship and the camera are governed by simple physics. When the ship speeds away, the camera pulls back. When the ship turns, the camera lags behind in the turn to show a partial profile view of the ship. When the ship stops moving, the camera gradually slides back into place"
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'm trying to create a car game in C#. I'm now trying to figure out a way to get some sounds into the game. For example, the acceleration sound of the car.
I recently tried to add a 5 second-sound of a real car accelerating, but I don't think its the right way to do it. Because then i have to start from the beginning all the time of the clip when i accelerate.
Is there maybe some way to work with frequencies? To send a frequency to the speakers and then just increase it when I accelerate (And to make it sound like a car)
I've heard about PWM, could that be something?
One way to approach this might be to mix some sounds together...
For example, if you had a series of sounds such as:
Car Idling
Car accelerating from 1st to 2nd, gear, etc
Sound of the car downshifting / engine braking
Sound of the car in each gear
You could just play different sounds at different times and cross-fade between them. Perhaps you could even do some pitch adjustment during playback to correspond to the throttle.
I'm not sure how the pros do it (Grand Theft Auto, Grand Turismo), but that's the first thing that comes to mind.
When I need audio in my C# projects I always try to use NAudio.
NAudio Algorithm to play a sinewave whose frequency can be changed smoothly in real time (there's a link to an algorithm the author wrote in the body of the question)
http://mark-dot-net.blogspot.com/2009/10/playback-of-sine-wave-in-naudio.html