SMART CITY SECURITY: FACE-BASED IMAGE RETRIEVAL MODEL USING GRAY LEVEL CO-OCCURRENCE MATRIX

Nowadays, a lot of images and documents are saved on data sets and cloud servers such as certificates, personal images, and passports. These images and documents are utilized in several applications to serve residents living in smart cities. Image similarity is considered as one of the applications of smart cities. The major challenges faced in the field of image management are searching and retrieving images. This is because searching based on image content requires a long time. In this paper, the researchers present a secure scheme to retrieve images in smart cities to identify wanted criminals by using the Gray Level Co-occurrence Matrix. The proposed scheme extracts only five features of the query image which are contrast, homogeneity, entropy, energy, and dissimilarity. This work consists of six phases which are registration, authentication, face detection, features extraction, image similarity, and image retrieval. The current study runs on a database of 810 images which was borrowed from face94 to measure the performance of image retrieval. The results of the experiment showed that the average


INTRODUCTION
Population growth has become one of the most interesting topics for researchers and practitioners, they show that the percentage of populations in modern cities is 54% while in the rural areas is 46%, and the increase in urban cities will rise to 66% at the beginning of 2050 (Makrushin & Dashchenko, 2016). In order to address population growth in urban centers, the idea of using communication and technology is emerging to reduce costs and create a more livable urban environment. The use of sensors, technology, and communication in cities has led to the use of the new term "smart city." Smart city has been defined as the use of communication technology to collect data which is used to integrate key information of core systems running cities; which makes intelligent responses to the different needs of its residents, including managing transportation systems, traffic, water supply networks, and others (Qin et al., 2010). When cities become smarter, a series of security breaches are expected because of the vulnerabilities of smart city applications (Biswas & Muthukkumarasamy, 2016;Martínez-Ballesté et al., 2013). Therefore new trends of smart city security have emerged to counter smart city threats (Gharaibeh et al., 2017). Energy system monitors energy generation by using a set of sensors to analyze collected data. Zanella et al. (2014) focused more attention on the Internet of Things (IoT) and surveyed the most important protocols and technologies related to smart cities in Padova, Italy. The main findings characterized in their survey revealed that most smart cities employed the same features in technologies. For instance, the vehicle monitoring system observes roads and collects car information regarding city security. The smart environment monitoring system uses sensors to collect data about the environment so as to create a suitable climate and sustainable environment for the smart cities. In this study, we present a secure scheme to retrieve images from smart city servers to identify wanted criminals by using Gray Level Co-occurrence Matrix (GLCM).
The proposed scheme extracts only five features of query images which are: contrast, homogeneity, entropy, energy, and dissimilarity. This work consists of six phases which are registration, authentication, face detection, features extraction, image similarity, and image retrieval. The main contribution of this research is to develop a scheme for image similarity and document retrieval. The proposed scheme is developed based on the critical analysis of image matching factors in a smart city environment, which could indicate a reliable project to implement in government centers such as a police station. In this study we improved on smart city security, enhanced the performance of police stations and the competitiveness of smart city services. There are many benefits that can be gained from the proposed scheme such as providing a method to efficiently identify wanted criminals through checking their images and retrieving related documents. The rest of this paper is organized as follows: the related works are summaried in the second section and the proposed phases in the scheme are presented in the third section. The fourth section focuses on the experimental design and results analysis. We run the proposed scheme and study its performance and efficiency in the fifth section. Finally, the sixth section presents the conclusion and future work.

RELATED WORK
In this section, we present a brief overview of existing research in the field of image retrieval and smart city security. In recent years the terms, smart cities, remote sensing, and observation technologies have been bandied about and frequently this question would pop up, what is a smart city? A smart city is an urban area that utilizes too many kinds of electronic sensors to aggregate data which is the main source to manage the assets of smart cities and its resources efficiently (Gracia & García, 2018;McLaren & Agyeman, 2015). Smart cities have different approaches to collect data from devices, citizens, and assets that are used to conduct analysis, make decisions, control transportation systems, power plants, traffic, water supply networks, law enforcement, information systems and others (Gracia & García, 2018;Musa, 2016). Smart city security has become one of the most important issues required to keep residents and their assets secure (Kumar et al., 2016). Smart cities use different information systems to provide a high quality of life for its citizens in a clean, energy efficient and climate-friendly urban environment (Bartoli et al., 2011). Smart cities cannot be smart without information systems, databases, and technology (Bartoli et al., 2011). This explains why several information systems are running concurrently to make the life of local residents easier because of the services provided. This research focuses on one of these information systems which is image retrieval and its role in maintaining the safety of city residents. In the next section, we present different techniques, algorithms, and studies on image retrieval.
GLCM was used to retrieve documents from a data set (Dixit & Shirdhonkar, 2018). This approach utilized three algorithms to extract document images, perform features extraction, and retrieve documents. As a result, it achieved 82.66 as average precision and 26.8 as average recall. This study suffered from response time because the number of retrieved documents was 20 which required a long time to react (time-consuming). This issue was solved by minimizing the number of retrieval images and documents to support response time. Thus, Dixit and Shirdhonkar (2018) proposed a new method for document retrieval based on features extracted from face biometrics. Their study used only three phases to retrieve documents which were: (1) extraction of personal images from query documents (2) extraction of personal image features and (3) retrieval of documents with image features. The efficiency of the proposed method was measured by average precision and average recall which were 67.15 and 16.52, respectively. This study experienced a fundamental issue which was that query documents already contained personal images and personal information. Document information such as name, ID, and numbers were easy to search and retrieve in databases as these documents contained similar information. Thus, the current study uses an online camera to capture personal images, and then request that all documents have the same image features. Du et al. (2020) presented a fast and secure scheme for image retrieval by using deep hashing algorithm. This work combined block 4-D hyperchaotic system and DNA sequence to encrypt examined images. This experiment of the proposed scheme was run on CIFAR-10 dataset which contained 1000 images and the retrieval efficiency achieved was 0.8931 which was considered as impressive. Thus, the current research consists of generating a once dynamic Token from the hash table used to encapsulate a shared key before sending to the Police Office in addition, image features are retrieved images which are sent to the PO encrypted. There were also several studies developed based on neural networks to retrieve images. The fuzzy hybrid learning algorithm was used as a neural network for image recognition and retrieval (Haddadnia et al., 2003). The current study proposes a new algorithm for system learning that offers faster convergence, less sensitivity and the average precision achieved in this study is estimated at 99.55%. Huang et al. (2018) argued that the performance of image retrieval depended on database size, database structure, and index file, which was the result of a study employing Neural Networks to develop MRBDL framework for image retrieval. The deep hashing on neural networks to force remote sensing to make correct decisions on image retrieval was conducted by Huang et al. (2018) and Wang et al. (2016) which trained neural networks to retrieve images and implemented developed frameworks from databases of animals, buildings and other objects. Li et al. (2018) employed deep hashing neural networks (DHNNs) to train remote sensing for image retrieval and examined images from general satellite databases. The proposed sensing showed sufficient results in comparison with other studies. retrieve documents. As a result, it achieved 82.66 as average precision and 26.8 as averag This study suffered from response time because the number of retrieved documents was 2 required a long time to react (time-consuming). This issue was solved by minimizing the of retrieval images and documents to support response time. Thus, Dixit and Shirdhonka proposed a new method for document retrieval based on features extracted from face bio Their study used only three phases to retrieve documents which were: (1) extraction of images from query documents (2) extraction of personal image features and (3) retr documents with image features. The efficiency of the proposed method was measured by precision and average recall which were 67.15 and 16.52, respectively. This study exper fundamental issue which was that query documents already contained personal ima personal information. Document information such as name, ID, and numbers were easy t and retrieve in databases as these documents contained similar information. Thus, the study uses an online camera to capture personal images, and then request that all docume the same image features. Du et al. (2020) presented a fast and secure scheme for image retrieval by usi hashing algorithm. This work combined block 4-D hyperchaotic system and DNA seq encrypt examined images. This experiment of the proposed scheme was run on CIFAR-10 which contained 1000 images and the retrieval efficiency achieved was 0.8931 wh considered as impressive. Thus, the current research consists of generating a once dynami (TK) from the hash table used to encapsulate a shared key (SK) before sending to th Office (PO); in addition, image features are retrieved images which are sent to the PO en There were also several studies developed based on neural networks to retrieve images. T hybrid learning algorithm was used as a neural network for image recognition and (Haddadnia et al., 2003). The current study proposes a new algorithm for system learn offers faster convergence, less sensitivity and the average precision achieved in this estimated at 99.55%. Huang et al. (2018) argued that the performance of image retrieval depended on size, database structure, and index file, which was the result of a study employing Networks to develop MRBDL framework for image retrieval. The deep hashing on networks to force remote sensing to make correct decisions on image retrieval was cond Huang et al. (2018) and Wang et al. (2016) which trained neural networks to retrieve ima implemented developed frameworks from databases of animals, buildings and other objec retrieve documents. As a result, it achieved 82.66 as average precision a This study suffered from response time because the number of retrieved required a long time to react (time-consuming). This issue was solved b of retrieval images and documents to support response time. Thus, Dixi proposed a new method for document retrieval based on features extrac Their study used only three phases to retrieve documents which were: ( images from query documents (2) extraction of personal image featu documents with image features. The efficiency of the proposed method precision and average recall which were 67.15 and 16.52, respectively. fundamental issue which was that query documents already contain personal information. Document information such as name, ID, and num and retrieve in databases as these documents contained similar inform study uses an online camera to capture personal images, and then reques the same image features. Du et al. (2020) presented a fast and secure scheme for image hashing algorithm. This work combined block 4-D hyperchaotic system encrypt examined images. This experiment of the proposed scheme was which contained 1000 images and the retrieval efficiency achieved considered as impressive. Thus, the current research consists of generatin (TK) from the hash table used to encapsulate a shared key (SK) befo Office (PO); in addition, image features are retrieved images which are There were also several studies developed based on neural networks to re hybrid learning algorithm was used as a neural network for image (Haddadnia et al., 2003). The current study proposes a new algorithm offers faster convergence, less sensitivity and the average precision a estimated at 99.55%. Huang et al. (2018) argued that the performance of image retriev size, database structure, and index file, which was the result of a Networks to develop MRBDL framework for image retrieval. The networks to force remote sensing to make correct decisions on image re Huang et al. (2018) and Wang et al. (2016) which trained neural networ implemented developed frameworks from databases of animals, building retrieve documents. As a result, it achieved 82.66 as average precision and 26.8 as average This study suffered from response time because the number of retrieved documents was 20 required a long time to react (time-consuming). This issue was solved by minimizing the n of retrieval images and documents to support response time. Thus, Dixit and Shirdhonkar proposed a new method for document retrieval based on features extracted from face biom Their study used only three phases to retrieve documents which were: (1) extraction of pe images from query documents (2) extraction of personal image features and (3) retrie documents with image features. The efficiency of the proposed method was measured by a precision and average recall which were 67.15 and 16.52, respectively. This study experie fundamental issue which was that query documents already contained personal imag personal information. Document information such as name, ID, and numbers were easy to and retrieve in databases as these documents contained similar information. Thus, the c study uses an online camera to capture personal images, and then request that all document the same image features. Du et al. (2020) presented a fast and secure scheme for image retrieval by usin hashing algorithm. This work combined block 4-D hyperchaotic system and DNA seque encrypt examined images. This experiment of the proposed scheme was run on CIFAR-10 which contained 1000 images and the retrieval efficiency achieved was 0.8931 whic considered as impressive. Thus, the current research consists of generating a once dynamic (TK) from the hash table used to encapsulate a shared key (SK) before sending to the Office (PO); in addition, image features are retrieved images which are sent to the PO enc There were also several studies developed based on neural networks to retrieve images. The hybrid learning algorithm was used as a neural network for image recognition and re (Haddadnia et al., 2003). The current study proposes a new algorithm for system learnin offers faster convergence, less sensitivity and the average precision achieved in this st estimated at 99.55%. Huang et al. (2018) argued that the performance of image retrieval depended on da size, database structure, and index file, which was the result of a study employing Networks to develop MRBDL framework for image retrieval. The deep hashing on networks to force remote sensing to make correct decisions on image retrieval was conduc Huang et al. (2018) and Wang et al. (2016) which trained neural networks to retrieve imag implemented developed frameworks from databases of animals, buildings and other object Image processing has been employed in different fields such as health and education to serve the world residents; for example, image processing and artificial intelligence or image processing and information system. Liliana et al. (2020) developed an artificial intelligent model analyzing facial expressions by using image features such as intensity, opened eyes, texture, histogram, and wrinkles which are used to investigate human emotions to better understand human interactions. Ahmad et al. (2018) used an efficient method for image optimization, deep learning technique, and feature extraction to retrieve required images. The main secret of features extraction in this study was removing the background of images for better selection which led to accurate image detection. This study was run on a large database consisting of different categories such as vehicles, animals, and rivers. Meng et al. (2016) presented features extraction method to retrieve images. This study ran on different databases and resulted in high levels of accuracy. The main weakness of this study was that the results were not realistic for some objects. Moreover, the image optimization technique was not suitable for all images. Finally, based on the review of the literature, it can be seen that the implementation of image retrieval in smart cities has received less attention compared with other fields of technologies. Thus, the current study intends to address the gap through a new proposed scheme to support smart city security based on image retrieval. The experimental results of this proposed scheme showed an average precision of 97.6 and an average recall of 6.3.

Proposed Scheme
Our proposed scheme is composed of six phases: registration, authentication, detection, features extraction, similarity, and retrieval phase. Registration is the first phase to collect Police Officer information such as username ,password fingerprint features and police station address The second phase is the Authentication Phase for recognizing the user's identity. It is a process of associating a received request with a set of identifying credentials collected in the registration phase. The credentials provided are compared to the records saved in a database of the authorized user's information in the cloud service provider The third phase, the Detection Phase is the name for a set of mathematical methods for identifying personal faces in digital images which can be used for object detection and classification. This is to reduce the digital file size while preserving the value of the image. In the fourth phase, the Features Extraction Phase is used to convert the huge amounts of pixels into numerous content features that enable efficient image classification of data images gathered from multiple sources. In the fifth phase, the Similarity Phase is an assessment process of an image matching ratio; images are often compared with a dataset of images to find the required images. Finally, in the sixth phase, the Retrieval Phase is processing and information system.

Proposed Scheme
Our proposed scheme is composed of six phases: extraction, similarity, and retrieval phase. Registr ). The second phase is the Authentication Phase (AP) for recognizing the is a process of associating a received request with a set of identifying d in the registration phase. The credentials provided are compared to the database of the authorized user's information in the cloud service provider ase, the Detection Phase (DF) is the name for a set of mathematical methods sonal faces in digital images which can be used for object detection and processing and information system. Liliana et al. (2020) developed an artificial intelligent model analyzing facial expressions by using image features such as intensity, opened eyes, texture, histogram, and wrinkles which are used to investigate human emotions to better understand human interactions. Ahmad et al. (2018) used an efficient method for image optimization, deep learning technique, and feature extraction to retrieve required images. The main secret of features extraction in this study was removing the background of images for better selection which led to accurate image detection. This study was run on a large database consisting of different categories such as vehicles, animals, and rivers. Meng et al. (2016) presented features extraction method to retrieve images. This study ran on different databases and resulted in high levels of accuracy. The main weakness of this study was that the results were not realistic for some objects.
Moreover, the image optimization technique was not suitable for all images. Finally, based on the review of the literature, it can be seen that the implementation of image retrieval in smart cities has received less attention compared with other fields of technologies. Thus, the current study intends to address the gap through a new proposed scheme to support smart city security based on image retrieval. The experimental results of this proposed scheme showed an average precision of 97.6 and an average recall of 6.3.

