1. 16

  2. 3

    I like totally personal applications of technology like this. Thanks for sharing.

    1. 2

      I wonder if you could simplify it by having a user manually select the region to analyze. It would take a bit of manual intervention, but then you wouldn’t have to worry about detecting the hoop or eliminating the border.

      1. 1

        I love this idea.

        The origin of the “find the hoop area” thing was that I was going to run it on a ton of images for analysis.

      2. 2

        I don’t account for lighting conditions (how would you do this?)

        Could you use the distribution of DMC colours in colour space as a “fingerprint”, and try to match the distribution of colours found in the image to it?

        I would assume that lighting conditions can be approximated as a relatively simple transformation of the points in colour space. For example, a warm yellowish light will proportionally increase the yellow component of a colour (e.g. blue remains unchanged or is just slightly darker, orange is skewed to look yellower, yellow stays yellow). Based on this assumption, could you extract your set of points in colour space from your image, then apply a range of different transformations to them, measure how closely each transformed data set matches the DMC colours, and pick the closest match. There’s probably a proper name for this sort of thing. Once you have the best match, you can deduce the lighting conditions from the chosen transform, although to be honest, you were never really interested in the lighting conditions.

        I think the key to whether anything like this works will be how evenly spread out the DMC colours are in colour space, and whether there are enough unique colours in a specific embroidery piece to form a useful pattern.

        Edit: Also, have you tried testing your analysis on images like this (a photograph of many different coloured skeins of DMC thread), or on photos of embroidery where the DMC threads used are known?

        1. 2

          I haven’t tested it on a photograph of many skeins (good idea!) — but I tested it on most of the embroidery around the house (where we know the DMC id) and it was hit and miss. A usual result would be to have a few colours correct and then a few close by (if we ignore the background result).