Human face detection in excessive dark image by using contrast stretching, histogram equalization and adaptive equalization


  • Shaikh Muhammad Allayear Daffodil International University
  • Md Fakrul Abedin Bhuiyan Daffodil International University
  • Mirza Mohtashim Alam University of Bonn
  • S. Rayhan Kabir Daffodil International University
  • Md Tahsir Ahmed Munna Daffodil International University
  • Md. Samaun Hasan Daffodil International University





Image Processing, Dark Image, Face Detection, Low-Contrast Image, Computer Vision.


Darkness is the inverse state of the brightness, is obtained as an absence of noticeable light and illumination. Generally, face detection applications cannot detect any human face in a dark image, where the image has captured from the dark environment or dark night. In this manuscript, we demonstrate our experiment, where we use Contrast Stretching, Histogram Equalization and Adaptive Equalization techniques for detecting any human face in any dark image. In this paper, we also illustrate our proposed algorithm, working procedure and differentiate the pixel intensity of different stage of image processing. We essentially do this research from an application perspective, where a software application detects the human face from a dark photo or a very low-contrast image and the photo has been captured from an excessive dark environment.




[1] Android Central Forums. (2017) Facial Recognition does not work in Dark. [Online]. Available:

[2] (2017) Face ID not recognising me in low light conditions/at night. [Online]. Available:

[3] C. E. Proctor, W. Parks, B. S. Riggan, A conceptual illustration for thermal-to-visible synthesis for interoperability with existing visible-based facial recognition systems, U.S. Army Research Laboratory, United States, 2018.

[4] B. S. Riggan, N. J. Short, S. Hu, “Thermal to Visible Synthesis of Face Images using Multiple Regionsâ€, in Proc. 2018 IEEE Winter Conference on Applications of Computer Vision (WACV), Lake Tahoe, NV, USA, 2018, pp. 30–38.

[5] J. Lezama, Q. Qiu, G. Sapiro, “Not Afraid of the Dark: NIR-VIS Face Recognition via Cross-spectral Hallucination and Low-rank Embeddingâ€, in Proc. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), United States, Honolulu, HI, USA, 2017, pp. 6628–6637.

[6] E. Komagal, V. Seenivasan, K. Anand, C. P. A. Raj, “Human Detection In Hours Of Darkness Using Gaussian Mixture Model Algorithmâ€, International Journal of Information Sciences and Techniques (IJIST), vol. 4, No. 3, pp. 83–89, May 2014.

[7] S. Singh, A. Godara, Gaurav, “Detection of Partial Invisible Objects in Images using Histogram Equalizationâ€, International Journal of Computer Applications, vol. 85, No. 9, pp. 40–44, January 2014.

[8] N. Dong, Z. Jia, J. Shao, Z. Li, F. Liu, J. Zhao, P.Y. Peng, “Adaptive Object Detection and Visibility Improvement in Foggy Imageâ€, Journal of Multimedia, vol. 6, No. 1, pp. 14–21, February 2011.

[9] A. H. Foruzan, Y.W. Chen, R. A. Zoroofi, A. Furukawa, Y. Sato, M. Hori, N. Tomiyama, “Segmentation of Liver in Low-Contrast Images Using K-Means Clustering and Geodesic Active Contour Algorithmsâ€, IEICE Transactions on Information and Systems, vol. E96.D, No. 4, pp. 798–807, April 2013.

[10] S. S. Al-amri, “Contrast Stretching Enhancement in Remote Sensing Imageâ€, BIOINFO Sensor Networks, vol. 1, No. 1, Article Id: BIA0001652, pp. 6–9, December 2011.

[11] S. S. Al-amri, N. V. Kalyankar, S. D. Khamitkar “A Comparative Study of Removal Noise from Remote Sensing Imageâ€, International Journal of Computer Science Issues (IJCSI), vol. 7, Issue 1, No. 1, pp. 32–36, January 2010.

[12] C.P. Loizou, M. Pantziaris, I. Seimenis, C.S. Pattichis, “Brain MR Image Normalization in Texture Analysis of Multiple Sclerosisâ€, in Proc. 9th International Conference on Information Technology and Applications in Biomedicine, Larnaca, Cyprus, November 2009.

[13] M. Zohaib, A. Shan, A. U. Rahman, H. ALi, “Image Enhancement by using Histogram Equalization Technique in Matlabâ€, International Journal of Advanced Research in Computer Engineering & Technology, vol. 7, No. 2, pp. 150–154, February 2018.

[14] Y. Zhu, C. Huang, “An Adaptive Histogram Equalization Algorithm on the Image Gray Level Mappingâ€, Physics Procedia, vol. 25, pp. 601 – 608, December 2012.

[15] R. Chouhan, R. K. Jha, P. K. Biswas, “Enhancement of dark and low-contrast images using dynamic stochastic resonanceâ€, IET Image Processing, vol. 7, No. 2, pp. 174–184, March 2013.

[16] M. T. Deole, S. P. Hingway, S. S. Suresh, “Dynamic Stochastic Resonance Technique for Enhancement of Low Contrast Imagesâ€, International Journal of Application or Innovation in Engineering & Management (IJAIEM), vol. 3, No. 1, pp. 174–184, January 2014.

[17] R. K. Jha, R. Chouhan, P. K. Biswas, “Noise-induced Contrast Enhancement of Dark Images using Non-dynamic Stochastic Resonanceâ€, in Proc. National Conference on Communications (NCC), 2012.

[18] A. R. Rivera, B. Ryu, O. Chae, “Content-Aware Dark Image Enhancement Through Channel Divisionâ€, IEEE TRANSACTIONS ON IMAGE PROCESSING, vol. 21, No. 9, pp. 3967–3980, September 2012.

[19] C. H. Shen, H. H. Chen, “Robust Focus Measure for Low-Contrast Imagesâ€, in Proc. 2006 Digest of Technical Papers International Conference on Consumer Electronics, Las Vegas, NV, USA, 2006, pp. 69–70.

[20] H.S. Tae, C.-S. Park, B.-G. Cho, J.-W. Han, B. J. Shin, S. Chien, D. H. Lee, “Driving Waveform for Reducing Temporal Dark Image Sticking in AC Plasma Display Panel Based on Perceived Luminanceâ€, IEEE Transactions on Plasma Science, vol. 34, No. 3, pp. 996–1003, June 2006.

[21] R. Fisher, S. Perkins, A. Walker, E. Wolfart. (2003) Contrast Stretching. [Online]. Available:

[22] Department of Mathematics, University of California, Irvine. (2008) Histogram equalization. [Online]. Available:

[23] S. M. Pizer, E. P. Amburn, J. D. Austin, R. Cromartie, A. Geselowitz, T. Greer, B. H. Romeny, J. B. Zimmerman, K. Zuiderveld, “Adaptive Histogram Equalization and Its Variationsâ€, Computer Vision, Graphics, and Image Processing, vol. 39, No. 3, pp. 355– 368, Sept. 1987.

[24] E. A. Haller, “Adaptive histogram equalization in GISâ€, Annals of the University of Craiova, Mathematics and Computer Science Series, vol. 38, No. 1, pp. 100–104, March 2011.

[25] K. Goyal, K. Agarwal, R. Kumar, “Face detection and tracking: Using OpenCVâ€, in Proc. 2017 International conference of Electronics, Communication and Aerospace Technology (ICECA), Coimbatore, India, 2017, pp. 474–478.

[26] S.V. Viraktamath, M. Katti, A. Khatawkar, P. Kulkarni, “Face Detection and Tracking using OpenCVâ€, The SIJ Transactions on Computer Networks & Communication Engineering, vol. 1, No. 3, pp. 45–50, July-August 2013.

[27] R. Mustafa, Y. Min, D. Zhu, “Obscenity Detection Using Haar-Like Features and Gentle Adaboost Classifierâ€, The Scientific World Journal, vol. 2014, Article ID: 753860, pp. 1–6, June 2014.

[28] T. Kumar, K. Verma, “A Theory Based on Conversion of RGB image to Gray imageâ€, International Journal of Computer Applications, vol. 7, No. 2, pp. 7–10, September 2010.

[29] A. Mordvintsev, A. K. Revision. OpenCV-Python Tutorials. (2015) Drawing Functions in OpenCV. [Online]. Available:

[30] OpenCV. (2018) Cascade Classification. [Online]. Available:

[31] P. I. Wilson, J. Fernandez, “Facial feature detection using Haar classifiersâ€, Journal of Computing Sciences in Colleges, vol. 21, No. 4, pp. 127–133, April 2006.

[32] OpenCV. (2015) Changing Colorspaces. [Online]. Available:

[33] H. Kuang, L. Chen, F. Gu, J. Chen, L. L. H. Chan, H. Yan, “Combining region of interest extraction and image enhancement for nighttime vehicle detectionâ€, IEEE Intelligent Systems, vol. 31, No. 3, pp. 57–65, May 2016.

[34] S. v. d. Walt, J. L. Schonberger, F. Boulogne, J. D. Warner, N. Yager, E. Gouillart, T. Yu and the scikit-image contributors, “scikit-image: image processing in Pythonâ€, PeerJ 2:e453, June 2014.

[35] OpenCV. (2018) Face Detection using Haar Cascades. [Online]. Available:

[36] H. Gujar, P. Mhatre, S. Ghanate, S. Chile, S. Kadam, D. Kurle, S. Shitole, “Python Based Image Processingâ€, SNDT Women's University, Mumbai, January 2016.

[37] M. F. A. Bhuiyan, R. R. Rothi, “Image visualization in extreme dark environment and face detectionâ€, B.Sc. Thesis, Department of Software Engineering, Daffodil International University, Bangladesh, 2018.

[38] Smart Data Science Center (SDSC), Daffodil International University. (2018) [Online]. Available:

View Full Article: