help on developing image to drawing robot
in
Programming Questions
•
2 years ago
i am lost after several days of trying to do the following so any help is greatly appreciated.
well im trying to make a program that does two things.
1-the analyse part:
take an image in prespecified dimensions and analyse its grayscales into 4 weights after four threshold intervals like 0-80, 80-130, 130-180 and 180-220.
it will then make a new image with the same dimensions where the pixels chosen from above are plotted in using 4 degrees of grey like 50,100,150 and 200.
this image will be saved in the data directory.
2-the drawing part:
the image made above is taken into a function.
this function chooses a random pixel in the image with the color 50.
it then chooses a random pixel nearby and draws a line to it if this pixel and its nearest neighboors arent the color 250.
the pixel where it draws a line to will gain 50 in its color which will also happen to its nearest neighboors.
this will create a dynamic where the newly created image will function as a guide to the drawn lines so light areas in the original image will gain less lines.
when all the pixels of interest are drawn white the image is finnished and the function will stop looping in void draw().
this should create a drawn interpretation of the original image.
which i will use as guidelines for two stepper motors to control a pen in an x y system. on paper.
any help is greatly appreciated.
1