unmap
unmap copied to clipboard
Unmap data from a pseudocolor image, with or without knowing the colormap.
Should be able to pass an image file (or URI for one) on the command line. The result should be a CSV file of the data. E.g. unmap --crop 115,72,690,647...
Inline docs have some TODO etc, eg https://github.com/scienxlab/unmap/blob/main/unmap/unmap.py#L252 Could also add defaults and either type hints or explicitly mention in args/returns.
Maybe no need to go full MyPy, but some hints would add to the docs.
Instead of Euclidean distance in RGB, try other metrics, esp CIEDE2000 as used in Poco, Mayhua & Heer (2018). They also use pixel patches around target pixels as a way...
Poco, Mayhua & Heer 2018 use DBSCAN. Seems like it could be slow. Not sure can parameterize it for the general case either (easier for the coloubar only)
Instead of trying to sparsify the graph of colours, possibly this dimensionality reduction step will work. This paper uses Laplacian eigenmaps: https://ieeexplore.ieee.org/document/9395231 (GitHub: https://github.com/yuanlinping/deep_colormap_extraction) They are following the recipe in...