There are tools like digital caliper, linear encoders that measures lengths. the are basically rulers and they use magnetic strips. they simply count magnetic stripes and calculated the distance.
I want to make it optical by using webcam instead of using magnetic stripes.
Imagine a ruler with webcam pointed on it. dont think about numbers or anything. just imagine ruler with vertical lines. webcam placed to this ruler very closely and image is very clear.
as webcam moves, vertical lines will travel across video.
what I want to do is count these lines at the center of the video so I can calculate how far we go.
I googled every word I can think of to find a stating point I had no luck.
any suggestions please ? I need to use windows platform for this project. c# or vbnet are wellcome.
best...
Try this; it's not been updated in a while but the concepts are all there.
http://reprap.org/wiki/CamRap
Related
We're developing system of getting combined image from camera, which being moved by step motors to make pictures of the whole area. The problem is that when we combine separate frames, the edges are not accurate because of step motors discretization. So we came up with idea to make frames with little overlap, so we can put them over each other to get continual image with no blanks. We're using c# + LeadTools. So I'm wondering is there any option in Lead Tools (or maybe some other sdk) to detect areas, which are equal on both images, so we can stitch them correctly? Thanks in advance.
I'm trying to get the cover image of a DVD as a rectangular image from a photo. Now as the cover on the photo is usually a bit skewed I need to rectify it programmatically.
I've already removed most of the surroundings using the Laplacian of Gauss filter, but now I need to find the borders of the cover and somehow fill the whole frame with the coverimage.
I thought of using the Hough-Transformation, but this seems to be pretty brute-force for linking edges. I want to run this on a Windows RT Device (Surface), so a low-level idea for C# would be great. Any ideas?
You should look into OpenCV and the image segmentation parts. After that you can perform a skew / shear transformation on the 2D image.
I'd like to apply various modifications to every frame in a video, for instance make every pixel in the first 100 pixels wide black for the length of the frame.
It's actually just for a bit of fun i.e. spoofing some newsreaders back ground pictures with company staff "stories".
Ive looked into FFMPeg just briefly but I'm wondering if there is anything more straight forward considering the nature of the project (I dont want to burn too much time on it).
I literally just want to overwrite patches of screen for x number of frames.
Take a look at this. http://directshownet.sourceforge.net/
there should be a sample where they draw a spider on the video
I'm working on a project where I need to take a single horizontal or vertical pixel row (or column, I guess) from each frame of a supplied video file and create an image out of it, basically appending the pixel row onto the image throughout the video. The video file I plan to supply isn't a regular video, it's actually just a capture of a panning camera from a video game (Halo: Reach) looking straight down (or as far as the game will let me, which is -85.5°). I'll look down, pan the camera forward over the landscape very slowly, then take a single pixel row from each frame the captured video file (30fps) and compile the rows into an image that will effectively (hopefully) reconstruct the landscape into a single image.
I thought about doing this the quick and dirty way, using a AxWindowsMediaPlayer control and locking the form so that it couldn't be moved or resized, then just using a Graphics object to capture the screen, but that wouldn't be fast enough, there would be way too many problems, I need direct access to the frames.
I've heard about FFLib, and DirectShow.NET, I actually just installed the Windows SDK but haven't had a chance to mess with and of the DirectX stuff yet (I remember it being very confusing for me a while back when I messed with it). Hopefully someone can give me a pointer in the right direction.
If anyone has any information they think might help, I'd be super grateful for it. Thank you!
You could use a video rendered in renderless mode (E.g. VMR9, EVR), which allows you to process every frame yourself. By using frame stepping playback you can step one frame each time and process the frame.
DirectShow.NET can help you to use managed code where possible, and I can recommend it. It is however only a wrapper to DirectShow, so it might be worthwhile to look for more advanced libraries as well.
A few sidenotes: wouldn't you experience issues with lighting which differs from angle to angle? Perhaps it's easier to capture some screenshots and use existing stitching algorithms?
I want to recognize handwriting shape and figure out which shape it probably is in the set. Simply saying, if I draw a triangle, the application should recognize it as an triangle.
How can I do this using C# or java, any help is appreciated.
Thanks in advance.
These are some of the shapes I need to identify
You can try to use OpenCV for that. EmguCV is a good wrapper to OpenCV for .net. Watch for ShapeDetection demo (included in OpenCV)
If you want to "roll your own" I would suggest the following steps:
First, skeletonize (thin out the image till all the lines are one pixel thick). There are many ways to do this, and it is a well studied problem. Google for more information.
Now, starting at a black pixel, go through and trace out the outline of the image, one pixel at a time. You add each of these segments to a list of segments outlining the shape (each segment will be a simple line from one pixel to its adjacent pixel). Now you have the outline of your shape as a many-sided polygon.
(Possible step at this point: smooth the outline by pulling each vertex closer to the average of its neighbors)
Now, you use a corner detection algorithm to find the corners (take a look here:http://visual.ipan.sztaki.hu/corner/node7.html).
This should be enough to identify the shapes you have listed.
If you want to get smarter, you can also identify the types of edges that exist between corners. If the segment between two corners stays within some threshold of the straight line between them, you treat it as a "straight line" edge. If it doesn't, you treat it as a curving edge.
With corners +straight/curving edge, you probably could detect any of the shapes you are looking for pretty well.
I'd suggest using a neural network.
You could teach it what the shapes look like.
This is one library for example:
Neural Networks on C#
If you are looking for particular shapes inside a larger image then OpenCV is a great alternative. Emgu.CV is a good .Net wrapper for it. See my picture of a SURF implementation for this. Also see other options in OpenCV, it has plenty to offer. Note that this approach requires a lot of processing power.
If you can easily identify the shape you want as a BLOB (that is, give the algorithm a picture of only this shape) you can do a search for "ANN OCR" ("Artificial Neural Networks" and "Optical Character Recognition"). Many (most?) ANN-implementations come with sample code for feeding it shapes (letters) and recognizing closest shape (hand written letters). For example Neural Network OCR. I believe this approach would solve your problem. (Sidenote: I've encountered and tested numerous libs that can do this. It's Neural Networks 101.)
If you need BLOB algorithms for the ANN-OCR OpenCV can provide this.
Both these approaches are farily easy to implement.
There is indeed a vast tree of research in shape recognition.
If your shapes are indeed some what predictable and are basic geometry,
the most straightforward way is to find the edges and apply hough transform.
Some managable reading materials for you to start with,
[1] Google Scholar for Hough Transform Shape Detection
http://scholar.google.com/scholar?q=hough+transform+shape+recognition&hl=en&as_sdt=0&as_vis=1&oi=scholart
[2] Hough Transform # Wiki http://en.wikipedia.org/wiki/Hough_transform