A visual positioning method and accompanying robot for intelligent elderly care

By calculating the detail retention and corner characteristics of each pixel, combined with the information entropy and initial contribution of the contribution sequence, an image pyramid is constructed to obtain accurate corner positions, which solves the problem of information loss in the image downsampling process in the existing technology. problem, achieving more accurate positioning of the elderly’s location and activity status.

CN119048510BActive Publication Date: 2025-01-24深圳市万德昌创新智能有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411534181.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-01-24
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Existing visual positioning methods may delete pixel points of key information during image downsampling, resulting in inaccurate position and activity status of the elderly.

Method used

By obtaining the local area and adjacent areas of each pixel point, calculate the details of the details and the characteristics of the corner point, combine the information entropy and initial contribution of the contribution sequence, and calculate the final contribution, and then build an image pyramid to obtain the accurate corner position position Essence

Benefits of technology

It has improved the retaining of information during the reduction of the image reduction, reduced the amount of corner detection and calculation, and enhanced the accuracy of the location and activity status of the elderly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048510B_ABST
    Figure CN119048510B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and specifically to a visual positioning method and accompanying robot for intelligent elderly care, including: obtaining an image to be detected; obtaining the local area and adjacent area of ​​each pixel point to obtain the detail retention of each pixel point; obtaining the corner point feature of each pixel point according to the gradient of each pixel point and the distribution of the grayscale values ​​of the surrounding pixels, and then obtaining the initial contribution of each pixel point; obtaining the contribution sequence of each grayscale value, obtaining the influence of the pixel point of each grayscale value on the pixel points of other grayscale values, obtaining the final contribution of the pixel point under each grayscale value, and finally obtaining the image pyramid; obtaining the corner points in the image to be detected, and obtaining the location of the elderly. The present invention aims to solve the problem that when obtaining the corner points in the image through the corner point detection algorithm, each pixel point needs to be detected, which makes the calculation amount too large.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a visual positioning method and a companion robot for intelligent elderly care. Background Art

[0002] There is an urgent need for a visual positioning method and a companion robot for intelligent elderly care to take care of the elderly around the clock and accurately; the companion robot can be used to work in conjunction with caregivers to reduce the workload of caregivers and improve the efficiency and quality of care; through visual positioning technology, the companion robot can ensure the safety of the elderly.

[0003] Existing visual positioning methods often use corner detection technology. In corner detection technology, in order to reduce the amount of data calculation, the image is downsampled and corner detection is performed on the downsampled image. However, in the process of downsampling the image, the downsampled image is often obtained by continuously deleting even rows and even columns in the image. This method may delete pixels carrying key information, making the location and activity status of the elderly obtained from the downsampled image inaccurate. Summary of the invention

[0004] The present invention provides a visual positioning method and a companion robot for intelligent elderly care to solve the existing problems.

[0005] The visual positioning method and accompanying robot for intelligent elderly care of the present invention adopt the following technical solutions:

[0006] The present invention proposes a visual positioning method for intelligent elderly care, which comprises the following steps:

[0007] Acquire the image of the elderly person to be detected;

[0008] Get the local area and adjacent area of ​​each pixel; get the detail retention of each pixel based on the distance between the local area and adjacent area of ​​each pixel and the difference in the grayscale values ​​of the pixels therein; get the corner feature of each pixel based on the gradient of each pixel and the distribution of the grayscale values ​​of the surrounding pixels; get the initial contribution of each pixel based on the detail retention of each pixel;

[0009] According to the initial contribution of all pixels at each gray value, the contribution sequence of each gray value is obtained; according to the information entropy of the contribution sequence of different gray values ​​and the distribution of the initial contribution in the contribution sequence, the influence of the pixel of each gray value on the pixel of other gray values ​​is obtained; according to the influence of the pixel of each gray value on the pixel of other gray values ​​and the value of the initial contribution in the contribution sequence of each gray value, the final contribution of the pixel under each gray value is obtained, and then the image pyramid is obtained;

[0010] The image pyramid is used to obtain the corner points in the image to be detected, and then the location of the elderly is obtained.

[0011] Furthermore, the specific method of obtaining the local area and adjacent area of ​​each pixel point includes:

[0012] In the image to be detected, The gray value is The pixel point in the 8-neighborhood of the pixel point is recorded as The gray value is The neighboring pixels of the pixel;

[0013] First The gray value is As the center of the pixel point, we get a , and is recorded as The gray value is The local area of ​​the pixel point; Indicates the preset window width;

[0014] First The gray value is The pixel point is taken as the starting point and extended in the 8 neighborhood directions to obtain several rays, which are recorded as The gray value is The neighborhood ray of the pixel point; in The gray value is On each neighborhood ray of the pixel point, select The gray value is The pixel with the smallest Euclidean distance pixel point, denoted as The gray value is The local pixel of the pixel;

[0015] First The gray value is The pixel of The local pixel point is taken as the center, and a The window is denoted as The gray value is The pixel of adjacent areas.

[0016] Furthermore, the detail retention degree of each pixel is obtained according to the distance between the local area of ​​each pixel and the adjacent area and the difference in the grayscale value of the pixels therein, including the specific method of:

[0017] The first The gray value is The mean grayscale value of all pixels in the local area of ​​the pixel is recorded as The gray value is The local gray value of the pixel point; The gray value is The pixel of The mean gray value of all pixels in the adjacent area is recorded as The gray value is The pixel of The local grayscale value of the adjacent area; get the The gray value is The specific calculation formula for the detail retention of the pixel point is:

[0018]

[0019] In the formula, Indicates The gray value is The detail retention of the pixel points, Indicates The gray value is The number of adjacent areas of the pixel point, Indicates The gray value is The pixel and its The Euclidean distance of local pixels, Indicates The gray value is The local gray value of the pixel point, Indicates The gray value is The pixel of The local gray value of adjacent regions, represents the absolute value function, is an exponential function with a natural constant as its base.

[0020] Furthermore, the corner feature of each pixel is obtained according to the distribution of the gradient of each pixel and the grayscale values ​​of surrounding pixels, including the specific method of:

[0021]

[0022] In the formula, Indicates The gray value is The corner features of the pixel points, Indicates The gray value is The number of neighboring pixels of the pixel, Represents grayscale value , Indicates The gray value is The pixel of The gray value of the neighboring pixels, Indicates The gray value is The gradient value of the pixel point, represents the absolute value function, Indicates The gray value is The gray value in the local area of ​​the pixel is The number of pixels.

[0023] Furthermore, the specific method of obtaining the initial contribution of each pixel is as follows:

[0024] The first The gray value is The pixel detail retention is similar to that of The gray value is The product of the initial contribution of the pixel points, after normalization, is recorded as The gray value is The initial contribution of the pixel.

[0025] Furthermore, the method of obtaining the influence of each gray value pixel on other gray value pixels based on the information entropy of the contribution sequence of different gray values ​​and the distribution of the initial contribution degree in the contribution sequence includes the following specific methods:

[0026] Get the gray value The information entropy of the contribution sequence is set to the entropy threshold ;

[0027] Set the gray value to The contribution sequence is greater than the gray value The contribution of the mean of all elements in the sequence is recorded as the gray value The contribution of the first sequence of elements, arranged in descending order to obtain gray values The first contribution sequence of

[0028] Set the gray value to The contribution sequence is less than or equal to the gray value The contribution of the mean of all elements in the sequence is recorded as the gray value The contribution of the second sequence of elements, arranged in descending order, gives a gray value of The second contribution sequence of

[0029] Set the gray value to The contribution of the second sequence and the gray value are The element in the sequence with the largest number of elements in the first sequence is used as the gray value The contribution of the third sequence of elements, arranged in descending order, gives a gray value of The contribution of the third sequence;

[0030] Get the gray value The gray value of the pixel is The specific calculation formula for the influence of the pixel point is as follows:

[0031]

[0032] In the formula, Indicates the gray value is The gray value of the pixel is The degree of influence of the pixel point, Indicates the gray value is The average of the initial contributions of all pixels, Indicates the gray value is The average of the initial contributions of all pixels, represents the absolute value function, Indicates the gray value is The contribution of the first sequence is the mean of the elements, Indicates the gray value is The contribution of the first sequence is the mean of the elements, Indicates the gray value is The contribution of the second sequence to the mean of the elements, Indicates the gray value is The contribution of the second sequence to the mean of the elements, Indicates the gray value is The contribution of the third sequence is the mean of the elements, Indicates the gray value is The contribution of the third sequence is the mean of the elements, Indicates the gray value is The information entropy of the contribution sequence is Indicates the gray value is The information entropy of the contribution sequence is Represents the entropy threshold.

[0033] Furthermore, the method of obtaining the final contribution of the pixel at each gray value according to the influence of the pixel at each gray value on the pixel at other gray values ​​and the value of the initial contribution in the contribution sequence of each gray value includes the following specific methods:

[0034]

[0035] In the formula, Indicates the gray value is The final contribution of the pixel point, Indicates the gray value is The number of pixels, Indicates The gray value is The initial contribution of the pixel point, Indicates the gray value is The gray value of the pixel is The degree of influence of the pixel point, Represents the normalization function.

[0036] Furthermore, the specific method of obtaining the image pyramid includes:

[0037] The specific calculation formula for obtaining the final contribution of each row and column of pixels in the image is as follows:

[0038]

[0039] In the formula, Indicates The final contribution of the row pixels, Indicates the number of pixels contained in a row of the image to be detected. Indicates the gray value is The final contribution of the pixel point, Indicates The gray value in the row is The number of pixels;

[0040]

[0041] In the formula, Indicates The final contribution of the column pixels, Indicates the number of pixels contained in a column of the image to be detected. Indicates The gray value in the column is The number of pixels, Indicates the gray value is The final contribution of the pixel point;

[0042] In the image to be detected, the image with the smallest final contribution The pixels in the row are removed, and the pixels with the smallest final contribution are The pixels in the column are removed, and the resulting image is recorded as the first down-sampling image;

[0043] The final contribution of each row and column of pixels in the first downsampled image is obtained, and the second downsampling is performed based on the final contribution, and so on to obtain an image pyramid.

