{i1, i2} = 
 Import@# & /@ {"http://i.stack.imgur.com/laZeT.png", 
(*Binarize the image and delete speckles to get clear edge detections*)
images = {DeleteSmallComponents@Binarize[i1, .2], 
DeleteSmallComponents@Binarize[i2, .2]};
(*match corresponding points in both images*)
  "Find corresponding points in the two images that are similar ", 
  FontWeight -> "Bold", FontColor -> Blue]]
matches = ImageCorrespondingPoints[images[[1]], images[[2]]]
Print[Style["Find the resulting shift ", FontWeight -> "Bold", 
FontColor -> Blue]]
ImgShiftCoord = {Flatten[matches[[1]]][[1]] - 
Flatten[matches[[1]]][[2]] - Flatten[matches[[2]]][[2]]}
 (*map the matching points in both images and calculate the pixel \
Print[Style["Show the outstanding matching region of interest ", 
FontWeight -> "Bold", FontColor -> Blue]]
 Show[#1, Graphics[{Red, 
   MapIndexed[Inset[#2[[1]], #1] &, #2]}]] &, {images, matches}]

Plot: 1

How can I change the font size of those markers {1,2,3} and also circle them so that I can show it in my presentation clearly as to what I am talking about ? The font sizes are so small and hard to see of there are many.

  • $\begingroup$ As a guide rule, try to post MWEs (Minimal Working Examples) related to your problem and showing it as clearly as possible. Any code non-related to your current problem is noise and discourage potential answerers $\endgroup$ Nov 5, 2013 at 3:15
  • $\begingroup$ Have added the link to import the pics so anyone can run the code without any problem. I just want to increase those markers font size and encircle them so that when I export as image, I can add it to my thesis presentation. $\endgroup$ Nov 5, 2013 at 3:37

1 Answer 1


Change the font size and circle the numbers... replace the final statement with:

MapThread[Show[#1, Graphics[{FontSize -> 30, Red, 
 MapIndexed[{Circle[#1, 20], Inset[#2[[1]], #1]} &, #2]}]] &, {images, matches}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.