Re: Image processing Questions

• To: mathgroup at smc.vnet.net
• Subject: [mg110582] Re: Image processing Questions
• From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
• Date: Sat, 26 Jun 2010 03:12:12 -0400 (EDT)

```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/BuiltInImageProcessing/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
>

```

• Prev by Date: Re: Replacement rule limitations
• Next by Date: Re: and sampling a distribution
• Previous by thread: Re: Image processing Questions
• Next by thread: Re: Image processing Questions