Proposed Scheme
Our proposed scheme is composed of six phases: registration, authentication, detection, features extraction, similarity, and retrieval phase. Registration is the first phase to collect Police Officer for identifying personal faces in digital images which can be used for object detection and processing and information system. Liliana et al. (2020) developed an artificial intelligent model analyzing facial expressions by using image features such as intensity, opened eyes, texture,

Proposed Scheme
Our proposed scheme is composed of six phases: registration, authentication, detection, features extraction, similarity, and retrieval phase. Registration is the first phase to collect Police Officer

Proposed Scheme
Our proposed scheme is composed of six extraction, similarity, and retrieval phase.
(PO) information such as username (US), station address(PSA). The second phase user's identity. It is a process of asso credentials collected in the registration records saved in a database of the autho (CSP). The third phase, the Detection Pha for identifying personal faces in digital orld residents; for example, image processing and artificial intelligence or image and information system. Liliana et al. (2020)

Registration Phase
associated with the assessment results to send the highest similarity in images to the

Registration Phase
Registration is the initial stage conducted to aggregate the information. The information gathering is used to identify the identity and to evaluate permission to access the Registration aims to create a record related to each Figure 1 shows the details of the registration phase.The main steps of this phase are summarized in Algorithm 1.

Algorithm 1: PO registration
INPUT: Email, username, password, and fingerprint OUTPUT: Complete the registration of PO Step 1: Begin.
Step 2: PO has to provide a valid email to the CSP to verify the PO.
Step 3: CSP checks the email against the availability of the email.
Step 4: CSP asks the PO to submit a piece of information where the email is available, otherwise asks for another email.
Step 5: PO submits the US, PW, and PSA.
Step 6: CSP sends a request to upload the PO's fingerprint (FP).
Step 7: PO uploads the FP.
Step 8: CSP extracts the FPF, then stores it in the database.
Step 9: CSP confirms the completion of the registration phase.
Step 10: End. stores it in the database.
ion of the registration phase.
image matching ratio; images are often compared with a dataset of images to find the required images. Finally, in the sixth phase, the Retrieval Phase (RP) is associated with the assessmen results to send the highest similarity in images to the PO .

Registration Phase
Registration is the initial stage conducted to aggregate the information. The informatio gathering ( , , , ), is used to identify the identity and to evaluate permission t access the . Registration aims to create a record related to each . Figure 1 shows th details of the registration phase.The main steps of this phase are summarized in Algorithm 1. Step 1: Begin.
Step 2: PO has to provide a valid email to the CSP to verify the PO.
Step 3: CSP checks the email against the availability of the email.
Step 4: CSP asks the PO to submit a piece of information where the email is available, otherwis asks for another email.
Step 5: PO submits the US, PW, and PSA.
Step 6: CSP sends a request to upload the PO's fingerprint (FP).
Step 7: PO uploads the FP.
Step 8: CSP extracts the FPF, then stores it in the database.
Step 9: CSP confirms the completion of the registration phase.
image matching ratio; images are often compared with a dataset of image images. Finally, in the sixth phase, the Retrieval Phase (RP) is associated results to send the highest similarity in images to the PO .

Registration Phase
Registration is the initial stage conducted to aggregate the informa Step 1: Begin.
Step 2: PO has to provide a valid email to the CSP to verify the PO.
Step 3: CSP checks the email against the availability of the email.
Step 4: CSP asks the PO to submit a piece of information where the email i asks for another email.
Step 5: PO submits the US, PW, and PSA.
Step 6: CSP sends a request to upload the PO's fingerprint (FP).
Step 7: PO uploads the FP.
Step 8: CSP extracts the FPF, then stores it in the database.
Step 9: CSP confirms the completion of the registration phase.
image matching ratio; images are often compared images. Finally, in the sixth phase, the Retrieval P results to send the highest similarity in images to th

Registration Phase
Registration is the initial stage conducted to aggr Step 1: Begin.
Step 2: PO has to provide a valid email to the CSP t Step 3: CSP checks the email against the availability Step 4: CSP asks the PO to submit a piece of inform asks for another email.
Step 5: PO submits the US, PW, and PSA.
Step 6: CSP sends a request to upload the PO's fing Step 7: PO uploads the FP.
Step 8: CSP extracts the FPF, then stores it in the da Step 9: CSP confirms the completion of the registra Step 10: End.
the Similarity Phase (SP) is an assessment process of an compared with a dataset of images to find the required etrieval Phase (RP) is associated with the assessment ages to the PO . ed to aggregate the information. The information identify the identity and to evaluate permission to eate a record related to each . Figure 1 shows the steps of this phase are summarized in Algorithm 1. ; images are often compared with a dataset of images to find the required e sixth phase, the Retrieval Phase (RP) is associated with the assessment hest similarity in images to the PO .
itial stage conducted to aggregate the information. The information , ), is used to identify the identity and to evaluate permission to stration aims to create a record related to each . Figure 1 shows the on phase.The main steps of this phase are summarized in Algorithm 1.

Authentication Phase
This phase is divided into two sub-phases which are the handshaking phase and authorization phase. The main steps of this phase are summarized in Algorithms 2 and 3:

Algorithm 2: Handshaking phase
INPUT: Username and password OUTPUT: Police officer authentication Step 1: Begin.
Step 2: should submit his and to CSP.
Step 3: CSP checks the validity of with the stored information which is initialized in the registration phase (RP).
Step 4: After approving the differences in the CSP generates a once dynamic token (TK) from the hash table, that is used to encapsulate a shared key (SK) before sending it to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtaining the SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

Algorithm 3: Authorization
INPUT: FP OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key which is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.

Authentication Phase
This phase is divided into two sub-phases which are the handshaking phase and authoriz phase. The main steps of this phase are summarized in Algorithms 2 and 3: Step 1: Begin.
Step 2: should submit his and to CSP.
Step 3: CSP checks the validity of , with the stored information which is initialized i registration phase (RP).

Authentication Phase
This phase is divided into two sub-phases which are the handshaking phase and authoriz phase. The main steps of this phase are summarized in Algorithms 2 and 3: Algorithm 2: Handshaking phase INPUT: Username and password OUTPUT: Police officer authentication Step 1: Begin.
Step 2: should submit his and to CSP.
Step 3: CSP checks the validity of , with the stored information which is initialized i registration phase (RP).
Step 4: After approving the differences in , & , the CSP generates a once dynamic to (TK) from the hash table, that is used to encapsulate a shared key (SK) before sendin to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtaining SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to wh is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.
Step 4: After approving the differences in , & , the CSP generates a once dynamic (TK) from the hash table, that is used to encapsulate a shared key (SK) before send to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtainin SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to w is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.

Authentication Phase
This phase is divided into two sub-phases which are the handshaking phase and authoriz phase. The main steps of this phase are summarized in Algorithms 2 and 3: Algorithm 2: Handshaking phase INPUT: Username and password OUTPUT: Police officer authentication Step 1: Begin.
Step 2: should submit his and to CSP.
Step 3: CSP checks the validity of , with the stored information which is initialized registration phase (RP).

Authentication Phase
This phase is divided into two sub-phases which are the handshaking phase and authoriz phase. The main steps of this phase are summarized in Algorithms 2 and 3: Algorithm 2: Handshaking phase INPUT: Username and password OUTPUT: Police officer authentication Step 1: Begin.
Step 2: should submit his and to CSP.
Step 3: CSP checks the validity of , with the stored information which is initialized i registration phase (RP).
Step 4: After approving the differences in , & , the CSP generates a once dynamic (TK) from the hash table, that is used to encapsulate a shared key (SK) before send to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtainin SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to w is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.
Step 7: End. Where, Step 4: After approving the differences in , & , the CSP generates a once dynamic t (TK) from the hash table, that is used to encapsulate a shared key (SK) before send to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtainin SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to w is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.
Step 7: End. Where, Step 4: After approving the differences in , & , the CSP generates a once dynamic t (TK) from the hash table, that is used to encapsulate a shared key (SK) before send to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtainin SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to w is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.

SKi =Shared Key
Step 4: After approving the differences in , & , the CSP generates a once dynamic (TK) from the hash table, that is used to encapsulate a shared key (SK) before send to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtainin SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to w is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.

