# Research on Mathematical Model of Smart Service for the Elderly in Small- and Medium-Sized Cities Based on Image Processing

Authors: Chunmei Feng
Journal: Scientific Programming
 (2021)

---

## Abstract

Image processing technology is to use computer, camera, and other technologies to calculate and process images and make the image clearer and convenient for quick extraction of information. Image processing technology has entered an all-round development stage. It also plays a great role in the components of the intelligent service model for the aged. Now many countries in the world have entered the aging stage, but old-age equipment is relatively backward and personnel management is not standardized. Based on these problems, this paper studies the intelligent model of old-age care in small- and medium-sized cities by using the image recognition method. Based on the analysis of the present situation of intelligent old-age care, an intelligent system is proposed, which solves the problems of defects in old-age care facilities and insufficient comprehensive management of medical staff in some small- and medium-sized cities. This system has RTID positioning system and APP client, which can ensure the privacy of the elderly. Through real-time identification of images in the elderly service, the rationality and layout optimization of existing old-age facilities are analyzed. The mathematical model is used to detect the regularity of participants’ daily activities. The image experiment results show that the prediction accuracy is over 90%, and the optimal prediction effect is obtained. In addition, a questionnaire survey was conducted among many elderly people over 50 years old to investigate their willingness to use smart old-age products.


---

## Body

## 1. Introduction

With the development of computers, image technology has also been applied to all aspects of human life. In the construction of smart models for the elderly in certain small- and medium-sized cities, image processing technology has also played a great role. Literature [1] introduces the development of image processing technology and the connection with the smart service model for the elderly. We analyzed the results of previous research and related data. Because of the physical reasons of the elderly, their social and victory functions will decline with age, so they will encounter various difficulties in daily life. The article is based on the elderly. The daily activity habit of creating scenes provides a specific solution for the activities of the elderly at home. Literature [2] discusses the views and suggestions of alternatives to restraint and isolation for service users and their families, as well as the conditions that can be used in adults in short-term psychiatric care and residents in long-term care. Set up 3 nursing institutions related to middle-aged and elderly family members and 5 focus groups related to service quality. These small focus groups discussed and analyzed records and found that more companionship and caring for the elderly are the most effective way to solve the mental disorders of the elderly. Listen to the inner thoughts of the elderly and give them more love and company. Immature old-age care policies in big cities result in the high poverty rate of the elderly and a series of old-age care problems. Literature [3] studies the elderly to provide location-based, customized job search services to actively support the elderly to participate in economic activities, provide customized positions for the elderly according to their residence, physical condition, and working conditions, so that the elderly can choose suitable positions according to their interests and living conditions, and contribute to the expansion of the employment market for the elderly. Literature [4] aims to develop smart healthcare glove system (SHGS) and transcutaneous electrical nerve stimulator (TENS) based on electronic textiles as healthcare equipment for elderly hypertension. Using image processing technology, the patient’s pulse and blood pressure generated pictures can be transmitted to the computer for better observation. Observing the blood pressure and pulse of multiple patients wearing SHGS, the results show that SHGS can not only be used for the elderly to lower blood pressure and improve the irregular blood circulation but also be used for hypertensive patients of any age. The goal of literature [5] is to deploy an intelligent nursing service integration agent to provide individualization and integration for each elderly person. Every elderly person’s needs and preferences are different. In time, a robot with strong learning ability also needs to spend a lot of time learning everyone’s preferences and needs. In order to provide basic nursing tasks, we have deployed nursing templates in the cloud. There are different scenes for each character. Literature [6] provides a theoretical basis for combining biophilic and smart home technology and provides a framework for smart home services to ensure that elderly residents can have a biophilic experience. Smart home technology is not a mechanized achievement. It simulates nature and creates a high quality of life, which can support the physical and mental health of the elderly. It not only provides effective information for the elderly smart home industry but also makes a huge contribution to the trend of smart home services. Literature [7] studies the contradiction between the design of smart home products under the medical care model and the daily needs of the elderly and conducts case analysis of smart home products for the elderly. The research results show that smart homes can maximize the satisfaction of the elderly. Literature [8] introduces WITSCare, which is a research prototype of a web-based IoT smart home system. It is a smart home system designed using the intelligence of the Internet of Things, which can help the elderly live safely and independently at home. Literature [9] proposes an application architecture suitable for such online service network platforms and designed it with the most advanced concepts such as server-side JavaScript, NoSQL databases, and machine learning. The rapid increase in the number of elderly people has brought great pressure to our country’s medical treatment and society. It has become an increasingly popular topic to provide the elderly with a high-quality living environment. Literature [10] proposes a conceptual model of an integrated and personalized system to solve this problem. We interviewed three healthcare experts to better explore the needs of the elderly and customized a conceptual model for the elderly to live independently, centering on the concepts of comfort, safety, and environmental protection and providing good protection for the elderly to live alone. The purpose of literature [11] is to propose services based on behavioral patterns. The range of activities for the elderly is limited, and the living room is an important area. We have proposed a method of developing a smart living room specifically designed for the elderly. We put forward a number of behavior patterns of the elderly, including preventing falls and injuries, and explain safety issues and health issues to provide a comfortable living environment in all aspects. There are many hidden safety hazards for the elderly at home alone. To ensure the safety of the elderly at home, we must consider the hazards such as gas leaks in the kitchen, fire, and falls in the bathroom. Literature [12] deals with the hazards and intelligent services in the kitchen according to the behavior of the elderly. According to multiple accidents such as fires and gas leaks, a smart service has been set up. The smart service can not only detect safety problems at home but also has functions such as automatic alarms and automatic ventilation to further protect the safety of the elderly at home. Studies have shown that the most common disease in the elderly is cardiovascular disease, which also poses a great threat to the health of the elderly. Literature [13] develops smart clothes to record 3-lead electrocardiogram (ECG). Using the image elementary technology, the analyzed data are quickly generated into pictures. The system is composed of fiber clothes with electrodes which have the function of acquiring physiological signals and can analyze health data. Experimental results show that the accuracy of ECG is as high as 86.82%. Starting from the two ways of family pension and institutional pension, family pension is the pension mode chosen by most people. The deficiency of traditional family pension lies in that it is generally difficult for the elderly to get professional and meticulous care, medical care, and spiritual and cultural services in the family. Under the background that “421 structure” families have become the mainstream of urban society, social competition has intensified and the pace of life has accelerated. The social labor cost and people’s work burden are generally increasing, family members and children cannot have enough energy to take care of the elderly at home, family pension is facing severe challenges, the traditional family pension model is increasingly difficult to maintain and play its social function and role, and the urban family pension is gradually weakened and socialized. Nursing homes charge higher fees, so most families cannot bear the economic pressure, and they have higher requirements for medical staff. Based on these problems, this paper creates an intelligent mathematical model to help solve the problem of providing care for the aged and uses image processing technology to create an intelligent system. The system has many functions, such as detecting health problems of the elderly and real-time positioning. By analyzing the present situation of old-age wisdom in China, this paper finds some problems in old-age care in China, such as backward old-age care equipment and irregular personnel management. This paper uses image processing technology to build an old-age wisdom service model, which solves the problems of old-age care facility defects and insufficient comprehensive management of medical staff in some small- and medium-sized cities. Using this model, the problem of providing care for the aged in China has been greatly solved. Through the test, it can be found that the system has a very high accuracy for the health detection of the elderly.


