Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.


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:


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)



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 ^^