[0044] Furthermore, the method of obtaining corner points in the image to be detected by using the image pyramid includes the following specific methods:

[0045] The top image in the image pyramid is recorded as the first image; the last image in the image pyramid is the image to be detected; if the first image pixels are not removed during the downsampling process. The pixel point corresponds to the first layer image pixels will be aligned with the pixels in the second layer image. The Euclidean distance of pixels is less than The pixel point is recorded as the first layer image The corresponding pixel points of the pixels, among which, the first layer image The corresponding pixel points of the pixel point include the pixels, Indicates the preset distance threshold;

[0046] Use Harris corner detection to obtain the corner points in the first layer of the image pyramid. The pixel points are corner points. The corresponding pixel points of the pixels are used to detect corner points; and so on, the corner points in the image to be detected are obtained.

[0047] The present invention also proposes a companion robot for intelligent elderly care, the robot comprising:

[0048] An image acquisition module, an image processing module and a voice service module; wherein the image acquisition module is used to acquire the image to be detected of the elderly, the image processing module obtains the position of the elderly in the image to be detected by calling a computer program to implement the steps of a visual positioning method for intelligent elderly care, and the voice service module determines the health status of the elderly through automatic inquiry by a robot or remote inquiry by the elderly's family.

[0049] The beneficial effects of the technical solution of the present invention are as follows: in the process of acquiring corner points in an image, based on the feature that the grayscale values ​​of the pixel points of the corner points are greatly different from those of the surrounding pixels, and that there are fewer pixels with the same grayscale value as the pixel points of the corner points in a certain area, the corner point features of each pixel point are calculated according to the distribution of the grayscale values ​​of the pixels around each pixel point, so that the corner point features of a pixel point reflect the possibility that the pixel point is a corner point; in the process of obtaining the influence of the pixel points of each grayscale value on the pixels of other grayscale values ​​according to the information entropy of the contribution sequences of different grayscale values ​​and the distribution of the initial contribution degrees in the contribution sequences, the influence of the pixel points of each grayscale value on the pixels of other grayscale values ​​is calculated in different ways according to the degree of confusion of the initial contribution degrees in the contribution sequences of different grayscale values. The influence degree makes the influence degree of each grayscale value pixel on other grayscale values ​​pixel more accurate, and then obtains the final contribution degree of the pixel under each grayscale value, avoiding the problem that the initial contribution degree of each pixel pays too much attention to the information of each pixel in the local range, resulting in the large difference between the information reflected by the downsampled image and the image to be detected in the process of downsampling according to the initial contribution degree of each pixel; makes the information reflected by each layer of the image in the image pyramid more similar to the information reflected by the image to be detected; according to the corner points in the first layer of the image pyramid, the pixels that need to be detected in each layer of the image are obtained layer by layer, instead of performing corner point detection on all pixels in the image to be detected, thereby reducing the amount of calculation in the process of obtaining corner point calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 This is a flow chart of the steps of a visual positioning method for smart elderly care in the present invention. DETAILED DESCRIPTION

[0052] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a visual positioning method for intelligent elderly care proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0053] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0054] The following is a detailed description of a visual positioning method for intelligent elderly care and a specific solution of a companion robot provided by the present invention in conjunction with the accompanying drawings.

[0055] See also Figure 1 , which shows a flowchart of a visual positioning method for smart elderly care provided by an embodiment of the present invention, the method comprising the following steps:

[0056] Step S001: Obtain the image of the elderly person to be detected.

[0057] This embodiment analyzes the elderly, and thus obtains the image of the elderly. In order to enhance the details in the image, the image is subjected to histogram equalization.

[0058] In the embodiments of the present invention, the collection of data related to the elderly is authorized by the relevant users, and the collection process does not violate relevant laws and regulations and does not violate public order and good customs.

[0059] Specifically, the image of the elderly is obtained through the camera of the accompanying robot, and the image of the elderly is grayed to obtain a grayscale image of the elderly. The grayscale image of the elderly is histogram equalized, and the image obtained after equalization is recorded as the image to be detected of the elderly. The size of the image to be detected is . Among them, performing histogram equalization on an image is a well-known technique, which will not be described in detail in this embodiment. Among them, Indicates the number of pixels contained in a row of the image to be detected. Indicates the number of pixels contained in a column of the image to be detected.

[0060] Step S002: Obtain the local area and adjacent area of ​​each pixel; obtain the detail retention of each pixel based on the distance between the local area of ​​each pixel and the adjacent area and the difference in the grayscale values ​​of the pixels therein; obtain the corner point feature of each pixel based on the gradient of each pixel and the distribution of the grayscale values ​​of the surrounding pixels; and obtain the initial contribution of each pixel in combination with the detail retention of each pixel.

[0061] It should be noted that the purpose of downsampling the image to be detected is mainly to reduce the amount of calculation for obtaining the corner points in the image to be detected. Therefore, when downsampling the image, the rows and columns where the corner point features are not obvious are removed first. That is, the corner point features of all pixels in each row and column should be calculated. In the process of downsampling the image, the detail information in the image should be retained as much as possible, so the detail retention degree of each pixel in the image is calculated, and then the initial contribution degree of each pixel in the image is obtained.

[0062] It should be further explained that when calculating the corner feature of each pixel in the image, since the grayscale value of the corner pixel is significantly different from that of the surrounding pixels, and there are fewer pixels with the same grayscale value as the corner pixel in a certain area, the corner feature of each pixel is calculated based on the distribution of the grayscale values ​​of the pixels surrounding each pixel in the image to be detected.

[0063] It should be further explained that the greater the difference between the grayscale value of the pixel in the area where a pixel is located and the grayscale values ​​of other pixels in the surrounding area, the more detail information is reflected in the area where the pixel is located, that is, the greater the detail retention of the area. Therefore, the detail retention of each pixel is calculated based on the distribution of the grayscale values ​​of the pixels around each pixel.

[0064] Specifically, in the image to be detected, The gray value is The pixel point in the 8-neighborhood of the pixel point is recorded as The gray value is The neighboring pixel of the pixel. The gray value is As the center of the pixel point, we get a , and is recorded as The gray value is The local area of ​​the pixel. The gray value is The number of pixels around the pixel is not enough to generate a The window width preset in this embodiment is , which is described as an example, and other implementations may be set to other values. The gradient value of each pixel in the image to be detected is obtained by the Sobel operator. The gradient of each pixel in the image is obtained by the Sobel operator, which is a well-known technology and will not be described in detail in this embodiment.

[0065] Further, the The gray value is The pixel point is taken as the starting point and extended in the 8 neighborhood directions to obtain several rays, which are recorded as The gray value is The neighborhood ray of the pixel point. The gray value is On each neighborhood ray of the pixel point, select The gray value is The pixel with the smallest Euclidean distance pixel point, denoted as The gray value is The local pixel of the pixel. If The gray value is The pixel of The number of pixels on the neighborhood ray is less than There are no local pixels on the neighborhood ray. The gray value is The pixel of The local pixel point is taken as the center, and a The window is denoted as The gray value is The pixel of adjacent regions. The gray value is The pixel of The pixels around the local pixel are not enough to generate a The actual situation shall prevail. The gray value is The mean grayscale value of all pixels in the local area of ​​the pixel is recorded as The gray value is The local gray value of the pixel. The gray value is The pixel of The mean gray value of all pixels in the adjacent area is recorded as The gray value is The pixel of The local gray value of adjacent areas.

[0066] Further, get the The gray value is The specific calculation formula for the detail retention of pixels is:

[0067]

[0068] In the formula, Indicates The gray value is The detail retention of the pixel points, Indicates The gray value is The number of adjacent areas of the pixel point, Indicates The gray value is The pixel and its The Euclidean distance of local pixels, Indicates The gray value is The local gray value of the pixel point, Indicates The gray value is The pixel of The local gray value of adjacent regions, represents the absolute value function, is an exponential function with a natural constant as the base. Model to present inverse proportional relationship and normalization, As the input of the model, the implementer can set the inverse proportional function and normalization function according to the actual situation.

[0069] It should be noted that The smaller the value, the The gray value is The local area of ​​the pixel and its The closer the adjacent areas are, the further it is explained. The gray value is The pixel of The more important the information obtained from the adjacent areas is; The smaller the value, the The gray value is The smaller the difference between the grayscale value of the pixel in the local area of ​​the pixel and the grayscale value of the pixel in the adjacent area, the smaller the difference between the grayscale value of the pixel in the local area of ​​the pixel The gray value is The less detailed information is reflected in the local area of ​​the pixel point, that is, The gray value is The greater the pixel detail retention.

[0070] Further, get the The gray value is The specific calculation formula for the corner point features of the pixel points is:

[0071]

[0072] In the formula, Indicates The gray value is The corner features of the pixel points, Indicates The gray value is The number of neighboring pixels of the pixel, Represents grayscale value , Indicates The gray value is The pixel of The gray value of the neighboring pixels, Indicates The gray value is The gradient value of the pixel point, represents the absolute value function, Indicates The gray value is The gray value in the local area of ​​the pixel is The number of pixels.

[0073] It should be noted that The larger the value, the The gray value is The greater the difference between the grayscale values ​​of the pixel and its surrounding pixels, the greater the difference in grayscale values ​​of the pixel. The gray value is The more the pixel point conforms to the characteristic that the gray value of the pixel point of the corner point is greatly different from that of the surrounding pixels; The larger the value, the The gray value is The greater the difference between the grayscale values ​​of the pixel and its surrounding pixels, the greater the difference in grayscale values ​​of the pixel. The gray value is The more the pixel point conforms to the characteristic that the gray value of the pixel point of the corner point is greatly different from that of the surrounding pixels; The larger the value, the The gray value is The more the pixel points conform to the characteristic that there are fewer pixels with the same grayscale value as the corner pixel points in a certain area.

[0074] Further, we get The gray value is The specific calculation formula for the initial contribution of the pixel point is as follows:

[0075]

[0076] In the formula, Indicates The gray value is The initial contribution of the pixel point, Indicates The gray value is The detail retention of the pixel points, Indicates The gray value is The corner features of the pixel points, Represents a linear normalization function, the normalized object is all pixels .

[0077] It is further necessary to explain that The larger the value, the The gray value is The more pixels can reflect the more corner features, that is, The gray value is The greater the initial contribution of the pixel point; The larger the value, the The gray value is The more pixels can reflect the more corner features, that is, The gray value is The greater the initial contribution of the pixel.

[0078] At this point, the initial contribution of each pixel in the image is obtained.

[0079] Step S003: According to the initial contribution of all pixels at each gray value, the contribution sequence of each gray value is obtained; according to the information entropy of the contribution sequences of different gray values ​​and the distribution of the initial contribution in the contribution sequence, the influence of the pixel of each gray value on the pixel of other gray values ​​is obtained; according to the influence of the pixel of each gray value on the pixel of other gray values ​​and the value of the initial contribution in the contribution sequence of each gray value, the final contribution of the pixel at each gray value is obtained, and then the image pyramid is obtained.

[0080] It should be noted that the above calculation of the initial contribution of each pixel is based on information within a certain range around each pixel, which may lead to the following situation. For example, there may be two areas in the image to be detected. and ,area Gray value and area of ​​inner pixel The grayscale values ​​of the pixels in the area are similar. The number of pixels in the inner area is far more than the redundant area The number of pixels in the area. After obtaining the initial contribution of each pixel, the area The initial contribution of the inner pixel is less than that of the region The initial contribution of the inner pixel. As a result, after the image to be detected is downsampled according to the initial contribution, the area in the sampled image More inner pixels are retained, and the area Fewer internal pixels are retained, resulting in a large difference between the information reflected by the downsampled image and the information reflected by the image to be detected. Therefore, the initial contribution of each pixel is adjusted so that the final contribution of pixels with the same grayscale value is the same.

[0081] It should be further explained that, since the initial contribution of each pixel is obtained based on information within a certain range around each pixel, the initial contribution of each pixel is adjusted according to the overall distribution of pixels in the image to be detected to obtain the final contribution of pixels at different grayscale values. That is, the influence of the initial contribution of all pixels at each grayscale value on the initial contribution of all pixels at other grayscale values ​​is obtained, and the initial contribution of all pixels at each grayscale value is adjusted to obtain the final contribution of pixels at each grayscale value.

[0082] It should be further explained that when calculating the gray value The initial contribution of the pixel point to the gray value When the initial contribution of the pixel is affected, if the gray value The initial contribution and gray value of the pixel under The fluctuation of the initial contribution of the pixels under the condition is small, which means that the gray value can be used The mean of the initial contribution of all pixels under represents the gray value The initial contribution of all pixels under the gray value. The average value and gray value of the initial contribution of all pixels under The absolute value of the difference between the mean values ​​of the initial contributions of all pixels under is taken as the grayscale value The initial contribution of all pixels to the gray value The initial contribution of all pixels under The final contribution and gray value of the pixel under If the final contribution of the pixels under the condition of high volatility is large, it means that the gray value cannot be used. The mean of the initial contribution of all pixels under represents the gray value The initial contribution of all pixels under the condition, grayscale value cannot be used The mean of the initial contribution of all pixels under represents the gray value The initial contribution of all pixels under the condition. Therefore, in order to reduce the gray value The fluctuation of the initial contribution of the pixel point is based on the gray value The initial contribution of the pixel point is The initial contribution of the pixel point under is divided into gray value The smaller initial contribution and the larger initial contribution under the gray value The mean of the smaller initial contribution under represents the gray value All smaller initial contributions under ; using grayscale values The mean of the smaller initial contribution under represents the gray value All the smaller initial contributions under the gray value , The gray value is obtained by taking the mean of the smaller initial contribution and the mean of the larger initial contribution under The initial contribution of all pixels to the gray value The influence of the initial contribution of all pixels under .

[0083] It should be further explained that when the gray value The initial contribution of the pixel under the condition of When the initial contribution of the pixel under the condition of low volatility. The average of the initial contribution of all pixels under cannot represent the gray value The initial contribution of all pixels under All pixels under the gray value The initial contribution and gray value of most Smaller initial contribution; use grayscale values The average of the initial contributions of most of the gray values ​​is used instead of the gray value The initial contribution of all pixels is obtained to obtain the gray value The initial contribution of the pixel point to the gray value The influence of the initial contribution of the pixel under .

[0084] Specifically, all gray values ​​in the image to be detected are The initial contribution of the pixel point is taken as the gray value The elements in the contribution sequence have a gray value of The pixel points are arranged in descending order to obtain the gray value The contribution sequence is further obtained as The information entropy of the contribution sequence. Preset entropy threshold If the gray value is The information entropy of the contribution sequence is greater than the entropy threshold, and the gray value is The contribution sequence of is recorded as the fluctuation contribution sequence. The information entropy of the contribution sequence is less than or equal to the entropy threshold, and the gray value is The contribution sequence of is recorded as a stationary contribution sequence. The entropy threshold value preset in this embodiment is , which is described by taking this as an example, and other values ​​may be set in other implementations. Among them, the method for obtaining the information entropy of a sequence is a prior art, and will not be described in detail in this embodiment.

