My project requires choosing the right parameters for cv2.adaptiveThreshold(): blockSize and C for many images. The project consists of 21 directories with approximately 100 frames each. Every frame is unique. After the threshold, there should be an image left where the crystals (the white spots) are distinguished from the background (black). This threshold image is then used to find contours.
Right now, I’m manually looking for the right combination of blockSize and C and apply these parameters to all frames of a single set. This requires me to endlessly fiddle with the parameters (for 21 sets of data).
I can imagine this is possible with using gold standards and looking for the best similarity, but it’s time-consuming to draw the gold standards myself.
Is there a way to quickly calculate the right blockSize and C for every single image (or else for one image of every set of images) without making use of gold standard similarity?
See below for one frame to give you a feel of what I’m seeing. To get rid of the vignette, I cropped below image using cv2.selectROI() to only use the middle part for analysis.