Quaternion analytic signal is regarded as a generalization of analytic signal from 1D to 4D space. It is defined by an original signal with its quaternion partial and total Hilbert transforms. The quaternion analytic signal provides the signal features representation, such as the local amplitude and local phase angle, the latter includes the structural information of the original signal. The aim of the present study is twofold. Firstly, it attempts to analyze the Plemelj‐Sokhotzkis formula associated with quaternion Fourier transform and quaternion linear canonical transform. With these formulae, we show that the quaternion analytic signals are the boundary values of quaternion Hardy functions in the upper half space of 2 complex variables space. Secondly, the quaternion analytic signal can be extended to the quaternion Hardy function in the upper half space of 2 complex variables space. Two novel types of phase‐based edge detectors are proposed, namely, quaternion differential phase angle and quaternion differential phase congruency methods. In terms of peak signal‐to‐noise ratio and structural similarity index measure, comparisons with competing methods on real‐world images consistently show the superiority of the proposed methods.