MATLAB: Get pixel where the intensity is 255

MATLABpixel intensity print point

Hi I have an immage 2048×2448 grayscale, I want to find all the pixel where the intensity is "255".
After i have find them i want to print this point on the immage

Best Answer

  • img; % 2048x2448 matrix
    [r, c] = find(img==255); % r and c contain all row and columns
    If you want to mark these points on the image
    plot(c, r, '+')
    It will draw '+' marker at those locations.