Re: filtering specific pixels
- From: Leonard <voyager1@xxxxxxxxxxxxxxxx>
- Date: Wed, 25 Jan 2006 22:38:35 -0500
Dave Robinson wrote:
>
> The way I might be tempted to tackle this problem is as follows.
>
> 1) Take a copy of your image and apply your 3x3 filter to the lot.
>
> 2) Take your Canny image and filter it using something like a
> Gaussian with a few pixels standard deviation. This gives you a
> rough
> and ready measure of how close you are to one of your lines. That
> is
> to say it will have a value of '1' when you are sitting on top of a
> line, and will get smaller as you move away from it. We can call
> this
> the Alpha image
>
> 3) Take your original image and your filtered version of your image
> and mix them using something like
>
> Mixed_Pixel = Alpha_Pixel*Filtered_Pixel +
> (1-Alpha_Pixel)*Original_Pixel;
>
> What we are doing here is any pixel which is far away from your
> lines
> is pure original image, whereas the closer you get to a line, you
> undertake a graceful transition between the original pixel, and the
> filtered pixel. When you are exactly on a line you are purely using
> the filtered image.
>
> The width of the transition zone is controllable by the variance of
> the Gaussian you used to filter your Canny edge image with, and can
> be made as wide or as narrow as you require. I think this will
> generate a much more pleasing result than just treating the exact
> edge pixels shown by the Canny, which is probably only showing the
> position of the maximum slope of the edge.
>
> It will obviously automatically work for any image, once you have
> the
> parameters of your 3x3 filter, and the Gaussian variance specified.
>
> Hope this helps
>
> Dave Robinson
just to make sure i understand you right,
1: apply my 3x3 average filter on the original image
2: apply a Gaussian LPF to the Canny image
3: output_pixel = alpha_pixel*average_pixel +
(1-alpha_pixel)*original_pixel
in this case, would it be better if i apply a Gaussian instead of an
Average filter on my original image?
my objective is to try to make it look like those lines had never
existed.
thank you so much for your help.
.
- References:
- filtering specific pixels
- From: Leonard
- Re: filtering specific pixels
- From: Rune Allnor
- Re: filtering specific pixels
- From: Leonard
- Re: filtering specific pixels
- From: Dave Robinson
- filtering specific pixels
- Prev by Date: Re: Optimization Problem
- Next by Date: saving large objects
- Previous by thread: Re: filtering specific pixels
- Next by thread: Re: filtering specific pixels
- Index(es):
Relevant Pages
|
Loading