google / ffcc

Fast Fourier Color Constancy: an auto white balance solution with machine learning in Fourier space
https://jonbarron.info/
Apache License 2.0
203 stars 72 forks source link

Updated ops.py with pre-processing funcs #5

Closed mahmoudnafifi closed 4 years ago

mahmoudnafifi commented 4 years ago

Added the implementation for data pre-processing, which includes: computing edge image, splatting feature vector, computing histogram. The added functions are: data_preprocess, featurize_image, compute_chroma_histogram, local_absolute_deviation, splat_non_uniform, edge_kernel, sub2ind

jonbarron commented 4 years ago

Hey it looks like some of the modified code uses a 4-space convention. Please keep everything to a 2-space convention, as this is what is used universally across the code currently (and is also what is used within Google). This will also make it easier to see what has been edited, because currently the diff shows all the 2->4 space changes as a whole line being changed.

mahmoudnafifi commented 4 years ago

Committed with 2-space convention and added test cases from Matlab code to compare with.