I am working on an algorithm to match the centroids of bacteria using computer vision.
As I'm an undergraduate and beginner to computer vision, I do not have code specifically for this problem. Just to provide some background, I'm using the following functions in my GUI.
The 'bact' variable refers to Bacteria objects, which stores each bacteria's ID, position, etc.
def identify_fluor(img, frame: int):
darkBlue = (139, 0, 0)
for bact in fluor_at_frame(frame):
pos = tuple([int(coord) for coord in bact.position[frame]])
img = cv2.circle(img, pos, 5, darkBlue, -1)
return img
def identify_bright(img, frame: int):
darkRed = (0, 0, 139)
for bact in bright_at_frame(frame):
pos = tuple([int(coord) for coord in bact.position[frame]])
img = cv2.circle(img, pos, 5, darkRed, -1)
return img
These centroids are found using the best software available in current image-processing literature. As you can notice, the processing images on the right (bright-field) is significantly underdeveloped and is a significant hurdle and nuisance for bacteriology researchers.
We need these images on the right to be processed because they have a significantly greater sampling rate of images (1 second [Right] vs. 11 seconds [Left]). The fluorescence images (left) accumulate chemical damage when sampled too frequently, losing their florescence.
These are some instances when the images align perfectly:
In these cases, the images on the right are at an intermediate stage before reaching the next aligned image.
Bright-Field Images
Additional Links
Note: This is not homework. I am doing a research project trying to gain information on the temporal dynamics of bacteria. I am trying to achieve a working solution on one of the samples of the images.
Edit #1: For clarification, I am trying to find the centroids of the bacteria on the right using the bacteria on the left.
Edit #2: I am not looking to match the images by applying a linear transformation. A computer vision algorithm is sought.
Edit #3: Additional bright-field images have been added separately for testing purposes.