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, to detect at least one candidate eye region from the integral image using at least one mask, to detect a pupil region and an eyebrow region from the at least one candidate eye region, and to detect an eye region based on the pupil region.