4 Noise removal
Because of atmospheric noise as well as due to motion on
conveyor belt some blurs effect comes in picture. So filtering
is required here. We checked all the filters and found that
median filter of 3X3 size is working best .its syntax is
diff_im = medfilt2 (diff_im, [3 3]);