Re: Little tool to ease the CAD process
hy nico, congratulation on your work
The critical part is to have a GOOD picture
regardless of image, contours are initally defined within a color range : all pixel colors of rgb+-tolerance are to be selected initially
for example, take a picture, and select from it all pixels with color between 220 220 220 .. and 230 230 230
the algorithm will first look for a nice sharp good looking sheet of paper
look for color range
The app will take a .jpg picture
begin with formats that don't loose original colors, like bmp, png; jpg quality varies with it's compresion
I'm working on the recognition of inner holes at the moment
let's supose your orignal image is a blue shape inside a red shape; using color range, you can extract each of the 2 separatley, then later on check if one selection is fully inside the other selection; you can do this at raster level, or at dxf level
checking if the selection is a circle, requies also dealing with pen width, so 1st sugestion is to try images that have 1px pen widht, thus the circle has no width;
otherwise, once the circle has width, then you should be able to detect it's inner and outside boundary, thus you will end up with 2 entities for each circle, and this will lead you to a larger situation, as for each selection for pixels drawned with >1px pen width, you will end up with 2 entitties
I'm still working on it, on the algorithm responsible for the detection so if you have suggestions fell free to contact me
check 1st how other program are working, understand what is doing each one differently, then, if you wish, particulaize it for your self
Of course it is not intended for copy things like gears or parts that need a tight fit with each othe
there are inspection machines, that work on the principle or paralel-light ... they get a accurate image, but the software has no clue that the image was accurate or not, only the creation process makes it so
in other words, if you wish, you could also make your own aporach for gears, etc
please, feel free to ask anything / kindly
Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg