Disclosure of Invention
The invention provides a height detection method and device based on image acquisition equipment, which can realize intelligent detection of the height of a user on the basis of acquiring the accurate height of the user and improve the detection efficiency of the height of the user.
The embodiment of the invention discloses a height detection method based on image acquisition equipment in a first aspect, which comprises the following steps:
inputting the acquired image of the target person into the determined image segmentation model for analysis to obtain an analysis result, and determining the analysis result as a human body image of the target person;
calculating a height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person;
and obtaining the height information of the target person according to the height pixel value.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, before the obtaining height information of the target person according to the height pixel value, the method further includes:
judging whether the target person completely appears in the image of the target person according to the human body image of the target person;
when the height pixel value is judged to be completely appeared in the image of the target person, triggering and executing the operation of obtaining the height information of the target person according to the height pixel value;
when the target person does not completely appear in the image of the target person, acquiring the height of a blind area of the target person, wherein the height of the blind area of the target person is used for representing the actual height corresponding to a partial image of the target person which does not appear in the image of the target person;
wherein, the obtaining of the height information of the target person according to the height pixel value comprises:
and determining the height matched with the height pixel value, and calculating the height sum of the height matched with the height pixel value and the blind area height of the target person as the height information of the target person.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the acquiring the blind area height of the target person includes:
acquiring an image acquisition position where the target person is located currently, and determining a horizontal distance between the image acquisition position and the position of the image acquisition equipment according to the image acquisition position;
and determining the height of the blind area of the target person according to the horizontal distance.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after determining the analysis result as the human body image of the target person, and before calculating a height pixel value of the human body image of the target person in the image of the target person based on a top position of the human body image of the target person and a bottom position of the image of the target person, the method further includes:
calculating a pixel difference value between the top position of the human body image of the target person and the top position of the image of the target person, and judging whether the pixel difference value is smaller than or equal to a determined pixel difference value threshold value or not;
and when the pixel difference value is judged to be less than or equal to the pixel difference value threshold, triggering and executing the operation of calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person.
As an optional implementation manner, in the first aspect of this embodiment of the present invention, the method further includes:
when the pixel difference value is judged to be not less than or equal to the pixel difference value threshold value, adjusting the equipment parameters of the image acquisition equipment corresponding to the image of the target person according to the pixel difference value;
acquiring the image of the target person based on the adjusted equipment parameters, and re-executing the operation of inputting the image of the target person into the determined image segmentation model for analysis to obtain an analysis result;
the device parameters of the image acquisition device comprise at least one of an acquisition angle of the image acquisition device, an acquisition focal length of the image acquisition device, a position height of the image acquisition device and a picture acquisition proportion of the image acquisition device.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, identification information of an article worn by the target person is obtained, and height information of the article worn by the target person is determined according to the identification information of the article worn by the target person, where the article worn by the target person includes a shoe worn by the target person and/or a hat worn by the target person;
and after obtaining the height information of the target person according to the height pixel value, the method further comprises:
and calculating height difference information between the height information of the target person and the height information of the article worn by the target person, and updating the height information of the target person into the height difference information.
As an alternative implementation, in the first aspect of the embodiments of the present invention, the method is applied to an intelligent cabinet, the intelligent cabinet is used for cooking food materials, and the intelligent cabinet has a corresponding recipe database;
and, the method further comprises:
performing identification operation on the acquired image of the target person to obtain a face image of the target person;
analyzing the face image of the target person to obtain attribute information of the target person, wherein the attribute information of the target person comprises at least one of gender of the target person, age of the target person and face color of the target person;
and after obtaining the height information of the target person according to the height pixel value, the method further comprises:
and inquiring a recipe matched with the target information from the recipe database according to the target information of the target person, and outputting the recipe matched with the target information to the target person, wherein the target information of the target person comprises attribute information of the target person and/or height information of the target person.
The second aspect of the embodiment of the invention discloses a height detection device based on image acquisition equipment, which comprises:
the analysis module is used for inputting the acquired image of the target person into the determined image segmentation model for analysis to obtain an analysis result;
the acquisition module is used for determining the analysis result as the human body image of the target person;
the calculation module is used for calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person;
the obtaining module is further configured to obtain height information of the target person according to the height pixel value.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the apparatus further includes:
the first judgment module is used for judging whether the target person completely appears in the image of the target person according to the human body image of the target person before the acquisition module acquires the height information of the target person according to the height pixel value; when the height pixel value is judged to be completely appeared in the image of the target person, triggering the acquisition module to execute the operation of acquiring the height information of the target person according to the height pixel value;
the acquisition module is further configured to acquire a blind area height of the target person when the first judgment module judges that the target person does not completely appear in the image of the target person, where the blind area height of the target person is used to indicate an actual height corresponding to a partial image of the target person where the target person does not appear;
the mode that the obtaining module obtains the height information of the target person according to the height pixel value specifically comprises the following steps:
and determining the height matched with the height pixel value, and calculating the height sum of the height matched with the height pixel value and the blind area height of the target person as the height information of the target person.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, a manner of acquiring the height of the blind area of the target person by the acquisition module is specifically:
acquiring an image acquisition position where the target person is located currently, and determining a horizontal distance between the image acquisition position and the position of the image acquisition equipment according to the image acquisition position;
and determining the height of the blind area of the target person according to the horizontal distance.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the calculating module is further configured to calculate a pixel difference between a top end position of the human body image of the target person and a top end position of the image of the target person after the obtaining module determines the analysis result as the human body image of the target person and before calculating a height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person;
and, the apparatus further comprises:
the second judgment module is used for judging whether the pixel difference value is less than or equal to the determined pixel difference value threshold value; and when the pixel difference value is judged to be less than or equal to the pixel difference value threshold value, triggering the calculation module to execute the operation of calculating the height pixel value of the human body image of the target person in the image of the target person based on the top position of the human body image of the target person and the bottom position of the image of the target person.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the apparatus further includes:
the adjusting module is used for adjusting the equipment parameters of the image acquisition equipment corresponding to the image of the target person according to the pixel difference value when the second judging module judges that the pixel difference value is not less than or equal to the pixel difference value threshold;
the acquisition module is used for acquiring the image of the target person based on the adjusted equipment parameters and triggering the analysis module to input the image of the target person into the determined image segmentation model for analysis to obtain the operation of an analysis result;
the device parameters of the image acquisition device comprise at least one of an acquisition angle of the image acquisition device, an acquisition focal length of the image acquisition device, a position height of the image acquisition device and a picture acquisition proportion of the image acquisition device.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the obtaining module is further configured to obtain identification information of an article worn by the target person;
and, the apparatus further comprises:
a determining module, configured to determine height information of an article worn by the target person according to identification information of the article worn by the target person, where the article worn by the target person includes a shoe worn by the target person and/or a hat worn by the target person;
the calculation module is further used for calculating height difference information between the height information of the target person and the height information of the object worn by the target person after the acquisition module acquires the height information of the target person according to the height pixel value;
and the updating module is used for updating the height information of the target person into the height difference information.
As an alternative implementation, in the second aspect of the embodiment of the present invention, the apparatus is applied to an intelligent cabinet, the intelligent cabinet is used for cooking food materials, and the intelligent cabinet has a corresponding recipe database;
and, the apparatus further comprises:
the identification module is used for executing identification operation on the acquired image of the target person to obtain a face image of the target person;
the analysis module is further configured to analyze the face image of the target person to obtain attribute information of the target person, where the attribute information of the target person includes at least one of a gender of the target person, an age of the target person, and a face color of the target person;
and, the apparatus further comprises:
the query module is used for querying a recipe matched with the target information from the recipe database according to the target information of the target person after the acquisition module acquires the height information of the target person according to the height pixel value, wherein the target information of the target person comprises attribute information of the target person and/or height information of the target person;
and the output module is used for outputting the recipes matched with the target information to the target personnel.
The invention discloses a third aspect of another height detection device based on image acquisition equipment, which comprises:
a storage storing executable program code;
a processor coupled to the depository;
the processor calls the executable program code stored in the storage device to execute the height detection method based on the image acquisition device disclosed by the first aspect of the invention.
The invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, the computer instructions are used for executing the height detection method based on the image acquisition equipment disclosed by the first aspect of the invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a height detection method and a height detection device based on image acquisition equipment, wherein the method comprises the steps of inputting an acquired image of a target person into a determined image segmentation model for analysis to obtain an analysis result, and determining the analysis result as a human body image of the target person; calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person; and acquiring the height matched with the height pixel value according to the determined actual height of the unit represented by the unit pixel, and taking the height as the height information of the target person. Therefore, the embodiment of the invention can improve the accuracy and efficiency of acquiring the human body image of the user by inputting the acquired image of the user into the image segmentation model for automatic analysis; and through calculating the height that height pixel value corresponds between the top position of user's human image and the bottom position of user's image, can realize the intelligent detection of user's height, improve detection accuracy and the efficiency of user's height to be favorable to carrying out other operations based on user's height, for example: recommending recipes, sports items and the like matched with the user according to the height of the user; the height can be detected without a special weight meter, the cost is saved, the height can be detected at any time and any place, and the convenience of height detection is improved.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to those listed but may alternatively include other steps or elements not listed or inherent to such process, method, product, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention discloses a height detection method and a height detection device based on image acquisition equipment, which can automatically analyze an acquired image of a user by inputting the image into an image segmentation model, and can improve the acquisition accuracy and efficiency of a human body image of the user; and through calculating the height that height pixel value corresponds between the top position of user's human image and the bottom position of user's image, can realize the intelligent detection of user's height, improve detection accuracy and the efficiency of user's height to be favorable to carrying out other operations based on user's height, for example: and recommending the recipes matched with the user according to the height of the user. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart of a height detection method based on an image capturing device according to an embodiment of the present invention. The height detection method based on the image acquisition device described in fig. 1 may be applied to an image analysis system/an image analysis server (including a local server or a cloud server)/an image analysis platform, where the image analysis system/the image analysis server/the image analysis platform may communicate with an authorized terminal device, and the terminal device includes a terminal device having a communication function, such as a smart phone and a computer. As shown in FIG. 1, the height detection method based on the image acquisition device can comprise the following operations:
101. and inputting the acquired image of the target person into the determined image segmentation model for analysis to obtain an analysis result, and determining the analysis result as the human body image of the target person.
In the embodiment of the invention, the image of the target person is acquired through the image acquisition equipment (such as a camera) arranged in the current scene. The target person needs to stand at a preset image acquisition position, for example: and the horizontal distance from the horizontal position of the image acquisition equipment is 10-10.5 meters. Optionally, the target person is directly opposite to the image capturing device. Optionally, fixed image acquisition positions can be set for people with different heights, different image acquisition positions can also be set for people with different heights, wherein the height is higher, the corresponding image acquisition position is farther, namely, the horizontal distance with the horizontal position of the image acquisition device is larger, different image acquisition positions are set by users with different heights, the human body image of a complete user can be acquired favorably, the detection efficiency and accuracy of the height of the user are improved, and the detection efficiency and accuracy of the weight of the user are improved. Further optionally, a height identifier is arranged at the image capturing position, for example: the height identification that image acquisition position A set up is 1.5 meters, and the height identification that image acquisition position B set up is 1.7 meters, through setting up different height identifications for different image acquisition positions like this, is favorable to the user to select the image acquisition position of matching according to own height to be favorable to shooing the human image of completion.
102. And calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person.
In the embodiment of the invention, the top position of the human body image of the target person is also called the top position of the head. Optionally, based on the top position of the human body image of the target person and the bottom position of the image of the target person, calculating a height pixel value of the human body image of the target person in the image of the target person, specifically: and acquiring a first longitudinal pixel value in the middle of the top position of the human body image of the target person and a second longitudinal pixel value at the bottom position of the image of the target person, subtracting the second longitudinal pixel value from the first longitudinal pixel value to obtain a longitudinal pixel value difference value, and determining the longitudinal pixel value difference value as the height pixel value of the human body image of the target person in the image of the target person.
103. And determining the height information of the target person according to the height pixel value.
In the embodiment of the invention, optionally, height information corresponding to the height pixel value is determined from the determined information database as height information of the target person, wherein the information database stores height information corresponding to pixels with different heights; alternatively, the first and second electrodes may be,
and calculating the height corresponding to the height pixel value according to the unit actual height represented by the determined unit pixel, and taking the height as the height information of the target person.
In the embodiment of the present invention, for example, the unit actual height represented by the unit pixel is 10mm, and the difference between the vertical pixels at the top of the head of the small red human body image and the bottom of the small red human body image is 150 pixels, so that the actual height corresponding to the small red human body image is 10 × 150 — 1000mm — 1m, that is, the height of the small red human body is 1.5 m.
Therefore, the height detection method based on the image acquisition equipment described in the embodiment of fig. 1 can automatically analyze the acquired image of the user by inputting the image into the image segmentation model, and can improve the accuracy and efficiency of acquiring the human body image of the user; and through calculating the height that height pixel value corresponds between the top position of user's human image and the bottom position of user's image, can realize the intelligent detection of user's height, improve detection accuracy and the efficiency of user's height to be favorable to carrying out other operations based on user's height, for example: and recommending the recipes matched with the user according to the height of the user.
In an alternative embodiment, before performing the above-mentioned determining the height information of the target person based on the height pixel values, the method may further comprise the steps of:
judging whether the target person completely appears in the image of the target person according to the human body image of the target person;
and when the image of the target person is judged to be completely appeared, triggering to execute the operation of determining the height information of the target person according to the height pixel value.
Therefore, in the optional embodiment, after the human body image of the user is acquired, whether the whole body of the user completely appears in the acquired image of the user is further judged, if yes, the subsequent height information acquisition of the user according to the acquired height pixel value is executed, and the accuracy of the height detection of the user can be further improved.
In another optional embodiment, the method may further comprise the steps of:
when the blind area height of the target person is judged to be not completely appeared in the image of the target person, obtaining the blind area height of the target person;
wherein, determining the height information of the target person according to the height pixel value comprises:
determining a height matched with the height pixel value, and calculating a height sum of the height matched with the height pixel value and the height of the blind area of the target person as height information of the target person.
In this alternative embodiment, the target person's blind spot height is used to represent the actual height corresponding to the portion of the image in which the target person is not present in the image of the target person.
Therefore, when the optional embodiment judges that the whole body of the user does not completely appear in the collected image of the user, the blind area height of the user, namely the actual height of the part of the user which does not appear in the image, is obtained, and the blind area height of the user and the height data matched according to the obtained height pixel value are determined as the actual height of the user, so that the occurrence situation that the wrong height of the user is obtained due to the fact that the whole image of the user is not collected can be reduced, and the accuracy and the reliability of detecting the height of the user can be further improved.
In yet another alternative embodiment, obtaining the blind zone height of the target person comprises:
acquiring an image acquisition position where a target person is currently located, and determining a horizontal distance between the image acquisition position and the position of image acquisition equipment according to the image acquisition position;
and determining the height of the blind area of the target person according to the horizontal distance.
In the optional embodiment, optionally, the information database stores blind area heights corresponding to different horizontal distances, and when the horizontal distance is obtained, the blind area height corresponding to the horizontal distance can be directly obtained from the information database and used as the blind area height of the target person; or calculating the height corresponding to the horizontal distance according to the determined height of the unit blind area corresponding to the unit horizontal distance, and taking the height as the height of the blind area of the target person.
Therefore, in the optional embodiment, the horizontal distance between the current image acquisition position of the user and the position of the image acquisition device is acquired, and the height corresponding to the horizontal distance is acquired and used as the blind area height of the user, so that the acquisition accuracy and efficiency of the blind area height of the user can be improved.
In yet another alternative embodiment, the method may further comprise the steps of:
when the judgment is not completely performed in the image of the target person, determining a first three-dimensional scene coordinate of the image acquisition position where the target person is currently located, adjusting equipment parameters of the image acquisition equipment according to the first three-dimensional scene coordinate and the second three-dimensional scene coordinate, so that the equipment parameters of the image acquisition equipment are matched with the image acquisition position where the user is currently located, re-acquiring the image of the target person, and re-executing the operation of inputting the acquired image of the target person into the determined image segmentation model for analysis to obtain an analysis result.
Therefore, when the optional embodiment judges that the whole body of the user does not completely appear in the acquired image of the user, the equipment parameters of the image acquisition equipment are adjusted through the three-dimensional scene coordinate of the image acquisition position where the user is located and the three-dimensional scene coordinate of the image acquisition equipment, and the complete image of the user can be acquired, so that the actual height of the user can be acquired directly from the height database, the detection efficiency and accuracy of the height of the user are further improved, and the acquisition mode of the height of the user is enriched.
In yet another optional embodiment, after determining the analysis result as the human body image of the target person, and before calculating the height pixel value of the human body image of the target person in the image of the target person based on the top position of the human body image of the target person and the bottom position of the image of the target person, the method may further include the steps of:
calculating a pixel difference value between the top position of the human body image of the target person and the top position of the image of the target person, and judging whether the pixel difference value is less than or equal to a determined pixel difference value threshold value or not;
and when the difference value is judged to be less than or equal to the pixel difference value threshold value, triggering and executing the operation of calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person.
Therefore, in the optional embodiment, after the human body image of the user is acquired, the pixel difference value between the top end of the human body image of the user and the top end of the acquired image of the user, that is, the vertical blank part, is further acquired, and if the pixel difference value is smaller, the subsequent operation of acquiring the height pixel value of the human body image of the user in the acquired image is performed, so that the accuracy and the reliability of acquiring the height pixel value corresponding to the user can be improved.
In yet another alternative embodiment, the method may further comprise the steps of:
when the pixel difference value is judged to be not less than or equal to the pixel difference value threshold value, adjusting the equipment parameters of the image acquisition equipment corresponding to the image of the target person according to the pixel difference value;
acquiring an image of the target person based on the adjusted equipment parameter, and re-executing the operation of inputting the image of the target person into the determined image segmentation model for analysis to obtain an analysis result;
in this optional embodiment, optionally, the device parameter of the image capturing device includes, but is not limited to, at least one of a capturing angle of the image capturing device, a capturing focal length of the image capturing device, a position height of the image capturing device, and a picture capturing ratio of the image capturing device. The collecting angle of the image collecting equipment comprises an upper collecting angle, a lower collecting angle, a left collecting angle and a right collecting angle of the image collecting equipment.
It can be seen that, when the optional embodiment determines that the pixel difference between the top of the human body image of the user and the top of the collected image of the user is large, the device parameters of the image collecting device are further adjusted according to the pixel difference, and the accurate user image can be collected based on the adjusted device parameters, so that the accurate human body image of the user can be obtained, the detection accuracy and reliability of the height of the user can be improved, and the intelligent function of the height detection device is enriched.
In yet another alternative embodiment, the method may further comprise the steps of:
acquiring a plurality of sample images, wherein the heights of human body images in the plurality of sample images are different, namely the plurality of sample images are images from users with different heights, and the plurality of sample images are images of users acquired by image acquisition equipment corresponding to the images of the acquisition target personnel;
and training the determined segmentation model based on the plurality of sample images to obtain the trained segmentation model, and determining the trained segmentation model as the determined image segmentation model.
In this alternative embodiment, the segmentation model may optionally include a semantic segmentation model and/or an instance segmentation model. Further alternatively, the plurality of sample images may be images for different positional heights of the image acquisition device.
Therefore, the optional embodiment can conveniently and accurately segment the human body image of the user from the acquired image by directly using the image segmentation model in the follow-up process through pre-training the required image segmentation model, thereby being beneficial to improving the accuracy and efficiency of obtaining the height of the user.
In yet another alternative embodiment, the method may further comprise the steps of:
acquiring identification information of an article worn by a target person, and determining height information of the article according to the identification information of the article;
and, after determining the information of the target person, the method may further comprise the steps of:
and calculating height difference information between the height information of the target person and the height information of the article worn by the target person, and updating the height information of the target person into the height difference information.
In this alternative embodiment, the item worn by the target person may optionally include shoes worn by the target person and/or hats worn by the target person.
In this optional embodiment, optionally, the identification information of the article worn by the target person is obtained, and the library may be:
receiving information input by a target person as identification information of an article worn by the target person, wherein the information input by the target person can be directly input through an input device (such as a display screen and a sound pick-up) corresponding to the weight detection device and can also be transmitted through a terminal device of the target person; alternatively, the first and second electrodes may be,
and identifying the article worn by the target person through the image acquisition equipment to obtain the identification information of the article worn by the target person.
By providing a plurality of types of obtaining modes of the identification information of the article worn by the user, the possibility of obtaining the identification information of the article worn by the user can be improved.
In this alternative embodiment, the identification information of the item may optionally include, but is not limited to, a brand identification and/or a shape identification of the item. Further optionally, height information corresponding to different articles is stored in advance.
Therefore, according to the optional embodiment, the height of the article is determined according to the identification information of the article worn by the user, the obtained height of the user can be corrected based on the height of the article, the actual height of the user can be obtained, the obtaining accuracy of the height information of the user is further improved, the obtaining accuracy of the weight of the user is further improved, and the intelligent function of the weight detection device is further enriched.
Example two
Referring to fig. 2, fig. 2 is a schematic flow chart of another height detection method based on an image capturing device according to an embodiment of the present invention. The height detection method based on the image acquisition device described in fig. 2 may be applied to an image analysis system/an image analysis server (including a local server or a cloud server)/an image analysis platform corresponding to the intelligent cabinet, where the image analysis system/the image analysis server/the image analysis platform may communicate with authorized terminal devices, where the terminal devices include terminal devices having a communication function, such as a smart phone and a computer. As shown in FIG. 2, the height detection method based on the image acquisition device may include the following operations:
201. and inputting the acquired image of the target person into the determined image segmentation model for analysis to obtain an analysis result, and determining the analysis result as the human body image of the target person.
In the embodiment of the invention, the intelligent cabinet is provided with corresponding image acquisition equipment, and the image acquisition equipment is used for acquiring the image of the target person. The intelligent cabinet is used for cooking food materials, and the corresponding recipe database exists in the intelligent cabinet. Wherein recipes for different physical situations are stored in the recipe database.
202. And calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person.
203. And executing identification operation on the acquired image of the target person to obtain a face image of the target person.
204. And analyzing the face image of the target person to obtain the attribute information of the target person.
In the embodiment of the present invention, the attribute information of the target person includes, but is not limited to, at least one of a gender of the target person, an age of the target person, and a face color of the target person.
It should be noted that, the occurrence sequence of each step in steps 201 to 204 has no precedence relationship, and may or may not occur simultaneously.
205. And determining the height information of the target person according to the height pixel value.
206. And inquiring a recipe matched with the target information from the recipe database according to the target information of the target person, and outputting the recipe matched with the target information to the target person, wherein the target information of the target person comprises attribute information of the target person and/or height information of the target person.
In the embodiment of the present invention, please refer to the related detailed description of steps 101 to 103 in the first embodiment for the other descriptions of step 201, step 202, and step 205, which is not described again in the embodiment of the present invention.
In the embodiment of the present invention, it is also possible to: and associating the target information of the target person with the obtained identity information of the target person to obtain associated information of the target person and the identity information of the target person, and storing the associated information. Therefore, by establishing the associated information of the user and the information such as the height of the user, the method is beneficial to monitoring the body health of the user according to the associated information and helps the user to build a healthy body.
Therefore, the embodiment of the invention analyzes the attribute information of the user by analyzing the face image of the user, for example: gender, age, face etc. can acquire the recipe that accords with user's health condition according to user's attribute information and user's height, promote the user and use the experience of intelligent cupboard, are favorable to improving the use viscosity of intelligent cupboard, the popularization of the intelligent cupboard of being convenient for.
In an optional embodiment, after performing a recognition operation on the acquired image of the target person to obtain a face image of the target person, the method may further include the following steps:
acquiring target attribute information matched with the face image of the target person from the determined attribute information database according to the face image of the target person;
and after analyzing the face image of the target person to obtain the attribute information of the target person, the method can further comprise the following steps:
and judging whether the target attribute information is matched with the attribute information of the target person, and triggering to execute the operation of inquiring the recipe matched with the target information from the recipe database according to the target information of the target person when the target attribute information is judged to be matched with the attribute information of the target person.
Therefore, after the face image of the user is acquired, the optional embodiment further acquires the existing attribute information matched with the face image of the user from the attribute information database, and when the current attribute information of the user is judged to be matched with the existing attribute information, the subsequent operation of inquiring the recipe matched with the user is continuously executed, so that the occurrence of the situation that the recipe is continuously inquired due to the fact that the current attribute information of the user is not matched with the existing attribute information can be reduced, the accuracy of the recipe inquiring operation is improved, the accurate recipe is further acquired, the experience of the user using the intelligent cabinet is further improved, the use viscosity of the intelligent cabinet is improved, and the popularization of the intelligent cabinet is facilitated.
In another optional embodiment, the method may further comprise the steps of:
when the target attribute information is judged not to be matched with the attribute information of the target person, acquiring a recipe corresponding to the target attribute information;
and determining distinguishing attribute information of the target attribute information and the attribute information of the target person, and determining a recipe required by the target person according to the recipe corresponding to the distinguishing attribute information and the target attribute information.
Therefore, when the optional embodiment judges that the current attribute information of the user is not matched with the existing attribute information of the user, the accuracy and the reliability of acquiring the recipes conforming to the user are further improved by comprehensively analyzing the current attribute information of the user and the existing attribute information, and the experience of the user in using the intelligent cabinet is further improved.
Therefore, the height detection method based on the image acquisition equipment described in the embodiment of FIG. 2 can automatically analyze the acquired image of the user by inputting the image into the image segmentation model, and can improve the accuracy and efficiency of acquiring the human body image of the user; and through calculating the height that height pixel value corresponds between the top position of user's human image and the bottom position of user's image, can realize the intelligent detection of user's height, improve detection accuracy and the efficiency of user's height to be favorable to carrying out other operations based on user's height, for example: and recommending the recipes matched with the user according to the height of the user. The recipe according with the physical condition of the user can be obtained according to the attribute information of the user and the height of the user, the experience of the user in using the intelligent cabinet is improved, the use viscosity of the intelligent cabinet is favorably improved, and the popularization of the intelligent cabinet is facilitated.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a height detection device based on an image capturing device according to an embodiment of the present invention. The height detection apparatus based on the image capturing device described in fig. 3 can be applied to an image analysis system/an image analysis server (including a local server or a cloud server)/an image analysis platform, where the image analysis system/the image analysis server/the image analysis platform can communicate with authorized terminal devices, where the terminal devices include terminal devices with communication functions such as a smart phone and a computer. As shown in FIG. 3, the height detecting apparatus based on the image capturing device may include: an obtaining module 301, an analyzing module 302, and a release optimizing module 303, wherein:
the analysis module 301 is configured to input the acquired image of the target person into the determined image segmentation model for analysis, so as to obtain an analysis result.
And an obtaining module 302, configured to determine an analysis result as a human body image of the target person.
The calculating module 303 is configured to calculate a height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person.
The obtaining module 302 is further configured to obtain, according to the determined actual height of the unit represented by the unit pixel, a height matched with the height pixel value as height information of the target person.
Therefore, the height detection device based on the image acquisition equipment described in the embodiment of fig. 3 can automatically analyze the acquired image of the user by inputting the image into the image segmentation model, and can improve the accuracy and efficiency of acquiring the human body image of the user; and through calculating the height that height pixel value corresponds between the top position of user's human image and the bottom position of user's image, can realize the intelligent detection of user's height, improve detection accuracy and the efficiency of user's height to be favorable to carrying out other operations based on user's height, for example: and recommending the recipes matched with the user according to the height of the user.
In an alternative embodiment, as shown in fig. 4, the apparatus further comprises: a first determining module 304, wherein:
a first judging module 304, configured to judge whether the target person is completely present in the image of the target person according to the human body image of the target person before the obtaining module 302 determines the height information of the target person according to the height pixel value; when the image of the target person is judged to be completely appeared, the obtaining module 302 is triggered to execute the operation of determining the height information of the target person according to the height pixel value;
the obtaining module 302 is further configured to obtain a blind area height of the target person when the first determining module 304 determines that the target person does not completely appear in the image of the target person, where the blind area height of the target person is used to indicate an actual height corresponding to a partial image of the target person where the target person does not appear.
The method for determining the height information of the target person by the obtaining module 302 according to the height pixel value specifically includes:
determining a height matched with the height pixel value, and calculating a height sum of the height matched with the height pixel value and the height of the blind area of the target person as height information of the target person.
For example: the height of the blind area is the lower half part of the human body and is 1 meter, the upper half part of the shot human body image is 0.7 meter, and then the height of the human body is 1.7 meter.
It can be seen that, with the implementation of the apparatus described in fig. 4, after the human body image of the user is acquired, it can be further determined whether the whole body of the user completely appears in the acquired image of the user, if so, subsequent height information of the user is acquired according to the acquired height pixel value, and if not, the occurrence of acquiring the wrong height of the user due to the fact that the user does not appear in the image can be reduced by acquiring the blind area height of the user, that is, the actual height of a part of the user that does not appear in the image, and determining the blind area height of the user and the height data matched according to the acquired height pixel value as the actual height of the user, so that the detection accuracy and reliability of the height of the user can be further improved.
In another alternative embodiment, as shown in fig. 4, the manner of acquiring the blind zone height of the target person by the acquiring module 302 is specifically as follows:
acquiring an image acquisition position where a target person is currently located, and determining a horizontal distance between the image acquisition position and the position of image acquisition equipment according to the image acquisition position;
and determining the height of the blind area of the target person according to the horizontal distance.
Therefore, by implementing the device described in fig. 4, the horizontal distance between the current image acquisition position of the user and the position of the image acquisition device can be obtained, and the height corresponding to the horizontal distance can be obtained as the blind area height of the user, so that the accuracy and efficiency of obtaining the blind area height of the user can be improved.
In yet another alternative embodiment, as shown in fig. 4, the apparatus further comprises: a second decision block 305, wherein:
the calculating module 303 is further configured to calculate a pixel difference value between the top position of the human body image of the target person and the top position of the image of the target person after the obtaining module 302 determines the analysis result as the human body image of the target person and before calculating a height pixel value of the human body image of the target person in the image of the target person based on the top position of the human body image of the target person and the bottom position of the image of the target person.
A second determining module 305, configured to determine whether the pixel difference is less than or equal to the determined pixel difference threshold; when the difference is smaller than or equal to the pixel difference threshold, the triggering calculation module 303 executes the above-mentioned operation of calculating the height pixel value of the human body image of the target person in the image of the target person based on the top end position of the human body image of the target person and the bottom end position of the image of the target person.
It can be seen that, with the implementation of the apparatus described in fig. 4, after the human body image of the user is acquired, the pixel difference value between the top end of the human body image of the user and the top end of the acquired image of the user, that is, the vertical blank portion, can be further acquired, and if the pixel difference value is smaller, the subsequent operation of acquiring the height pixel value of the human body image of the user in the acquired image is performed, so that the accuracy and reliability of acquiring the height pixel value corresponding to the user can be improved.
In yet another alternative embodiment, as shown in fig. 4, the apparatus further comprises: an adjustment module 306 and an acquisition module 307, wherein:
and an adjusting module 306, configured to adjust, when the second determining module 305 determines that the pixel difference is not less than or equal to the pixel difference threshold, an apparatus parameter of the image acquisition apparatus corresponding to the image of the target person according to the pixel difference.
And the acquisition module 307 is configured to acquire an image of the target person based on the adjusted device parameters, and re-trigger the analysis module 301 to input the image of the target person into the determined image segmentation model for analysis, so as to obtain an analysis result.
The device parameters of the image acquisition device comprise at least one of an acquisition angle of the image acquisition device, an acquisition focal length of the image acquisition device, a position height of the image acquisition device and a picture acquisition proportion of the image acquisition device.
It can be seen that, implementing the device described in fig. 4 can further adjust the device parameters of the image acquisition device according to the pixel difference value when the pixel difference value between the top of the human body image of the user and the top of the collected image of the user is large, and can collect an accurate user image based on the adjusted device parameters, thereby being beneficial to obtaining an accurate human body image of the user, further being beneficial to improving the detection accuracy and reliability of the height of the user, and enriching the intelligent function of the height detection device.
In yet another alternative embodiment, the device is applied to an intelligent cabinet, which is used for cooking food materials, and which has a corresponding recipe database. And, as shown in fig. 4, the apparatus further comprises: an identification module 308, a query module 309, and an output module 310, wherein:
and the recognition module 308 is configured to perform recognition operation on the acquired image of the target person to obtain a face image of the target person.
The analysis module 301 is further configured to analyze the face image of the target person to obtain attribute information of the target person, where the attribute information of the target person includes at least one of a gender of the target person, an age of the target person, and a face color of the target person.
And the query module 309 is configured to, after the obtaining module 302 determines the height information of the target person according to the height pixel value, query, according to the target information of the target person, a recipe matched with the target information from the recipe database, where the target information of the target person includes attribute information of the target person and/or height information of the target person.
And an output module 310, configured to output the recipe matching the target information to the target person.
It can be seen that the apparatus described in fig. 4 can also analyze the attribute information of the user by analyzing the facial image of the user, for example: gender, age, face etc. can acquire the recipe that accords with user's health condition according to user's attribute information and user's height, promote the user and use the experience of intelligent cupboard, are favorable to improving the use viscosity of intelligent cupboard, the popularization of the intelligent cupboard of being convenient for.
In yet another alternative embodiment, as shown in fig. 4, the apparatus further comprises: a third determining module 311, wherein:
the obtaining module 302 is further configured to, after the recognition module 308 performs a recognition operation on the acquired image of the target person to obtain a face image of the target person, obtain target attribute information matched with the face image of the target person from the determined attribute information database according to the face image of the target person.
A third judging module 310, configured to judge whether the target attribute information matches with the attribute information of the target person after the analyzing module 301 analyzes the face image of the target person to obtain the attribute information of the target person, and when the target attribute information matches with the attribute information of the target person, trigger the querying module 309 to perform an operation of querying a recipe matching with the target information from the recipe database according to the target information of the target person.
It can be seen that, by implementing the apparatus described in fig. 4, after the face image of the user is obtained, the existing attribute information matched with the face image of the user can be further obtained from the attribute information database, and when it is determined that the current attribute information of the user matches with the existing attribute information, the subsequent recipe query operation matched with the user is continuously executed, which can reduce the occurrence of the situation that the recipe query operation is continuously executed due to the mismatch between the current attribute information of the user and the existing attribute information, improve the accuracy of the recipe query operation, further facilitate the obtaining of an accurate recipe, further improve the experience of the user in using the intelligent cabinet, facilitate the improvement of the use viscosity of the intelligent cabinet, and facilitate the popularization of the intelligent cabinet.
In yet another alternative embodiment, as shown in fig. 4, the apparatus further comprises: a determination module 312 and an update module 313, wherein:
the obtaining module 302 is further configured to obtain identification information of an article worn by the target person.
A determining module 312, configured to determine height information of an item worn by the target person according to the identification information of the item worn by the target person, where the item worn by the target person includes a shoe worn by the target person and/or a hat worn by the target person.
The calculating module 303 is further configured to calculate height difference information between the height information of the target person and the height information of the article worn by the target person after the obtaining module 302 obtains the height information of the target person according to the height pixel value.
And an updating module 313, configured to update the height information of the target person into height difference information.
It can be seen that the device described in fig. 4 can also determine the height of an article according to the identification information of the article worn by the user, and correct the height of the user obtained from the obtained height of the user based on the height of the article, so that the actual height of the user can be obtained, the accuracy of obtaining height information of the user is further improved, the accuracy of obtaining the weight of the user is further improved, and the intelligent function of the weight detection device is further enriched.
Example four
Referring to fig. 5, fig. 5 is a schematic diagram of another height detection device based on an image capturing apparatus according to an embodiment of the present invention. As shown in fig. 5, the height detection apparatus based on the image capturing device may include:
a storage 501 in which executable program code is stored;
a processor 502 coupled to a store 501;
further, an input interface 503 and an output interface 504 coupled to the processor 502 may be included;
the processor 502 calls the executable program code stored in the storage 501 for executing the steps of the height detection method based on the image capture device described in the first embodiment or the second embodiment.
EXAMPLE five
The embodiment of the invention discloses a computer storage medium which stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the height detection method based on the image acquisition equipment described in the first embodiment or the second embodiment.
EXAMPLE six
An embodiment of the invention discloses a computer program product, which comprises a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the image capture device-based height detection method described in the first or second embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, wherein the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EPROM-on-ROM), an optical Disc (EEPROM), a Read-Only optical Disc (CD-on-ROM), or other magnetic Disc, or a ROM, a magnetic disk, or a combination thereof, A tape storage, or any other medium readable by a computer that can be used to carry or store data.
Finally, it should be noted that: the height detection method and device based on the image acquisition device disclosed in the embodiments of the present invention are only the preferred embodiments of the present invention, and are only used for illustrating the technical solution of the present invention, not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.