I have a jpg image of a microarray slide. In other words, roughly a 2x4.5K pixel image with rows of colored spots on it. Here's a link to an example, if you've never seen one; it's not quite what I am working with, but the idea is the same.
What I need to do is, given a set of coordinates (the spots are arranged into blocks and the blocks have rows and columns), get that one spot as a 16x16 pixel image.
Simple, right? Except that the slides are never quite aligned properly, and the width tends to differ by a few pixels. So in other words, the spot at 1,1 may be 5 pixels away from the left edge, and the last spot in the same column maybe 10 pixels farther away. They have one feature to help with this, in each corner there is a few spots (the number identifies which corner it is, but the corner spot is there for all four) of controls, meaning they always come up as bright green.
So, is there a module out there that will help me crop and rotate the image so that each of the four corner spots has two sides excactly at the edges of the image, and all the spots along each side are precisely aligned?
My graphics manipulation experience with perl is extremely limited, I use GD.pm quite a lot but only to create simple charts and such, I don't know where to begin here.
So this is really a two part question: first, what do I do to grab a specific region of a larger image? I can always just grab a somewhat larger are so I get the spot I am looking for in the middle and a bit offcenter. And two, what, if anything, can I use to do the above-described alignment. At this point I am more curious about how to do The Right Thing, if it's more trouble than it's worth I'll just do the more sloppy method described above.
Thanks,
In reply to image clean up and alignment by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |