Content uploaded by Moath Erqsous
Author content
All content in this area was uploaded by Moath Erqsous on Sep 14, 2023
Content may be subject to copyright.
Scientific Journal of Informatics
Vol. 7, No. 2, November 2020
p-ISSN 2407-7658 http://journal.unnes.ac.id/nju/index.php/sji e-ISSN 2460-0040
166
The Real-Time Alert System for Prayers at Smart
Masjid
Tanweer Alam1, Moath Erqsous2
1Computer Science Department, Islamic University of Madinah, Saudi Arabia
1tanweer03@iu.edu.sa
2Information System Department, University of Bisha, Saudi Arabia
2Moatherqsous@gmail.com
Abstract
Smart Masjid with embedded technologies is the key factor for the prayers to correctly pray
without having mistakes. The technologies inside or outside the Masjid might be greatly
helpful for the prayers. Arrange and monitor people in a crowded environment inside masjid
is a critical task. The authors have proposed the solution of arranging the rows during pray
in the Masjid. It is necessary to fill rows start from the first row behind the Imam. Most
counting techniques depend on detecting individuals to count their numbers. Counting and
arrangement become inefficient when it is required in real-time and when the crowd is dense.
I am proposing a technique for monitoring and estimating the density of the crowd in real-
time using infrared technology. The intelligent systems will be designed based on the
number of people section wise. The mosque will be divided into sections and each section
will be allocated an Infra-Red Camera. Each section will be programmed to contain a limited
number of people. There will be an LED display allocated to each section. With the people
coming into that section, the display will start becoming less GREEN. In other words, the
intensity of the GREEN LED display will become weaker. As the section is filled, the
display will turn red. This way, people could see the section from quite a distance and can
easily decide whether to move forward or not. As soon as the people enter the mosque, they
will have an overview of each section and can decide to go to suitable places to get settled
easily into the rows. The pre-programmed thermal camera will recognize people based on
their body temperature. The LED display will go less green as the system receives more
thermograms. After reaching the highest level of thermograms received, the LED display
will automatically go RED. This would naturally stop people to enter that section.
Keywords: Counting Technique, Density of Crowed, Infrared Technology, Infrared Camera
Thermograms, LED, Red Light.
1. INTRODUCTION
Masjid is regarded as a place of worship; it is a very popular word and commonly
used by Muslims throughout the world. According to a report, the percentage of
the World Muslim population concerning the total World population has increased
steadily from 17% in 1950 to 26% by 2020 [1]. While the total European population
increased from 548 million in 1950 to 744 million by 2020, the percentage of
Muslims in Europe increased from 2% in 1950 to 6% by 2020. As of 2013, it was
predicted that the world's Muslim population will grow twice as fast as non-
Muslims over the next 20 years. By 2030, Muslims will make up more than a
quarter of the global population [1].
It is quite clear that the World Muslim population is increasing at a dramatic rate.
The increase in the Muslims around the world means the increase in the number of
Scientific Journal of Informatics, Vol. 7, No. 2, November 2020 167
pilgrims coming to the holy lands of Makkah and Madinah every year [2]. Several
problems are faced by pilgrims due to the overcrowding of people in Masjid at the
time of Hajj and Umrah in Saudi Arabia. We have focused on the problem of filling
gaps inside Masjid to deliver an even distribution of people inside the mosque [3].
Figure 1 shows the masjid al Nabawi Madinah.
Figure 1. Masjid Al-Nabawi, Madinah
This study mainly focuses on limiting the over-crowding of the people in rows
during prayers at Masjid and could be implemented anywhere else [4-5]. Because
of the huge area of the mosque [6], it becomes very difficult for the people whether
to go further to the next row or not. In most cases, people just don’t care and step
forward towards the front, resulting in overcrowding and hence inconvenience to
the people [7-9]. We are proposing a novel system that could be used to limit the
overcrowding of the people and create an even distribution of people inside the
mosque.
There have been a lot of discussions about the approach that should be used to solve
the problems. A lot of debate was carried out at the Faculty of Computer and
Information Sciences about this issue. Various ideas were proposed including the
use of microcontrollers, sensors, laser-cameras, etc. After some critical reviews put
forward by some faculty members, we came up with a solution that was accepted
as an appropriate approach towards the solution to the problem [10-13]. We are
proposing Infra-Red technology to be used in this project as the best suitable tool
to solve the problem.
2. METHODS
2.1 Working Of The Infra-Red Camera
Most Infrared Security System will be able to capture clear images during the day
– which is exactly what we want. The overall effectiveness of a camera is marred
if you are not also fully protected at night-time. Night-time security is vital to have
because criminals will often choose to act under the cover of darkness [14].
Scientific Journal of Informatics, Vol. 7, No. 2, November 2020 168
Therefore infrared CCTV is a great all-round surveillance choice – it gets good
picture coverage no matter the time of day or night.
As CCTV becomes more commonly used, the systems become more sophisticated,
infrared CCTV for example, is now an affordable way of protecting a low-light
area. Infrared closed-circuit television cameras make this a reality, effectively
monitoring the darkness for your surveillance system [15]. This technology has
been used for the surveillance purpose so far, but here we are using it for a whole
new concept.
2.2 Thermal Imaging
The process used by infrared CCTV cameras for night-vision is known as thermal
imaging. People and objects constantly emit a level of heat referred to as thermal
energy. Thermal energy resides in the electromagnetic spectrum which in turn
occupies the top of the infrared light spectrum [16]. Thermal energy is invisible to
the naked eye because it is emitted from a source, as opposed to being reflected by
light. Infrared CCTV cameras use thermal imaging to capture various levels of
thermal energy and convert it to a light-based image that is visible to the human
eye [17]. This process of revealing the invisible occurs over several steps:
i. Infrared Lens - The specially designed lens of an infrared camera is used
to focus the levels of invisible infrared radiation within its view [18].
ii. Thermogram - Infrared detectors review the radiation focused by the lens
and proceed to create a temperature map known as a "thermogram." The
completed thermogram is then translated into a series of electric impulses
[19].
iii. Signal-Processing - Once converted into electric impulses, the
thermogram is sent to a chip on the camera or server known as the signal-
processing unit. This unit rebuilds the electric impulses as usable data
[20].
iv. Display - Once translated, the user data is sent to the display, where it
appears as a graphic rendition of the contrasting heat emissions that were
originally captured [21], [22]. These images exist in the visible spectrum,
allowing the human eye to see the subject via its thermal energy.
3. RESULTS AND DISCUSSION
The researchers themselves involved gathering most of the data for analysis.
Various strategies are applied for gathering data such as questionnaires,
assessment, and reporting. Analysis of the accuracy of the information requires
implementation through the use of tools and concepts. It includes the importance
of flexibility for collecting the data. This research has been carried out across
interconnected operations such as data elimination, application method/analysis
found, and completion.
The mosque will be divided into sections and each section will be allocated an
Infra-Red Camera. Figure 3 shows the rows of peoples and infrared cameras.
Scientific Journal of Informatics, Vol. 7, No. 2, November 2020 169
Figure 2. Coloring displayed by LED
Figure 3. Example of three rows and four columns in the Masjid
Each section will be programmed to contain a limited number of people. There will
be an LED display allocated to each section. Figure 2 shows the coloring produced
by the LED.
With the people coming into that section, the display will start becoming less
GREEN. In other words, the intensity of the GREEN LED display will become
weaker. As the section is filled, the display will turn red. This way, people could
see the section from quite a distance and can easily decide whether to move forward
or not. As soon as the people enter the mosque, they will have an overview of each
section and can decide to go to suitable places to get settled easily into the rows.
Algorithm-1 (count number of people in image)
Step 1: Read the Image
Step 2: Convert the Image to Grayscale
Step 3: Threshold the image
Step 4: Complement the image
Step 5: Find the Boundaries of the Objects
Program in Matlab
image1=imread('count.jpg');
imshow(image1) image1=rgb2gray(image1);
imshow(image1) image2=im2bw(image1, graythresh(image1));
imshow(image2) image2=~image2;
Scientific Journal of Informatics, Vol. 7, No. 2, November 2020 170
imshow(image2) t1 = bwboundaries(image2);
imshow(image2) text(10, 10, strcat('\color{green} Objects Found:', num2str
(length(t1))))
Algorithm-2 (output algorithm)
Step-1: Find the total number of persons from algorithm 1 say n.
Step 2: if n<Max goes to step 3 otherwise go to step 4.
Step 3: GREEN light will ON and the RED light will OFF.
Step 4: RED light will ON and GREEN light will OFF.
Our pre-programmed thermal camera will recognize people based on their body
temperature. Since the normal human body temperature is 38 C (98.6 F), this
system would create a thermogram of a human being. The LED display will go less
green as the system receives more thermograms. After reaching the highest level
of thermograms received, the LED display will automatically go RED. This would
naturally stop people to enter into that section. Figure 4 shows the real-time people
counting and display the color green because space is available in the rows.
Figure 4. Real-Time people counting and shows color
The output of the research shows that green indicator because the number of people
in a row is less than the maximum number. If the row is full then the red indicator
will be on.
5. CONCLUSION
This study aims to find the solution to the space finding problem in the Masjid and
continuous improvement of the ongoing research on Smart Masjid. The algorithm
is implemented that reads the thermogram which is captured by an Infra-Red
camera. Each thermogram is processed and the human images are defined making
Scientific Journal of Informatics, Vol. 7, No. 2, November 2020 171
it easy for the system to count the number of persons in each section and identify
the space between two prayers. Based on the input data, the output algorithm
responds. The output algorithm notifies whether there is any space left inside the
section or not using an LED display. The prayers will know the available space
inside the Masjid using the lighting system. Greenlight indicated "the space is
available" and red light indicated "the space is not available". In the future, this
study can be implemented in smart Masjids in whole the world.
REFERENCES
[1] Kettani, H. (2010). Muslim population in europe: 1950-2020.
International Journal of Environmental Science and Development, 1(2),
154.
[2] Al-Kodmany, K. (2009). Planning for the Hajj: political power,
pragmatism, and participatory GIS. Journal of Urban Technology, 16(1),
5-45.
[3] Haase, K., Al Abideen, H. Z., Al-Bosta, S., Kasper, M., Koch, M., Müller,
S., & Helbing, D. (2016). Improving pilgrim safety during the hajj: an
analytical and operational research approach. Interfaces, 46(1), 74-90.
[4] Aqel, M. O., Issa, A., Nada, D. A., & Draz, S. (2018, October).
Development of Smart Masjid Display Using Raspberry Pi. In 2018
International Conference on Promising Electronic Technologies (ICPET)
(pp. 118-123). IEEE.
[5] Yusarelan, M. N. A., Hamid, S. Z. A., Rashid, R. A., & Ibrahim, A. K. M.
(2020, July). IoT Based Temperature Control for Smart Mosque. In IOP
Conference Series: Materials Science and Engineering (Vol. 884, No. 1,
p. 012079). IOP Publishing.
[6] Alamri, R. J., Alkhuriji, M. S., Alshamani, M. S., Ibrahim, O. Y., &
Haron, F. (2018, April). Al-Masjid An-Nabawi Crowd Adviser Crowd
Level Estimation Using Head Detection. In 2018 1st International
Conference on Computer Applications & Information Security
(ICCAIS) (pp. 1-4). IEEE.
[7] Alshehri, A., Arif, M., & Felamban, E. (2016). Simulation of crowd in the
corridor of ziara in Masjid-e-Nabwi, Madinah. In Traffic and Granular
Flow'15 (pp. 353-360). Springer, Cham.
[8] Rossi, M., Cattari, S., & Lagomarsino, S. (2015). Performance-based
assessment of the Great Mosque of Algiers. Bulletin of Earthquake
Engineering, 13(1), 369-388.
[9] Shannahan, D. S. (2014). Gender, inclusivity and UK mosque
experiences. Contemporary Islam, 8(1), 1-16.
[10] Hakim, N. (2008). Mosque architecture past and present. In Sacred
Buildings. Birkhäuser Basel, Springer. pp. 46-53.
[11] Setiadi, H. (2015). Islam and Urbanism in Indonesia: The mosque as
urban identity in Javanese Cities. In The Changing World Religion Map
(pp. 2415-2436). Springer, Dordrecht.
[12] Yusarelan, M. N. A., Hamid, S. Z. A., Rashid, R. A., & Ibrahim, A. K. M.
(2020, July). IoT Based Temperature Control for Smart Mosque. In IOP
Scientific Journal of Informatics, Vol. 7, No. 2, November 2020 172
Conference Series: Materials Science and Engineering (Vol. 884, No. 1,
p. 012079). IOP Publishing.
[13] Sumaryanto, T. (2016). Planning for The Smart Mosque as Islamic
Learning Resources Center. Indonesian Journal of Islamic Literature and
Muslim Society, 1(2), 167-180.
[14] Ciampa, F., Mahmoodi, P., Pinto, F., & Meo, M. (2018). Recent advances
in active infrared thermography for non-destructive testing of aerospace
components. Sensors, 18(2), 609.
[15] Haurum, J. B., & Moeslund, T. B. (2020). A Survey on Image-Based
Automation of CCTV and SSET Sewer Inspections. Automation in
Construction, 111, 103061.
[16] McCarthy, A., Krichel, N. J., Gemmell, N. R., Ren, X., Tanner, M. G.,
Dorenbos, S. N., ... & Buller, G. S. (2013). Kilometer-range, high
resolution depth imaging via 1560 nm wavelength single-photon
detection. Optics express, 21(7), 8904-8915.
[17] Falco, C. M. (2009). Invited Article: High resolution digital camera for
infrared reflectography. Review of scientific instruments, 80(7), 071301.
[18] Ma, J., Ma, Y., & Li, C. (2019). Infrared and visible image fusion methods
and applications: A survey. Information Fusion, 45, 153-178.
[19] Nigam, R. K. (2018). Application of Thermal Imaging in Forensic Vision.
Indonesian Journal of Legal and Forensic Sciences, 8(1), 15-18.
[20] Yu, Y., Mariotti d’Alessandro, M., Tebaldini, S., & Liao, M. (2020).
Signal Processing Options for High Resolution SAR Tomography of
Natural Scenarios. Remote Sensing, 12(10), 1638.
[21] Aljohani, M., & Alam, T. (2017). Real time face detection in ad hoc
network of android smart devices. In Advances in Computational
Intelligence (pp. 245-255). Springer, Singapore.
[22] Alam, T. (2020). CMI Computing: A Cloud, MANET, and Internet of
Things Integration for Future Internet. Jambura Journal of Informatics,
2(1), 1-22.