The MASM Forum

General => The Laboratory => Topic started by: Farabi on October 27, 2013, 06:28:10 PM

Title: [2D Graphic]Get Nearest Point And Get Contour
Post by: Farabi on October 27, 2013, 06:28:10 PM
Im continuing my experiment on Graphics for robotic from scratch. For now on, Im building the contour detector but only done the retrieving nearest point functions. This function is used when you had no idea which point is connected to another points, the function search for the nearest point and connected to it. The goal for this functions is to detect the contour of an object and determined wheter a moving object is one or multiple. I uploaded the source code.
Title: Re: [2D Graphic]Get Nearest Point
Post by: Farabi on October 27, 2013, 11:47:14 PM
I failed, the performance tests shown that my get nearest point used for detecting contour was very very slows. It wont do any good for realtime processing. Intel done a good job at processing contour on realtime.


28-okt-2013:
Ah get the bug fixed. Im making the get nearest point detector faster up to 600%.
I edited the attachment. It contain a working and optimized Get Nearest Point functions. It is an early stage that are life time learning of robotic visions.
Title: Re: [2D Graphic]Get Nearest Point
Post by: Farabi on October 30, 2013, 06:52:24 PM
Ah the Get Nearest Point is done, and also, I develop another new technique to retrieve the contour. Unfortunately, it ran very slow. I need to do optiimzations everywhereh. I uploaded the source, code. If the final code took more than a second, I will not doing the recognitions of the moving object at realtime.

Also I get an idea of geting the euler angle of an object. It is X=DX/hyp Y=DY/hyp Z=(hyp-(DX+DY))/hyp. First, the software need to calibrate the object to obtain the real length of its boundary in real shape. After I get the actual length value, each time the object moving, I can get the euler angle information based only its 2D positions from the above formula. Theoriticaly, based on the knowledge of my 3D programming, it was right for retrieving the inverse matrix of position to euler angle.
Title: Re: [2D Graphic]Get Nearest Point
Post by: Farabi on October 31, 2013, 10:16:01 PM
I finished the get contour functions. It is slow, very very slow, the more pixel from the detect edge function on the screen the slower the function to process. But it can retrieve the pixel as accurate as one pixel each object. On the test project, press "C" to see how the demo detect how many object on the screen and print the object count.
Title: Re: [2D Graphic]Get Nearest Point And Get Contour
Post by: Farabi on November 06, 2013, 03:04:16 AM
Had a new approach on the Get Contour function, very fast, but not really accurate. Im making a canny line detector using PellesC and compiled it as a dll. Im taking the code from the FAST EDGE Google Code project and add it as an external dynamic library. Next goal is detecting the moving object, get the edges, retrieve the contour and then recognize it. I have no idea on the method how to recognize an object, I only know how to extraxt a straight line or retrieve the corner, nothing more.

Here is my plan. I will detect a contour of an object, and then determine its direction and get the angle, and try to estimate the corner if the edge is cutted. So I can fully reconstruct an object. I hope I can be as a good as the magic tools from the GIMP.
Title: Re: [2D Graphic]Get Nearest Point And Get Contour
Post by: Farabi on November 25, 2013, 05:16:07 AM
Here it is the newest code http://farabidatacenter.url.ph/MainSystem/MainData/SW_Graphic.zip it can detect how many object on the screen based on the contour detected, unfortunately the edge detect funciton is still not really good so I need to filter out how many edges can be considered as an object. I'll look first for optimizing the edge detect before doing everything else, if Im stuck, I guess I'll making an edge contour analysis.