Hi, I have a digital movie with a lot of noise, which appears as many colored pixels. The movie is a high-speed movie and has about 8000 frames, which I can extract, for example, by running "mplayer -vo jpeg movie.avi". I was wondering that maybe if I could separate the black parts from the rest of the colors for each frame, the noise would disappear as the noise is colored, but not black. I need to conserve the edges of the movie, so I can not blur the image, but with only black and white (with no grayscale) it would be ok (its for shape detection).
Is there any way to do that?
Removing noise
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Removing noise
"-adaptive-blur" might do the trick, or "-level" or a simple threshold. You might post a couple of adjacent frames, so we can see the noise and offer suggestions.
snibgo's IM pages: im.snibgo.com
Re: Removing noise
Thank you for your reply.
I attach two consecutive frames (I uploaded it to tinypic because it's the only way I know to attach images in this forum), so you can see the noise:
I would like to catch the shape of the liquid as closely as possible, all the other things (colors, brithgness, etc) are useless for me.
Which do you think is the best method to catch the liquid shape?
I attach two consecutive frames (I uploaded it to tinypic because it's the only way I know to attach images in this forum), so you can see the noise:
I would like to catch the shape of the liquid as closely as possible, all the other things (colors, brithgness, etc) are useless for me.
Which do you think is the best method to catch the liquid shape?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Removing noise
try my script, isonoise, at link below:
isonoise -r 2 -t 10 1zx8jrs.jpg 1zx8jrs_iso_r2_t10.jpg
isonoise -r 2 -t 5 1zx8jrs.jpg 1zx8jrs_iso_r2_t5.jpg
isonoise -r 2 -t 10 1zx8jrs.jpg 1zx8jrs_iso_r2_t10.jpg
isonoise -r 2 -t 5 1zx8jrs.jpg 1zx8jrs_iso_r2_t5.jpg
Re: Removing noise
It's very good in removing noise, thank you for your suggestion.
Do you know how can I catch the liquid shape? (with or without noise)
Do you know how can I catch the liquid shape? (with or without noise)
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Removing noise
The greatest difficulty seems to be separating the bottom drop from the background. Many possibilities exist, depending on what you want to do with the output images. For example:
Code: Select all
convert 1zx8jrs.jpg -colorspace gray -noise 2 -median 2 ( +clone -adaptive-blur 10x3 ) -compose difference -composite -threshold 10% liquid.jpg
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Removing noise
don't know if this is what you want.
convert 1zx8jrs_iso_r2_t5.jpg -channel g -separate -channel rgb -lat 25x25+10 1zx8jrs_iso_r2_t5_g_lat25x25+10.jpg
convert 1zx8jrs_iso_r2_t5.jpg -channel g -separate -channel rgb -lat 50x50+10 1zx8jrs_iso_r2_t5_g_lat50x50+10.jpg
convert 1zx8jrs_iso_r2_t5.jpg -channel g -separate -channel rgb -threshold 70% 1zx8jrs_iso_r2_t5_g_t70.jpg
convert 1zx8jrs_iso_r2_t5.jpg -channel g -separate -channel rgb -lat 25x25+10 1zx8jrs_iso_r2_t5_g_lat25x25+10.jpg
convert 1zx8jrs_iso_r2_t5.jpg -channel g -separate -channel rgb -lat 50x50+10 1zx8jrs_iso_r2_t5_g_lat50x50+10.jpg
convert 1zx8jrs_iso_r2_t5.jpg -channel g -separate -channel rgb -threshold 70% 1zx8jrs_iso_r2_t5_g_t70.jpg
Re: Removing noise
Thank you so much!
You gave me some great ideas of convert options that I can use, I will be playing with -lat, -threshold, and separation of channels, together with the isonoise script by fmw42, until I found the best result for me. Probably I will try to change the contrast and/or brightness before applying this nosie-reduction and shape-detection, maybe this can improve a little bit the desired output.
Once I have found the best solution, I will write a little bash script to convert the 8000 frames.
Thank you very much for your help, which I needed because I am completely new to image manipulation.
You gave me some great ideas of convert options that I can use, I will be playing with -lat, -threshold, and separation of channels, together with the isonoise script by fmw42, until I found the best result for me. Probably I will try to change the contrast and/or brightness before applying this nosie-reduction and shape-detection, maybe this can improve a little bit the desired output.
Once I have found the best solution, I will write a little bash script to convert the 8000 frames.
Thank you very much for your help, which I needed because I am completely new to image manipulation.