[0085] Further, the gray value is obtained The contribution sequence is the mean of all elements in the sequence, and the gray value is The contribution sequence is greater than the gray value The contribution of the mean of all elements in the sequence is recorded as the gray value The contribution of the first sequence of elements, arranged in descending order to obtain gray values The first contribution sequence of The contribution sequence is less than or equal to the gray value The contribution of the mean of all elements in the sequence is recorded as the gray value The contribution of the second sequence of elements, arranged in descending order, gives a gray value of The second contribution sequence of The contribution of the second sequence and the gray value are The element in the sequence with the largest number of elements in the first sequence is used as the gray value The contribution of the third sequence of elements, arranged in descending order, gives a gray value of The contribution of the third sequence.

[0086] Further, the gray value is The gray value of the pixel is The specific calculation formula for the influence of the pixel point is as follows:

[0087]

[0088] In the formula, Indicates the gray value is The gray value of the pixel is The degree of influence of the pixel point, Indicates the gray value is The average of the initial contributions of all pixels, Indicates the gray value is The average of the initial contributions of all pixels, represents the absolute value function, Indicates the gray value is The contribution of the first sequence is the mean of the elements, Indicates the gray value is The contribution of the first sequence is the mean of the elements, Indicates the gray value is The contribution of the second sequence to the mean of the elements, Indicates the gray value is The contribution of the second sequence to the mean of the elements, Indicates the gray value is The contribution of the third sequence is the mean of the elements, Indicates the gray value is The contribution of the third sequence is the mean of the elements, Indicates the gray value is The information entropy of the contribution sequence is Indicates the gray value is The information entropy of the contribution sequence is Represents the entropy threshold.

[0089] It should be noted that when , indicating that the gray value is The initial contribution of the pixel point has a small fluctuation, and the gray value is The initial contribution of the pixel point is small, so according to the gray value The average value of the initial contribution of the pixel point and the gray value are The average of the initial contribution of the pixels, the calculated gray value is The gray value of the pixel is The degree of influence of the pixel point, The larger the gray value is, the The initial contribution of the pixel point and the gray value are The greater the difference in the initial contribution of the pixel points, the greater the difference in the initial contribution of the pixel points. , indicating that the gray value is The initial contribution of the pixel point fluctuates greatly, and the gray value is The initial contribution of the pixel point is larger, so according to the gray value , The contribution of the second sequence of elements in the mean and the contribution of the first sequence of elements in the mean, the calculated gray value is The gray value of the pixel is The degree of influence of the pixel points; The larger the value of, the gray value is The initial contribution of the pixel point and the gray value are The greater the difference in the initial contribution of the pixel points, the greater the difference in the initial contribution of the pixel points. When the gray value is The initial contribution of the pixel point fluctuates greatly, and the gray value is The initial contribution of the pixel point is small, so the gray value is used The contribution of the third sequence is the mean of the elements, and the gray value is calculated The gray value of the pixel is The influence of the pixel point, when The larger the gray value is, the The initial contribution of the pixel point and the gray value are The greater the difference in the initial contribution of the pixels.

[0090] Furthermore, the specific calculation formula for obtaining the final contribution of the pixel at each gray value is as follows:

[0091]

[0092] In the formula, Indicates the gray value is The final contribution of the pixel point, Indicates The gray value is The initial contribution of the pixel point, Indicates the gray value is The gray value of the pixel is The degree of influence of the pixel point, Indicates the gray value is The number of pixels, Represents a linear normalization function. The normalization object is the degree of influence of pixels of all gray values ​​on pixels of other gray values.

[0093] It should be noted that The larger the value of, the gray value is The greater the initial contribution of the pixel point; The larger the value of is, the more pixels at other gray values ​​are proportional to the gray value. The greater the pixel's influence.

[0094] Furthermore, the specific calculation formula for obtaining the final contribution of each row and column of pixels in the image is as follows:

[0095]

[0096] In the formula, Indicates The final contribution of the row pixels, Indicates the number of pixels contained in a row of the image to be detected. Indicates the gray value is The final contribution of the pixel point, Indicates The gray value in the row is The number of pixels.

[0097]

[0098] In the formula, Indicates The final contribution of the column pixels, Indicates the number of pixels contained in a column of the image to be detected. Indicates The gray value in the column is The number of pixels, Indicates the gray value is The final contribution of the pixel.

[0099] Furthermore, the image with the smallest final contribution is selected in the image to be detected. The pixels in the row are removed, and the pixels with the smallest final contribution are The pixels in the column are removed, and the resulting image is recorded as the first down-sampling image; it should be noted that if or If it is not an integer, it is rounded down and then removed, and a downsampling process is completed for the image to be detected; the final contribution of each row and column of pixels is obtained for the first downsampled image according to the above method, and a second downsampling is performed based on the final contribution, and so on to obtain an image pyramid.

[0100] Step S004: Obtain the corner points in the image to be detected through the image pyramid, and then obtain the location of the elderly person.

