0

I am trying to figure out a way to digitally map an image of a stained glass window. Between and around every piece of glass is a line of lead solder. What I'm thinking would be the best way to go about this would be to map the image based on the range of HSL or HSI values of the soldering material, such that each piece of glass would be its own zone, with its own information and click function.

I'm trying to make this a desktop application using C#, but could probably use html/javascript if that would be easier. I have been searching for some time to try and figure out a good way to accomplish this, but I'm having a hard time figuring it out.

Does anyone have any pointers on how I might go about doing this? I'm sorry if this question seems vague; if further clarification is needed, please comment on it and I will try to be clearer if necessary.

I don't have enough reputation to post a picture, but look at these for an idea: http://rootsofknowledge.tc.uvu.edu/Gallery

Sean
  • 95
  • 3
  • 11
  • Have you got an image or a link to one? – Mark Setchell Jun 05 '14 at 15:19
  • Having a lot of trouble getting an image to upload for some reason... – Sean Jun 05 '14 at 16:02
  • This may help you if you want to do it in HTML - move your mouse around over Samus's head to find the clickable area http://www.yourhtmlsource.com/images/imagemaps.html – Mark Setchell Jun 05 '14 at 16:12
  • Thanks Mark. That's potentially helpful, but I'm really looking for a way to trace the existing lines so the same program can be used for multiple images, if that ends up being really feasible – Sean Jun 05 '14 at 16:28
  • Your image link doesn't seem to work... :-( – Mark Setchell Jun 05 '14 at 17:03
  • Really? Working for me, not sure what that's about... here's an image that might give you the idea. Irregular shapes, lots of color is what I'm dealing with: http://www.distantsunartwork.com/Stained_Glass/stained.glass.birds.of.paradise.flowers.abstract.n.jpg – Sean Jun 05 '14 at 17:52
  • Working now - I am looking at your image... – Mark Setchell Jun 05 '14 at 17:57

1 Answers1

0

I have had a little look, but don't want to do too much in case I am barking up the wrong tree!

I like to use ImageMagick, available for free with C/C++, Perl, PHP bindings and on the command line in most Linux distros. It is here.

I started with this image:

enter image description here

and tried a little blurring to make it less sensitive to tonal changes in the glass, followed by a Canny Edge detector and got this:

enter image description here

The command I used was this:

convert glass.jpg -blur 0x2 -canny 0x1+5%+10% edges.jpg

Obviously there is loads more to do, but it is maybe a start... and maybe others will add their expertise now we have a starting point....

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Wow, that's pretty good! I'm not going to mark this as THE ANSWER yet, because I'd still love to hear some other thoughts, but this does look promising! I tried finding the edges even in Adobe Photoshop, and met with very little success there (though that may be partially lack of expertise). Thanks Mark! – Sean Jun 08 '14 at 00:08