### 1.1. Overview and Development of Digital Image Processing Technology

With the rise of the computer industry, people gradually began to pay attention to digital image processing technology. In 1964, the US Jet Propulsion Laboratory used a computer to process a large number of lunar photos sent by the “Prowler” spacecraft. The results are very satisfactory. The digital image technology has also become an emerging subject. Until the 1990s, digital images have developed rapidly. Today, various industries have put forward high requirements on image processing technology, which has also promoted the better development of image processing technology. Common methods of processing technology include image transformation, image enhancement and restoration, and image segmentation. Image processing technology has the following characteristics: the diversity of image processing, the sharpness of the processed image is getting higher and higher, and the amount of data processing is large.


### 1.2. Research Background

The problem of population aging in our country is becoming more and more serious. The issue of elderly care is one of the problems that our country must face in its development. According to the report of the civil affairs department, the elderly in our country now account for 17.17% of the total population, and the problem of population aging is aggravated. The imperfections of old-age facilities show that our country is not fully prepared for the problem of population aging again. The number of elderly people living alone has increased rapidly in recent years. Because with the acceleration of social development and the pace of life, young people in many big cities have chosen to develop in big cities, so they cannot accompany these old people for a long time to take care of their own old people. The elderly care in modern society is mainly divided into two types: one is home care and the other is “material home.” Because of the early implementation of the family planning policy in our country, a pair of husbands may have a single child every day. This traditional family management model is called “4-2-1” by us. It refers to a special family that requires 4 independent elderly people, a husband and a wife, and a child. This is for a couple of two people. In other words, it is necessary to take care of 4 independent old people and one child at the same time. Because of the livelihoods of working outside, there is no way to accompany the old people at all times. The traditional family care model is difficult to achieve. When the elderly live alone, there are also many hidden dangers. When the elderly suddenly falls ill and cannot seek medical treatment in time, they cannot deal with the sudden accident in time. These hidden dangers make children of many ages gravitate towards nursing care institutions. The elderly care institutions in our country are showing a trend of two levels of differentiation. Senior nursing homes are equipped with advanced equipment and high level of management personnel, but the fees are too high. Most families cannot afford the high expenses. The general nursing homes have aging equipment and limited service quality and cannot provide high-quality services for the elderly.


### 1.3. Research Significance

With the increase of age, the elderly may also have some problems in life, such as falling hair and teeth, shaking legs and feet, and memory loss. They tend to have a strong sense of self-dependence and fear of loneliness. They pay more attention to their own life and health problems and their dependence on family and affection. As modern Chinese elderly people decline in their cognitive abilities and active actions, their ability to accept new things has also declined. Most nursing homes in our country have imperfect medical service facilities and imperfect management, which will cause many retired elderly people to have to enjoy high-quality medical care. At present, most nursing homes in our country monitor and care for the elderly mainly through videos. Although video monitoring can directly monitor the situation and behavior of the elderly in the life of the home and nursing homes, there are dead corners in this kind of monitoring and cannot provide full coverage to the elderly. This kind of monitoring easily reveals the personal privacy of the left-behind elderly. Therefore, this article proposes an intelligent elderly care service system. On the premise of ensuring that the privacy of the elderly in the family is not leaked and will not affect the normal life of the elderly in the family, the RFID technology equipment can monitor the elderly in the family in real time. The RFID technology equipment can monitor the situation of medical sanatorium in real time for the elderly at home.


### 1.4. Status Quo of Research on Smart Elderly Care

