Simple way to detect continuous lines I have some images of a background, and of steam that I am subtracting to extract just the steam. Unfortunately, because the camera conditions are not perfect the differenced image is always a few pixels off generating sharp lines where features in the background don't match up pixel-by-pixel like so



I'm interested in segmenting out the steam (foreground noise), from the background. I think if I can automatically remove the continuous lines from this image it would be sufficient for my purposes. 

Unfortunately it's been almost ten years since my image analysis work and I don't remember what you do to detect continuous lines. What are some simple well preforming algorithms to do this?
I have two methods to suggest:
1. Use the erosion (morphological operator) (you can also use other operators like closing/opening). But i think it will destroy the steam data also...
2. A better solution is to detect the lines using hough transform. Google it and you'll find tons of info about it (if your'e using MATLAB, there is a guide how to do it in their website)

Have fun...