Keep getting the error "AttributeError: 'function' object has no attribute 'find_blobs' "

Guys today i was just testing my cams, it just worked before I added some functions to my code,
after that it kept getting the error as the topic says
here is some of my codes,which is working normally last hour


def detect_blue():
    while True:
        sensor.skip_frames(time=10)
        img = sensor.snapshot
        blobs_blue = img.find_blobs([blue_threshold], pixels_threshold=10, area_threshold=10, merge=True)
            largest_blob_blue = max(blobs_blue, key=lambda b: b.pixels())
            img.draw_rectangle(largest_blob_blue.rect(), color=(0, 255, 0))
            img.draw_cross(largest_blob_blue.cx(), largest_blob_blue.cy(), color=(0, 255, 0))
            img.draw_string(largest_blob_blue.cx(), largest_blob_blue.cy(),"blue", color=(0, 255, 0))
   
            blue_x, blue_y = largest_blob_blue.cx(), largest_blob_blue.cy()
            Max_pixels_blue = largest_blob_blue.pixels()
            if Max_pixels_blue >= min_area_to_break:
        else:
            print("No blue found")
            return -1,-1
img = sensor.snapshot

Is just assinging a variable a function name.

img = sensor.snapshot()

Is calling the function.