prothero at earthednet.org
Fri Sep 4 20:10:24 EDT 2015
I think you are going to have to analyze the pixels of the image using the byte values. Look in the sample stacks for image processing code. I am on the road until mid next week and if you haven't gotten started by then I will send you some code that can get you started.
If the rectangle box is arbitrary, you will have to search the image data for the horizontal and vertical lines of the box in the image. There may be other tricks you can do by moving line objects with particular rendering options while checking the adjacent pixels.
But, ideally someone on the list has already solved this problem and can offer finished code.
> On Sep 4, 2015, at 4:04 PM, Peter Reid <preid at reid-it.co.uk> wrote:
> I'm trying to detect and extract a rectangular area of an image. The image is a graph with some parameters that are always contained inside a rectangle. The graph consists of curves and axes in black on a white background. The rectangle is a box consisting of black lines and it contains black text on a white background. I need to extract the box alone so I can run it through an OCR process to convert the key parameters inside the rectangle into text for other purposes.
> Can anyone suggest a method, script or add-on for LiveCode that will help me extract a rectangle from its surrounding image?
> Peter Reid
> Loughborough, UK
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode