1. An electronic device, comprising: a camera module configured to obtain a Near-Infrared Ray (NIR) image; and a controller configured to convert the NIR image into an integral image, detect at least one candidate eye region from the integral image using a plurality of different masks, detect a pupil region and an eyebrow region from the at least one candidate eye region, detect an eye region based on the pupil region, detect a first candidate eye region from the integral image using a first mask of the plurality of different masks, detect a second candidate eye region from the first candidate eye region using a second mask of the plurality of different masks, detect a third candidate eye region from the second candidate eye region using a third mask of the plurality of different masks, and detect a fourth candidate eye region from the third candidate eye region using a fourth mask of the plurality of different masks, and wherein the first mask includes, in a horizontal direction, a first main block, a first sub-block on the left of the first main block, and a second sub-block on the right of the first main block, the second mask includes, in a vertical direction, a second main block, a first sub-block above the second main block, and a second sub-block below the second main block, the third mask includes, in a diagonal direction, a third main block, a first sub-block on the upper left side of the third main block, and a second sub-block on the lower right side of the third main block, and the fourth mask includes, in a diagonal direction, a fourth main block, a first sub-block on the upper right side of the fourth main block, and a second sub-block on the lower left side of the fourth main block.