SKi =Shared Key
Step 4: After approving the differences in , & , the CSP generates a once dynamic to (TK) from the hash table, that is used to encapsulate a shared key (SK) before sendin to the PO's email or SMS as shown in Equation 1 and Figure 2.
Step 5: checks the email and mobile to decapsulate the received token, before obtaining SK for further authentication as shown in Equation 2 and Figure 3.
Step 6: PO has to enter the SK value in the login interface for authentication process.

INPUT: FP
OUTPUT: Access to server resources Step 1: Begin.
Step 2: CSP requests to send FP.
Step 3: uploads his FP, which is stored in flash memory or mobile memory.
Step 4: CSP extracts the FP's features, then checks by matching the FPF with the fingerprint features stored in the database.
Step 5: After approving the matching of FPF, CSP sends a secret key (SK Z_n^+) to whi is required in the retrieval phase.
Step 6: Finally, CSP provides an access to the server resources.

Face Detection Phase
Face detection phase focuses on personal face discovery inside a digital image, which means examining an image to identify whether there is a certain person's face and where this face is located. This is to design a robust system for image classification based on object detection. Image classification depends on detected facial features which are compared with those stored in the database, as shown in Figure 4. The main steps of this phase are summarized in Algorithm 4.

Algorithm 4: Face detection
INPUT: The digital camera and examined persons OUTPUT: Face extraction Step 1: Begin.
Step 2: PO uses an online digital camera for capturing an image.
Step 3: PO only uploads personal face in the standard template.
Step 4: Identify the detected face.
Step 5: Transmit the identified face into the extraction phase.

Face Detection Phase
Face detection phase focuses on personal face discovery inside a digital image, which means examining an image to identify whether there is a certain person's face and where this face is located. This is to design a robust system for image classification based on object detection.
Image classification depends on detected facial features which are compared with those stored in the database, as shown in Figure 4. The main steps of this phase are summarized in Algorithm 4.

Algorithm 4: Face detection
INPUT: The digital camera and examined persons OUTPUT: Face extraction Step 1: Begin.
Step 2: PO uses an online digital camera for capturing an image.
Step 3: PO only uploads personal face in the standard template.
Step 4: Identify the detected face.
Step 5: Transmit the identified face into the extraction phase.

Features Extraction Phase
Features extraction is a set of methods, algorithms, and processes to collect several variables from a huge amount of data to simplify the description, classification, and similarity ratio of an image. Texture feature analysis helps to find the unique features for accurate classification of an image. There is a set of features grouped under texture analysis, terms such as: correlation, spatial frequency, inverse, angular, average gray level, and entropy. GLCM is a method used to implement texture analysis to extract image features. GLCM is a matrix where the number of rows and columns is equal to the number of gray levels. First, divide the gray level image to n-intensity levels by means of intensity maps. A number of intensity levels in the image decide the size of the GLCM. Each element of the matrix at position (i, j) represents the frequency of co-occurrence of two pixels with intensity i and j, respectively, separated by a distance 'k' in the direction specified by a displacement vector (da Silva Torres & Falcao, 2006;Dixit & Shirdhonkar, 2018). Only five features are extracted from an image in this study which is contrast, homogeneity, entropy, energy, and dissimilarity. Finally, GLCM works based on Algorithm 5:
Step 2: Separate RGB image to three channels which are R, G, and B.
Step 3: Divide each channel to 8-intensity levels.
Step 3 Find the GLCM for each level to come up with three matrixes which are GLCMR, GLCMG, GLCMB which are used to extract the factors.

Features Extraction Phase
Features extraction is a set of methods, algorithms, and processes to collect several variables from a huge amount of data to simplify the description, classification, and similarity ratio of an image.
Texture feature analysis helps to find the unique features for accurate classification of an image.
There is a set of features grouped under texture analysis, terms such as: correlation, spatial frequency, inverse, angular, average gray level, and entropy.
GLCM is a method used to implement texture analysis to extract image features. GLCM is a matrix where the number of rows and columns is equal to the number of gray levels. First, divide the gray level image to n-intensity levels by means of intensity maps. A number of intensity levels in the image decide the size of the GLCM. Each element of the matrix at position (i, j) represents the frequency of co-occurrence of two pixels with intensity i and j, respectively, separated by a distance 'k' in the direction specified by a displacement vector (da Silva Torres & Falcao, 2006;Dixit & Shirdhonkar, 2018). Only five features are extracted from an image in this study which is contrast, homogeneity, entropy, energy, and dissimilarity. Finally, GLCM works based on Algorithm 5: Step 1: Begin.
Step 2: Separate RGB image to three channels which are R, G, and B.
Step 3: Divide each channel to 8-intensity levels.
Step 3 Find the GLCM for each level to come up with three matrixes which are GLCMR, GLCMG, GLCMB which are used to extract the factors.

Image Similarity Phase
After distinguishing the image features of each face, the next step is to recognize the identities of the targeted face. The targeted face similarity is checked by comparing its features to the features of each face stored in the database. There are several studies conducted to check image similarity in order to achieve the classification. Image classification means identifying the distance between the examined face(s) and the database images. The main steps of this phase are summarized in Algorithm 6 and shown in Figure 5.

Algorithm 6: Image similarity
INPUT: Examined image OUTPUT: The queue of similar images Step 1: Begin.
Step 2: Let EI={img j } where EI denotes the examined image.
Step 4: Let D(i, j), means a distance between two images, img i and img j which depend on examined features.
Step 5: Based on the results of distance function, D(i,j).
Step 6: Database images are ranked, which creates a queue of images from high similarity to low similarity QI={img h1, img h2, img h3, ……,img hn }, QI denotes queue image, and H index means the similarity in ranks.
Step 7: Finally, redirect the QI to the retrieval phase which is responsible for passing the top image(s) to the PO as shown in Figure 5.
These five factors are sent as a string to a similarity phase which is responsible for checking th percentage of similarity as shown in Equation 3.
Step 4: Let D(i, j), means a distance between two images, imgi and imgj which depend o examined features.
Step 7: Finally, redirect the QI to the retrieval phase which is responsible for passing the top image(s) to the PO as shown in Figure 5.

Image Retrieval Phase
Image retrieval phase plays a core role in our scheme which is defined as processes to collect an image(s) with the highest simlarity ratio to send to . This phase receives QI={imgh1, imgh2, imgh3,……, imghn} from the similarity phase, and only selects the top three images which are in the start of the queue and sends to . The main steps of this phase are summarized in Algorithm 7 and Figure 6.

Image Retrieval Phase
Image retrieval phase plays a core role in our scheme which is defined as processes to collect an image(s) with the highest simlarity ratio to send to This phase receives QI={img h1, img h2, img h3, ……, img hn } from the similarity phase, and only selects the top three images which are in the start of the queue and sends to The main steps of this phase are summarized in Algorithm 7 and Figure 6. Step 1: Begin.
Step 2: CSP retrieves the top three images and sends to PO.
Step 3: PO uses the secret key and fingerprint to decrypt the retrieved images.
Step 4: PO selects the required image(s).
Step 5: CSP sends the selected image ID(s) to Smart City Servers (SCS) Step 6: SCS sends the full documents of required ID(s) to CSP.
Step 7: CSP sends the documents to PO.
Step 8: End. Step 6: SCS sends the full documents of required ID(s) to CSP.
Step 7: CSP sends the documents to PO.
Step 8: End. Finally, Figure 7 shows the proposed scheme with six phases: registration, authentication, detection, features extraction, similarity, and retrieval. First phase-registration to collect the PO information. Second phase-authentication to ensure only the authorized PO can access the CSP database and check for image similarity. Third phase-face detection to upload personal image(s) into the proposed system. Fourth phase-features extraction to create a database of features. Fifth phase-check the similarity between query image(s) and database features, and the sixth phase, retrieval phase to retrieve top images to send to

Image Retrieval Phase
Image retrieval phase plays a core role in our scheme which is defined as processes to collect an image(s) with the highest simlarity ratio to send to . This phase receives QI={imgh1, imgh2, imgh3,……, imghn} from the similarity phase, and only selects the top three images which are in the start of the queue and sends to . The main steps of this phase are summarized in Algorithm 7 and Figure 6.

Experimental Results
In order to evaluate the performance of our proposed scheme regarding the search efficiency, we ran the proposed scheme on a real image database of face94 constructed by Dr. Libor Spacek which has 27 classes of an image. Our experiments were conducted on a 2.5 GHz Intel i7-6500U processor; with a Windows 10 operating system of 64-bits, and 8 GB RAM (Lenovo Laptop). Furthermore, we used Java NetBeans IDE 8.0.2 to run our experiments.

Database Structure
The first step of the proposed scheme was creating a database of extracted features by using the 810-color images, which classified into 27 classes-16 classes for men and 11 classes for women. Each member was related to five documents. The total size of the database is computed in Equation 4.
The extracted features of these images were contrast, homogeneity, entropy, energy, and dissimilarity. The documents related to the database of members were: passport, identification card, driving license, certificate, and work ID. Figure 8 shows a sample of the documents related to the database image.

(4)
In order to evaluate the performance of our proposed scheme regarding the search efficiency, ran the proposed scheme on a real image database of face94 constructed by Dr. Libor Spac which has 27 classes of an image. Our experiments were conducted on a 2.5 GHz Intel i7-650 processor; with a Windows 10 operating system of 64-bits, and 8 GB RAM (Lenovo Lapto Furthermore, we used Java NetBeans IDE 8.0.2 to run our experiments.

Database Structure
The first step of the proposed scheme was creating a database of extracted features by using 810-color images, which classified into 27 classes-16 classes for men and 11 classes for wom Each member was related to five documents. The total size of the database is computed The extracted features of these images were contrast, homogeneity, entropy, energy, a dissimilarity. The documents related to the database of members were: passport, identificat card, driving license, certificate, and work ID. Figure 8 shows a sample of the documents rela to the database image. The database creation time differed, depending on the database size, the first 10 classes was created in 12 seconds, the second 20 classes was created in 64 seconds and the total number of classes which was 27 was created in 119 seconds as shown in Figure 9.

Related documents
The database creation time differed, depending on the database size, the first 10 classes was created in 12 seconds, the second 20 classes was created in 64 seconds and the total number of classes which was 27 was created in 119 seconds as shown in Figure 9.  Figure 10 shows the retrieved images for the requested image using the proposed scheme. The proposed model retrieved exactly what was requested by the image where the database size was 810 images. This was because there were only 30 images for each person. The proposed model retrieved some different images which were related to scheme accuracy, precision and recall as computed in the following sections.  The evaluation of our proposed scheme was conducted by computing the precision, recall and f-measure for retrieved samples of images and related documents. Average precision is a measure of relevant images retrieved to the total number of images retrieved as shown in Equation 5.
(5) Average recall is relevant images retrieved to the total number of relevant images in the database as shown in Equation 6.
(6) F-measure is the harmonic mean of precision and recall, as shown in the following Equation 7.
(7) Table 1 shows the result of image similarity and document retrieval by using the proposed scheme. The average precision is 97.66; the average recall result is 6.3 and the F-measure is equal to 11.7. The result presented in Table 1 is evidence of the performance of the proposed scheme. Top1 means the highest matching result to the inquiry image which decreases gradually to Top 3. Table 1 confirms that the implementation of the proposed scheme in the smart city will help the police to catch criminals because it shows high similarity in results. Table 2 presents the comparison of results with previous studies which proved that the proposed scheme has met high levels of precision and recall. The result in Table 2 confirms that the proposed scheme reached a high similarity point in the current study. Figures 11 and 12 present a comparison of results of the current proposed scheme with other studies in the field of image retrieval. : -measure is the harmonic mean of precision and recall, as shown in the following Equation 7. = (7) Table 1 shows the result of image similarity and document retrieval by using the roposed scheme. The average precision is 97.66; the average recall result is 6.3 and the Feasure is equal to 11.7. The result presented in Table 1 is evidence of the performance of the roposed scheme. Top1 means the highest matching result to the inquiry image which decreases radually to Top 3. Table 1 confirms that the implementation of the proposed scheme in the smart ity will help the police to catch criminals because it shows high similarity in results. Table 2 resents the comparison of results with previous studies which proved that the proposed scheme as met high levels of precision and recall. The result in Table 2 confirms that the proposed cheme reached a high similarity point in the current study. Figures 11 and 12  : -measure is the harmonic mean of precision and recall, as shown in the following Equation 7. = (7) Table 1 shows the result of image similarity and document retrieval by using the roposed scheme. The average precision is 97.66; the average recall result is 6.3 and the Feasure is equal to 11.7. The result presented in Table 1 is evidence of the performance of the roposed scheme. Top1 means the highest matching result to the inquiry image which decreases radually to Top 3. Table 1 confirms that the implementation of the proposed scheme in the smart ity will help the police to catch criminals because it shows high similarity in results. Table 2 resents the comparison of results with previous studies which proved that the proposed scheme as met high levels of precision and recall. The result in Table 2 confirms that the proposed cheme reached a high similarity point in the current study. Figures 11 and 12

IMAGE RETRIEVAL TIME
The efficiency of the proposed scheme was measured through first, computing the retrieval time of the required images and then documenting them (Haralick et al., 1973;Wang et al., 2016). Retrieval time was considered in the design of this scheme because of the fast response techniques related to the well designed and researching strategies of the query images. Figure 13 shows the retrieval time according to the proposed scheme.

IMAGE RETRIEVAL TIME
The efficiency of the proposed scheme was measured through first, computing the retrieval time of the required images and then documenting them (Haralick et al., 1973;Wang et al., 2016).
Retrieval time was considered in the design of this scheme because of the fast response techniques related to the well designed and researching strategies of the query images. Figure 13 shows the retrieval time according to the proposed scheme.

CONCLUSION
Admittedly there are some challenges in smart city security such as in identifying outsiders and criminals. This is because there has yet to be developed a study which reached 100% in terms of performance and efficiency of image matching in real time. This study proposes a new scheme to check for image similarity and retrieve documents based on query images which can help the police to establish the identity of criminals. The average precision achieved by the new scheme is 97.66 which indicated an excellent ability to identify wanted persons (criminals) and to retrieve the right documents. The most important features of the proposed scheme are: (1) use of the authentication phase to ensure only the right PO can access the image retrieval system (2) use of encapsulation and decapsulation of secret key (3) all images are encrypted before saving in a database, which means that this proposed scheme is able to resist malicious attacks such as spyware or the man in the middle (4) creation time of a database is minimized, and (5) short retrieval time of query images. For future work, the researchers intend to run the proposed scheme online in real time.