Here's the code to read an image and create a mask of all the pixels that have an intensity greater than 2999 in Matlab:
main.m145 chars6 lines
The imread
function reads the image file into a 2D or 3D matrix depending on the type of image. The >
operator returns a logical matrix of the same size as the input image, with 1s where the pixel intensity is greater than 2999 and 0s where it is not. This logical matrix is the mask we are looking for.
You can then use this mask for image segmentation or to find the location of the bright pixels in the image.
gistlibby LogSnag