[0101] Specifically, the top image in the image pyramid is recorded as the first layer image. And the last layer image of the image pyramid is the image to be detected. pixels are not removed during the downsampling process, that is, the pixels in the second layer image The pixel point corresponds to the first layer image pixels will be aligned with the pixels in the second layer image. The Euclidean distance of pixels is less than The pixel point is recorded as the first layer image The corresponding pixel points of the pixels in the first layer image are The corresponding pixel points of the pixel point include the Use Harris corner detection to obtain the corner points in the first layer of the image pyramid. If the first layer of the image The pixel points are corner points. The corresponding pixel points of the pixels are used for corner point detection. The above operation is repeated for each layer of the image to obtain the corner points in the last layer of the image. The corner point detection of the image to be detected is completed. Among them, the Harris corner point detection algorithm is a well-known technology and is not described in detail in this embodiment. The distance threshold preset in this embodiment is , this is used as an example for description, and other values ​​may be set in other implementation modes.

[0102] Furthermore, the positions of the corner points in the image to be detected are input into the trained CNN model to obtain the position of the elderly in the image to be detected, and then the position of the elderly is obtained to complete the rapid positioning of the elderly. Among them, the loss function in the CNN model adopts the cross entropy function, and training the CNN model is an existing well-known technology, which will not be described in detail in this embodiment.

[0103] At this point, this embodiment is completed.

[0104] The present invention also provides a companion robot for intelligent elderly care, which includes: an image acquisition module, an image processing module and a voice service module; wherein the image acquisition module is used to obtain the image to be detected of the elderly, the image processing module obtains the position of the elderly in the image to be detected by calling a computer program to implement the steps of a visual positioning method for intelligent elderly care, and the voice service module determines the health status of the elderly through automatic inquiry of the robot or remote inquiry of the elderly's family.

[0105] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A visual positioning method for smart elderly care, characterized in that: The method comprises the following steps: Acquire the image of the elderly person to be detected; Get the local area and adjacent area of ​​each pixel; get the detail retention of each pixel based on the distance between the local area and adjacent area of ​​each pixel and the difference in the grayscale values ​​of the pixels therein; get the corner feature of each pixel based on the gradient of each pixel and the distribution of the grayscale values ​​of the surrounding pixels; get the initial contribution of each pixel based on the detail retention of each pixel; According to the initial contribution of all pixels at each gray value, the contribution sequence of each gray value is obtained; according to the information entropy of the contribution sequence of different gray values ​​and the distribution of the initial contribution in the contribution sequence, the influence of the pixel of each gray value on the pixel of other gray values ​​is obtained; according to the influence of the pixel of each gray value on the pixel of other gray values ​​and the value of the initial contribution in the contribution sequence of each gray value, the final contribution of the pixel under each gray value is obtained, and then the image pyramid is obtained; The corner points in the image to be detected are obtained through the image pyramid, and then the location of the elderly is obtained; The method of obtaining the corner point feature of each pixel point according to the distribution of the gradient of each pixel point and the grayscale values ​​of the surrounding pixels includes: In the formula, Indicates The gray value is The corner features of the pixel points, Indicates The gray value is The number of neighboring pixels of the pixel, Represents grayscale value , Indicates The gray value is The pixel of The gray value of the neighboring pixels, Indicates The gray value is The gradient value of the pixel point, represents the absolute value function, Indicates The gray value is The gray value in the local area of ​​the pixel is The number of pixels; The method of obtaining the influence of each gray value pixel on other gray value pixels according to the information entropy of the contribution sequence of different gray values ​​and the distribution of the initial contribution degree in the contribution sequence includes: Get the gray value The information entropy of the contribution sequence is set to the entropy threshold ; Set the gray value to The contribution sequence is greater than the gray value The contribution of the mean of all elements in the sequence is recorded as the gray value The contribution of the first sequence of elements, arranged in descending order to obtain gray values The first contribution sequence of Set the gray value to The contribution sequence is less than or equal to the gray value The contribution of the mean of all elements in the sequence is recorded as the gray value The contribution of the second sequence of elements, arranged in descending order, gives a gray value of The second contribution sequence of Set the gray value to The contribution of the second sequence and the gray value are The element in the sequence with the largest number of elements in the first sequence is used as the gray value The contribution of the third sequence of elements, arranged in descending order, gives a gray value of The contribution of the third sequence; Get the gray value The gray value of the pixel is The specific calculation formula for the influence of the pixel point is as follows: In the formula, Indicates the gray value is The gray value of the pixel is The degree of influence of the pixel point, Indicates the gray value is The average of the initial contributions of all pixels, Indicates the gray value is The average of the initial contributions of all pixels, represents the absolute value function, Indicates the gray value is The contribution of the first sequence is the mean of the elements, Indicates the gray value is The contribution of the first sequence is the mean of the elements, Indicates the gray value is The contribution of the second sequence to the mean of the elements, Indicates the gray value is The contribution of the second sequence to the mean of the elements, Indicates the gray value is The contribution of the third sequence is the mean of the elements, Indicates the gray value is The contribution of the third sequence is the mean of the elements, Indicates the gray value is The information entropy of the contribution sequence is Indicates the gray value is The information entropy of the contribution sequence is Indicates the preset entropy threshold.

