Image processing up to 50€ as reward
I know this is OpenCV but you can tell me in C++ and i figure it out in C#.
I am willing to pay around 50€ via Paypal if you help me in the inicial code to make a project. I am new in EMGU and it's very hard for me to start.
Squares: https://gyazo.com/f48b1a95aafedde2704...
I need to process squares like this images and determine which one is which (maybe comparing to a known database or if square has color blue,yellow,red than it's square 1).
I am already trying to solve this problem.
This s my Application: https://gyazo.com/5e22e9a489d42266f55...
[code]
frame11.SmoothMedian(3); //Filtro mediana antes da passagem para HSV
frame11_processado_hsv = frame11.Convert<hsv, byte="">(); //Converte a imagem da camera RGB para HSV
frame11_processado = frame11_processado_hsv.InRange(new Hsv(hl.Value, sl.Value, vl.Value), new Hsv(hh.Value, sh.Value, vh.Value)); //utiliza as trackbars HSV para ver a cor pretendida
frame11_processado.SmoothGaussian(11); //Filtro gaussiano na imagem binaria
#region Extracting the Contours
using (MemStorage storage = new MemStorage()) //aloca espaço na memoria
{
for (Contour<Point> contours = frame11_processado.FindContours(Emgu.CV.CvEnum.CHAIN_APPROX_METHOD.CV_CHAIN_APPROX_SIMPLE, Emgu.CV.CvEnum.RETR_TYPE.CV_RETR_LIST, storage); contours != null; contours = contours.HNext)
{
Contour<Point> currentContour = contours.ApproxPoly(contours.Perimeter * 0.015, storage);
if (currentContour.Area > area_contornos.Value)
{
if (currentContour.Total == 4)
{
CvInvoke.cvDrawContours(frame11, contours, new MCvScalar(255), new MCvScalar(255), -1, 3, Emgu.CV.CvEnum.LINE_TYPE.EIGHT_CONNECTED, new Point(0, 0));
frame11.Draw(currentContour.BoundingRectangle, new Bgr(0, 0, 255), 3);
Point[] pontos = currentContour.ToArray();
foreach (Point p in pontos)
{
listbox_contornos.Items.Add(p);
}
}
}
}
}
#endregion[/code]
But if you look the image is very noisy. I will never be able to detect only the squares like this. Maybe I need to improve code? Maybe I need to change the Squares (I can make like bigger outlines or something?Can you share ideas to solve this problem? Like i said i am willing to donate via pyapal (or something else) if you help me. Consider it as a Xmas gift ^^
Try hsv color space (and it's free!)
first of all you need to set some requirements into which your application would work, it is not easy to make an application that it will work under every condition. For example in the first image things are much easier to be solved compared to the second due to the size of the squares, the sharpness of the image, etc... Therefore, you need to specify for example under which distance you would like your app to work, what kind of camera are you using, calibration of the camera(in your second image you have a quite heavy distortion) and other.
Anyway, in addition to what @LBerger suggested check the official squares.cpp example for detecting squares plus another approach here. I hope it helps and it's free as well :-)!
It's a 1280x720 camera. I am using 680x360 images. Maybe i am losing quality there? I will use it always 1.5-2 meters from the squares.
Maybe I need to do improvements on the squares? Like bigger outlines? Should i remove the outline between each color (if you look closely it's separating each color into a new square) or make it bigger? I need at least 4 squares in the camera view.
Which ones are the easiest colors to detect? I think red and purple are the hardest. Maybe 255 green 255 blue and which ones more?
Like i said i am willing to give some money/games as a reward. it's not much but it's a thank you for helping me.
@Geaper upload some more images from use cases that you want your app to process. Me or someone else might find some time to try something and help you :-).
Image
I want to use the drone webcam to look at the squares on the ground and use it as a spacial location. I already have everything on the drone working. I just need to detect very well each square to determine each square to a coordinate in space.
If you look closely each square have 2-3 colors. If i am able to determine how many colors or which color combination a square has I am able to use it as a x,y coordinate in space.
@Geaper the image that you have uploaded above is not useful at all. What I was meaning was an actual image of what the drone sees.