Population aging is an inevitable phenomenon. Many developed countries have entered a new era of population aging earlier than our Chinese nation and have accumulated a lot of advanced experience. Therefore, when dealing with these pension problems, our country should appropriately learn from the practices of developed countries. From the successful examples of the elderly care service systems in these developed countries, we can find some more excellent high-quality smart elderly care products, which not only integrate advanced technology but also incorporate humanistic care that meets the characteristics of the elderly, so that the elderly can enjoy high tech while bringing convenience and fun and feel the humanistic care that meets your requirements. With the development of computer technology and the Internet of Things, the convenience brought by automation to the elderly care problem is of great significance, and it provides effective experience for the development of our country’s smart elderly care industry.


## 1.1. Overview and Development of Digital Image Processing Technology

With the rise of the computer industry, people gradually began to pay attention to digital image processing technology. In 1964, the US Jet Propulsion Laboratory used a computer to process a large number of lunar photos sent by the “Prowler” spacecraft. The results are very satisfactory. The digital image technology has also become an emerging subject. Until the 1990s, digital images have developed rapidly. Today, various industries have put forward high requirements on image processing technology, which has also promoted the better development of image processing technology. Common methods of processing technology include image transformation, image enhancement and restoration, and image segmentation. Image processing technology has the following characteristics: the diversity of image processing, the sharpness of the processed image is getting higher and higher, and the amount of data processing is large.


## 1.2. Research Background

The problem of population aging in our country is becoming more and more serious. The issue of elderly care is one of the problems that our country must face in its development. According to the report of the civil affairs department, the elderly in our country now account for 17.17% of the total population, and the problem of population aging is aggravated. The imperfections of old-age facilities show that our country is not fully prepared for the problem of population aging again. The number of elderly people living alone has increased rapidly in recent years. Because with the acceleration of social development and the pace of life, young people in many big cities have chosen to develop in big cities, so they cannot accompany these old people for a long time to take care of their own old people. The elderly care in modern society is mainly divided into two types: one is home care and the other is “material home.” Because of the early implementation of the family planning policy in our country, a pair of husbands may have a single child every day. This traditional family management model is called “4-2-1” by us. It refers to a special family that requires 4 independent elderly people, a husband and a wife, and a child. This is for a couple of two people. In other words, it is necessary to take care of 4 independent old people and one child at the same time. Because of the livelihoods of working outside, there is no way to accompany the old people at all times. The traditional family care model is difficult to achieve. When the elderly live alone, there are also many hidden dangers. When the elderly suddenly falls ill and cannot seek medical treatment in time, they cannot deal with the sudden accident in time. These hidden dangers make children of many ages gravitate towards nursing care institutions. The elderly care institutions in our country are showing a trend of two levels of differentiation. Senior nursing homes are equipped with advanced equipment and high level of management personnel, but the fees are too high. Most families cannot afford the high expenses. The general nursing homes have aging equipment and limited service quality and cannot provide high-quality services for the elderly.


## 1.3. Research Significance

With the increase of age, the elderly may also have some problems in life, such as falling hair and teeth, shaking legs and feet, and memory loss. They tend to have a strong sense of self-dependence and fear of loneliness. They pay more attention to their own life and health problems and their dependence on family and affection. As modern Chinese elderly people decline in their cognitive abilities and active actions, their ability to accept new things has also declined. Most nursing homes in our country have imperfect medical service facilities and imperfect management, which will cause many retired elderly people to have to enjoy high-quality medical care. At present, most nursing homes in our country monitor and care for the elderly mainly through videos. Although video monitoring can directly monitor the situation and behavior of the elderly in the life of the home and nursing homes, there are dead corners in this kind of monitoring and cannot provide full coverage to the elderly. This kind of monitoring easily reveals the personal privacy of the left-behind elderly. Therefore, this article proposes an intelligent elderly care service system. On the premise of ensuring that the privacy of the elderly in the family is not leaked and will not affect the normal life of the elderly in the family, the RFID technology equipment can monitor the elderly in the family in real time. The RFID technology equipment can monitor the situation of medical sanatorium in real time for the elderly at home.


## 1.4. Status Quo of Research on Smart Elderly Care

Population aging is an inevitable phenomenon. Many developed countries have entered a new era of population aging earlier than our Chinese nation and have accumulated a lot of advanced experience. Therefore, when dealing with these pension problems, our country should appropriately learn from the practices of developed countries. From the successful examples of the elderly care service systems in these developed countries, we can find some more excellent high-quality smart elderly care products, which not only integrate advanced technology but also incorporate humanistic care that meets the characteristics of the elderly, so that the elderly can enjoy high tech while bringing convenience and fun and feel the humanistic care that meets your requirements. With the development of computer technology and the Internet of Things, the convenience brought by automation to the elderly care problem is of great significance, and it provides effective experience for the development of our country’s smart elderly care industry.


## 2. Related Technical and Theoretical Research

### 2.1. Positioning Technology

Positioning technology mainly includes two major components: indoor positioning and outdoor positioning. Outdoor positioning technology has been widely used in various scenarios. At present and internationally, outdoor positioning systems that can achieve commercial operation and normal operation mainly include the United States’ global positioning system, Europe’s Galileo satellite positioning system, and Russia’s global positioning system. The navigation satellite system and China’s BeiDou satellite positioning system are based on satellite signals, but when a satellite signal is transmitted indoors, the signal strength will be severely degraded and the error is large, making it impossible for anyone to receive. Therefore, it cannot be suitable for indoor positioning. However, the area of daily life of the elderly is basically indoors, so the indoor automatic positioning system can greatly promote the daily life of the elderly.


### 2.2. Frequency Radio Identification

RFID wireless radio frequency technology is a technology that uses radio frequency signals to achieve information interaction through a magnetic field. The basic structure diagram is shown in Figure1.Figure 1
RFID structure diagram.The development process of RFID technology is shown in Table1.Table 1
RFID technology development process.
YearDevelopment process1941–1950RFID technology is separated from radar technology and appears in front of people as an independent technology1951–1960RFID technology is separated from radar technology and appears in front of people as an independent technology1961–1970The first RFID-related paper was published, and the successful application of EAS for electronic article monitoring marks the further development of RFID technology1971–1980A large number of RFID patents appeared, and RFID technology appeared in commodity applications for the first time1981–1990RFID has been officially used in commercial production, and various large-scale applications have begun to appear1991–2000The standardization of RFID technology is getting more and more attention, RFID products are widely used, and RFID products have gradually become a part of people’s daily lives2000 laterRFID product types are more abundant, the production level is continuously improved, the cost of electronic tags is continuously reduced, and the scale of application industries is expandedThere are 3 categories of RFID, and their main characteristics are shown in Table2.Table 2
Comparison of characteristics of different types of RFID.
Types of RFIDPassive RFIDSemiactive RFIDActive RFIDLabel power supplyWithout batteryBuilt-in batteryPart of the built-in batteryRange of actionLimitedFartherGeneralService lifeLongerShorterGeneralLabel costLowerHigherGeneralAdapt to harsh environmentsSuitableInappropriateGeneralThe comparison chart of RFID technology under different carrier frequencies is shown in Table3.Table 3
Technical comparison table under different frequencies.
FrequencyLow frequencyHigh frequencyUHFCarrier frequency<125 kHz13.56 MHz>433 HzGeneral characteristicsHigh price, affected by the environmentLow price, suitable for short-distance and multiple target recognition applicationsAdvanced IC technology makes the cost the lowest, suitable for multiple target recognitionData transfer rateLow (8kbit/s)High (64kbit/s)High (64kbit/s)Recognition speedLow (<1 m/s)Medium (<5 m/s)High (<50 m/s)Label structureCoilPrinted coilDipole antennaDirectionalityNoneNonePartHumid environmentNo effectNo effectGreater impactMarket share74%17%9%Transmission performancePenetrable conductorPenetrable conductorLinear propagationImitation impact performanceLimitedGoodGoodExisting standardsISO11784 ISO11785ISO18000-3 ISO14443EPC G2ISO18000-6Recognition distance<60 cm0.1–1 m1–6 mScope of applicationAccess control, fixed equipment, natural gasLibrary, product tracking, transportationShelves, truck tracking, containers


## 2.1. Positioning Technology

Positioning technology mainly includes two major components: indoor positioning and outdoor positioning. Outdoor positioning technology has been widely used in various scenarios. At present and internationally, outdoor positioning systems that can achieve commercial operation and normal operation mainly include the United States’ global positioning system, Europe’s Galileo satellite positioning system, and Russia’s global positioning system. The navigation satellite system and China’s BeiDou satellite positioning system are based on satellite signals, but when a satellite signal is transmitted indoors, the signal strength will be severely degraded and the error is large, making it impossible for anyone to receive. Therefore, it cannot be suitable for indoor positioning. However, the area of daily life of the elderly is basically indoors, so the indoor automatic positioning system can greatly promote the daily life of the elderly.


## 2.2. Frequency Radio Identification

RFID wireless radio frequency technology is a technology that uses radio frequency signals to achieve information interaction through a magnetic field. The basic structure diagram is shown in Figure1.Figure 1
RFID structure diagram.The development process of RFID technology is shown in Table1.Table 1
RFID technology development process.
YearDevelopment process1941–1950RFID technology is separated from radar technology and appears in front of people as an independent technology1951–1960RFID technology is separated from radar technology and appears in front of people as an independent technology1961–1970The first RFID-related paper was published, and the successful application of EAS for electronic article monitoring marks the further development of RFID technology1971–1980A large number of RFID patents appeared, and RFID technology appeared in commodity applications for the first time1981–1990RFID has been officially used in commercial production, and various large-scale applications have begun to appear1991–2000The standardization of RFID technology is getting more and more attention, RFID products are widely used, and RFID products have gradually become a part of people’s daily lives2000 laterRFID product types are more abundant, the production level is continuously improved, the cost of electronic tags is continuously reduced, and the scale of application industries is expandedThere are 3 categories of RFID, and their main characteristics are shown in Table2.Table 2
Comparison of characteristics of different types of RFID.
Types of RFIDPassive RFIDSemiactive RFIDActive RFIDLabel power supplyWithout batteryBuilt-in batteryPart of the built-in batteryRange of actionLimitedFartherGeneralService lifeLongerShorterGeneralLabel costLowerHigherGeneralAdapt to harsh environmentsSuitableInappropriateGeneralThe comparison chart of RFID technology under different carrier frequencies is shown in Table3.Table 3
Technical comparison table under different frequencies.
FrequencyLow frequencyHigh frequencyUHFCarrier frequency<125 kHz13.56 MHz>433 HzGeneral characteristicsHigh price, affected by the environmentLow price, suitable for short-distance and multiple target recognition applicationsAdvanced IC technology makes the cost the lowest, suitable for multiple target recognitionData transfer rateLow (8kbit/s)High (64kbit/s)High (64kbit/s)Recognition speedLow (<1 m/s)Medium (<5 m/s)High (<50 m/s)Label structureCoilPrinted coilDipole antennaDirectionalityNoneNonePartHumid environmentNo effectNo effectGreater impactMarket share74%17%9%Transmission performancePenetrable conductorPenetrable conductorLinear propagationImitation impact performanceLimitedGoodGoodExisting standardsISO11784 ISO11785ISO18000-3 ISO14443EPC G2ISO18000-6Recognition distance<60 cm0.1–1 m1–6 mScope of applicationAccess control, fixed equipment, natural gasLibrary, product tracking, transportationShelves, truck tracking, containers


