extfieldsofstudy:
Physics
Computer Science

text:
The Implementation of Electronic Voting System for Student Representation Council using reCAPTCHA

The electronic voting system (E-voting System) is a web-based application that enables voters to record safe and confidential votes electronically. This research aims to develop an E-Voting System by exploiting the ‘reCAPTCHA’ security component for a private international college. The Waterfall Model is deemed the most suitable to be used after data was gathered prior to developing the system and it is also considered simple to be employed. The functional testing was conducted with thirty students and results revealed that 63% of the respondents are in agreement that the traditional voting system should be supplanted with electronic voting system, especially to cut down the time in the voting process. Ultimately, the system developed demonstrated that it efficient, reliable and displayed transparency in the E-voting System.

Introduction
Election is the utmost leading method for associates to have ability to speak in the leadership and direction of their association. People feel a greater sense of value, authority, and obligation when they are allowed to vote in fair and open elections. Other than that, online voting service allow members of associations, peoples, and other independent organizations by making voting easy and useful [1].
According to Fish S [1], online voting decreases voting costs by controlling manufacture costs. In electronic votes, paper, postage and postal rates are all significantly lower than for traditional methods of polling. Also, employees will save time when electronic polls remove the need to collect ballot packets and tabulate votes manually. Moreover, he claims that there are no rejected, mismarked or null votes for online voting. The figures will be measured automatically, removing the need for manual tabulation and reckoning. Computerized tabulation helps administrators of elections to reveal the outcomes easily.
reCAPTCHA has been the most effective and reliable CAPTCHA program in recent years. The main property that distinguishes it from standard text-based CAPTCHAs is the method of creating problems that they are a by-product of digitizing huge quantities of data. Each time the algorithm for optical character recognition (OCR) fails to recognize one word properly, it is considered difficult to digitize and is applied to the reCAPTCHA program after further distortions. It means that the word in question is not audible by robots at once. ReCAPTCHA is used on several of the Internet's most popular sites, including Facebook, Twitter and Craigslist. According to reCAPTCHA, the apps overcome over 200 million tasks every day [2]. Google's reCAPTCHA software is the most commonly deployed captcha program, and many popular websites have implemented it to discourage computer bots from carrying out nefarious activities. Google confirmed that a new reCAPTCHA system is being implemented to make it more human-friendly and safe [3].

Problem Statement
Time Consumption -The student of (Kolej Teknologi Antarabangsa Cybernatics) KTAC is currently using the traditional system which is vote using paper ballot. The current traditional system is no longer suitable and convenient because there are many students that study in that college. This is not suitable because the organization need to hire others to calculate the vote or paper ballot during the elections. Use paper ballot is time consuming, but it creates a lot of work for the people participating in the counting of ballots. This will increase the time and costing for the institutions during this program.
Cost Increase -The manual system voting also increase the cost to hire more staff during the election process to avoid the fraud and lack of process during the elections. The rate of paper ballot expenditure is much greater than that of electronic voting. For the election commission, the use of electronic voting is quite economical.
Lack of Security -Poor security system because one can get easily the document and change whatever they want, loss of information. The manual election systems may not secure. For example, student can use other student document to proceed with the fake votes during election. Moreover, in few places where the traditional system is corrupt, they can easily insert several fake paper votes in the ballot and then it becomes impossible to track the honest votes. Paper is a flammable material, so, under certain situations, the document in which the votes were registered in the referendum could be lost or damage and then the records of the votes cannot be recovered.
Votes Counting -The manual system that being used is not accurate for the result because there is too many students' votes in one time. Sometimes the staff accidentally skip to count votes and makes the result not tally with the student's votes. The traditional system also not accurate during the calculation when the election finished. Using the computerized system will helps to improve the accuracy and can prevent frauds during the elections.

Objectives
More Secure -The system will be more secure and prevent from frauds or fake vote from other student. The system must be secure to prevent frauds, malicious attack and hacker. The system login will be completely secure with developer will implement the reCAPTCHA during login the system. The reCAPTCHA security is easy use on human but hard for bots. The reCAPTCHA security implementation is letting the valid user to pass through the system with ease. Bots is an interactive program for executing basic and repetitive tasks that would be time-consuming, uncommon or difficult to do for a human being. Bots can be used for productive tasks, but they are also frequently used for malicious purposes. Moreover, developer implement one time password which is for user enter valid code that have been sent to email. This method also can avoid fraud during election. Lastly, developer implement security for database. This security is called password hashing. Password hashing executes a password with one-way process, transforming the password into another string named the hashed password. Hashing password is for storing password securely in database.
Reduce Cost -The new system will reduce more cost of hiring other staff that will be on duty during the election. Moreover, the system will reduce cost for buying more paper for votes, so students can vote use the new system and paperless. The system helps to reduce cost because anything will process using system and electronically. The data of the students also save in the database and students no need to do a registration before voting using a form paper. The database of E-Voting System connect to the Campus Management System so the staff do not wasting time to do a registration for student.
Result More Accurate -The electronic voting system also can helps staff to view the result and more accurate instead staff need to counts the paper during the election. So the termination will be come out with the result more accurate using electronic voting system compare to the traditional voting system. This result is faster come out and display in the system compare to traditional that need to be counts first. The result also display live and update so the students and staff can view the result whenever they want.
More Convenient -The system is user friendly and easy to understand and user easy to use. This system is convenient and suitable to implement at the institution. This is because developer made this system used a basic system design that user can understand. The flow of the system also easy and user can understand. The flow is very simple makes everyone use the system can understand very well.
Once Vote Only -The system allow voter to vote one candidate only for each position. After vote have been cast, voters cannot allow to login into the system again. Voter can login unless voter do not cast any vote during election. This method will make sure the register voter tally with the result after election to make sure there is no unregistered student allow to vote.

Literature Review
Electronic voting systems can be used to register voters, tally ballots, and record votes [4]. Online voting is a web-based system that promotes the digital election process and surveys. This program has been set up to simplify the organisation of elections and make it convenient for voters to vote remotely from their personal computers while maintaining confidentiality, privacy and auditing capability [5]. Several categories of CAPTCHAs are image CAPTCHA, text CAPTCHA, voice CAPTCHA and video CAPTCHA [6].
Authentication is the mechanism to recognize and verify an entity before granting access to any secured service such as a personal account. This double layer of encryption, named two-factor authentication, provides a route that involves passwords (username / email and password) registration, accompanied by the development and confirmation of the One Time Password (OTP). The OTP is a numeric code that is created spontaneously and uniquely for each authentication case. It adds an additional layer of security, as the produced password is a fresh set of digits each time an authentication is attempted and offers the benefit of being random for the next session provided [7].
One explanation e-voting faces such a protection threat is that any successful attack would be highprofile, an aspect that motivates much of the hacker activity up to date. Even worse, the most extreme assaults will come from someone who is inspired by the ability to change the result without anyone knowing [8].
ReCAPTCHA offers an alternative for the visually impaired. Our standard audio CAPTCHAs are easy to solve for your legitimate users. On the other side, bots can get a much tougher CAPTCHA audio designed to block them [9].

Methodology
Methodology that has been used to develop this system is waterfall model as shown in Figure 1. The primary distribution on the cascade model is credited to Walter Royce's article in 1970 [10]. This concept of waterfall is an example of a sequential process. Software development process is divided into different phases in this model, and each step consists of a series of tasks and has different goals. First, we had to concentrate on preparation, time management, target date, expenditures and the execution of a whole program. Waterfall model can help users to obtain a better understanding of developments in information systems development in the text on the paper. This is because the system specification in text provided is clear and easily understood by users. In this methodology, the involvement of users in the initial phase in the development of systems to ensure the systems achieve the objectives required by the user.

Requirement Analysis Phase
The first phase of waterfall methodology is system analysis and requirements. The first phase involves understanding what need to be design and what is the function and purpose of the system that will be develop. The developer has supplied a questionnaire to users so the developer can identify the user and client needs. This phase developers need do brainstorming and generate more ideas and to understand the requirement. Moreover, developers need to do research about the previous system similar for what he want to develop to get the ideas. After the requirement collected, developer should identify the overall direction that the project will take through the creation of the project strategy documents. The primary attraction of the analytical process is the selection of criteria. Assessment of specifications, also referred to as requirements development, is the process of determining user needs for a new or modified product.

System Design
In this step the criteria requirements are learned from the first process and the planned of system design. System Design helps determine the hardware and system specifications and helps define the overall design of the system. The developer need to generate the idea on how the product will look like. Moreover, the developer need to take serious the client needed to make the project successful. The design for this system is very simple and easy to understand.

Coding Implementation
The basic role of this phase is to convert designing into code using the programming language decided in designing phase. This is one of the longest phases in software development life cycle. This is a few points which we need to take care in this phase. Before begin the actual coding, you should spend some time on selecting development tool, which will be suitable for your debugging, coding, modification and designing needs. There should be a regular review meeting with lecturer need to conduct in this stage. It helps to identify the prospective defects in an early stage and helps to improve product and coding quality.

System Testing
In this phase, every code that implement need to testing to make sure if it works as expected. Moreover, developer need to perform all the testing activities functional and non-functional to make sure that the system meets the requirements. The developer aim to find defects within the system as well as verifying whether the system behaves as expected and according to what was documented in the requirements analysis phase. It is possible that defects are identified in the testing phase. When defect been identified, the developers will make sure to fix the problem and find a solution to make sure the system running and well function before ready to deployment.

System Deployment
After the system testing successfully passed, the system can be used and deploy at the client organization. Perform a stability check in the environment after the application is deployed to ensure the application does not break. Make sure system well function and can run smoothly as client needed before deployment. After client satisfied, the system can be deploy at the client organization to be use.

System Maintenance
The final phase is system maintenance. This step occurs after installation, and involves making modifications to the system or an individual component to alter attributes or improve performance. These modifications arise either due to change requests initiated by the client. Other than that, in case client encounters and defect, make sure to note and fix the issues faced. The application is always enhanced to incorporate more features, update the environment with the latest features.

Results
This section discusses the findings and the result of data gathering from dissemination of questionnaires to KTAC students. The questionnaires includes 17 questions and it is about E-Voting system. The total respondents we collected for the data is for 30 students. Based from the survey, results revealed that 63% of the respondents agree that the traditional voting system should be supplanted with electronic voting system, especially to cut down the time in the voting process.

System Modelling
System modeling is the process of developing intellectual models of a system, with each model offering a different view or perception of that system. Moreover, system modelling helps the analyst to know the functionality of the system and models that are used to communicate with customers. System modeling will also represent the view of the whole system in a visual diagram and clearly shows the functionality of the whole system.

Flow chart Diagram
A flowchart is a visual representation for the sequence of steps and decisions that need to perform as a process. Each step in the sequence is noted within a diagram shape. Steps are linked by connecting lines and directional arrows. This will allows anyone to view the flowchart and logically follow the process from beginning to end. Figure 2 shows a flowchart for voter. The process flow start when user (voter) need to solve CAPTCHA that show by the system. Then, system will verify CAPTCHA, if it is correct, user need to enter their ID and password but if the answer is incorrect, user need to re-solve CAPTCHA. System will give one time password (OTP) code to verify the user.

Figure 2. Flowchart for Voter
If the login is correct, system will verify either user has done voting previously. Message box will appear that "voter allow one vote only" if user have done voting previously and user is allow to vote if system cannot find the record about user. Figure 3 illustrates a flowchart for administrator (student welfare). The process flow begin with start symbol to indicate that the process is started after voter enter IOP Publishing doi:10.1088/1757-899X/1062/1/012043 7 student ID and password. If the user ID and password is correct the system will view the dashboard. After that, students will be registered as a voters and the system will register the candidate, add position, edit election title, view report and print the result. Admin also can update their account and last step they can log out from the system. Figure 3 shows the flowchart for admin.

Use Case Diagram
This will allows anyone to view the flowchart and logically follow the process from beginning to end. Use cases are a set of actions, services, and functions that the system needs to perform. For E-Voting system using reCAPTCHA, there are two actors involved which are voters (students) and administrator (student's welfare).
Based on Figure 4, it shows that voters are able to login to the system by solving CAPTCHA. The system can detect either voters has been done voting previously or not. Figure 5 shows that administrator can manage all the information about candidate.

Conclusions
This research has shown that the developed electronic voting system will detect either the voters have been vote for the students representative candidate twice using reCAPTCHA. Security is very important in developing E-Voting website. This electronic voting system will give the organizations an opportunity to increase the efficiency, reliability and transparency of an elections.


A programmable transcutaneous electrical nerve stimulation device based on arduino and remote control using a smartphone

Chronic pain, which includes back pain, headache, and joint pain, affects one out of three people worldwide. The work, social life, and mind of an individual who suffers from this illness can be affected, and the illness severe. A transcutaneous electrical nerve stimulation (TENS) device is typically used to relieve the pain. Existing TENS devices, however, consist of a hard-coded program and are unhandy. Therefore, this work aims to improve such devices by using Arduino to make them programmable and handy. Arduino can be programmed to produce an electrical pulse pattern desired by the user. The circuit is equipped with Bluetooth to make it handy and connect it to a smartphone application. Results indicate that Arduino can generate electrical pulses similar to existing TENS devices and can be easily changed if required. Thus, it provides patients with customized treatment patterns and is portable.

1.Introduction
Uncomfortable sensations, such as pain, often could cause a destructive stimulus. The International Association for the Study of Pain defines pain as an unpleasant sensory and emotional experience associated with actual or potential tissue damage, or described in terms of such damage [1]. Pain is entirely controlled by an overly protective person's brain, regardless of what happens to the tissues in the body [2]. That is, most types of chronic pain can be treated through different tricks and stimulations [3]. However, the human brain is stubborn and hardly believes that pain [4] can be stopped completely. The brain can determine the pain level through various sources of information.
Pain has consistently tortured humankind for centuries. In the age of modernization, various medicines and technologies have been developed to deal with different pain [3]. Most of the pain experienced by humans in this world already has corresponding treatment. The strategies used to treat pain can be divided into pharmacological and non-pharmacological techniques [5].
*Author for correspondence In pharmacological treatment, drugs are usually used; such treatment has various side effects, such as an allergy to a substance in the drugs, or leads to a worse condition that can be fatal [6]. Therefore, nonpharmacological treatment is the best alternative to replace medications and treat pain, regardless of medications and severity [7]. One nonpharmacological technique is using an electrical device [8]. Treating pain by using a device has several advantages over pharmaceutical treatment (taking medicines) because there is no need to digest [9]. Furthermore, treatment by using devices can be cheaper than taking medicines in the long run and may be used in combination with recovery therapies to realize enhanced results [10].
A transcutaneous electrical nerve stimulation (TENS) device is usually used to relieve pain through electrical pulse injections into our nerve system [11]. TENS devices available in the market use wires over long distances and hard-coded electrical pulse programs. Wired TENS devices assist users only in problems requiring limited movement. On the contrary, a programmable electrical pulse generator can help the user customize treatment patterns.
The architecture of current TENS device circuits is mostly complex and uses many components to produce pulse width modulation (PWM) signals for the generation of electrical pulses. Thus, the objectives of this work are 1) to develop a simpler TENS circuit by using a programmable Arduino that can help the user deal with related nerve pain problems and relax muscles and 2) to develop an application for smartphones to make the TENS circuit be controlled remotely.

