I have a mortar image and it has some blackish pixels on the inside edges.
I need to make those blackish pixels colored same as the grey mortar color.
remove odd pixels in the image
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: remove odd pixels in the image
try
Code: Select all
convert mn1-bRxR3LFR.png -fuzz 55% -alpha off -fill "rgb(230,230,230)" -opaque "rgb(63,63,63)" -alpha on show:
Re: remove odd pixels in the image
fmw42 wrote:try
Code: Select all
convert mn1-bRxR3LFR.png -fuzz 55% -alpha off -fill "rgb(230,230,230)" -opaque "rgb(63,63,63)" -alpha on show:
I only needed to change those blackish pixels on inside edges but it changes the images a lot and looses the original texture. the result is
Re: remove odd pixels in the image
Is there a way to change all pixels with rgb(50,50,50) and less to rgb(230,230,230)? I think that can solve the problem.
Re: remove odd pixels in the image
nagarwal wrote:fmw42 wrote:try
Code: Select all
convert mn1-bRxR3LFR.png -fuzz 55% -alpha off -fill "rgb(230,230,230)" -opaque "rgb(63,63,63)" -alpha on show:
I only needed to change those blackish pixels on inside edges but it changes the images a lot and looses the original texture. the result is
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: remove odd pixels in the image
This is how you would do it.
where 19.6% = 100*(50/255) and gray(230)=rgb(230,230,230). You can increase the black-threshold value, if there are still some dark regions.
If you need to maintain the black in the below transparency region of the base image, then do
Alternately, you could use a clone stamp tool to modify those dark regions using Photoshop or GIMP
Code: Select all
convert mn1-bRxR3LFR.png -alpha off -black-threshold 19.6% -fill "gray(230)" -opaque black -alpha on tmp1.png
If you need to maintain the black in the below transparency region of the base image, then do
Code: Select all
convert mn1-bRxR3LFR.png -alpha off -black-threshold 19.6% -fill "gray(230)" -opaque black -alpha on \
-background black -alpha background tmp1.png
Alternately, you could use a clone stamp tool to modify those dark regions using Photoshop or GIMP
Re: remove odd pixels in the image
Thanks, you have been a great help!