Open roshameow opened 2 years ago
Hi @roshameow,
Sorry for the late reply, this slipped through the many cracks!
We tend to like knowing how much samples are being processed in my field, that said we could have a utility function to compute them so that they could be passed a bit more easily this way.
Cheers,
Thomas
Hi Thomas,
I see your concern here. Are you talking about a utility function like
def get_sample_by_ratio(height, width, swatches_h, swatches_v, samples_ratio=0.25):
return int(np.sqrt(height*width/(swatches_h*swatches_v))*samples_ratio)
and add flag like "use_sample_ratio" in the parameter dict? I totally agree.
Also much thanks for your work. It did speed up a lot when I was doing a color correction process.
Description
I noticed that in segmentation.py/detect_colour_checkers_segmentation the samples is a passed in parameter. Would it be more natural if we instead pass in the ratio of samples/colorchecker to adapt different checkerboard size?
This line can be modified as following: https://github.com/colour-science/colour-checker-detection/blob/develop/colour_checker_detection/detection/segmentation.py#L1097