2.Development of wireless TENS device
Arduino Uno is one of the various Arduino microcontroller boards. This board comes with six inputs of analog, 14 digital input or output (I/O) pins (they can be utilized for PWM generation), a 16 MHz ceramic resonator, a USB connector, a force jack, an in-circuit serial programming header, and a reset button [12]. It contains all that is expected to help the microcontroller; essentially, it is interfaced with a USB connection to a PC or started using an AC-to-DC connector or battery. The Arduino Uno is based on an Atmel 8-bit AVR microcontroller that was created in Trondheim, Norway in 1996. Most Arduino architectures are considered reducedinstruction-set computing and consume minimal computational time. An Arduino board has mixed fragments to support programming, and it can be segmented into various circuits, as shown in Figure  1. The board typically uses ATmega8, ATmega168, ATmega328, ATmega1280, and ATmega2560 chip arrangements. That is, numerous shields can be adjusted separately by allowing them to be stacked and used equally. Arduino compatibles utilize other processors. Most boards are equipped with a 5 V linear controller and a 16 MHz crystal oscillator, but they run at a low speed and deliver with a local voltage controller due to explicit structural limitations. The microcontroller is also pre-modified with a boot loader that unravels the movement of undertakings to the on-chip streak memory and various contraptions that require a programming engineer from outside. It makes the use of an Arduino increasingly transparent by enabling the use of a traditional PC designer. The current Arduino sheets are adjusted using USB connection [13]. For example, the FTDI FT232 Successive Arduino sheets contain a level switching circuit to switch among RS-232-level TTL signs.
The Arduino board reveals most I/O pins for use via different microcontrollers [14]. The Duemilanove, Diecimila, and current Uno deliver 14 I/O pins propelled, with 6 straightforward wellsprings of data and 6 that can make beat width directed signs. The Arduino Nano, Arduino-good No frills Board, and Boarduno sheets can provide male header pins to connect to solderless breadboards at the board's underside. They produce PWM signals that replace the integrated circuits of the 555 and 7555 timers used in standard TENS devices. Arduino encoding can be performed through Arduino software to generate PWM signals. Arduino software is used to connect among TENS devices, and the PWM generator circuit is a common technique used to change the pulse width of signals. PWM has many applications, such as servo and speed control, limiting motor and LED power effectively. It is a square wave with different high and low times.
The Arduino Uno is used to replace the PWM generator circuit in this work, and the PWM output is obtained from Pin 3. Digital control is utilized in the PWM generation to make a square wave and a signal shared between on and off. The on-off example can recreate voltages in the full middle on (5 V) and off (0 V) by changing the amount of time the sign invests in versus the energy it spends off. The pulse width is known as the "on-time" length. It can be regulated to obtain analog qualities that fluctuate. When the onoff pattern is repeated rapidly, it will produce a steady-voltage output signal.
An overall flowchart for developing a wireless TENS device is shown in Figure 2. It consists of two parts: 1) development of a TENS circuit and 2) development of a smartphone application. A detailed explanation on the key elements of each part will be presented in the following subsections. The modified circuit is discussed in the development of TENS circuit. Coding blocks of the application to execute the desired control scheme will be presented in the development of the smartphone application.

2.1TENS circuit
The TENS circuit in this work is simpler than the existing circuit suggested in [15] because some components have been replaced with the Arduino Uno to produce the PWM signal. The frequency and width of the pulse can be adjusted and controlled in accordance with the desired pattern. The circuit is supplied using a 9 V battery, as depicted in Figure 3. All essential devices in the TENS circuit are discussed in the following subsections.

2.1.1Interface switch
A switch is required to interface between the lowvoltage circuit from the Arduino Uno and the highvoltage TENS circuit. The most widely recognized type of switch is an electromechanical device that is physically worked with various electrical contacts associated with outer circuits. System activating the progress between two states can be either a "toggle" (flip switch for nonstop "on" or "off") or "momentary" (push-for "on" or push-for "off") type. An electronic switch is a device that switches an electrical circuit, intruding on the current or transmitting it from one conductor to another. The IRF9640 metal oxide semiconductor field effect transistor (MOSFET) that produces low power output is recommended over ordinary transistors. MOSFET is a transistor utilized for switching and intensifying electronic signs. Although MOSFET is a fourterminal device with gate, source, drain, and body terminals, its body is frequently linked to the source terminal, making it a three-terminal device similar to any other field-impact device transistors. Two terminals are typically connected to each other (shortcircuited) inside, given three terminals that turn out in electrical diagrams.
MOSFET can be considered the most successive transistor in digital and analog circuits [16]. In the enhancement mode, the MOSFET voltage drop over the oxide convinces a conducting channel between the source and channel reaching the field. The expression "enhancement mode" alludes to the increase in conductivity with the increment in the oxide field that inputs carriers to the channel alluded to as the inversion layer. The channel comprises bearers in a surface impurity layer of the inverse type to the substrate, and conductivity is diminished using a field of channel bearers from this surface layer.

2.1.2Voltage regulator
This circuit consists of a capacitor to regulate voltage from the supplied 9 V battery. The capacitor comprises of two aloof electrical terminals used to charge energy in an electrical field electrostatically. Aluminium thin films may be used as conductors. Capacitors are widely used in standard electronic devices. A non-conductive dielectric acts to increase the charge limit of the condenser. A condenser does not disseminate energy; instead, it stores energy among its plates as an electrostatic field. A capacitor provides a sifting activity by parting with a path from the load for the harmonic current.
The capacitor is also used to shorten overshoot and swell voltage present at the step-down converter output. With the lack of capacity and a high equivalent series resistance (ESR) at the output capacitor, enormous overshoot grounds caused by the lack of output capacitance and substantial voltage swell occur [17]. The wave content for a step-down converter circuit can be regulated by incorporating a capacitor with adequate capacitance and low ESR.

2.1.3Current limiter
A potentiometer is used to control the output current that will be injected through the human skin. The resistance of the human skin depends on age and gender [18]. A potentiometer is a physical threeterminal variable resistor. One terminal interface moves over the resistive part with a sliding touch called a wiper, and the other ends of a resistive component are connected by two terminals. The resistive component can be regarded as a series of two resistors (potentiometer resistance), in which the position of the wiper determines the resistance ratio of the primary resistor to the subsequent resistor. The potentiometer output voltage can be determined using the wiper. The potentiometer essentially works as a voltage divider to vary the voltage at terminals. As a result, the current flow through the human body can be controlled to prevent inconvenience. The potentiometer is known as a "potmeter" or "pot". The most popular type of potentiometer is the single-turn rotation. Sound volume control is usually utilized by this sort of potentiometer, similar to different applications. It is generally made of cermet, metal film, wire wound, carbon composition, and conductive plastic.

2.1.4Step-up transformer
A transformer is used to boost the voltage from the supplied 9 V battery to a higher voltage at skin terminals. Large windings are connected to probes and earth through a resistor. In this case, the output voltage can reach a maximum of ±60 V electrical pulses by using a transformer with 1:10 ratio.

2.2Smartphone application
MIT App Inventor is used to build an application to control a TENS device remotely through a smartphone. The MIT App Inventor is visual programming that lets everyone build smartphone and tablet applications that are fully functional [19]. The block-based tools facilitate the complex systems that are produced in a much shorter time than conventional programs. The coding for this application is performed using an online platform. The first screen is coded using the available blocks, as shown in Figure 4, to display the TENS logo as a start button before it goes to the second screen. The second screen is where users provide input in accordance with their needs. Figure 5 shows coding blocks that are used in the second screen.

3.Result and discussion
The proposed TENS circuit is tested on the Tinkercad platform [20], as shown in Figure 6. The proposed TENS circuit based on the Arduino Uno board can produce output specifications based on the standard circuit, as shown in Table 1. A monophasic pulse waveform is generated because the PWM signal is used in the proposed circuit. The pulse amplitude can be adjusted by using a digital potentiometer in the circuit. Therefore, a pulse current amplitude similar to the standard [21] is produced. The pulse frequency can be obtained from the time period of the output PWM signal. The time period is measured at 0.008 s or equivalent to 125 Hz. From the signal, the pulse duration is provided by the "on" time. It is measured at 100 µs. This finding clearly shows that the proposed TENS produces the output waveform in accordance with the standard. Figure 7 Illustrates the process of using the developed application to control the output electrical pulse from the TENS circuit remotely. The application provides an option for users to select body parts to be treated and electric pulse durations (μs). Users can choose the required intensity in accordance with their comfort; thus, the pulse is neither excessively strong nor weak during the treatment. Start, stop, and pause buttons are also available to allow users to stop or continue at any time during the treatment.
The combination of the proposed TENS circuit and a smartphone application enables users to control their treatment wirelessly. The communication between them is established using a Bluetooth module. In this case, the TENS device can be placed at any part of the user's body without the hassle of wires. The TENS circuit is then activated, and the treatment can be adjusted remotely using a smartphone. The treatment's electrical pulses can be easily customized because the proposed TENS is based on Arduino.  Process for wireless TENS control by using a user interface application

3.1Approach limitations
This work successfully demonstrates that the TENS circuit can be developed using Arduino board and controlled remotely using a smartphone. For safety precaution, the entire system is carried out within a simulation environment. Hence, the physical effects on its operation are not considered. The actual dimension and weight of the TENS device also cannot be determined. Nevertheless, the capability of TENS device for a real-time application can be investigated using Tinkercad.

4.Conclusion and future works
Pain can be treated through high-frequency TENS that should be used as an adjunct to pharmacologic methods to replace pills. This paper presents a TENS circuit based on a programmable Arduino. Nearly half of the components in the original TENS circuit can be replaced with the Arduino Uno. The proposed TENS circuit is developed and tested within the Arduino Tinkercad simulator. Then, an application is developed using the MIT App Inventor platform to control the electrical pulses from the TENS circuit remotely during treatment by using a smartphone.
The results show that the proposed TENS circuit is able to produce similar electrical pulses to those by using the standard TENS device. The smartphone application enables remotely controlling the TENS device. In future works, the proposed TENS device can be developed using hardware, and the optimal dimension of the device can be obtained. As a result, the conventional TENS device can be improved to avoid the hassle of wires and become highly flexible in terms of treatment patterns.


