Calibrate the color of images using a color calibration card on the same photo.
The approach is semi-automatic. After picking the edges (A, B, C, D---always starting with the black outer edge and then moving to white, turquoise and blue for the SyderChecker24) of the color calibration card, the rest should happen automatically.
RGB values copied from a Github repo and not verified so far.
Open source implementation of Color calibration of digital images for agriculture and other applications to be used directly in ELN.
The code can deal with moderate tilt and rotation of the card (as shown in the example image). Rotation should be much more robust than tilt, hence please try to shoot your images such that the plane of the camera and the card are parallel to each other.
$ npm i colorcal
import library from 'colorcal';
const result = library(args);
// result is ...