I have an objective: I need to join, for example 2 pictures like http://imgur.com/9G0fV and http://imgur.com/69HUg. In the result there has to be and image like http://imgur.com/SCG1X not http://imgur.com/LO4fh.
I'll explain in words: I have some images with the same areas and I need to find the area, crop it in one image and after this join them.
Take a look at this article, it's explains a possible solutions using the C# Aforge.NET image processing library
What you want to do is read the pixel values into arrays,
then find overlapping area using an algorithm like correlation
or min cut.
After finding coordinates of overlap, write out both images into
new array, use coordinates relative to large image minus
position of overlap in that source image plus position in destination image.
C# is not a factor in solving this, unless you meant
to ask about existing .NET frameworks that can help.
I am developing .NET library called SharpStitch (commercial) which can do the job.
It uses feature-based image alignment for general purpose image stitching.
Related
I'm trying to compare an uploaded image with the image stored in my project's root file. I found many related work which is useful to compare images.
This link (https://www.c-sharpcorner.com/uploadfile/krishnasarala/compare-two-images-in-Asp-Net/) describe how to compare images.
I just want to compare with specific part. For example, I have an image in my root directory, the image is about government authorization stamp and signature and I want to check whether the uploaded image has same signature and stamp portion or not.
I value the help.
Mohammad.
You can use Bitmap to crop an image to your preferences. If you cannot access Bitmap with using System.Drawing dependency, follow this answer from another StackOverflow post.
Then you can crop using this algorithm:
int cropWidth, cropHeight;
Bitmap croppedImage = new Bitmap(Image.FromFile("uploaded.jpg"), cropWidth, cropHeight);
Note that crop will not scale the image in any way.
After this, you can use several comparison algorithms that are good, depending on what you find better for your application. I found this post interesting:
Algorithm to compare two images in C#
I suggest you follow this tutorial which uses opencv library to match the shapes. This will help you to find the solution for your requirement.
https://www.youtube.com/watch?v=tNMDWRXwHjo
I am trying to make an application which will do 2 task.
get some object from an image e.g a rectangle which actually a
traffic light.
Find this selected object in training data,training data is actually
bulk of images.
I have searched found an OpenCV library which can be use but how can i start it.How can i detect some specific shape from image and find it in training data with matching probability.
Also is there any algorithm which is auto learning..?
You would need to have stored the coordinates of the rectangle in a CSV file(for example) along with the path to the image. You would then load the image along with the coordinates to get the traffic light as a subimage. This, I think, answers question 1.
You would then feed these subimages, which would be your positive dataset along with some negative data, which could be random portions of the image that don't overlap with the traffic light, into a machine learning algorithm like a HOG SVM. There are some nice tutorials in Python here: http://www.pyimagesearch.com/2014/11/10/histogram-oriented-gradients-object-detection/
This, I think, would lead you to solving question 2.
Does that answer your question? Or have I misinterpreted it?
I need to capture audio data from the computer mic, process it and then plot it in real time. Processing each frame will produce a 1-D array which I want to display in an image where each value in the array is mapped to a color. The next audio frame is processed similarly and is then displayed on the next row of the image and so on. In matlab, one can achieve this using imagesc function. I also want the user to be able to scroll up and down to see current or previous data.
I believe I will need to buffer the processed data in a file or database and then asynchronously update the plot as mentioned above.
I'm trying to achieve all the above using C#.
My question is: what is the best way to generate the image/plot? I've done a lot of research (Microsoft Chart, VTK, several codeproject articles..) but couldn't find exactly what I want.
Also, what would be the best database to use in such case?
I do not think that there is a component that does exactly the things you've described. In most frameworks/bundles all the images get visualized by native system calls (in the end) which accept strides, buffers and so on, driving all by HANDLE. So, either you generate next time new image with new rows or just draw it yourself by stacking prev image to new one.
Scrolling (AKA windowing) is not trivial but possible again with already pre-created image in memory which is fixed. However, please note, that GDI+ based images (.NET Bitmap) is kind of limited for more than 9000px size. Please consider using alternative like IPP, AForge images.
I recommend you draw rows yourself because in your task re-sizing in going to be an issue because of rows bluring.
So, all in all, you might need to do it yourself.
We have a large number of Images taken from a car for a project. To satisfy privacy norms, we need to detect faces & License Plates and then blur those areas. I came to know of the Emgucv project, and the tutorial given at http://www.emgu.com/wiki/index.php/License_Plate_Recognition_in_CSharp has been very useful to detect Licensplates.
Is there a way of blurring this region using Emgu itself?
I don't believe that there is something built-in like what you are looking for.
What you will have to do, like with openCV, is to blur a whole copy of your source image and then copy back the license plate part to the original image.
You can do this using the SmoothBlur method first and then the Copy method that accepts a mask as its second argument.
I have 6 images
Each image is part of a 180 degree (or so) panorama. The images overlap. The task is to write a program in C# that will import the images, determine where the images overlap and merge the images together to form a single image.
Write the program in such a way that the user can import as many images as he or she would like to have merged into one image.
There should be some function in the program that will determine if given 2 images the 2 images overlap and to what amount.
Also, the input images may not necessarily be constructed from a strict linear axis of revolution, and their orientation may not be the same (you will need to consider rotation and both X and Y offsets to the overlap region as part of the program).
This is quite a large project. You might want to take a look at the source code for Hugin for inspiration. Unless you're really set on doing it yourself, you might just want to use (and possibly contribute improvements) to Hugin instead of starting over.
OTOH, Hugin isn't written in C#, so if that's a requirement, you probably will have to start over. Offhand I don't remember if the source to Autopano-SIFT is available, but if so it would be a good start (it already handles one of the most complex parts of the task).