extfieldsofstudy:
Medicine
Computer Science

text:
UnCanny: Exploiting Reversed Edge Detection as a Basis for Object Tracking in Video

Few object detection methods exist which can resolve small objects (<20 pixels) from complex static backgrounds without significant computational expense. A framework capable of meeting these needs which reverses the steps in classic edge detection methods using the Canny filter for edge detection is presented here. Sample images taken from sequential frames of video footage were processed by subtraction, thresholding, Sobel edge detection, Gaussian blurring, and Zhang–Suen edge thinning to identify objects which have moved between the two frames. The results of this method show distinct contours applicable to object tracking algorithms with minimal “false positive” noise. This framework may be used with other edge detection methods to produce robust, low-overhead object tracking methods.

Introduction
As image capturing hardware and storage capabilities improve, more and more digital imagery is being captured as video. Classic methods of edge detection based on first and second-derivative kernel operations, such as the Roberts [1], Sobel [2,3], Marr-Hildreth [4], and Haralick [5] techniques are still frequently used as the basis for modern static image edge detection due to the speed and quality of the output [6]. Perhaps one of the the most well-known and actively used techniques in the field of edge detection in computer vision is the Canny edge detector [7]. Briefly, this classic method detects edges by taking a denoised grayscale image, finding the gradient intensities, suppressing spurious non-maxima, finding the dual-threshold of the result, and edge tracking by hysteresis. While the Canny technique has been improved many times over the years, including improving the blurring operator [8], using Otsu's method for thresholding [9], and using advanced thinning techniques [10], most improvements on the Canny filter have focused on static images as opposed to video streams. Currently, many optical flow, object tracking, and motion detection algorithms are concerned with corner matching methods [11] that tend to require intensive computation [12], customized deep learning algorithms [13], and/or dedicated hardware [14]. As an alternative we offer a naive approach suitable for detecting moving objects that employs computationally inexpensive methods based on a reversal of classic edge detection techniques.

Methods
In this communication, we demonstrate edge detection reversal using the general steps from a single edge detection scheme, the Canny edge detector, and compare the results to simple object detection by image difference. Sample videos consisted of "moonwatching" footage wherein nocturnally migrating birds were filmed crossing in front of the moon as viewed through a spotting scope [15]. In an effort to present examples which are accessible to users with a background in applications, rather than exclusively those in computer science, all methods described here use functions available from the standard OpenCV and OpenCV-contrib libraries [16] in multiple programming languages.

UnCanny Filter
The novel method, which we have dubbed the UnCanny filter, attempts to find differences in temporally adjacent images by applying the steps used in the Canny filter for edge detection in reverse order across two frames. The order reversal from the Canny filter suppresses spurious non-maxima prior to the execution of gradient intensities, and thereby reduces the impact of background noise prior to gradient operations arising from atmospheric effects or compression artifacts. The difference in the current frame of a video (M n ) and the previous frame (M n−1 ) are passed through OpenCV's adaptiveThresh with Gaussian filtering to produce a blurred image (G(M x , M y )) which then is binarized by the Niblack method (M ) [17], The result is separated by anisotropic Sobel kernel operations in the horizontal and vertical directions, and each of these Sobel outputs is squared and added prior to taking the square root of the result: The scaled matrix was blurred again to reduce noise and simplified by the Zhang-Suen thinning algorithm (represented here as an operator (Z)) [18].
The output, already binary from the thinning step, may undergo contour detection steps. It should be noted that both the Sobel operations and linear distance steps shift the edges of the thinned contour away from the original object's location; therefore, objects near the edge of the image may appear shifted after these detection steps.

Stepwise UnCanny Application to Video Frames
By applying the method to temporally adjacent frames from a video, one can identify moving objects with a high "hit" rate. As an example, two adjacent frames from a video of migrating bird silhouettes passing in front of the moon, cropped to 100 px 2 , were processed using the UnCanny object detector; see The example images in Figure 1 were chosen and cropped to simplify the example for demonstrative purposes. Most edge detection methods would have little trouble detecting an object based solely on the difference between the input images represented by Figure 1a. However, object movement against visually complex backgrounds showcases the strengths of the UnCanny filter. In the case of the example video chosen for this demonstration, the lunar background is considerably unstable compared to nearer, less complex backgrounds. While the motion of the moon from frame-to-frame in a video may be negligible, especially if the image is artificially stabilized, the atmospheric lensing effects are not. Localized turbulent changes in the atmospheric pressure and relative humidity cause minute shifts in pixel illumination, especially in areas of sharp gradient contrast, such as near the lunar mare in the example image, a phenomenon known as atmospheric scintillation [19,20]. The result of these changes is that simple image differences in what appears to be a stable background become noisy to the point that the degree of blurring required to negate this noise would obscure the moving object. In the resolution of very long-distance imagery, which may be an edge-case example, the presence of atmospheric scintillation approximates compression artifacts in some video.

Comparison to Raw Frame Differences
The UnCanny filter results in a much lower output of false positives, defined here as false identifications of moving objects which do not correspond to any moving action in the frame, compared with the raw framewise difference. Stills from the application of both framewise subtraction (M n − M n−1 ) and the UnCanny method to single-channel video of water dripping from a faucet are shown in Figure 2. The public domain stock footage used here was encoded as 480 × 272 H.264 video in yuv420p color space at a bitrate of 949 kbit s −1 , a compressed format [21]. The water drop in this video is larger than the small objects detected in the previous example, demonstrating the UnCanny method's capability extends beyond the extremely small. While the background in this video was stable and subject to constant lighting, by running a simple pixel difference across frames of the video, a large amount of shot noise was revealed. This simple image differencing approach is unacceptable for moving object detection. Treatment of the same frames with the UnCanny method results in a distinct droplet contour and no visual noise or false positives from the static portions of the frame.
While it is obvious that a simple image difference is unacceptable for moving object detection, it illustrates the gulf between rudimentary approaches and the UnCanny method. By analyzing the entirety of the sample video (34.46 s duration) and recording the sizes of all detected contours by minimum bounding radius for both the framewise difference and UnCanny methods, we illustrate the increase in object detectability. Figure 3 depicts a normalized histogram of contour radii with a bin size of 1 px. Application of the UnCanny method reduces the number of contours detected in the video by more than 2200×. Such a large reduction in results provides performance improvements to downstream calculations. Moreover, since most of the contour results ignored by the UnCanny method were due to shot noise, the radial size proportion in the results shift to higher values, which are more likely to correspond to positive moving object detection "hits." While the framewise difference likely detected these same "hits," these positive results were diluted by the extreme number of false positives.

Edge Detection Necessity
The use of image blurring and contour thinning techniques minimizes the impacts of background noise from the input images, but it cannot do so without edge detection as well. A 590.08 s section of compressed H.264 video in yuv420p color space with a bitrate of 884 kbit s −1 of a nocturnal bird migration was cropped to a 500 px 2 region of interest from 1920 × 1080 input. Figure 4 demonstrates this necessity by showing the results of the novel UnCanny object detector without including the edge detection step (Equation (3)) in a video frame of the previous bird silhouette further along its transit. While the complete UnCanny result shows a single area of white on the black background, indicating the previous position of the bird silhouette in frame M n−1 , the result without the benefit of edge detection included noisy speckles along the edges of the prominent lunar mare. Similarly to the comparison with raw framewise difference in Section 3.2, the distribution of contour radii in the result images skews to larger contours when using the UnCanny method. A normalized histogram of contour radii with bins set at 1 px width ( Figure 5) reports a significant reduction (30×) of unique contours in the UnCanny results compared to the same analysis without edge detection. The bulk of the extra contours have a bounding radius of <1 px, suggesting that they were false positives, smaller than the actual bird.

Limitations and Shortcomings
There are certain conditions that, when met, cause the UnCanny method to perform poorly. Video of a typewriter mechanism in Figure 6 demonstrates one instance of such a failure. In this H.264 video in yuv420p color space, out-of-frame keys are pressed on a mechanical typewriter, and video shows the mechanism of strikers hitting the platen as the ribbon carrier progresses [22]. During some frames, the ribbon carrier is still while the striker moves, generating a "hit," identifying the moving region of the frame. In other frames, the ribbon carrier progresses the type guide, causing the UnCanny filter to identify this motion as well as the motion of the striker. When these events occur simultaneously the stationary portions of the typewriter vibrate slightly as the carrier moves, and the UnCanny filter erroneously reports that a large amount of the frame is in motion. This phenomenon is not observed using methods excluding edge detection. This behavior occurs due to the enhancement of the edges during edge detection. By observing the output prior to the edge thinning step in both the simplified and UnCanny methods presented in Figure 7, the cause becomes clear. The Sobel operator here enhances the edges of the difference between frame M n and frame M n−1 , causing them to appear highlighted in Figure 7. In the method which does not include the Sobel operation, labeled "Blur+Thin Only" here, these minute vibrations of the background strikers are not as pronounced. Thus, when this intermediate frame is stage is processed by edge thinning, the entirety of the thick regions are included.
In practice, this means that the UnCanny method is suitable for complex but unmoving backgrounds. The steps reported in this demonstration of edge detection reversal do not include a robust background subtraction [23]. While several strong background subtraction algorithms exist within the OpenCV framework used for this work, including Gaussian Mixture Models (GMM) [24], improved GMMs [25], and Gale-Shapley matching [26], these were not included in the UnCanny filter. As the work presented here is intended as an application demonstration of edge detection to sequential video rather than as a report of a single technique, these methods were omitted for the sake of demonstrative simplicity. . This is a normalized histogram of contour radii detected in the nocturnal bird migration video. Bins were set at 1 px width. Image processing including blurring, subtraction, and thinning steps, but excluding edge detection reported 1536 contours. The UnCanny method, which includes the edge detection step, reported 51 contours over 34.46 s of the same input video. The proportion skews toward larger radii in the UnCanny filter, likely due to the high levels of visual noise in the reduced method, diluting "hits." Figure 6. This figure shows examples of correct and incorrect motion identification by the UnCanny filter due to background vibration. In the correct example, the UnCanny method without edge detection ("Blur+Thin Only") and with edge detection identify similar regions where the striker of the typewriter is moving. In the incorrect example, vibrations caused by the ribbon carrier progression (the blurred cylinders in the bottom of each input image) cause the UnCanny filter to report that the entire set of at-rest strikers is moving, rather than the single striker in motion near the center.

Tracking Object Motion
Applying the UnCanny method to sequential frames of moving imagery allows for object tracking. In a sample video encoded in H.264 in yuv420p color space of a man flinching as a warplane flies above his head, we can illustrate these tracks [27]. Each frame was processed by the UnCanny filter, and the detected object contours were overlaid in sequential color. The result shown in Figure 8 depicts four moving regions. The first is the warplane approaching the man and flying overhead. The second is the outline of the man as he flinches during the flyover. The third is the shadow of the warplane on the grass. Finally, the fourth region is the horizon line which shifts slightly due to the vibration of the camera in the wake of the low-flying plane. Figure 8. A video of a man ducking as a World War II era Spitfire warplane flies close overhead demonstrates the object tracking capabilities of the UnCanny method. A few frames of the video sequence are shown first to demonstrate the action and motion in the video. The colorful image below the action sequence reports the contours discovered by the UnCanny filter layered sequentially in color gradient. The action in the video generates distinct shapes related to the objects in motion, including the plane, the flinching man, the shadow of the plane, and the horizon as air currents from the plane disturb the camera.
The individual regions of interest in this image may be tracked separately using the output from the UnCanny method. By isolating a region of the frames featuring the flinching man, we see this demonstrated in Figure 9. The rightmost portion of this figure shows the shift in center of mass of the largest contour on the cropped frame. The total vector of motion across these points trends downwards as the man flinches. Other techniques may be used at this point to determine motion more precisely, such as object pose matching [28,29] or partially supervised pattern recognition [30,31]. Here, most of the frame has been cropped, leaving only the scared reporter flinching as the plane flies above. As mentioned in Figure 8, the UnCanny filter determines the motion as outlines of the actor. By calculating the center of mass of these outlines, we can determine the movement vector. In the rightmost image, the centroids from the center image are shown as connected lines, demonstrating this movement vector visually.

Computational Efficiency
To demonstrate the computational efficiency of the UnCanny filter, a comparison was run between it and another well-known method, Lucas-Kanade optical flow. Video processing ran on approximately three-million frames of video using hardware with an Intel Core i7-7500U 2.70 GHz "Kaby Lake" processor to yield relative computational time expenditure. Each object tracking method was run sequentially on a single processor thread, and frame acquisition time was not measured. For comparison, a simple differencing operation was executed which applied a Laplacian gradient to input frames and took the difference of the binarized result. Laplacian matrices used were of the same size as the Sobel matrices applied in the UnCanny filter The UnCanny filter used 1.48× computational time as the Laplacian gradient, while Lucas-Kanade optical flow used 8.06× computation time. While object detection methods and complex optical flow methods are not directly comparable from a theoretical standpoint, the time comparison against a frequently employed method serves to demonstrate the relative quickness of the UnCanny filter. It must be noted that computation time is not a reliable measure of process efficiency, quantity of output, or "usefulness"; and the efficiency calculated here purely demonstrates the reduced computational complexity of the UnCanny method compared with other well-known methods.

Conclusions
As video recording and storage capabilities increase, and as the demand for computer vision applications for these videos likewise increases, it is worth adapting classic edgedetection methods to address these advances. Our framework is capable of object detection with fewer false positives at minimal computational expense. By reversing the techniques from conceptually-simple edge detection methods, such as the Canny filter, it is possible to detect differences between sequential images with greater accuracy than raw subtraction. Although for the sake of brevity, this paper only demonstrated the reversal of the Canny filter, the higher-level concept of reversing edge detection for framewise analysis of video would benefit from further exploration. Many more edge detection methods for static images exist, and many more improvements have been made on each since their inception. Each of these holds potential for facile object detection with low computational overhead. Furthermore, none of the methods presented here require advanced computer programming to implement, because each step is possible within the user-accessible OpenCV code base. The initial application of this method was limited in scope, and the authors encourage computer vision experts to expand upon this framework in other contexts where moving-object detection is required under the constraints of low-cost video analysis.


THE METHOD OF STUDENT'S QUERY ANALYSIS WHILE INTELLIGENT COMPUTER TUTORING IN SQL

Recently, IT specialties have become one of the most demanded specialties in the world labor market. Simultaneously the traditional teaching in conditions of mass production, even with a professional teacher, has a significant drawback – the fundamental impossibility of adapting to each student. Since the 60s of the twentieth century, researchers worldwide have been developing various computer-tutoring tools that have, less or more, adaptive functions. Nevertheless, the task of the perfect computer tutor development is still far from being solved. The article's research subject is the process of student requests analyzing during intelligent computer tutoring in SQL. The main goal is to develop a method for analyzing the student's SQL queries. The purposes: to form a general scheme and features of the method for analyzing student’s SQL queries based on the principles of technical diagnostics and methods of lexical, syntactic analysis of computer programs; to develop methods for parse tree construction; to create methods for comparing reference and real SQL queries according to their similarity rate; to demonstrate the function ability of the developed methods on specific examples. The methods used computer programs the automatic testing method, the computer programs lexical and syntactic analysis methods, the computer programs parsing trees construction methods, the objects diagnosing method based on comparison with a reference, the strings analysis methods, the method of q-grams. The following results were obtained: the student’s SQL queries analysis method was formed based on a system approach including automatic testing on real data, building query-parsing trees, comparison with a reference, and comprehensive determination of the queries similarity rate. The scientific novelty is the improvement of the method for the student's SQL query analysis during intelligent computer training in SQL query composition.

Introduction
In the recent decades information technology (IT) significantly transformed the environment of human life. They are currently used as a main tool for the information and knowledge processing [1,2].
In such conditions high-quality IT training is required in the different domains. An integral part of most complex IT systems are relational databases (RDB) and algorithms for data manipulation based on the Structured Query Language SQL. However, the traditional learning of SQL, similar to many other complex domains in terms of group studying, usually does not result in the required quality training of each student. The main issue is the complexity of the adaptive approach providing by the tutor in the case of multiple students task individual solving [3]. Such approach has to take onto account difference in skills and working pace of students, as well as limitation of human tutor cognitive abilities.
According to many researchers [4][5][6][7][8][9]12] the solution can be found in designing and implementing com-puter tutoring programs which have large computational power and advanced intelligent skills.
The most famous ITS for learning SQL is the SQL-Tutor system [6,7], developed at the University of Canterbury, New Zealand. Each task in it consists of a data model and information needed to be obtained. Students write SQL queries by filling out forms. After request completion, SQT-Tutor analyzes student requests to find errors and provides multiple levels of feedback and tips. Students independently choose the level of feedback they wish to receive. After receiving feedback and editing the request, a student can again send it for consideration by the system.
For the purpose of step analysis SQL-Tutor contains many constraints, which includes two parts: a relevance condition and a constraint satisfaction condition. The reaction occurs only if the first condition is met, and the second is not. This means that the constraint is violated and ITS identifies the corresponding feedbacks.
Although the restrictions were conceived by the authors as domain-independent, many of them deal with a correct solution stored in the system. For example, one  A. Chukhray, О. Havrylenko, 2021 of the constraints might check the FROM section of the query to see if the value filled in by the student is equal to the value in the correct solution. The relationship between steps, learning events, and constraints in the system is fairly straightforward. Each constraint meets the competency component.
On the basis of the above principles, other ITS have been developed [10,11].

Formulation of the problem
Despite the repeated presentation in publications by the developments as based on a fundamentally new and effective theory of constraint-based modeling (CBM) [12], in fact, this is not the case, since any restriction can be reduced to the well-known rules "ifthat". A number of restrictions are created for the purpose of syntactic comparison between the only ideal solution and the student's solution. Naturally, these restrictions do not give a chance to alternative solutions that may be more rational than those created by the authors.
An alternative approach, implemented in the form of rules-models of errors, is presented in [13]. It describes 37 classes of the most common semantic mistakes made by students while SQL queries construction.
It is also worth to mention such systems as AsseSQL [14] and SQLator [15] for assessing student requests; SQLify [16] a tool that implements semantic feedback; and also an intelligent computer system teaching SQL from the University of Malaysia [17]. In the latter, the student is limited only by entering data into the fields SELECT, FROM, WHERE, which significantly limits the flexibility of the system. Therefore a new development approach to ITS in SQL is required, combining existing effective techniques with the new methods of the SQL queries analysis and comparison.
To achieve the stated objective following tasks have been formulated and solved: 1. A method of student's SQL queries analysis development.
2. Parsing and syntactic tree building methods development.
3. A method development for two SQL-queries comparison aimed to detect their similarity.

The student's SQL-queries analysis method
Because of the queries presentation redundancy in SQL for any problem more than one correct SQL-query might exist. Hence, it is necessary to verify whether a student's SQL-query fit a certain set of standards for a concrete given task.
In the case of resemblance to one of the reference solutions system identifies the student's solution as known. Each reference query stored in the system is characterized by a set of parameters that determine its quality and, consequently, knowledge and skills of a student. Such parameters, for example, can include performance and required memory capacity, the number of characters in a query that determines the reading and understanding convenience of a request by another person.
If the system does not identify the query as known it could be executed on a real database with multiple data sets. As the result of a data manipulation query is a set of certain tuples all the correct answers must return the same set of data for the same initial data set. Hence with high probability we can conclude that if the query is not known to the sys-tem but on the series of initial data sets output the same set of tuples as the reference solution then this query can be classified as the correct answer.
ITS based upon the described approach works according to the schema presented on fig.1, where high Shigh similarity, low Slow similarity, which is obtained experimentally.
After a new task for student has been generated the program displays the text with the assignments, ER-diagram of the given DB, and a field for student's answer in the form of SQL-query.
Once the answer was confirmed system starts analysis according to the following script: 1. The system estimates similarity rate between the student's answer and reference SQL-queries.
2. Finding similarity rate is compared with some threshold.
3. In the case of high similarity the system operates as follows: 3.1. Lexical and syntactic analysis of SQL-query carries out and a syntax tree is built.
3.2. The parsing tree is compared with the reference syntax tree, which has the highest similarity with the student's query. Every such a model of SQL-query is described by a set of parameters that characterize the quality in several aspects: performance and memory capacity requirements, readability.
3.3. If the system found a mismatch of some nodes of the trees it informs about the error location.
3.4. If the parsing trees are identic the student's answer is considered as correct, and a new task is generated.
4. In the case of low similarity between the student's query and reference queries the system runs both queries on the real database and then compares resulted sets of tuples. 4.2. If the sets of tuples differ, the answer is considered as wrong, and a student has to solve another task from the same topic.

The SQL-queries parsing method
SQL is a language which can be described in Backus-Naur Form (BNF). Its grammar is context-free (CF grammar). It allows developing SQL compiler in this project utilizing the programs LEX/YACC.
The main hypothesis of this paper is that the pedagogically correct feedback can be given by comparing syntax trees of the reference and the student SQLqueries. Fig. 2, 3 show examples of the parsing trees for the reference and student queries. After the trees traversal and nodes comparison the mismatch at one of the nodes has been detected. To make a decision about a necessity of parsing trees traversal system needs information about similarity rate of the student's and reference queries. In this paper advanced q-gram method is proposed for queries similarity rate estimation.
Classical q-gram method. In this method, the original strings are broken into sets of overlapping word forms (q-gram) consisting of q symbols.
For example, in the case q2  : original string: abcdef (Len=6) word forms: ab, bc, cd, de, ef (N=5) in the case q3  : word forms: abc, bcd, cde, def (N=4) Thus the number of q-grams for N strings of length Len , and a given q is described by following formula: Each word form from the first set is compared with each word form from the second set. If the pair coincide, a comparison with the given word form from the second set is no longer produced. The similarity rate of two strings S might be considered as the ratio of C matches to the total number of word forms N : Example 1. Assume that there are two strings representing SQL-queries (Len1 = Len2 = 19): 1) S1 = "SELECT color FROM p"; 2) S2 = "SELECT owner FROM p".
Given sets of word forms match in 17 positions: C(QG 1, QG 2) = 17 . In this case the similarity rate calculated by (2) with the grater word forms number is: The similarity rate based on the smaller word forms number: Method based upon SQL keywords replacement. Any syntactically correct SQL-query contains a limited set of the certain keywords. Since many of the keywords might appear as in a correct query, and in an incorrect query to reduce their impact on the similarity assessment it makes sense to replace such keywords with the corresponding ID. Example 3. Let consider a set of keywords: KW={"SELECT" "FROM" "WHERE"}.
Example 4. Let consider a parsing tree of the SQL-query «SELECT * FROM p WHERE City<>'Paris» (Table 1).
In tab.1: Node contentdescription of syntactic rules; Left index, Right indexindices of array elements for left and right descendants.
In order to distinguish a rule number, a child index and an ordinary numeric value, numbers could be marked with the following prefixes: %rule number; #descendant index; numeric values are stated without any additional marks.
The string obtained for the query: Further, constructed strings are compared by means of the classical q-gram method.
Presented methods for different types of similarity detection tasks give different output values. A promising challenge is to create a neural network and train it on the basis of student query series by giving as the input of the network the similarity values obtained by the three methods, and setting a required similarity rate as the output.

Conclusions
The approach proposed in the article allows providing comparison of the student's answer and reference query more efficiently then it is carried out in existing ITS for SQL.
A new approach to query's presentation in canonical form, as well as a scheme of the self-diagnosing method for the quality improvement of computer training in SQL were obtained.
The further investigations promising way is development of new task adaptive choice algorithms, depending on the current student progress, as well as interactive hints system creation.


Face Recognition of Passenger for Bus Services

: Most university students are using the bus provided by the university's management to move from one place to another place. The analysis are required to improvise the quality of the of bus services such as the amount of passenger that using the bus and information of passengers such as gender. The objectives of this project are to develop face recognition system based on gender using Raspberry Pi 4 and Intel Neural Compute Stick 2 and to test and validate the performance of the developed system for face classification and passenger counting system. Also this system is able to store passenger information into Google Firebase Cloud with Internet of Things. This system is used Raspbian in Raspberry Pi 4 with the libraries that used for face classification and recognition such as OpenCV and OpenVINO. This project able to detect faces of the passengers soon as they ride the bus and determine gender of the passengers and count passengers according gender and the information of the passengers will stored in Google Firebase. There are some recommendation that need to be added in this project to improve efficiency of the system. the gender either the passenger is male or female. The number of passengers be counted after analyzing face completed. The data regarding number of passengers based on gender send to Google Firebase for stored data using Cloud technologies. The results number of passengers based on gender displayed in Google Firebase through Google Firebase’s website.

Introduction
Most Malaysian these days using public transport such as bus as their preferred transportation to reach their destination. Based analysis that have been done in 2017 by the Ministry of Prime Minister's Department, about 56 per cent of people in Malaysia used public transportation services [1]. In the university, most of the students is rely on the bus services that provided by university management for them to move from one place to another such as to lecture halls and sports facility center. Bus service is one of the solutions to have a green campus environment which is helps reducing the traffic congestion and the release number of carbon emissions to surroundings. The management must be responsible to have a good quality of the bus services to ease mobility of the students in the campus. Lack of quality in bus services will give the impacts towards the students such as late for the class, wasting time and energy, unpleasant ride and problems in safety which make give negative perception towards managements of transport services [2].
In order to improve the quality of bus services, the analysis regarding the passengers must be done. The analysis that can be done such as the number of passengers that using bus services in different situations for example during peak hours which in early morning and evening and off-peak hours. Besides that, the information of the passengers also important to include in the analysis such as gender of the passengers. Face Recognition of Passenger for bus in UTHM is better solution to get the statistics of the bus passengers based on their gender. This system using real-time application, Internet of Things (IoT) system. The face of passenger have been analysed using Raspberry Pi 4 and sent to Firebase to store the results of the analysis.

Problem Statement
The method that available to count the amount of the passengers that riding the bus is by doing manual counting. This method required about one or two persons to count the passengers and wrote in the form. However, there is drawback with this method as this method need full commitment of the person that doing counting passengers for one day in term of energy and time. This will cause the person to waste their time spending in the bus counting the passenger and inaccurate statistics will occurs because the person may exhaust when doing their tasks. Therefore, the proposed system designed to detect face of passengers based on the gender. This system has ability to collect data of passenger which helps UTHM management to improve bus services. Besides that, the proposed system can save user's time as user do not need to spend whole day to collect data instead of installing the system in the bus and wait the analysis at the end of the day.

Face Recognition
Face recognition is defined as the system that used to finding a human face from an image [3]. In other article, face recognition is also defined as an automated computer system that work same as the human performance which is working same as human brain that have ability to recognize faces. recognition and biometrics in general still continue. There are many face recognition algorithms in academic field. Some of results from the research is relatively mature, and then several commercial face recognition system and products are appeared [4] such as Identix and Cognitec that has researched and developed FaceIt system and FaceVACS system, respectively.

Face Detection
In automated face recognition system, face detection is important to have a system that have accurate detection in face location and features such as nose, eyes, eyebrow, nostrils, mouth, lips and ears based on an image. Fundamental for face recognition is face detection. There are many related with face detection such as difficulties to determine the position of the face in the image, detecting the presence, location of facial feature and face authentication to confirm individual's identity in the image [5].

People Counting
People counting based on computer vision is implemented on different purpose according to the research problems being set earlier. There are two scale variation to captured image or video footage that used for processing people counting algorithm which is large-scale and small-scale people counting [6]. In small-scale people counting, mostly used to counting the number of people in a group among in the store or an area of interest using multiple technology. These technologies differ with sensor-based system to vision-based system which is sensor-based relying with multiple number of sensors that have obstacles such as unable to differentiate people and their direction of movement. Vision-based system able to implement more features for example tracking movement of the people.

Materials and Methods
For this project, there are some essential parts needed such as face detection, face classification and passenger counting. GPS tracker used to determine the location of bus. Google Firebase is used to store the information regarding the number of passengers based on gender and Google Maps for display the location of the bus. Figure 1 shows the block diagram of the system.

Materials
There is some equipment that used for allowing this project to run including: i. Raspberry Pi 4 Raspberry Pi is a small scale-based computer which the performance of the Raspberry Pi is very efficient when running games, image files and documents. They can be manufactured using different configuration as per the user's needs.The specification of Raspberry Pi 4 are: a) Broadcom 2711 with quad-core Cortex A-72 processor with speed at 1.5GHz. b) Capable of video playback using H265 which able to decode 4K resolution and H264 that able to decode Full HD at 60 fps and encode Full HD at 30 fps c) Include several ports including 2 ports of USB 3.0, Ethernet hub.
Raspbian is the operating system for Raspberry Pi 4 that produced by Raspberry foundation. The Raspbian able to operate any tasks in the Raspberry Pi 4 and have built-in Python 2.7 and Python 3.5 for easier to run the program as the system using the Python language.
ii. Intel NCS2 Intel Neural Compute Sticks 2 (NCS2) is an embedded deep learning device which is small USB 3.0 Type-A that able to use for learning in AI programming at the edge [7]. Intel NCS2 run with Intel Movidius Myriad X vision processing unit (VPU) that can found in smart security cameras and industrial machine vision equipment which this processor has an ability to support the Intel Distribution of the OpenVINO toolkit.
Based on Intel, the Intel NCS2 makes easier for test, tune and prototype deep neural networks. Besides that, NCS2 have 8 times higher performance with NCS. Moreover, with vision accelerators can helps the developers increase producing the IoT devices. NCS2 supports many types of operating system including Windows and Raspbian. Moreover, NCS2 also support TensorFlow, Caffe, MobileNet SSD, ApacheMXNet, Pytorch and PaddlePadle through open neural network conversion.
iii. USB webcam USB webcam are connecting with Raspberry Pi 4 through USB cable. There are many USB webcam that available in the market but for this research the type of USB webcam that used is Logitech C270 HD webcam. Google Firebase defined as a technology that allowing users to make web applications without server-side programming brings the development of web applications become easier and quicker than normal technique [8].
Google Firebase give benefits towards developers where able to store data without using SQL which data will store in NO SQL and sort in the form of paired key. Google Firebase also allowing the developers to use Firebase Cloud Messaging features that have capabilities including:  Figure 2 shows the flowchart of the system. When the passengers ride the bus, the system determine the faces of passengers according to the features that available in the faces such as eyes and nose with using USB webcam that located at the front door of the bus. After face of passenger been detected, the system analyze the gender either the passenger is male or female. The number of passengers be counted after analyzing face completed. The data regarding number of passengers based on gender send to Google Firebase for stored data using Cloud technologies. The results number of passengers based on gender displayed in Google Firebase through Google Firebase's website.

Results and Discussion
The results of project have been shown including the design of hardware, face recognition in any condition including the angle of faces, the brightness of environment and distance of faces that been detected. Besides that, this chapter shows information using Google Firebase.

Design of hardware
The Raspberry Pi 4 have been connected with many peripherals including USB web camera, GPS module with USB to TTL Serial converter and Intel NCS2. All components have been connected to the powerbank which used as power supply for the system as shown in Figure 3.

Face detection in bus
In Figure 4 shows the visual of video of front door of bus that captured USB webcam inside the bus. Based on visual below, height of the hardware was sufficient enough for the webcam to capture the faces of passengers as the system that able to detect faces when the passengers entering bus.   Table 1 shows the range of distance that face able be recognize by the system. Based on Table 1 the system was able to detect up to 150 centimeter which as suitable distance from hardware prototype to detect the faces of passengers. The limitation of camera distance used in this study. The distance is measured from face of passengers towards USB webcam where the measurement done by using measuring tape.

Face detection based on face accessories
The effectiveness of face detection is depending on the accessories that available at face such as spectacle, face mask and hat. Some of accessories has ability to determine the gender of the person and some of them are not able to determine the gender. Table 2 shows the face detection based on accessories that available on the face. Based on Table 2, shows the face detection based on accessories that available at faces where the passenger wearing the face mask is unable to detect as the system unable to detect because the face feature is been covered which is mouth and nose. Meanwhile, other accessories such as hat and scarf is able to determine the gender because the face features such as mouth and nose is not covered. The passenger wearing spectacle also able to determine the gender as eyes is able detect by the system.

Gender Detection accuracy
The accuracy of the system when detect the gender of the people is important to have good statistics when running the analysis. In the Table 3 shows the results of the gender detection of people. The number of people that involve is ten where seven of them is man while others is women. From Table 3, six out seven man is detected while for one out three women has been detected which bring the accuracy for man is 85.71% while for women is 33.33% where the calculation of the accuracy is shown in Eq. 1:

Conclusion
This project is able to determine the gender of human face real-time video by using webcam for real-time video detection with using Haar cascade classifier, count the passengers based on gender and able to track the location of bus services using Google Maps. The result of the analysis is send to Google Firebase. For future work, the system able to classify race of the passenger according to Malaysian citizen such as Malay, Chinese and Indian also can count the passengers based on age and races. Besides that, the system needs to enhance in order to increase the accuracy of face classification.


s2fieldsofstudy:
Computer Science
Mathematics

text:
A Parallel PageRank Algorithm For Undirected Graph

PageRank is a fundamental property of graph and there have been plenty of PageRank algorithms. Generally, we consider undirected graph as a complicated directed graph. However, some properties of undirected graph, such as symmetry, are ignored when computing PageRank by existing algorithms. In this paper, we propose a parallel PageRank algorithm which is specially for undirected graph. We first demonstrate that the PageRank vector can be viewed as a linear combination of eigenvectors of probability transition matrix and the corresponding coefficients are the functions of eigenvalues. Then we introduce the Chebyshev polynomial approximation by which PageRank vector can be computed iteratively. Finally, we propose the parallel PageRank algorithm as the Chebyshev polynomial approximating algorithm(CPAA). Experimental results show that CPAA only takes 60% of iteration rounds of the power method and is at least 4 times faster than the power method.

I. INTRODUCTION
Plenty of applications such as power grids, traffic nets can be abstracted into undirected graph. PageRank [1], [2] is an essential field of graph including both directed graph and undirected graph. There is little work on computing PageRank of undirected graph. Usually, we consider undirected graph as a complicated directed graph when computing PageRank, and thus some disadvantages such as the increase in computation are inevitable. However, some important properties of undirected graph, such as symmetry, are ignored when computing PageRank by existing method.
For undirected graph, each eigenvalue of the probability transition matrix is real and the corresponding eigenvectors form a basis of the n-dimensional linear space. Then both personalized vector and PageRank vector are the linear combinations of the basis and completely determined by the coefficients. Thus computing PageRank vector from the personalized vector can be focused on the transformation of coefficients which is a function of eigenvalues. However, it is infeasible on large-scale graph because of the huge cost on computing eigenvalues and eigenvectors, we need another method to avoid this cost.
Chebyshev polynomial [3] is an effective tool on approximating. The recursion relation of Chebyshev polynomial can be extended to the domain of matrix, and thus the multiplication between Chebyshev matrix polynomial and personalized vector can be computed iteratively. It is possible to obtain the approximated PageRank vector without computing eigenvectors if we approximate the function of eigenvalues by Chebyshev polynomial. Naturally, we propose a parallel PageRank algorithm for undirected graph. The contributions of this paper are as follows: We show that PageRank vector of undirected graph is a linear combination of eigenvectors of the probability transition matrix and the corresponding coefficients are the functions of eigenvalues; We propose a parallel PageRank algorithm(CPAA) without computing eigenvectors for undirected graph; We compare CPAA with some other PageRank algorithms by experiments and the results demonstrate that CPAA converges faster.
The remains of this paper are as follows: section 2 is about the relate work; in section 3, we propose CPAA; some experiments are given in section 4; we conclude this paper in section 5.

II. RELATED WORKS
There have been plenty of PageRank algorithms [4] and Power method is the most fundamental one. Power method iteratively computes PageRank vector and the convergence rate depends on the damping factor. Although it has achieved success in many applications, power method is inefficient when dealing with the large-scale graph. Some improvements such as paralleling [5], utilizing the block structure [6] and utilizing the DAG structure [7] were proposed during the past decades.
Monte Carlo method [8] is also an excellent PageRank algorithm. From the perspective of stochastic process, PageRank can be viewed as the probability of each vertex being visited by a random walk which starts at a random vertex and walks according to the probability transition matrix. Monte Carlo method naturally supports parallelization. Some improvements based on the Monte Carlo method can be found in [9]- [11]. However, there is a big flaw that the Monte Carlo method requires large memory space and bandwidth.
Forward Push [12] is the state-of-the-art personalized PageRank algorithm and one of the improvements based on it is ITA. ITA is parallel and has low requirements on memory space and bandwidth. However, ITA is inefficient on undirected graph even compared with the power method since there is no dangling vertex or unreferenced vertex.

III. CPAA
In this section, we will propose a parallel PageRank algorithm which is specially for undirected graph. Firstly, we demonstrate that PageRank vector is the linear combination of eigenvectors of the probability transition matrix and the corresponding coefficients are the functions of eigenvalues. Then we introduce the Chebyshev polynomial and a method by which PageRank vector can be obtained without computing eigenvectors. Finally, we propose CPAA, a parallel PageRank algorithm for undirected graph. Before proceeding, we introduce some basic notations. Let a ij and P = AD −1 is the probability transition matrix. Then the PageRank vector π is given as where p is the personalized vector, I the identity matrix and c is the damping factor.

A. PAGERANK OF UNDIRECTED GRAPH
Proof. Given a n-dimensional vector y, we can have that Since Theorem 1. All the eigenvalues of P T are real.
We denote the eigenvalue of P T by λ and χ is the corresponding eigenvector, thus we can have Since B is positive definite matrix, we can have λ = λ, namely λ is real.
Since P has the same eigenvalues with P T , there exist n linearly independent eigenvectors of P . Let λ 1 , λ 2 , · · · , λ n denote the eigenvalues of P and χ 1 , χ 2 , · · · , χ n are the corresponding eigenvectors. Then χ 1 , χ 2 , · · · , χ n form a basis of n-dimensional linear space, and the personalized vector p satisfies p = n l=1 α l χ l .
Combine with (1), we can have that (6) shows that PageRank vector π is a linear combination of eigenvectors of P and the corresponding coefficients are the functions of eigenvalues. However, computing eigenvectors is inefficient when G(V, E) is large-scale graph. In next section, we will propose a new method by which π can be obtained without computing eigenvalues and eigenvectors.

B. CHEBYSHEV POLYNOMIAL APPROXIMATION
Chebyshev polynomial is a set of orthogonal polynomials with good properties. Let {T n (x)} denotes the Chebyshev polynomial, then T n (x) satisfies (a) |T n (x)| ≤ 1; Given a function f (x) ∈ C(a, b) and b a f 2 (x)dx < ∞, since Chebyshev polynomial is the optimal uniform approximating polynomial, we can have that T k (λ l )α l χ l . Since we can have that From (7) and (8), we can have that c k T k (P )p). (9)

C. CPAA
Since T k+1 (P )p = 2P T k (P )p − T k−1 (P )p, from (9), PageRank vector can be approximated iteratively without computing eigenvectors. The calculations on each vertex can be done in parallel at the same iteration round. However, invoking thread for each vertex is unrealistic, we can generate K calculating threads and then assign all the vertices to them. The parallel PageRank algorithm for undirected graph is given as the follow which we abbreviate as CPAA.

A. EXPERIMENTAL SETTING
In this section, we evaluate the performance of CPAA experimentally. We first show the convergence of CPAA and then compare CPAA with the single-threaded power method [1], [2] as well as the multi-threaded power method [13]. Let RES = ||π(k) − π(k − 1)|| 2 , where π(k) is the result of the k th iteration. And ERR = max the result of 210 th iterations of the power method as the true value. R is the iteration round and T is the consumption of CPU time. The thread numbers of CPAA and multi-threaded power method are all 32. All of the three algorithms are implemented by C++ multi-threading technology. Table 1 shows the hardware and software utilized by these numerical experiments. Table 2 shows all four data sets, where n is the amount of vertices, m is the amount of edges, nd is the amount of dangling vertices and deg = m n .  Figure 1 shows the relations between k, RES and T .

CPU
(1) The blue lines show that RES monotonously decreases with k and exhibits an exponential relationship; (2) The red lines show that T monotonously increase with k and exhibits an linear relationship; (3) RES decreases exponentially with T , namely CPAA is converged.  Figure 2 shows the relations between T and ERR and Table  3 shows T and R when ERR < 0.001.
(1) The blue and green lines in Figure 2 show that MPI is faster than SPI. The multiplication between matrix and personalized vector is parallel in MPI while which is serial in SPI; (2) The red and blues lines in Figure 2 show that CPAA is faster than MPI. CPAA and MPI are all parallel, but the convergence rate of CPAA is higher; (3) Table 3 shows that CPAA only takes 60% of iteration rounds of power method and is at least 4 times faster than SPI.

V. CONCLUSION AND FUTURE WORK
In this paper, we propose CPAA which is parallel and specially for undirected graph. The experimental results show that CPAA takes less iteration rounds and less CPU time. CPAA is suitable for implementing in the distributed environment, especially in map-reduce framework. Our ongoing work includes approximating the function of eigenvalues by other orthogonal polynomials and extending CPAA to directed graph.