Detection of DS18B20, arduino Mega
In the Tutorial, which you are following, it says,


  So we will use the 2 wire method. Simply connect both the GND and VDD
  pins to 0V (yes both)


and it shows:



but I think you are missing this step, because i can't see any connection like that here: