def METHOD_NAME(self, dice_img):
    # Setup SimpleBlobDetector parameters.
    params = cv2.SimpleBlobDetector_Params()
    params.filterByColor = 1
    params.blobColor = 0  # 0 to pick dark blobs , 255 to pick white blobs
    params.minDistBetweenBlobs = 0
    # Change thresholds
    params.minThreshold = 0
    params.maxThreshold = 255
    # The idea is that, we want to check all thresholds to take care of varied lighting conditions
    # Filter by Area.
    params.filterByArea = True
    params.minArea = (
        25  # in pixels , 10 to pick up from far away , but also picks up noise
    )
    # 25 is an ideal amount
    params.maxArea = 200000  # max are in pixels
    # Filter by Circularity
    params.filterByCircularity = True
    params.minCircularity = 0.70
    # Filter by Convexity
    params.filterByConvexity = True
    params.minConvexity = 0.8  # 1 = perfect convex hull
    # Filter by Inertia
    params.filterByInertia = True
    params.minInertiaRatio = 0.4  # Defines the ellipsoid 1= detects only cirlces
    # 0 = Detects even lines
    # Create a detector with the parameters
    ver = (cv2.__version__).split(".")
    if int(ver[0]) < 3:
        detector = cv2.SimpleBlobDetector(params)
    else:
        detector = cv2.SimpleBlobDetector_create(params)
    # im_c = Colored image
    im_c = dice_img
    d = {}
    # im = GrayScale Image
    im = cv2.cvtColor(im_c, cv2.COLOR_BGR2GRAY)
    # Has the value of all blobs within the image
    keypoints = detector.METHOD_NAME(im)
    # For Visualization purposes
    # Draw detected blobs as red circles
    im_with_keypoints = cv2.drawKeypoints(
        im_c,
        keypoints,
        np.array([]),
        (0, 0, 255),
        cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS,
    )
    # Debug to print all blobs detected
    key_len = len(keypoints)
    # print(keypoints)
    # Neighborhood search algorithm
    """
    Looks at every point in the keypoints array and finds the nearest point to it
    Within a Threshold, set by Global Var 'DIST_THRESHOLD' . Then looks for other points
    within 'SEARCH_RANGE_FOR_PIPS' times the 'DIST_THRESHOLD' .Basically within a circle of
    radius twice the size of the nearest pip.
    """
    for i in range(0, key_len):
        a = keypoints[i].pt
        dist = SENTINEL_INFINITE
        count = 0
        for j in range(i + 1, key_len):
            b = keypoints[j].pt
            dist_itr = distance.euclidean(a, b)
            if dist_itr <= dist and dist_itr < DIST_THRESHOLD:
                dist = dist_itr
        for j in range(0, key_len):
            b = keypoints[j].pt
            dist_itr = distance.euclidean(a, b)
            if dist_itr <= SEARCH_RANGE_FOR_PIPS * dist:
                count = count + 1
        if dist == SENTINEL_INFINITE:
            count = 1
        if count > 4:
            # Debug Statement
            # Prints all points which correspond to dice of value 4 or more
            print(str(i) + " th detection is " + str(count))  # Debug
            d[str(count)] = [keypoints[i].pt[0], keypoints[i].pt[1]]
            font_face = cv2.FONT_HERSHEY_SIMPLEX
            cv2.putText(
                im_with_keypoints,
                (
                    str(int(keypoints[i].pt[0]))
                    + ", "
                    + str(int(keypoints[i].pt[1]))
                ),
                (int(keypoints[i].pt[0]), int(keypoints[i].pt[1])),
                font_face,
                1,
                (255, 255, 255),
                1,
                cv2.LINE_AA,
            )
    # im_with_keypoints now displays image, keypoints and x, y values displayed as text
    return d, im_with_keypoints, im_c