Less outputs?
Less outputs?
I am trying to convert an image (black and white for now) into coordinates (x and y). I am using the command "convert image.png -threshold 50% txt:". Currently, whatever image I convert IM replies with around 640k sets of coordinates (800 in the x axis and 800 in the y axis). I need to send these coordinates to a stepper motor which is only able to make 200 steps. Is there a way of reducing the number of coordinates or at least minimising it? I need the image to be printed afterwards onto A3 sized paper for my project and so do not want to loose any resolution. Any help would be much appreciated.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Less outputs?
Your question isn't clear to me.
If your stepper motor "is only able to make 200 steps" (in each direction?), then that's the resolution available. You "do not want to loose any resolution", but you don't have a choice?
If your stepper motor "is only able to make 200 steps" (in each direction?), then that's the resolution available. You "do not want to loose any resolution", but you don't have a choice?
snibgo's IM pages: im.snibgo.com
Re: Less outputs?
Sorry, I should of been more clear. I each direction my stepper motor is able to move 200 steps as it has a step angle of 1.8 degrees. I want to move the object left and right so the object can move 200 steps left and 200 steps back to the right. Same with it moving upwards and downwards. 200 steps upwards and 200 steps back down from the top. However, IM is giving me 800 coordinates in each direction. So it starts from (0,0) and goes all the way up to (800,800). Is there a way I can reduce the number of coordinates it gives me. To my understanding, it converts each pixel into a coordinate. Is it possible to group pixels so there are less sets of coordinates? I will try to add an image of my results to help illustrate my point.
Re: Less outputs?
Thank you Bonzo. Completely forgot I could do that. Now it works perfectly.