A method and system for acquiring human back curve based on camera

Through camera-based human body segmentation database and convolutional neural network detection technology, combined with monocular or binocular cameras and checkerboard reference objects, non-contact high-precision human back curve measurement is achieved, solving the problem of low efficiency of existing contact measurement. problems, improving the convenience and accuracy of measurement.

CN108665471BInactive Publication Date: 2024-09-27高鹏
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810651010.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-05-30
Filing Date
2018-06-22
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing human back measurement methods mainly rely on contact measurement, which is inefficient and cannot achieve remote or non-contact measurement, limiting the accuracy and convenience of measurement.

Method used

The camera-based human body segmentation database and convolutional neural network (CNN) and region proposal network (RPN) are used to detect and calculate human back contour and height data, and images are obtained through monocular or binocular cameras, using checkerboards as reference Accurately measure objects to achieve non-contact acquisition of human back curves.

Benefits of technology

It improves the accuracy and convenience of human back curve measurement, enables fast and accurate measurement of multiple human back curves without the need for human cooperation, and is suitable for remote and non-contact applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108665471B_ABST
    Figure CN108665471B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for acquiring a human back curve based on a camera, comprising step 1: acquiring a human body segmentation database; step 2: inputting a user's human back image; and step 3: detecting the input image and calculating the human back contour and / or height data. The acquisition method proposed by the present invention can conveniently perform non-contact human back curve measurement, thereby improving the measurement accuracy and convenience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision, and in particular to a method and system for acquiring a human back curve based on a camera. Background Art

[0002] Human body detection is widely used in life, such as monitoring systems, safety monitoring, autonomous driving and driver assistance systems, human-computer interaction, interactive entertainment, smart homes and elderly assistance, medical treatment, etc. The wide range of applications and challenges have attracted many researchers to participate in it.

[0003] Existing back measurements are limited to contact measurements with the equipment, and require one's own cooperation to accurately measure human height. For example, caliper measurements and ultrasonic induction height measuring instruments require the human body to stand on a platform specified by the equipment to be completed, and can only be measured one by one.

[0004] For example, the existing patent CN2548558Y discloses a human spine and back curve measurement template, which is composed of a hole-shaped template with through holes evenly distributed and a measuring rod inserted into each through hole in a transition fit manner. When in use, first slide all the measuring rods of the human spine and back curve measurement template to one side of the template, and then place it on the backrest of the human body. The person being measured is required to gently press the measured part against the curve measurement template. The measuring rod set on the template will retract inward due to the different forces exerted on it by the measured part. The measuring rods evenly distributed on the template will carve out the curve of the measured part of the human body. According to the retraction amount of the measuring rods, the physiological curve of the human spine or back can be approximately drawn. The above-mentioned measurement method and device have low measurement efficiency and are not friendly to the measured object, and cannot perform remote or non-contact measurement.

[0005] Computer vision is a simulation of biological vision using computers and related equipment. Its main task is to obtain three-dimensional information of the corresponding scene by processing the collected pictures or videos, just like humans and many other creatures do every day.

[0006] Monocular vision refers to the use of only one camera to complete the positioning work. Because it only requires one visual sensor, the monocular camera needs to identify the target, that is, before measuring, it must first identify whether the target is a car, a person, or something else. On this basis, the parameters of the target are measured.

[0007] Binocular vision technology is an important form of computer vision. It is based on the principle of parallax and uses two cameras at different positions to shoot the same scene. Through binocular positioning and matching technology, it obtains the three-dimensional information of the target in the scene. Binocular matching refers to the alignment of the target points of two projected images of the same scene at different viewing angles.

[0008] Monocular and binocular vision measurement methods have the advantages of high efficiency, appropriate accuracy, simple system structure and low cost. They are very suitable for online, non-contact product inspection and quality control at manufacturing sites. Summary of the invention

[0009] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, the present invention proposes a method for obtaining a human back curve based on a camera, which can conveniently perform non-contact human back curve measurement and improve the accuracy and convenience of measurement.

