Jump to content

Detecting text


Xentradi
 Share

Recommended Posts

I tried searching for an answer I found a lot about imagesearch.au3 and the such but I wasn't able to find a download for it, and I'm not totally convinced it would work for what I'm trying to do.

 

Background:

I use a software called EasyStone at work for generating machine files for engraving on my CNC machine. After drawing what needs to be engraved I then need to tool the file. Unfortunately to ensure accuracy and consistency of the engraving I need to engrave line by line rather than as a whole part.  Not really a problem but it is time consuming and I have to do approximately 1900 parts. Suffice to say doing even a few of these is incredibly boring and tedious. 

I've already written a script that will draw all 1900 parts for me and another to generate shop drawings saving a significant amount of time which leaves me with what I feel should be the last piece of the puzzle, so far as computer work is concerned.

I've attached a screenshot of what I'm working with.

Goal: To select groups of 8 objects of text using AutoIT assigning a tool to those 8 objects and then repeating on the next group of 8 till all 4 groups have been tooled. 

Problem: I can select ALL the text at once, but this won't do, tooling must be done for a maximum of 4 lines per tool path.

Details that might help:

  • EasyStone has the ability to select by color, type (line or text)
  • Each bit of text is its own object and they are not connected, whole words are treated as a single object.
  • I'll eventually have to select the triangles at some point as well, should be doable with what ever I use to find the text though.

What I've tried:

  • PixelSearch (for the text) - Only returned the coordinate of the first matching pixel. Managed to select the first text object
  • PixelSearch (for the blue lines) - Again only returned the first match. Managed to select 4 text objects around the line. Failed to select in some cases due to letters being in different locations based on what the text is.
  • Modifying the drawing so that each text object was a different color - Didn't work at all it changed colors in columns rather than rows due to how EasyStone components work.

Next actions:

  • Looping pixelsearch for the blue line modifying the Y values to start lower on each loop
  • Pixelsearch within coordinates around the blue line to find the text in case it moves.

What I'd like to know:

Is there an easier way to be looking for things like this or am I limited to pixelsearch?

 

Hope this all makes sense and I don't sound like an idiot I'm crazy. 

Capture.JPG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...