## 3. Image Preprocessing

### 3.1. Image Binarization

Image binarization is a common image segmentation method. The grayscale processed image is binarized again. Assuming that an image hasL gray levels and T is the binarization value, the entire image can be divided into two districts, namely, C0 and C1. The number of sharing speed points of gray level i is ni, and N is the total number of pixels in the image. Then,(1)N=∑i=0t−1ni.The probability of occurrence ofi is(2)pi=niN.The probability of the pixels in the two regions appearing in the image is(3)ω0=∑i=0TPi,ω1=∑i=T+1L−1Pi=1−ω0.The average grayscale of the two regions is(4)μ1=1ω0∑i=T+1L−1ipi,(5)μ0=1ω0∑i=0Tipi.Through formulas (4) and (5), the average gray value of the entire image is obtained, and according to the pixel points, the color image is divided into three components: R, G, and B, which show various colors such as red, green, and blue, respectively. Grayscale is the process of making the R, G, and B components of color equal. The pixels with large gray value are brighter (the maximum pixel value is 255, which is white), and the opposite is darker (the lowest pixel is 0, which is black).The background and the interclass variance formula of the target can be obtained as follows:(6)μ=∑i=0L−1iPi=∑i=T+1TiPi=ω0μ0+ω1μ1,σ2T=ω0μ0−μ2+ω1μ1−μ2=ω0ω1μ0−μ12.


### 3.2. Image Morphological Filtering

Image morphological filtering is widely used in the process of image processing, and its common arithmetic methods are divided into the following types.(1)Expansion Algorithm. The principle of the expansion algorithm is to assume that A is an image, B is a structural element, and ⊕ is an operator in Figure 2, which is defined as(7)A⊕B=Z|B^Z∩A≠∅.Figure 2
Schematic diagram of expansion algorithm.(2)Corrosion Algorithm. The basic principle of image expansion is assuming that A is an image, B is a structural element, and ⊙ is an erosion mathematical operator in Figure 3, which is defined as(8)A⊙B=Z|Bz⊆A.Figure 3
Schematic diagram of corrosion algorithm.


### 3.3. Use Image Processing Data

#### 3.3.1. Extreme Learning Machine

When training an extreme learning machine to deal with classification problems, a setxi,ti∈Rd×Rm is given, where xi is the input vector and ti represents the category to which it belongs. Then,(9)tj=∑i=1LβiGiwi⋅xi+bi,j=1,…,N.Among them,Gw,b,x is the activation function. Equation (10) can be simplified to(10)Hβ=T.In equation (10),(11)H=Gw1⋅x1+b1⋯GwL⋅x1+bL⋯Gw1⋅xN+b1⋯GwL⋅xN+bLN×L,β=β1T⋮βNTL×M,T=t1T⋮tNTL×M.According to the permission matrix of the learning machine, it can be set as(12)β^=HTH+λI−1HTT,λ>0.When entering an unknown sample ofx˜,(13)t˜=argmaxh˜β˜,where(14)h˜=GW1⋅X˜+b1⋯GwL⋅x˜+bL,where t˜ is the predicted value of unknown sample x˜.


#### 3.3.2. Support Vector Machine

The training process of the support vector machine model is to solve a minimum problem with constraints:(15)yiwi⋅xi+b≥1,i=1,2,…m,minJw=w22.Solving by Lagrangian function,(16)Lw,b,α=12w⋅w−∑i=1mαxi⋅w+byi−1,Take the partial derivative of w and b, and then take the value of 0. Then, we obtain(17)∂L∂W=W−∑i−1mαiyixi=0,∂L∂b=∑i=1maiyi=0.The optimal hyperplane needs to meet(18)αixi⋅w+byi−1=0,which is transformed into(19)minWα=12∑i=1m∑i=1myiyjαiαjxi⋅xj−∑j=1maj,s.tai≥0,i=1,…,m,∑i=1mαiyi=0.The value ofα∗ is the optimal solution, and there are(20)w∗=2wα∗=∑svαi∗αj∗xi⋅xjyiyj.The optimal decomposition function is(21)fx=sgn∑svmyiαi∗xi⋅xj+b∗.For the linear inseparable case, the constraint conditions are transformed into(22)yiw⋅xi+b−1+εi≥0,i=1,…,m.The objective function is transformed into(23)Jw,ε=12w⋅w+C∑i=1mεi.In formula (15), C is the penalty factor, and the larger the value of C>0, the greater the loss caused by the outlier to the objective function.


## 3.1. Image Binarization

Image binarization is a common image segmentation method. The grayscale processed image is binarized again. Assuming that an image hasL gray levels and T is the binarization value, the entire image can be divided into two districts, namely, C0 and C1. The number of sharing speed points of gray level i is ni, and N is the total number of pixels in the image. Then,(1)N=∑i=0t−1ni.The probability of occurrence ofi is(2)pi=niN.The probability of the pixels in the two regions appearing in the image is(3)ω0=∑i=0TPi,ω1=∑i=T+1L−1Pi=1−ω0.The average grayscale of the two regions is(4)μ1=1ω0∑i=T+1L−1ipi,(5)μ0=1ω0∑i=0Tipi.Through formulas (4) and (5), the average gray value of the entire image is obtained, and according to the pixel points, the color image is divided into three components: R, G, and B, which show various colors such as red, green, and blue, respectively. Grayscale is the process of making the R, G, and B components of color equal. The pixels with large gray value are brighter (the maximum pixel value is 255, which is white), and the opposite is darker (the lowest pixel is 0, which is black).The background and the interclass variance formula of the target can be obtained as follows:(6)μ=∑i=0L−1iPi=∑i=T+1TiPi=ω0μ0+ω1μ1,σ2T=ω0μ0−μ2+ω1μ1−μ2=ω0ω1μ0−μ12.


## 3.2. Image Morphological Filtering

Image morphological filtering is widely used in the process of image processing, and its common arithmetic methods are divided into the following types.(1)Expansion Algorithm. The principle of the expansion algorithm is to assume that A is an image, B is a structural element, and ⊕ is an operator in Figure 2, which is defined as(7)A⊕B=Z|B^Z∩A≠∅.Figure 2
Schematic diagram of expansion algorithm.(2)Corrosion Algorithm. The basic principle of image expansion is assuming that A is an image, B is a structural element, and ⊙ is an erosion mathematical operator in Figure 3, which is defined as(8)A⊙B=Z|Bz⊆A.Figure 3
Schematic diagram of corrosion algorithm.


## 3.3. Use Image Processing Data

### 3.3.1. Extreme Learning Machine

When training an extreme learning machine to deal with classification problems, a setxi,ti∈Rd×Rm is given, where xi is the input vector and ti represents the category to which it belongs. Then,(9)tj=∑i=1LβiGiwi⋅xi+bi,j=1,…,N.Among them,Gw,b,x is the activation function. Equation (10) can be simplified to(10)Hβ=T.In equation (10),(11)H=Gw1⋅x1+b1⋯GwL⋅x1+bL⋯Gw1⋅xN+b1⋯GwL⋅xN+bLN×L,β=β1T⋮βNTL×M,T=t1T⋮tNTL×M.According to the permission matrix of the learning machine, it can be set as(12)β^=HTH+λI−1HTT,λ>0.When entering an unknown sample ofx˜,(13)t˜=argmaxh˜β˜,where(14)h˜=GW1⋅X˜+b1⋯GwL⋅x˜+bL,where t˜ is the predicted value of unknown sample x˜.


### 3.3.2. Support Vector Machine

The training process of the support vector machine model is to solve a minimum problem with constraints:(15)yiwi⋅xi+b≥1,i=1,2,…m,minJw=w22.Solving by Lagrangian function,(16)Lw,b,α=12w⋅w−∑i=1mαxi⋅w+byi−1,Take the partial derivative of w and b, and then take the value of 0. Then, we obtain(17)∂L∂W=W−∑i−1mαiyixi=0,∂L∂b=∑i=1maiyi=0.The optimal hyperplane needs to meet(18)αixi⋅w+byi−1=0,which is transformed into(19)minWα=12∑i=1m∑i=1myiyjαiαjxi⋅xj−∑j=1maj,s.tai≥0,i=1,…,m,∑i=1mαiyi=0.The value ofα∗ is the optimal solution, and there are(20)w∗=2wα∗=∑svαi∗αj∗xi⋅xjyiyj.The optimal decomposition function is(21)fx=sgn∑svmyiαi∗xi⋅xj+b∗.For the linear inseparable case, the constraint conditions are transformed into(22)yiw⋅xi+b−1+εi≥0,i=1,…,m.The objective function is transformed into(23)Jw,ε=12w⋅w+C∑i=1mεi.In formula (15), C is the penalty factor, and the larger the value of C>0, the greater the loss caused by the outlier to the objective function.


## 3.3.1. Extreme Learning Machine

When training an extreme learning machine to deal with classification problems, a setxi,ti∈Rd×Rm is given, where xi is the input vector and ti represents the category to which it belongs. Then,(9)tj=∑i=1LβiGiwi⋅xi+bi,j=1,…,N.Among them,Gw,b,x is the activation function. Equation (10) can be simplified to(10)Hβ=T.In equation (10),(11)H=Gw1⋅x1+b1⋯GwL⋅x1+bL⋯Gw1⋅xN+b1⋯GwL⋅xN+bLN×L,β=β1T⋮βNTL×M,T=t1T⋮tNTL×M.According to the permission matrix of the learning machine, it can be set as(12)β^=HTH+λI−1HTT,λ>0.When entering an unknown sample ofx˜,(13)t˜=argmaxh˜β˜,where(14)h˜=GW1⋅X˜+b1⋯GwL⋅x˜+bL,where t˜ is the predicted value of unknown sample x˜.


## 3.3.2. Support Vector Machine

