2

I am trying to find a repeatable process to find the coordinates of grid intersection points from an image. The image is a montage of many smaller images. Each 'tile' of the montage has inconsistent contrast, so my naive methods are failing (the tile boundary is being selected) . A small example:

Montaged grid

I have had minor advances from the ideas explained in How to remove convexity defects in a Sudoku square? and Grid detection in matlab

However, the grid lines are NOT necessarily straight over the entire image, so cannot approximate as a grid of straight lines. I am familiar with imageJ or Gatan digitalMicrograph software, if anyone knows of a simple solution. Otherwise matlab/python Opencv would be useful

Community
  • 1
  • 1
Shaun_M
  • 93
  • 1
  • 1
  • 7
  • 1
    You can use hough transform to find lines, You just have to merge various line segments across a line, with liberal window of hough parameter (theta). It should work fine because you have only two almost perpendicular set of lines. Since image is not consistent in brightness, you might have to use low threshold to find canny image. – Garvita Tiwari Nov 11 '16 at 10:45
  • 1
    From an experiment viewpoint: It might be a good idea to record your grid *not* parallel to the image axis, if this is possible. This would allow to easily disregard paralle "line" contrast from stitching. Is this an option? – BmyGuest Nov 11 '16 at 16:32
  • Do you have access to the images *prior* to montaging? What OS do you use? Can you provide another sample image? – Mark Setchell Nov 29 '16 at 21:16

1 Answers1

1

My first idea: write a script to chop your image into tiles, and apply some contrast normalization such as CLAHE to each one. Then reassemble the tiles using the Stitching plugin with the Linear Blending option on, to avoid the sharp tile lines. After that, segmenting the grid will become much easier; see ImageJ's Segmentation page for an introduction.

This is the kind of image analysis problem that is better discussed on the ImageJ Forum where people can throw ideas and script snippets back and forth, to converge on a solution.

ctrueden
  • 6,751
  • 3
  • 37
  • 69