Sunday, 15 July 2012

Beyond eye-droppers: extracting useful data from images

There are three key elements to images: lines; areas; and gradients. The eye-dropper tool allows extraction of color information, and the clone tool and copying and pasting can be used to extract and use lines, areas and gradients. But most techniques are quite manual. It would be good to have some tools to make it easier.

Capturing lines


The user draws a line over the line they see in the underlying data. These lines can be straight or squiggly. The image program extracts the data from the image to create a line data file. The user can then draw a line (which can be straight or differently squiggly) from that file.

A key feature is that the perpendicular axis to the line is maintained. For example, if in the original image the line is red on the left, green in the middle and blue on the right, then when lines are drawn from the image file the left of the line is red, the middle green and the right blue.

As the line the user wants to draw may be longer than the line captured from the original image, the data would need to wrap around, and be merged into the start.

Capturing areas

The user selects an area from an image. The area can be any shape. A texture file is generated using the copy and flip method to ensure no seams. As the original area is not required to be a square, the gaps must be filled with relevant content.

The user can then draw the area using a brush or fill.


Capturing gradients

The user selects an area from an image and a starting point. The area can be any shape. A gradient file is captured, being the color differential to the starting point of each pixel in the area selected. Any gaps in the area are filled with matching content.

To use the tool, the user selects a starting point and an area, and then applies the gradient. The colors of each pixel are adjusted relative by the gradient overlay.

Auto-extraction

It might be possible to automate these tools with line, area and gradient detection, such that an auto-detect function can be run on an image and a set of line, area and gradient files generated.

No comments: