Well, you can always check and try the matlab demo files specifically on the edge detection examples. There are many in matlab. Thresholding might works too in order to separate high and low valued-pixels.
Dear Anupama, as you required to segregate low intensity pixel from high intensity pixels. Find the histogram of image then decide threshold value on the bases of two distinct peaks, one by low intensity other by high intensity. This will solve your prolem.