The training process of the support vector machine model is to solve a minimum problem with constraints:(15)yiwi⋅xi+b≥1,i=1,2,…m,minJw=w22.Solving by Lagrangian function,(16)Lw,b,α=12w⋅w−∑i=1mαxi⋅w+byi−1,Take the partial derivative of w and b, and then take the value of 0. Then, we obtain(17)∂L∂W=W−∑i−1mαiyixi=0,∂L∂b=∑i=1maiyi=0.The optimal hyperplane needs to meet(18)αixi⋅w+byi−1=0,which is transformed into(19)minWα=12∑i=1m∑i=1myiyjαiαjxi⋅xj−∑j=1maj,s.tai≥0,i=1,…,m,∑i=1mαiyi=0.The value ofα∗ is the optimal solution, and there are(20)w∗=2wα∗=∑svαi∗αj∗xi⋅xjyiyj.The optimal decomposition function is(21)fx=sgn∑svmyiαi∗xi⋅xj+b∗.For the linear inseparable case, the constraint conditions are transformed into(22)yiw⋅xi+b−1+εi≥0,i=1,…,m.The objective function is transformed into(23)Jw,ε=12w⋅w+C∑i=1mεi.In formula (15), C is the penalty factor, and the larger the value of C>0, the greater the loss caused by the outlier to the objective function.


## 4. System Design

The smart elderly care system is a smart elderly care system designed using image processing technology, remote monitoring, and information service platforms, combined with the life needs of the elderly, and the overall structure is shown in Figure4.Figure 4
The overall structure of the smart elderly care system.The system has many functions. When the elderly wear the ECG monitoring bracelet, the heart rate and heartbeat of the elderly will be generated and transmitted to the mobile phones of family members and medical staff. So that they can pay more attention to the health problems of the elderly and spend the day of the elderly. The pictures generated by the system will also be sent to the family members’ mobile phones. Based on the actual management and service needs of nursing homes, a nursing home personnel positioning management system is developed, which can realize daily basic information management, real-time positioning and tracking of the elderly, vital signs monitoring of the elderly, one-button alarm of dangerous situations of the elderly, and other functions. When the elderly have special circumstances, they can respond as soon as possible, and the system can truly realize the significance and requirements of intelligent old-age care and be responsible for the daily life and health status of the elderly. It is no longer the traditional way of providing care for the aged, and there is a shortage of nursing staff. There is an independent nursing home in this system.


### 4.1. Simulation Experiment Results

We investigated, learned, and collected the daily activity trajectories of many elderly people, as shown in Figure5.Figure 5
Activity trajectory diagram of the elderly.The collected images are counted, and the statistics chart can view the real-time location of each person, as shown in Figure6.Figure 6
Statistics of the scope of activity.You can also query the activity track of a user in a day, as shown in Figures7 and 8.Figure 7
Statistics of the range of activities of the elderly.Figure 8
Statistics of the scope of activities for the elderly.There are many recreational facilities in nursing homes. These recreational facilities bring great fun to the elderly and enrich the daily life of the elderly; some facilities are used by a large number of people, and the resource allocation is not reasonable. Nursing homes should strengthen the construction of the project and make elderly care services better.


### 4.2. Obtaining Experimental Results

In order to check the accuracy of the system, we arranged the RFID equipment and collected the daily data of 4 students for a month. The ReaderIDs of the two places are represented by 1 and 2, respectively. The specific data are shown in Table4.Table 4
Stored location data.
TagIDTimeDateReaderIDAntIDReaderRssiAntRssi8202715810:35:002020-09-1622−12−78202805810:35:002020-09-1622−16−178202715910:35:002020-09-1611−23−208203242510:35:002020-09-1622−21−148202715810:36:002020-09-1622−12−78202805810:36:002020-09-1622−16−178202715910:36:002020-09-1611−23−208203242510:36:002020-09-1622−21−14The smart elderly care system generates many pieces of location data every day to prevent data memory from being confused. We should process these data to facilitate more accurate results. The data of each experimenter are accumulated in one place. Because there are 5 active areas, the experimental data are divided into 5 groups.


### 4.3. Analysis of Simulation Experiment Results

The experiment process lasted for one month. We used the data of 4 students within 25 days as the training set and used the data of the last 5 days to test the robustness of the prediction model and the support vector machine prediction model. Figure9 shows the prediction results. The results show that, in the five-day life of four people, there were only two errors, and the accuracy rate was as high as 90%. The specific results are shown in Figures 9 and 10.Figure 9
Prediction results of the extreme learning machine.Figure 10
Prediction results of the support vector machine.The predicted value and actual value of the extreme learning machine are 70 and 60, respectively, and the accuracy rate is as high as 90%.


### 4.4. Research Methods

We started a round of questionnaire surveys with 50 pairs of elderly people and those older than 50 years as the survey subjects and distributed questionnaires to elderly people in different regions, different ages, and educational backgrounds. After removing invalid questionnaires, there were 254 valid questionnaires remaining. The distribution results are shown in Table5.Table 5
Distribution results.
Sample statistical characteristicsCategoryFrequencyPercentage%Cumulative percentage%GenderMale11339.839.8Female17160.2100.0Age50–69 years old70 years old and above17260...660.0611239.4100.0EducationElementary school and belowJunior high schoolHigh schoolBachelor degree and above14450.750.76021.171.83913.785.64114.4100.0Monthly income<1000 yuan8530.030.01000–2000 yuan8028.358.32000–3000 yuan5318.777.0>3000 yuan6523.0100.0The willingness to use smart aged care products is shown in Figure6.According to the experimental results obtained in Figures9 and 10, we can clearly observe the accuracy of prediction by drawing images with image processing technology. For the questionnaire survey obtained in Table 6, through image analysis, we can also clearly see the different percentages of statistical characteristics of different samples and other conditions.Table 6
Regression analysis table.
D VI VNonstandardized coefficientStandard coefficienttSig.VIFDurbin–WatsonR2BStandard errorU MConstant0.4240.1510.2910.4330.2112.8010.0051.5831.6631.2991.7580.5970.293∗∗0.0486.1040.0000.402∗∗0.046808480.0000.210∗∗0.0434.8790.000Through the results of the questionnaire survey, we can find that the degree of education, education level, and salary of the elderly are related to the willingness to use smart pension products. In general, the elderly with high wages also have a higher education level and they will use their own knowledge reserve ability to quickly learn how to use smart products. Therefore, in the process of product development and promotion, we should focus on the elderly who are slow to accept new things.