[0010] The present invention proposes a method for acquiring a human back curve based on a camera, comprising: step one: acquiring a human body segmentation database, in particular a trained human body segmentation database; step two: inputting a user's human back image; and step three: using the human body segmentation database to detect the input image and calculate the human back contour and / or height data.

[0011] Furthermore, obtaining the trained human body segmentation database in step 1 specifically includes: a training phase and a testing phase.

[0012] Furthermore, the training stage specifically includes: selecting a large number of human back contour pictures as training samples; preprocessing the pictures; and training the convolutional neural network CNN and the region proposal network RPN on the preprocessed pictures.

[0013] Furthermore, the testing phase specifically includes: inputting an image frame; reading the trained model parameters; calling an image frame for forward propagation to obtain the target category score, target border and target segmentation area block.

[0014] Furthermore, inputting the user's back image specifically includes acquiring the human back image using a monocular camera or a binocular camera.

[0015] Furthermore, the user's back image obtained by using a monocular camera includes the user's back image with a reference object.

[0016] Furthermore, using a binocular camera to acquire the image of the user's back includes calibrating an installation angle and a height of the binocular camera.

[0017] Furthermore, in the user's back image, the user faces the right side of the picture. Furthermore, the user's back image is a complete upper body image.

[0018] Furthermore, the reference object is an object with fixed planar dimensions.

[0019] Further, the reference object includes a chessboard, an ID card, an A4 paper or a mobile phone. Further, the reference object is a chessboard, the chessboard includes at least 2 columns in the vertical direction and at least 6 rows in the horizontal direction, more preferably, the chessboard includes 2-6 columns in the vertical direction and 6-12 rows in the horizontal direction, and even more preferably, the chessboard includes 4 columns in the vertical direction and 8 rows in the horizontal direction.

[0020] Furthermore, the side length of each square of the chessboard can be any side length as long as it can be identified from the camera. Preferably, the side length of each square of the chessboard is 10-50 mm, more preferably, the side length of each square of the chessboard is 15-25 mm, more preferably, the side length of each square of the chessboard is 20 mm. When the side length of the chessboard of the present invention is 10-50 mm, the measurement accuracy of the human back curve acquisition method is the highest.

[0021] Furthermore, the colors in the chessboard can be the intersection of any two colors. Preferably, the colors in the chessboard are the intersection of black and white.

[0022] Furthermore, the detection of the input image in step three includes detecting the corner points of the reference object. Preferably, the coordinates of the corner points of the reference object are stored sequentially from left to right and from top to bottom, and the actual length represented by each pixel is calculated and averaged to obtain the actual length represented by each pixel.

[0023] Furthermore, the detection of the input image in step three includes detecting the user's back image, preferably including using the above-mentioned trained human segmentation database to obtain the segmented human target, obtain the boundary coordinates of the irregular object, and the edge coordinate storage is stored continuously from the top of the head to the left by default, and the continuous coordinates on the left are the back contour.

[0024] Furthermore, calculating the human back contour in step three includes calculating a gradient map of human back area data.

[0025] Furthermore, the human back height data calculated in step three includes calculating the gradient map of the human back area data, obtaining the outer contour points, defining the average value of the area near the first convex point to obtain point A, defining the average value of the area near the first concave point to obtain point B, and defining the height from point B to the top of the head as the face height; more preferably, defining the height of the lower half of the face below point B as point C of the back height, and defining the horizontal difference from point A to point C as the head height; more preferably, defining the horizontal difference from point B to point C as the neck height.

[0026] Furthermore, after calculating and obtaining the human back contour and / or height data in step three, the process further includes performing curve fitting between various points to obtain the human back curve.

[0027] Furthermore, the camera-based method for acquiring a human back curve also includes step four: outputting the user's human back contour and / or height data.

[0028] The present invention also provides a camera-based human back curve acquisition system, including a human segmentation database storage module, a user human back image acquisition module, a human back contour and / or height data calculation module, and a human back contour and / or height data output module.

[0029] Furthermore, the human body segmentation database storage module is used to access the trained human body segmentation database, for example, it can be a memory storing the human body segmentation database.

[0030] Further, the user's back image acquisition module is used to obtain the user's back image and / or the reference image; further, in the user's back image, the user faces the right side of the picture, and further, the user's back image is a complete upper body image; further, the reference is an object with a fixed plane size, such as a chessboard, an ID card, A4 paper or a mobile phone. Further, the reference is a chessboard, the chessboard contains at least 2 columns in the vertical direction, and the chessboard contains at least 6 rows in the horizontal direction, more preferably, the chessboard contains 2-6 columns in the vertical direction, and the chessboard contains 6-12 rows in the horizontal direction, and more preferably, the chessboard contains 4 columns in the vertical direction, and the chessboard contains 8 rows in the horizontal direction; further, the side length of each square of the chessboard can be any side length as long as it can be identified from the camera. Preferably, the side length of each square of the chessboard is 10-50 mm, more preferably, the side length of each square of the chessboard is 15-25 mm, more preferably, the side length of each square of the chessboard is 20 mm. When the side length of the chessboard of the present invention is 10-50 mm, the measurement accuracy of the human back curve acquisition method is the highest; further, the color in the chessboard can be any two colors crossing, preferably, the color in the chessboard is black and white crossing. For example, the user's back image acquisition module can be a camera, such as a monocular camera or a binocular camera.

[0031] Further, the human back contour and / or height data calculation module is used to calculate the human back contour and / or height data; preferably, the above-mentioned trained human body segmentation database is used to obtain the segmented human body target, obtain the boundary coordinates of the irregular object, and the edge coordinate storage is stored by default from the top of the head to the left continuously, and the continuous coordinates on the left are the back contour; more preferably, the human back contour and / or height data calculation module is used to calculate the human back contour, including calculating the gradient map of the human back area data; more preferably, after the human back contour and / or height data calculation module is used to calculate the gradient map of the human back area data, obtain the outer contour point, define the average value of the area near the first convex point to obtain point A, define the average value of the area near the first concave point to obtain point B, and define the height from point B to the top of the head as the face height; more preferably, define a certain height below point B as the back height point C, and define the horizontal difference from point A to point C as the head height; more preferably, define the horizontal difference from point B to point C as the neck height. Further, the human back contour and / or height data calculation module is used to calculate the human back contour and / or height data, and then perform curve fitting between various points to obtain the human back curve. For example, the human back contour and / or height data calculation module can be a processor.

[0032] Furthermore, the human back contour and / or height data output module is used to output the calculated human back contour and / or height data. For example, the human back contour and / or height data output module can be a display screen, a monitor, an indicator light, etc.

[0033] Furthermore, the human back curve acquisition system can be a computer, a tablet computer, a smart phone, a smart watch, a learning machine, etc.

[0034] The present invention also provides an application of a chessboard in acquiring a human back curve.

[0035] Furthermore, the chessboard includes at least 2 columns vertically and at least 6 rows horizontally. More preferably, the chessboard includes 2-6 columns vertically and 6-12 rows horizontally. More preferably, the chessboard includes 4 columns vertically and 8 rows horizontally.

[0036] Furthermore, the side length of each square of the chessboard can be any side length as long as it can be identified from the camera. Preferably, the side length of each square of the chessboard is 10-50 mm, more preferably, the side length of each square of the chessboard is 15-25 mm, more preferably, the side length of each square of the chessboard is 20 mm. When the side length of the chessboard of the present invention is 10-50 mm, the measurement accuracy of the human back curve acquisition method is the highest.

[0037] Furthermore, the colors in the chessboard can be the intersection of any two colors. Preferably, the colors in the chessboard are the intersection of black and white.

[0038] Furthermore, the checkerboard can be printed matter, fabric, plastic product, etc.

[0039] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0041] Figure 1 4 is a flow chart of the training phase and the testing phase of an embodiment of the present invention.

[0042] Figure 2 It is a structural diagram of the CNN and RPN networks of an embodiment of the present invention.

[0043] Figure 3 It is a schematic diagram of a method for acquiring a human back image according to an embodiment of the present invention.

[0044] Figure 4 Schematic diagram of the chessboard used in the embodiment of the present invention.

[0045] Figure 5 4 is a composition diagram of a human back curve acquisition system according to an embodiment of the present invention.

