Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need help compensating for the shifting of images when trying to create a grid with one image and apply it on another

I have two images of yeast plates:

Permissive:

alt text

Xgal:

alt text

The to images should be in the same spot and roughly the same size. I am trying to use one of the images to generate a grid and then apply that grid to the other image. The grid is made by looking at the colonies on permissive plate, the plate should have 1536 colonies on it. The problem is that the camera that was used to take the images moves a bit up and down and the images can also be shifted slightly due to the other plate not being in exactly the same place.

This then means that when I use the permissive plate to generate the grid on the xgal plate the grid shifts. Does anyone know a way in which I can compensate for this? I am using perl with the gd module. Any advice would be greatly appreciated. Thank you

like image 798
Alos Avatar asked Jul 22 '10 20:07

Alos


People also ask

How do I turn one photo into a grid?

PhotoSplit is the most popular app to split your photos to the grid and post them directly to Instagram. PhotoSplit lets you slice any photo into a 1x2, 1x3, 2x3, 3x3 & 4x3 grid while keeping it in high resolution. It then quickly lets you post the split images to Instagram to show it as one big photo on your profile.

How do you split pictures on photo grid?

To do this, tap the grid icon at the bottom right of the image you're uploading. From the pop-up menu, choose which format you'd like the posts split into. Then tap Split at the bottom of the screen. If the split preview looks okay, tap Upload to add the image (now multiple posts) to your account.

How to shift the image using canvasshift?

For other shifting, use different parameters. For example to shift the image 100 pixels to the right and 20 pixels up, you use canvasshift (c, 100, -20), to move 15px left and 20px down, canvasshift (c, 15, 20) and so on… If the loading part is annoying to you, you can also use the load method of the script:

What is image shifting?

Image shifting is simply shifting each pixel of the image to a new position. This is a method of pixel shift used in digital cameras to produce super-resolution images. We can think of a pixel as a point in the coordinate axis to be shifted in any direction. When we implement this on all the pixels of the image then we can say the image is shifted.

What is pixel shift in photography?

This is a method of pixel shift used in digital cameras to produce super-resolution images. We can think of a pixel as a point in the coordinate axis to be shifted in any direction. When we implement this on all the pixels of the image then we can say the image is shifted.

How to manipulate images using HTML Canvas?

Now, manipulation of image data can be done using HTML canvas. You can manipulate images pixel by pixel, but – even better – you can slice parts of the image out, cache it, manipulate the image and then paste the sliced part again.


1 Answers

I've done this in other languages in relation to motion analysis. You can mathematically determine the shift in position between two images using cross correlation.

Fortunately, you may not need to actually do the maths :) You could use something like ImageMagick, which provides a lot of image processing functions for you, and is perl scriptable. Independently scripts already exists for tasks very much like yours -- see.

like image 73
Tim Barrass Avatar answered Nov 03 '22 00:11

Tim Barrass