2. A visual positioning method for smart elderly care according to claim 1, characterized in that: The specific method of obtaining the local area and adjacent area of ​​each pixel point includes: In the image to be detected, The gray value is The pixel point in the 8-neighborhood of the pixel point is recorded as The gray value is The neighboring pixels of the pixel; First The gray value is The pixel point is the center, and we get a , and is recorded as The gray value is The local area of ​​the pixel point; Indicates the preset window width; First The gray value is The pixel point is taken as the starting point and extended in the 8 neighborhood directions to obtain several rays, which are recorded as The gray value is The neighborhood ray of the pixel point; in The gray value is On each neighborhood ray of the pixel point, select The gray value is The pixel with the smallest Euclidean distance pixel point, denoted as The gray value is The local pixel of the pixel; First The gray value is The pixel of The local pixel point is taken as the center, and a The window is denoted as The gray value is The pixel of adjacent areas.

3. The visual positioning method for intelligent elderly care according to claim 2 is characterized in that: The method of obtaining the detail retention degree of each pixel point according to the distance between the local area of ​​each pixel point and the adjacent area and the difference in the grayscale values ​​of the pixels therein includes: The first The gray value is The mean grayscale value of all pixels in the local area of ​​the pixel is recorded as The gray value is The local gray value of the pixel point; The gray value is The pixel of The mean gray value of all pixels in the adjacent area is recorded as The gray value is The pixel of The local grayscale value of the adjacent area; get the The gray value is The specific calculation formula for the detail retention of the pixel point is: In the formula, Indicates The gray value is The detail retention of the pixels, Indicates The gray value is The number of adjacent areas of the pixel point, Indicates The gray value is The pixel and its The Euclidean distance of local pixels, Indicates The gray value is The local gray value of the pixel point, Indicates The gray value is The pixel of The local gray value of adjacent regions, represents the absolute value function, is an exponential function with a natural constant as its base.

4. The visual positioning method for intelligent elderly care according to claim 1, characterized in that: The specific method of obtaining the initial contribution of each pixel is as follows: The first The gray value is The pixel detail retention is similar to that of The gray value is The product of the initial contribution of the pixel points, after normalization, is recorded as The gray value is The initial contribution of the pixel.

5. The visual positioning method for smart elderly care according to claim 1, characterized in that: The method of obtaining the final contribution of the pixel at each gray value according to the influence of the pixel at each gray value on the pixel at other gray values ​​and the value of the initial contribution in the contribution sequence of each gray value includes the following specific methods: In the formula, Indicates the gray value is The final contribution of the pixel point, Indicates the gray value is The number of pixels, Indicates The gray value is The initial contribution of the pixel point, Indicates the gray value is The gray value of the pixel is The degree of influence of the pixel point, Represents the normalization function.

6. The visual positioning method for intelligent elderly care according to claim 1, characterized in that: The specific method of obtaining the image pyramid includes: The specific calculation formula for obtaining the final contribution of each row and column of pixels in the image is as follows: In the formula, Indicates The final contribution of the row pixels, Indicates the number of pixels contained in a row of the image to be detected. Indicates the gray value is The final contribution of the pixel point, Indicates The gray value in the row is The number of pixels; In the formula, Indicates The final contribution of the column pixels, Indicates the number of pixels contained in a column of the image to be detected. Indicates The gray value in the column is The number of pixels, Indicates the gray value is The final contribution of the pixel point; In the image to be detected, the image with the smallest final contribution The pixels in the row are removed, and the pixels with the smallest final contribution are The pixels in the column are removed, and the resulting image is recorded as the first down-sampling image; The final contribution of each row and column of pixels in the first downsampled image is obtained, and the second downsampling is performed based on the final contribution, and so on to obtain an image pyramid.

7. The visual positioning method for smart elderly care according to claim 1, characterized in that: The specific method of obtaining the corner points in the image to be detected by using the image pyramid includes: The top image in the image pyramid is recorded as the first image; the last image in the image pyramid is the image to be detected; if the first image pixels are not removed during the downsampling process. The pixel point corresponds to the first layer image pixels will be aligned with the pixels in the second layer image. The Euclidean distance of pixels is less than The pixel point is recorded as the first pixel in the first layer image. The corresponding pixel points of the pixels, among which, the first layer image The corresponding pixel points of the pixel point include the pixels, Indicates the preset distance threshold; Use Harris corner detection to obtain the corner points in the first layer of the image pyramid. The pixel points are corner points. The corresponding pixel points of the pixels are used to detect corner points; and so on, the corner points in the image to be detected are obtained.

8. A companion robot for intelligent elderly care, characterized in that: The robot comprises: An image acquisition module, an image processing module and a voice service module; wherein the image acquisition module is used to acquire the image to be detected of the elderly, the image processing module obtains the position of the elderly in the image to be detected by calling a computer program to implement the steps of a visual positioning method for intelligent elderly care as described in any one of claims 1 to 7, and the voice service module determines the health status of the elderly through automatic inquiry by a robot or remote inquiry by the elderly's family.

Citation Information

Patent Citations

  • Video fingerprint detecting and video sequence matching method and system based on visual features

    CN103593464A

  • Intelligent robot grabbing method based on 3D vision

    CN111243017A