[0046] Figure 6 It is a flow chart of a method for acquiring a human back curve according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0048] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification.

[0049] The present invention is described below in conjunction with the accompanying drawings and with reference to specific embodiments. The present invention proposes a method for obtaining a human back curve based on a camera, comprising the following steps: Step 1: obtaining a trained human segmentation database; Step 2: inputting a user's human body image and using the trained human body segmentation database to detect the input image; Step 3: calculating the human back contour and height data, and fitting to obtain the human back contour curve. The specific processes of each step are introduced below:

[0050] Step 1: Obtain a trained human segmentation database, which specifically includes: training phase and testing phase.

[0051] In the training phase, a large number of human back contour images are selected as training samples, and the images are preprocessed for subsequent training. RPN training is performed on the preprocessed images to obtain multiple possible human regions, and then CNN training is performed to obtain the final human segmentation database.

[0052] The training phase consists of two parts: the Body R-CNN network and the RPN network. The shared convolution layer obtains features based on the ResNeXt-101 network, uses the RPN (region proposal network) to obtain the candidate target region box, and maps it to the original image, aligning feature regions of different sizes into a fixed-size feature map. The multi-task loss function L = L is defined in the training phase. cls +L box +L mask , L cls is the classification loss function, and the classification score is obtained, L box is the target box loss function, and the target box is obtained, L mask It is the human segmentation loss function. After obtaining the human segmentation data, the three branches are jointly cross-trained to improve the overall robustness.

[0053] The following is an example of the training process:

[0054] First, the input image size is 224×224×3 (3 is three channels, that is, RGB). Then, the dimension of the convolution kernel of the first layer is 7×7×3×96, so the result of conv1 is 110×110×96 (110 comes from (224-7+pad) / 2+1, pad is padding, that is, adding pixels around the image. The purpose of doing this is to be divisible. Dividing by 2 is because 2 is the stride in the image). After that, pooling is done once to get pool1. The size of the pooling kernel is 3×3, so the dimension of the pooled image is 55×55×96 ((110-3+pad) / 2+1=55); then there is another convolution, and the dimension of the convolution kernel this time is 5×5×96×256, and conv2 is obtained: 26×26×256; the following is a similar process, and finally the output of conv5, that is, 13×13×256, is taken and sent to the RPN network.

[0055] The sliding window size of the RPN network is 3×3. Only a 4-dimensional convolution kernel of 3×3×256×256 is needed to convolve each 3×3 sliding window into a 256-dimensional vector. The cls layer has 18 output nodes, so a 1×1×256×18 convolution kernel is used between 256-d and cls layer to get the clslayer. This 1×1×256×18 convolution kernel is fully connected. The output of the reg layer is 36, so the corresponding convolution kernel is 1×1×256×36, so the output of the reg layer can be obtained. Then the cls layer and the reg layer will be connected to their own loss functions, giving the value of the loss function, and at the same time, according to the results of the derivation, the back-propagation data will be given.

[0056] For the testing phase, the trained model parameters are read and a picture is called for forward propagation to obtain the target category score, target bounding box and target segmentation area block.

[0057] Step 2: Input the user's body image and use the trained body segmentation database to detect the input image.

[0058] The input image requires the user to face the right side of the image and take a full upper body image. The image is detected using the trained human segmentation database to obtain segmented human targets and the boundary coordinates of irregular objects. The edge coordinates are stored by default starting from the top of the head (maximum Y coordinate value) to the left side. The continuous coordinates on the left side are the back contour.

[0059] Step 3: Calculate the human back contour and height data, and obtain the human back contour curve by fitting.

[0060] For user images obtained by a monocular camera, it is necessary to use a chessboard for calibration. The 4×8 chessboard in the detection image has an actual length of 20 mm for each square on the chessboard. According to the detected chessboard corner point data, the coordinates of each detected corner point are stored in order from left to right and from top to bottom. In this way, the actual length represented by each pixel in the X and Y directions can be calculated, and the actual length represented by each pixel can be obtained by averaging. The size of each square on the chessboard is not limited to 20 mm, and the preferred range is 10-50 mm.

