pxtobrx icon indicating copy to clipboard operation
pxtobrx copied to clipboard

refactor the algorithm

Open city41 opened this issue 10 years ago • 0 comments

the algorithm was built in an exploratory way, so the end result is less than ideal.

  • all colors should be in hex, as that is what color-difference operates on.
  • should only calculate rects once per image, and possibly cache them
  • assignColorAndGetPieces is just weird
  • difficult to choose how the algorithm should optimize, currently it is hardcoded for price
  • etc

city41 avatar Jul 12 '15 02:07 city41