## 4.1. Simulation Experiment Results

We investigated, learned, and collected the daily activity trajectories of many elderly people, as shown in Figure5.Figure 5
Activity trajectory diagram of the elderly.The collected images are counted, and the statistics chart can view the real-time location of each person, as shown in Figure6.Figure 6
Statistics of the scope of activity.You can also query the activity track of a user in a day, as shown in Figures7 and 8.Figure 7
Statistics of the range of activities of the elderly.Figure 8
Statistics of the scope of activities for the elderly.There are many recreational facilities in nursing homes. These recreational facilities bring great fun to the elderly and enrich the daily life of the elderly; some facilities are used by a large number of people, and the resource allocation is not reasonable. Nursing homes should strengthen the construction of the project and make elderly care services better.


## 4.2. Obtaining Experimental Results

In order to check the accuracy of the system, we arranged the RFID equipment and collected the daily data of 4 students for a month. The ReaderIDs of the two places are represented by 1 and 2, respectively. The specific data are shown in Table4.Table 4
Stored location data.
TagIDTimeDateReaderIDAntIDReaderRssiAntRssi8202715810:35:002020-09-1622−12−78202805810:35:002020-09-1622−16−178202715910:35:002020-09-1611−23−208203242510:35:002020-09-1622−21−148202715810:36:002020-09-1622−12−78202805810:36:002020-09-1622−16−178202715910:36:002020-09-1611−23−208203242510:36:002020-09-1622−21−14The smart elderly care system generates many pieces of location data every day to prevent data memory from being confused. We should process these data to facilitate more accurate results. The data of each experimenter are accumulated in one place. Because there are 5 active areas, the experimental data are divided into 5 groups.


## 4.3. Analysis of Simulation Experiment Results

The experiment process lasted for one month. We used the data of 4 students within 25 days as the training set and used the data of the last 5 days to test the robustness of the prediction model and the support vector machine prediction model. Figure9 shows the prediction results. The results show that, in the five-day life of four people, there were only two errors, and the accuracy rate was as high as 90%. The specific results are shown in Figures 9 and 10.Figure 9
Prediction results of the extreme learning machine.Figure 10
Prediction results of the support vector machine.The predicted value and actual value of the extreme learning machine are 70 and 60, respectively, and the accuracy rate is as high as 90%.


## 4.4. Research Methods

We started a round of questionnaire surveys with 50 pairs of elderly people and those older than 50 years as the survey subjects and distributed questionnaires to elderly people in different regions, different ages, and educational backgrounds. After removing invalid questionnaires, there were 254 valid questionnaires remaining. The distribution results are shown in Table5.Table 5
Distribution results.
Sample statistical characteristicsCategoryFrequencyPercentage%Cumulative percentage%GenderMale11339.839.8Female17160.2100.0Age50–69 years old70 years old and above17260...660.0611239.4100.0EducationElementary school and belowJunior high schoolHigh schoolBachelor degree and above14450.750.76021.171.83913.785.64114.4100.0Monthly income<1000 yuan8530.030.01000–2000 yuan8028.358.32000–3000 yuan5318.777.0>3000 yuan6523.0100.0The willingness to use smart aged care products is shown in Figure6.According to the experimental results obtained in Figures9 and 10, we can clearly observe the accuracy of prediction by drawing images with image processing technology. For the questionnaire survey obtained in Table 6, through image analysis, we can also clearly see the different percentages of statistical characteristics of different samples and other conditions.Table 6
Regression analysis table.
D VI VNonstandardized coefficientStandard coefficienttSig.VIFDurbin–WatsonR2BStandard errorU MConstant0.4240.1510.2910.4330.2112.8010.0051.5831.6631.2991.7580.5970.293∗∗0.0486.1040.0000.402∗∗0.046808480.0000.210∗∗0.0434.8790.000Through the results of the questionnaire survey, we can find that the degree of education, education level, and salary of the elderly are related to the willingness to use smart pension products. In general, the elderly with high wages also have a higher education level and they will use their own knowledge reserve ability to quickly learn how to use smart products. Therefore, in the process of product development and promotion, we should focus on the elderly who are slow to accept new things.


## 5. Conclusion

In view of the difficulty of providing care for the aged in cities, this paper puts forward an RTID positioning system and APP client, which can ensure the privacy of the elderly. Through image processing technology, it analyzes the old-age situation in each activity center and the living conditions of the elderly in different environments. It can reasonably plan urban old-age facilities and activity centers, so as to improve the satisfaction of elderly services.



---

*Source: 1023187-2021-10-29.xml*