Delaunay triangulation - How to prevent twisted mesh? [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 5 years ago.
Improve this question
I've found a good sample of triangulation: High performance version by Salvatore Previti in C# 2.0.
The left side of the mesh is twisted in the following image. Is there some way to prevent it?

Possible duplicate:
So I have found a relatively cheap but imperfect work-around. My super triangle is programmatically determined to surround the sites' bounding box without intersecting its sides. This idea was caused by all sorts of frustrating problems with Java considering some of my calculated circumcenter coordinates or distances between coordinates to be infinite. This caution led me to make my super triangle so small that its vertices sometimes fell in valid triangles' circumcenters. Increasing the size of the super triangle has made the problem seem to disappear. However, it is possible that a triangle on the convex hull can be so obtuse that one of the vertices still could fall inside a valid circumcircle.
[1]Bowyer-Watson algorithm: how to fill "holes" left by removing triangles with super triangle vertices

Related

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.

Image Processing in C# to Count Shapes [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 5 years ago.
Improve this question
Looking to write a piece of software that can take in images like this, and count the number of circular "holes" in the picture. You can see that there are circular holes, as well as non-circular holes. The image is basically a plastic plane consisting of cylinders melted together, and the diamond-ish holes should not be counted.
I am at the point where I can load the image into a C# WPF application, and resize or recenter the image to where I want to work with, but how to count the shadows or circular holes is not something I've been able to find in my research so far.
What I've thought about is having the user place a line on top of the image that crosses the holes, and counting how many times on that line the color drops approaching black, but that seems time consuming.
Any help in solving this problem would be appreciated even if it's referring to a manual or textbook/reference on image processing in this form.
I will not go too much into detail here. What you are attempting to do is a very common problem in image processing. Finding groups of similar pixels and sorting them by shape / size.
https://en.wikipedia.org/wiki/Blob_detection
https://en.wikipedia.org/wiki/Image_segmentation
https://en.wikipedia.org/wiki/Statistical_classification
Will give you a good starting point into this topic.
Basically you separate the image into regions that belong to the plastic and regions that belong to the holes. Then you find connected regions of "hole-pixels". Once you have that you can calculate their area and/or some shape descriptors like circularity to classify your regions.
I suggest you read any book on image processing fundamentals befor you continue. That's very basic knowledge anyone should know befor writing any code...

how to Track object from video using c# [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'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#

is it possible for Canny Edge to measure? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Hi sirs I'm just wondering if is it possible for me to measure the height or width of an object using canny edge?
and if there's other way?
As #BartoszKP correctly stated, there are numerous ways on how to solve your problem. If, however, you want to go ahead and solve it with the help of the Canny edge detection you could do something like this:
Create Canny edge image
Do Hough line detection (here is an example in Emgu) to get geometrical information on where the lines in your image are - they might now represent your clothing article outline in a much more usable way
Use the geometrical information to rule out the non-shoulder lines - normally you should have all the information you need on all the lines (like where they are exactly in the image). That information might just enable you to throw away, let's say, the bottom end of the clothing article.
Use the geometrical information of the remaining lines to calculate your shoulder width or whatever you want to calculate.

What kind of user interaction and visual transforms do I need? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I will apologize in advance if this appears vague. The problem I am having is that I am not certain how to properly articulate what I want to achieve into the correct question. I will try to describe my goal.
This is for a windows 8 tablet app. Imagine a set of rectangles across the top of the screen, much like piano keys. The user will drag a key down a little (I can do this). Then touching the top end of the rectangle they will drag their finger in a circle around it, as they do so the rectangle will fan out into an actual circle. Then when finished they would drag the top around the opposite way closing it. Sort of like one of those Japanese hand fans.
What do I search for or how do I phrase this in such a way that will point me in the right direction.
Thanks in advance, its maddening not being able figure out what I need search for.
My apologies, I should have phrased this question better.
To provide an answer to my query:
Shape manipulation of the type I am describing I believe can be accomplished a couple of ways. One possibility is through the use of animations. The other method (which I am currently pursuing) involves the use of the Polygon shape and the ManipulationDelta event. By utilizing the rotation event it is possible to adjust the points of the shape itself instead of applying the actual rotation.

Categories

Resources