A distance measuring apparatus that makes a two-dimensional scan by launching a pulse laser beam and measures a distance to a target (100, 200) based on reflected light received from the target, characterized in that there are provided: means for generating a difference binary image from a first range image that is generated in a state in which the target does not exist with respect to a background and represents distances to each of a plurality of range measurement points on the first range image, and a second range image that is generated in a state in which the target exists with respect to the background and represents the distances to each of the plurality of range measurement points on the second range image; means for extracting a first region having a size that is greater than or equal to a first threshold value, from a non-background region of the difference binary image, made up of a plurality of non-background points; means for grouping adjacent points on the second range image into a plurality of groups of adjacent points having close distance values, for each of the points within the first region of the difference binary image, to extract second regions respectively corresponding to each of the plurality of groups of adjacent points having the close distance values, wherein the adjacent points having the close distance values refer to points having distance values with a difference that is less than or equal to a threshold value; and means for extracting a third region (100B-1) having a size that is smaller than or equal to a second threshold value, from the second regions of the difference binary image, to output a judgment result which judges that each of a plurality of points (100D, 200D) within the third region is edge noise (100D, 200D). means for generating a difference binary image from a first range image that is generated in a state in which the target does not exist with respect to a background and represents distances to each of a plurality of range measurement points on the first range image, and a second range image that is generated in a state in which the target exists with respect to the background and represents the distances to each of the plurality of range measurement points on the second range image; means for extracting a first region having a size that is greater than or equal to a first threshold value, from a non-background region of the difference binary image, made up of a plurality of non-background points; means for grouping adjacent points on the second range image into a plurality of groups of adjacent points having close distance values, for each of the points within the first region of the difference binary image, to extract second regions respectively corresponding to each of the plurality of groups of adjacent points having the close distance values, wherein the adjacent points having the close distance values refer to points having distance values with a difference that is less than or equal to a threshold value; and means for extracting a third region (100B-1) having a size that is smaller than or equal to a second threshold value, from the second regions of the difference binary image, to output a judgment result which judges that each of a plurality of points (100D, 200D) within the third region is edge noise (100D, 200D).