[0061] For user images obtained by binocular cameras, chessboard calibration is not required. Use binocular cameras to capture scene images and obtain the image coordinates of the head point of the human target in the scene image. Before using binocular cameras to capture scene images, the installation height and installation angle of the binocular cameras should be calibrated. The installation angle includes the pitch angle and tilt angle of the binocular cameras. First, it is necessary to use a ruler to measure the vertical distance from the scene ground to the camera as the installation height of the binocular camera; secondly, use the binocular camera to capture images of targets of known height at multiple positions in the scene; thirdly, obtain the depth information of multiple groups of targets at different positions in the images captured by the binocular camera. Construct a minimization problem to solve a set of binocular camera pitch angles and tilt angles so that the variance between the target height obtained by the human back curve measurement method based on binocular vision technology and the actual height of the target is minimized, and finally obtain a set of optimal binocular camera pitch angles and tilt angles as the binocular camera pitch angles and tilt angles.

[0062] After the camera is calibrated, the back area data of the human body detection frame area is obtained; the gradient map of the back area data of the human body is calculated; based on the gradient map of the back area data of the human body, the outer contour points are obtained, and the average value of the area near the first convex point is defined to obtain point A, and the average value of the area near the first concave point is defined to obtain point B; the height from point B to the top of the head is defined as the "face height", and a certain "face height" below point B is defined as the "back height" point C, and the difference in the X direction from point A to point C is defined as the "head height", and the difference in the X direction from point B to point C is defined as the "neck height". Then, curve fitting is performed between each point to obtain the back curve of the human body.

[0063] The present invention proposes a camera-based human back curve measurement method and an end-to-end human body detection and segmentation algorithm. By inputting a picture, the detection category score and human body target frame human body segmentation data can be obtained through training. The back curve measurement of multiple human targets within the measurable range can be completed without the cooperation of personnel.

[0064] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for acquiring a human back curve based on a camera, characterized in that: include: Step 1: Obtain a human segmentation database through training and testing phases; The training stage includes: selecting a human back contour image as a training sample; preprocessing the image; training the preprocessed image with CNN and RPN, and obtaining features based on the shared convolutional layer ResNeXt-101 network; defining a multi-task loss function L=L cls +L box +L mask , the L cls is the classification loss function, the L box is the target box loss function, the L mask is the human body segmentation loss function; The testing phase includes: inputting a picture frame; reading the trained model parameters; calling a picture frame for forward propagation to obtain the target category score, target border and target segmentation area block; Step 2: inputting a human back image acquired by a monocular camera and a reference object image with a fixed plane size; the image also includes a human back image acquired by a binocular camera; in the human back image, the user faces the right side of the picture; Step 3: Detect the input image using the trained human body segmentation database, wherein the detection of the input image includes detecting the corner points of the reference object, wherein the detection of the corner points of the reference object includes storing the coordinates of the corner points of the reference object in order from left to right and from top to bottom, and calculating the actual length represented by each pixel, averaging, and obtaining the actual length represented by each pixel; The detection of the input image includes detecting the back image of the user, including obtaining the boundary coordinates of the segmented human body target and the irregular object, and the edge coordinates are stored continuously from the top of the head to the left by default, and the continuous coordinates on the left are the back contour; Calculating the human back contour in step three includes calculating the gradient map of the human back area data; calculating the human back height data in combination with the gradient map includes obtaining the outer contour points, defining the average value of the area near the first convex point to obtain point A, defining the average value of the area near the first concave point to obtain point B, and defining the height from point B to the top of the head as the face height; defining the height below point B as the back height point C, defining the horizontal difference from point A to point C as the head height; defining the horizontal difference from point B to point C as the neck height; the calculation to obtain the human back contour includes performing curve fitting between each point to obtain the human back curve.

2. A method for acquiring a human back curve based on a camera as claimed in claim 1, characterized in that: The human back image obtained by the binocular camera includes calibration of the height and angle of the binocular camera.

3. The method for acquiring a human back curve based on a camera as claimed in claim 1, characterized in that: The reference objects in step 2 include a chessboard, an ID card, A4 paper or a mobile phone.