I am trying to identify lakes and other water bodies in a DEM file. The source file is located here. I am using gdaldem aspect to identify contiguous pixels with zero slope change.
gdaldem aspect -co compress=lzw infile_dem.tif outfile_aspect.tif
When I plot the output file, it looks like below (please ignore the white border):

Obviously, I am doing the exact opposite of what I need to be doing. Is there any way of inverting the operation of gdaldem aspect? The output of gdalinfo is give below:
Size is 2928, 2285
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (81.381111111111110,22.564444444444447)
Pixel Size = (0.002083333333333,-0.002083333333333)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 81.3811111, 22.5644444) ( 81d22'52.00"E, 22d33'52.00"N)
Lower Left ( 81.3811111, 17.8040278) ( 81d22'52.00"E, 17d48'14.50"N)
Upper Right ( 87.4811111, 22.5644444) ( 87d28'52.00"E, 22d33'52.00"N)
Lower Right ( 87.4811111, 17.8040278) ( 87d28'52.00"E, 17d48'14.50"N)
Center ( 84.4311111, 20.1842361) ( 84d25'52.00"E, 20d11' 3.25"N)
Band 1 Block=2928x1 Type=Int16, ColorInterp=Gray
NoData Value=-32768