Hy
I take two pictures from a webcam and split them into a 9 pieces. Then i match the pieces of the two pictures. The problem is that my webcam have a picture noise. So my programm thinks that in every piece of the second picture have chanced something.
I need a logical push to solve my problem please help.
The pictures from the web cam will never exactly match - even the slightest change in lighting will cause a difference. For this kind of picture matching you have to use a forgiving algorithm that allows at least some change and still makes a match. Create a histogram of each image, then calculating the difference seems to be a promising approach.
See the following threads on SO (just for examples, there are many more threads):
Image comparison - fast algorithm
Image comparison algorithm
Also I would check out Emgu if you are working with .NET, this is a .NET wrapper for openCV, a computer vision library.
Related
I am in need to SIZE small white blobs on a black background, using OpenCV over C#.
Right now, I am starting to use the OpenCvSharp library, but, given that I am early in the development (started two days ago) I wonder if it's the best library for C#, or if you guys would use something else.
The task is to find small pinholes (In the 10/20 micron range, up to 100 micron) in an aluminum foil sample, which is placed in a machine that returns a 1800x1800 pixel picture with the pinholes on a black background.
My problem is simple, but the solution, I think, isn't: How do I "size" the pinhole, using OpenCV?
I know that the size is a clear indicator... But the smallest pinholes 10/15 micron are very difficult to recognize, because they are pretty similar in size (in the image), but vary in brightness.
Any of you guys find this challenge even remotely interesting?
I have a bitmap image like this
My requirement is to create a GUI to load the image and for changing the contrast and other things on the image and algorithm to mark the particular area in silver colour as shown in the fig using C++ or C#.I am new to image processing and through my search I have found out that I can use the Histogram of the image for finding the required area.These are the steps.
Get the histogram
Search for intensity difference
Search for break in the line
Can someone suggest me how can I proceed from here.Can I use Opencv for this or any other efficient methods are available..?
NOTE:
This image have many bright points and the blob algorithm is not successful.
Any other suggestions to retrieve the correct coordinates of the rectangle like object.
Thanks
OpenCV should work.
Convert your input image to greyscale.
adaptiveThreshold converts it to black and white
Feature detection has a whole list of OpenCV feature detectors; choose one depending on the exact feature that you're trying to detect.
E.g. have a look at the Simple Blob Detector which lists the basic steps needed. Your silver rectangle certainly qualifies as "simple blob" (no holes or other hard bits)
If all of your pictures look like that, it seems to me not complicate to segment the silver area and find its centre. Basically you will need to apply these algorithms in the sequence below:
I would suggest binaryze the image using Otsu adaptive threshold algorithm
Apply a labelling (blob) algorithm
If you have some problem with noise you can use an opening filter or median before the blob algorithm
If you end up with only one blob (with the biggest area I guess) use moment algorithm to find its centre of mass. Then you have the X,Y coordinate you are looking for
These algorithms are classical image processing, I guess it wouldn't be hard to find then. In any case, I may have they implemented in C# and I can post here latter in case you think they solve your problem.
May be a research on Directshow, a multi media framework from Microsoft will help you to accomplish your task.
I have an image processing question, using C#.
Say I have some schematic diagrams in BMP format, the diagram contains component shapes which are connected to each other.
I wrote a simple program to detect square shapes in the diagram as one component, and record the location of it. However, the next level is to detect more complicated shapes like a few arcs joined together. Note that these shapes can be different sizes in the image. Does anyone know any good method of doing it? without downloading any library (this is my limitation now).
After detecting the shapes, I also need to record which shape is connected to which, so later on, I can redraw them. I have one week to do this, so thanks a lot for any help!!
I'm using C#.
Have a look at this paper. My understanding of their approach:
Detect edges
Detect corners by looking for perpendicular edges
Detect polygons by looking for groups of corners
Detect circles using Hough transform
This is a fairly difficult research problem. Even with a powerful computer vision library like OpenCV, implementing an effective solution within 1 week would be a demanding task.
Have you taken a look at using EmguCV? It is an open-source C# wrapper of OpenCV. It also has a shape detection sample you might interested in.
To answer an old post I had, I have done what I needed to do in 2 weeks time, it worked well. I actually ended up using different algorithms for different shapes. The algorithms are a bit self inventions, but a good method I want to mention is that get the histogram and then use projection on different axis helped a lot.
Our website allows people to upload images. However, we don't allow watermarked images, yet many do still get uploaded by users. Is there some software/code that can (at least in most cases) catch images that do have watermarks such as logos/images? I'm not sure if there is some sort of a standard.
You can do it via image classification.
Basically, train a CNN(Convolutional neural Network) model by feeding in some images with watermark and some without watermark in it and then use this model to judge the probability of watermark in any new image.
You can apply transfer learning on some existing pre-trained models(as of today inception v3 is the best out there) which can be retrained for your specific classification purpose.
For example this link shows how to do it to identify whether an image is that of a sunflower or a daisy or a rose.
https://www.tensorflow.org/tutorials/image_retraining
Here is a quick 5 minute tutorial about building a tensorflow image classifier: https://youtu.be/QfNvhPx5Px8
To detect any kind of logo on an image would be quite complicated. You would need something similar to face recognition, and a lot of AI...
To make it reasonably efficient you would need a library of logos to look for, and know where they are applied on the images. If the logo is always in the same place, you could just mask out the pixels where it would be, and calculate how close it is to the pixels of the logo. If logos varies in size and position, it gets more complicated.
You can't automatically detect a watermark. The best thing to do is make it real easy for others to report images that have a watermark and once reported, put them in a holding state where they aren't displayed until it's verified they either do or don't have a watermark.
With certain kind of AI it would be possible, at least with certain probability.
More precisely said it IS possible provided that you CAN define what the watermark is,
which is the greatest problem. Generic watermark detection is virtually undetectable,
consider logo at billboard at photo etc.
We have a for fun project which require us to compare two black and white bitmaps of two signature and say whether they are the same persons signature. As this is just two loaded bitmaps rather than data captured from a tablet the approach is going to be a little different to normal signature recognition.
I am thinking it would require the following steps
Crop the bitmaps to just the signature
Try to work out some kind of rotation to align them
Resize to make the cropped / rotated bitmaps the same
Analyse the signature inside (maybe by breaking down into a grid)
Does anyone have any thoughts on this project? How to best do the rotation, comparison etc? Seen anything similar?
You may want to look at:SOMs for interesting pics (:D) as well as an example of how to compare image similarities.
There are two main types of Neural Networks - supervise and unsupervised. SOMs are unsupervised. Depending on your situation, you might want to take a look at supervised Neural Networks NNs are common, and quite straightforward to implement for the most part.