There should be a class that represents the sampling map of coordinates for a shape that can be applied to an image and return the pixels from the shape. The example here would be a dashed ring.
Then the object that gets returned would be used to retrieve either the RGB, color names or brightness values.
That would then be passed to something that is aware of the existing product sequences and see if it exists. The best way to do this I think would be to check against every entry in the product map and determine which is the most likely. If all sequences are below a ceratin threshold of certainty, maybe 75%, then an exception would get thrown, otherwise the most likely would get returned.
The product would then be passed to an object that understands the checkout URL creation.
All of the image preprocessing should happen client side.
There should be a class that represents the sampling map of coordinates for a shape that can be applied to an image and return the pixels from the shape. The example here would be a dashed ring.
Then the object that gets returned would be used to retrieve either the RGB, color names or brightness values.
That would then be passed to something that is aware of the existing product sequences and see if it exists. The best way to do this I think would be to check against every entry in the product map and determine which is the most likely. If all sequences are below a ceratin threshold of certainty, maybe 75%, then an exception would get thrown, otherwise the most likely would get returned.
The product would then be passed to an object that understands the checkout URL creation.
All of the image preprocessing should happen client side.