detect_changes_division
- detect_changes_division(img1, img2, output_range=None)[source]
Detect the changes between two images by division. Areas with a lot of change will appear darker and areas with little change bright.
The change from img1 to img2 is computed with.
\(I_d = \frac{ img2 + 1}{img1 + 1}\)
The range of the output image is scaled to the range of the datatype of the input image.
- Parameters
- img1: np.ndarray
- img2: np.ndarray
- output_range: tuple, optional
Range of the output image. This range must be within the possible range of the dtype of the input images. E.g. (0,1) for float images.
- Returns
- out: np.ndarray
Input dtpye is only converved when an output_range is given. Else the result will have dtype float with a maximal possible range of 0.5-2