Quasi-static speckles are one of the main limitations in imaging exoplanets, since the image of a planet looks similar to a speckle. However, speckles are light from the same coherent source, the star, and incoherent with the planet. By moving the deformable mirror after each image, the speckle pattern as seen on the camera changes between images. The change is very small within the full width half max of the planet, so changes in the planet image are minimal. This fundamental coherence property of the speckles (and incoherence with the planet light) guides us to develop a planet detection method to distinguish a planet from a speckle by taking advantage of a changing speckle pattern. We present a planet detection algorithm using a Bayesian analysis. We seek to conduct a hypothesis test at each pixel in the image to detect the presence of a planet at that location. We formulate a test statistic and use a least-squares method to estimate the unknown parameters. These parameters are the intensities of a planet and a locally constant background. Our algorithm assumes the speckle pattern is independent from one image to another. This approach is used to formulate an integration time estimate for detection of a planet with specified probabilities of false alarms and missed detections. A comparison is made between a single stacked image and using multiple images.