Converting image into an array of 2D coordinate points and colors
So, Hello everyone. I am working on a project and need a little help. I have a base code for a machine that can move a pneumatic piston to a coordinate on a 2d plane. It also has functions to be able to select a color (based off a var) and select that color by moving the piston up and down over a pallet and then goes to the coordinates provided in the variable. The machine is coded in C and basically it needs to convert lets say a .jpeg image into this format when it converts i want it to be basically a notepad document with this inside: blue[32,3],red[25,56],yellow[4,7],blue[7,9],red[2,3],yellow[25,56]
And so then the machine would run at x32 and z3 to put down the color blue, clean the brush and then continue on to the next. Also it can create the different colors like purple and such on the side then once it knows it is created the purple, orange, and green functions can be used in the program. That i can code in. If anyone can help that would be great thank you! :)
So, there's a couple of steps here.
First, there is the question of what colors to use. Do you want to posterize the image to a small set of colors and create those, or do you want a pre-defined set of colors and convert the image to just those colors?
Secondly, there is order. From what you say, the machine might benefit from having the colors in order, so it does all the blue, then all the red, then all the green and so forth. That would save having to clean the brush every time, maybe.
Third, what resolution images and what resolution is the machine? Do you need to resize the images, to fit, or are they already the appropriate size?
Last, do you know enough C++ that if you knew the color and coordinate you could print it, or are you a total beginner?
Thank you for responding Tetragramm. I am limited to 8 premixed colors during the entire process. so i would want the primary colors, then depending on the image that i would be converting i would select the next 6.
Yes i do think all blue then al red etc would be best for time (even though it is not a variable in this project) I think that would be best not to have water accidentally spill on the work when it moves from clean to color.
I can get the dimensions of the sheet on Tuesday (currently Sunday when I am posting) I am currently out of town. But once i get the dimensions on what the machine can print on. I would say keep i want to keep the photo at a low resolution for the use of only having 8 colors to be used.
So again i specified ...(more)
And not i am not a beginner in C or C++ i am how ever in OPenCV (which the only reason i am posting is because I thought OpenCV to be an imaging processing open source software) Any help would be greatly appreciated. i Also have access to adobe illustrator for image tracing, and or reducing color amounts and resolution. But i don't know if that would help :)
Pardon my english :)