Question

Here with i have attached two consecutive frames captured by a cmos camera with IR Filter.The object checker board was stationary at the time of capturing images.But the difference between two images are nearly 31000 pixels.This could be affect my result.can u tell me What kind of noise is this?How can i remove it.please suggest me any algorithms or any function possible to remove those noises. Thank you.Sorry for my poor English.

Image1 : [1]: http://i45.tinypic.com/2wptqxl.jpg

Image2: [2]: http://i45.tinypic.com/v8knjn.jpg

Was it helpful?

Solution

That noise appears to result from camera sensor (Bayer to RGB conversion). There's the checkerboard pattern still left.

Also lossy jpg contributes a lot to the process. You should first have an access to raw images.

From those particular images I'd first try to use edge detection filters (Sobel Horizontal and Vertical) to make a mask that selects between some median/local histogram equalization for the flat areas and to apply some checker board reducing filter to the edges. The point is that probably no single filter is able to do good for both jpeg ringing artifacts and to the jagged edges. Then the real question is: what other kind of images should be processed?

From the comments: if corner points are to be made exact, then the solution more likely is to search for features (corner points with subpixel resolution) and make a mapping from one set of points to the other images set of corners, and search for the best affine transformation matrix that converts these sets to each other. With this matrix one can then perform resampling of the other image.

One can fortunately estimate motion vectors with subpixel resolution without brute force searching all possible subpixel locations: when calculating a matched filter, one gets local maximums for potential candidates of exact matches. But this is not all there is. One can try to calculate a more precise approximation of the peak location by studying the matched filter outputs in the nearby pixels. For exact match the output should be symmetric. Otherwise the 'energies' of the matched filter are biased towards the second best location. (A 2nd degree polynomial fit + finding maximum can work.)

OTHER TIPS

Looking closely at these images, I must agree with @Aki Suihkonen. In my view, the main noise comes from the jpeg compression, that causes sharp edges to "ring". I'd try a "de-speckle" type of filter on the images, and see if this makes a difference. Some info that can help you implement this can be found in this link.

In a more quick and dirty fashion, you apply one of the many standard tools, for example, given the images are a and b:

(i) just smooth the image with a Gaussian filter, this can reduce noise differences between the images by an order of magnitude. For example:

  h=fspecial('gaussian',15,2);
  a=conv2(a,h,'same');
  b=conv2(b,h,'same');

(ii) Reduce Noise By Adaptive Filtering

 a = wiener2(a,[5 5]);
 b = wiener2(b,[5 5]);

(iii) Adjust ntensity Values Using Histogram Equalization

 a =  histeq(a);
 b =  histeq(b);

(iv) Adjust Intensity Values to a Specified Range

 a = imadjust(a,[0 0.2],[0.5 1]);
 b = imadjust(b,[0 0.2],[0.5 1]);

If your images are supposed to be black and white but you have captured them in gray scale there could be difference due to noise. You can convert the images to black and white by defining a threshold, any pixel with a value less than that threshold should be assigned 0 and anything larger than that threshold should be assigned 1, or whatever your gray scale range is (maybe 255). Assume your image is I, to make it black and white assuming your gray scale image level is from 0 to 255, assume you choose a threshold of 100:

ind = find(I < 100);
I(ind) = 0;
ind = find(I >= 100);
I(ind) = 255;

Now you have a black and white image, do the same thing for the other image and you should get very small difference if the camera and the subject have note moved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top