Re: Image processing Questions
- To: mathgroup at smc.vnet.net
- Subject: [mg110597] Re: Image processing Questions
- From: Robert Pigeon <robert.pigeon at videotron.ca>
- Date: Sun, 27 Jun 2010 04:56:05 -0400 (EDT)
Hello Patrick, You are right about using a "commercial" paint/pictures software for doing that. I used PhotoShop Element 8 to do it and it does exactly what I wanted. But, after looking at the method posted at Wolfram web site (RemoveTextFromAnImage) I wanted to try it. And it did dot worked. So I tried to find out why and build my own process, just because the problem was there! I thought of what you proposed: doing the process on the part of the image where the date is. That was working. Then came my second question: how to put back that portion of the image in the original. Anyway, thanks for your reply.! I will study your process and learn from it. Thanks again, Robert -----Message d'origine----- De : Patrick Scheibe [mailto:pscheibe at trm.uni-leipzig.de] Envoy=E9 : 25 juin 2010 10:06 =C0 : Robert Pigeon Cc : mathgroup at smc.vnet.net Objet : Re: [mg110549] Image processing Questions Hi, the good thing in image processing is that a method never applies to all situations. Bad people say it only applies in the specific testcase for what it was written. I would take Gimp or Photo-Shop|Paint or any other ip-software and use the *repair*-brush (sorry, I don't know the english word), since this is faster. The method at http://www.wolfram.com/products/mathematica/newin7/content/BuiltInImageProce ssing/RemoveTextFromAnImage.html works on the whole image and I wouldn't use it on my photos. Maybe this is more appropriate and can be adapted to your photo. It should answer your second question too: img == ImageResize[ Import["http://lessflowermorepower.files.wordpress.com/2009/08/\ dsci0004.jpg"], 300] {nx, ny} == ImageDimensions[img]; date == ImageTake[img, {190, 225}, {150, 300}] {r, g, b} == ColorSeparate[date] mask == Dilation[Binarize[ColorNegate[b]], 1] street == ImageMultiply[date, ColorNegate[mask]] tile1 == ImageMultiply[Closing[street, 4], mask] tile2 == ImageMultiply[ColorNegate[mask], date] tile3 == ImageAdd[tile1, tile2] ImageCompose[img, tile3, {150, 0}, {0, 0}] Cheers Patrick PS: If the randomly selected image link isn't working, let me know. On Fri, 2010-06-25 at 07:26 -0400, Robert Pigeon wrote: > Hello to all, > > I have two questions related to image processing. > > First question : I have some pictures taken with my digital camera and on > the pictures I have the date in red numbers on them. I would like to erase > those numbers from the pictures. I tried the procedure described on Wolfram > web site about image processing (Removing text from an image). But it is > not working and I don't know why. Maybe some of you are doing it and could > share with me the procedure ? > > Second question : I take a portion of an image using ImageTake. I do some > processing on that portion. Now I would like to put back that portion in the > original image. How can I do that? It would be like the inverse of > ImageTake... Any idea? > > Thanks for any suggestions, > > Robert >