Pet feeding plan acquisition method and device, electronic device and storage medium
By obtaining the image data of the pet, using the one-sided fitting curve to determine the body shape, and generating a feeding plan, it solves the problem that the pet body shape cannot be intelligently and conveniently monitored and adjusted in the existing technology, and realizes the scientific feeding and healthy state of pets. maintain.
Patent Information
- Application Number
- CN202411338472.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing BCS method is only used to judge whether the pet's body shape is healthy, lacks corresponding coping strategies, and is not smart and convenient enough to help the pet recover or maintain a healthy body shape.
By obtaining the image data of the target object, static and dynamic judgments are performed based on the one-sided fitting curve, body shape determination results are obtained, and corresponding feeding plans are generated based on the results, and the amount of food is intelligently adjusted to ensure that the pet body shape remains in an ideal state.
It realizes intelligent and convenient monitoring of pet body shape, provides scientific feeding solutions, timely adjusts food quantity, prevents overweight or excessive weight, and maintains pet health.
Smart Images

Figure CN118844353B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of pet breeding technology, and relates to a pet breeding technology, and in particular to a method and device for obtaining a pet feeding plan, an electronic device, and a storage medium. Background Art
[0002] In today's society, pets have become an important role in many people's lives, and pet health issues have received more and more attention. Among them, the body shape of a pet is inseparable from its health. Being too fat or too thin will cause health problems for the pet. In the prior art, BCS (Body Condition Scoring) is generally used as a criterion for judging the body shape of a pet.
[0003] However, the existing BCS is only used to judge whether the pet's body shape is healthy, lacks corresponding response strategies, and cannot provide a reference for helping the pet recover or maintain a healthy body shape. Moreover, it mainly relies on vision and touch to make manual judgments, and the steps are cumbersome and not smart and convenient enough.
[0004] Therefore, how to intelligently and conveniently monitor the body size of pets and provide corresponding countermeasures is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0005] The purpose of this application is to provide a method and device for obtaining a pet feeding plan, an electronic device and a storage medium, which are used to solve the problem that the existing BCS is only used to determine whether the pet's body shape is healthy, cannot provide a reference for the pet to restore or maintain a healthy body shape, and is not smart and convenient enough.
[0006] In a first aspect, the present application provides a method for obtaining a pet feeding plan, comprising:
[0007] Acquire target object image data, acquire target object contour data based on the target object image data, and acquire a unilateral fitting curve of the target object based on the target object contour data;
[0008] The unilateral fitting curve is judged based on a preset body shape judgment method to obtain a body shape judgment result of the target object, and a feeding plan for the target object is obtained based on the body shape judgment result and a preset feeding mechanism;
[0009] The step of determining the unilateral fitting curve based on a preset body shape determination method to obtain the body shape determination result of the target object includes:
[0010] The unilateral fitting curve is judged through a static judgment process to obtain a static judgment result, and the body shape judgment result is obtained based on the static judgment result;
[0011] Determining the one-sided fitting curve through a static determination process to obtain a static determination result includes:
[0012] Obtain all the maximum values of curvature in the one-sided fitting curve, and determine whether the number of all the maximum values of curvature is greater than a preset threshold value. If so, take the first body shape pattern as the static judgment result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the first preset numerical range. If so, take the second body shape pattern as the static judgment result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the second preset numerical range. If so, take the third body shape pattern as the static judgment result.
[0013] In this application, the body shape of the target object is determined based on the contour curvature and its maximum value through a static determination process, with high accuracy, and the body shape of the target object can be determined intelligently and conveniently. A feeding plan is obtained based on the body shape determination result, realizing intelligent and scientific feeding, which is beneficial to the health of the target object.
[0014] In one embodiment of the present application, obtaining the body shape determination result based on the static determination result includes:
[0015] Acquire historical image data of a target object at a preset endpoint within a preset historical time period, acquire corresponding historical contour data of the target object based on each of the historical image data of the target object, and acquire corresponding historical unilateral fitting curves based on each of the historical contour data of the target object;
[0016] Determine all the historical unilateral fitting curves through a dynamic determination process to obtain a dynamic determination result, and combine the static determination result with the dynamic determination result to obtain the body shape determination result;
[0017] Determining all the historical one-sided fitting curves through a dynamic determination process to obtain dynamic determination results includes:
[0018] The waist circumference value growth rate of the target object is obtained based on all the historical unilateral fitting curves. If the waist circumference value growth rate is within the first growth interval, the first body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the second growth interval, the second body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the third growth interval, the third body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the fourth growth interval, the fourth body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the fifth growth interval, the fifth body shape trend is determined to be the dynamic determination result;
[0019] Among them, the values within the first growth interval are all smaller than the values within the second growth interval, the values within the second growth interval are all smaller than the values within the third growth interval, the values within the third growth interval are all smaller than the values within the fourth growth interval, and the values within the fourth growth interval are all smaller than the values within the fifth growth interval.
[0020] In one embodiment of the present application, obtaining the waist circumference growth rate of the target object based on all the historical unilateral fitting curves includes:
[0021] The preset endpoints include the start time and end time of the historical time period;
[0022] The unilateral fitting curve corresponding to the starting time is used as the starting unilateral fitting curve, the starting unilateral fitting curve is equally divided into three sections, the curve of the middle section is extracted as the starting waist and abdomen curve, the point with the largest curvature in the starting waist and abdomen curve is obtained as the starting trunk midpoint, the two end points of the starting unilateral fitting curve are connected as the starting trunk long axis, and the starting waist circumference value of the target object is obtained based on the distance from the starting trunk midpoint to the starting trunk long axis;
[0023] The unilateral fitting curve corresponding to the termination time is used as the termination unilateral fitting curve, the termination unilateral fitting curve is equally divided into three sections, the curve of the middle section is extracted as the termination waist and abdomen curve, the point with the largest curvature in the termination waist and abdomen curve is obtained as the termination trunk midpoint, the two end points of the termination unilateral fitting curve are connected as the termination trunk long axis, and the termination waist circumference value of the target object is obtained based on the distance from the termination trunk midpoint to the termination trunk long axis;
[0024] The growth rate of the ending abdominal circumference value relative to the starting abdominal circumference value is obtained as the abdominal circumference value growth rate.
[0025] In one embodiment of the present application, combining the static determination result with the dynamic determination result to obtain the body shape determination result includes:
[0026] If the static determination result is the first body shape pattern, determine whether the dynamic determination result is the fourth body shape trend, if so, the body shape determination result is the third determination result; otherwise, determine whether the dynamic determination result is the fifth body shape trend, if so, the body shape determination result is the second determination result; otherwise, the body shape determination result is the first determination result;
[0027] If the static determination result is the second body shape pattern, determine whether the dynamic determination result is the first body shape trend, if so, the body shape determination result is the first determination result; otherwise, determine whether the dynamic determination result is the fifth body shape trend, if so, the body shape determination result is the fourth determination result; otherwise, the body shape determination result is the third determination result;
[0028] If the static judgment result is the third body shape pattern, determine whether the dynamic judgment result is the first body shape trend, and if so, the body shape judgment result is the fifth judgment result; otherwise, determine whether the dynamic judgment result is the second body shape trend, and if so, the body shape judgment result is the third judgment result; otherwise, the body shape judgment result is the fourth judgment result.
[0029] In one embodiment of the present application, the first body shape mode is a thin body shape mode, the second body shape mode is a normal body shape mode, and the third body shape mode is a fat body shape mode;
[0030] The first body shape trend is a thin body shape trend, the second body shape trend is a weight loss body shape trend, the third body shape trend is a maintenance body shape trend, the fourth body shape trend is a weight gain body shape trend, and the fifth body shape trend is an obese body shape trend;
[0031] The first determination result is an overly thin weight gain mode, the second determination result is an excessive weight gain mode, the third determination result is a maintenance mode, the fourth determination result is an overly fat weight loss mode, and the fifth determination result is an excessive weight loss mode.
[0032] In one embodiment of the present application, obtaining a feeding plan for the target object through a preset feeding mechanism based on the body shape determination result includes:
[0033] Determine whether the body size determination result is the first determination result. If so, the feeding plan is: obtain the food amount of the previous feeding plan, increase it by 5% to serve as the current food amount;
[0034] Otherwise, it is determined whether the body size determination result is the second determination result. If so, the feeding plan is: obtaining the food amount of the previous feeding plan and reducing it by 2% as the current food amount;
[0035] Otherwise, it is determined whether the body shape determination result is the third determination result. If so, the feeding plan is: obtaining the amount of food in the previous feeding plan as the current amount of food;
[0036] Otherwise, it is determined whether the body shape determination result is the fourth determination result. If so, the feeding plan is: obtaining the food amount of the previous feeding plan and reducing it by 5% as the current food amount;
[0037] Otherwise, determine whether the body shape determination result is the fifth determination result. If so, the feeding plan is: obtain the food amount of the previous feeding plan, and increase it by 2% as the current food amount.
[0038] In one embodiment of the present application, acquiring target object contour data based on preset object image data, and acquiring a preset one-sided fitting curve corresponding to the preset object based on the preset object contour data includes:
[0039] Binarizing the preset object image data to obtain a binary image, extracting all complete closed contours in the binary image, and taking the closed contour with the largest enclosed area among all the complete closed contours as the preset object contour data;
[0040] The straight line between the two points with the largest distance on the preset object contour data is used as the x-axis, and any straight line perpendicular to the x-axis on the plane where the preset object contour data is located is used as the y-axis, all points on the preset object contour data located on either side of the x-axis are extracted to form a one-sided contour curve, and a one-sided fitting curve of the one-sided contour curve is obtained in the coordinate system formed by the x-axis and the y-axis as the preset one-sided fitting curve;
[0041] Among them, when the preset object image data is the target object image data, the preset object contour data is the target object contour data, and the preset one-sided fitting curve is the one-sided fitting curve of the target object; when the preset object image data is the target object historical image data, the preset object contour data is the target object historical contour data corresponding to the target object historical image data, and the preset one-sided fitting curve is the historical one-sided fitting curve corresponding to the target object historical contour data.
[0042] In a second aspect, the present application provides a pet feeding plan acquisition device, including a fitting curve acquisition module and a feeding plan acquisition module;
[0043] The fitting curve acquisition module is used to acquire target object image data, acquire target object contour data based on the target object image data, and acquire a unilateral fitting curve of the target object based on the target object contour data;
[0044] The feeding plan acquisition module is used to determine the unilateral fitting curve based on a preset body shape determination method, obtain the body shape determination result of the target object, and obtain the feeding plan of the target object based on the body shape determination result and a preset feeding mechanism;
[0045] The step of determining the unilateral fitting curve based on a preset body shape determination method to obtain the body shape determination result of the target object includes:
[0046] The unilateral fitting curve is judged through a static judgment process to obtain a static judgment result, and the body shape judgment result is obtained based on the static judgment result;
[0047] Determining the one-sided fitting curve through a static determination process to obtain a static determination result includes:
[0048] Obtain all the maximum values of curvature in the one-sided fitting curve, and determine whether the number of all the maximum values of curvature is greater than a preset threshold value. If so, take the first body shape pattern as the static judgment result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the first preset numerical range. If so, take the second body shape pattern as the static judgment result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the second preset numerical range. If so, take the third body shape pattern as the static judgment result.
[0049] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the processor is used to execute a computer program stored in the memory, so that the electronic device executes the pet feeding plan acquisition method as described above.
[0050] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the pet feeding plan acquisition method as described above.
[0051] As described above, the present application provides a method and device for obtaining a pet feeding plan, an electronic device, and a storage medium. Through a static judgment process, the body shape of the target object is judged based on the maximum curvature of the target object's contour, and then the corresponding feeding plan is executed. It is intelligent and convenient, and the amount of food for the target object is adjusted in a timely and effective manner, so that the body shape of the target object is maintained in a relatively ideal state, which is beneficial to the health of the pet. At the same time, the present application also judges the body shape change trend of the target object through a dynamic judgment process to prevent the target object from being too fat or too thin, further maintaining the health of the pet. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 Shown is a schematic diagram of a feeding device feeding a target object as described in an embodiment of the present application.
[0053] Figure 2 Shown is a flow chart of a method for obtaining a pet feeding plan as described in an embodiment of the present application.
[0054] Figure 3Shown is a schematic diagram of a one-sided fitting curve acquisition process described in an embodiment of the present application.
[0055] Figure 4 Shown is a schematic diagram of a static determination process described in an embodiment of the present application.
[0056] Figure 5 Shown is a schematic diagram of a process for obtaining body shape determination results as described in an embodiment of the present application.
[0057] Figure 6 Shown is a schematic diagram of a dynamic determination result acquisition process described in an embodiment of the present application.
[0058] Figure 7 Shown is a schematic diagram of a process for obtaining the growth rate of abdominal circumference value as described in an embodiment of the present application.
[0059] Figure 8 Shown is a schematic diagram of a process for obtaining body shape determination results as described in an embodiment of the present application.
[0060] Fig. 9 Shown is a flow chart of another method for obtaining a pet feeding plan as described in an embodiment of the present application.
[0061] Fig.10 Shown is a schematic diagram of the structure of a pet feeding plan acquisition device described in an embodiment of the present application.
[0062] Fig.11 Shown is a schematic diagram of the structure of an electronic device described in an embodiment of the present application.
[0063] Component number description
[0064] 100 feeding device
[0065] 200 Target audience
[0066] 510 fitting curve acquisition module
[0067] 520 feeding plan acquisition module
[0068] 610 processor
[0069] 620 Memory DETAILED DESCRIPTION
[0070] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0071] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0072] The following embodiments of the present application provide a method and device for obtaining a pet feeding plan, an electronic device and a storage medium, which classify the body shapes of pets and obtain corresponding feeding plans for scientific, healthy and intelligent pet feeding. No manual judgment is required, and the accuracy is higher. The problem that the prior art lacks feeding strategies that are suitable for pets of various body shapes is solved, which is beneficial to the physical and mental health of pets.
[0073] The following embodiments of the present application provide a method and device for obtaining a pet feeding plan, an electronic device and a storage medium, including but not limited to being used for uploading pet image data through a feeding device and feeding the pet. The following description will be given by taking the example of controlling the feeding device to photograph the pet and feeding the pet according to the corresponding feeding plan.
[0074] like Figure 1 As shown, the feeding device 100 takes a picture of the target object 200 eating and uploads it to execute the pet feeding plan acquisition method. Since the target object 200 sticks its head forward into the food container of the feeding device 100 during the eating process, the pet is photographed at this time, and the pet's trunk and tail are mainly collected. The feeding device 100 feeds the pet the corresponding amount of food according to the received feeding plan. It should be noted that the above judgment of the body shape of the target object 200 and acquisition of the feeding plan are achieved by executing the pet feeding plan acquisition method carried on the electronic device. Among them, the electronic device is a terminal device such as a mobile phone, PAD, wearable device, laptop computer, smart AI device, personal computer, or directly carried on the feeding device 100. The embodiment of the present application does not impose any restrictions on the specific type of electronic device.
[0075] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0076] like Figure 2 As shown, this embodiment provides a method for obtaining a pet feeding plan, including:
[0077] Step 300: Acquire target object image data, acquire target object contour data based on the target object image data, and acquire a unilateral fitting curve of the target object 200 based on the target object contour data. The target object 200 is a pet that needs to restore or maintain a healthy body shape.
[0078] It should be noted that the target object image data can be obtained by shooting and uploading through a camera installed on the feeding device 100, or the pet owner can shoot and upload it by himself. Preferably, shooting, obtaining and uploading by the feeding device 100 is more intelligent and convenient, and the viewing angle and distance are fixed, which is conducive to long-term analysis and comparison of the pet.
[0079] For example, Figure 3 The above step 300 specifically includes:
[0080] Step 310: Binarize the target object image data to obtain a binary image, extract all complete closed contours in the binary image, and use the closed contour with the largest enclosed area in all complete closed contours that meets the enclosed area including the center position of the binary image as the pet contour curve. Specifically, grayscale conversion, Gaussian blur and binarization are performed on the target object image data to obtain a binary image for the purpose of contour extraction. Of course, other image processing methods can also be used as long as a binary image can be obtained, and this embodiment is not specifically limited here.
[0081] Since there may be other objects in the background of the uploaded target object image data, multiple closed contours may be extracted. Based on this, the closed contour with the largest enclosed area and the enclosed area in all complete closed contours including the center of the binary image is used as the pet contour curve, which can effectively remove background noise and extract the complete pet contour quickly and conveniently without complicated operations. It should be noted that the extracted pet contour curve is actually a set of pixel points.
[0082] Exemplarily, the contour information is extracted by using a findContours method or other contour extraction methods, which are not specifically limited in this application.
[0083] Step 320: The straight line between the two points with the largest distance on the pet contour curve is used as the x-axis, and any straight line perpendicular to the x-axis on the plane where the pet contour curve is located is used as the y-axis, and all points on the pet contour curve on either side of the x-axis are extracted to form a single-sided contour curve, and a single-sided fitting curve of the single-sided contour curve is obtained in the coordinate system formed by the x-axis and the y-axis. Specifically, the fitting of the single-sided contour curve can be realized based on the spline curve fitting method, or the single-sided contour curve can be fitted by other curve fitting methods, which is not specifically limited in this embodiment.
[0084] Exemplarily, the positive direction of the x-axis is from the first point to the second point, where the first point is close to the bottom edge of the binary image, the second point is close to the top edge of the binary image, and the straight line where the y-axis lies passes through the point with the smallest x-coordinate on the pet's contour curve.
[0085] Further, in order to make the unilateral fitting curve more accurate and more in line with the actual contour of the target object 200, the unilateral contour curve used in the present embodiment is a unilateral contour curve after removing the wrong points. Specifically, step 310 is repeated multiple times to obtain multiple pet contour curves, and a coordinate system is established for each pet contour curve, wherein the positive direction of the x-axis is from the first point to the second point, and the straight line where the y-axis is located passes through the point with the smallest x coordinate on the pet contour curve. The x-axis and y-axis of the multiple pet contour curves are overlapped to obtain a superimposed image. Ideally, the multiple pet contour curves on the superimposed image should be completely overlapped, but due to errors, there are actually wrong points on the curve. Points that are obviously deviated from other pet contour curves in the superimposed image are removed as wrong points to obtain the pet contour curve after removing the wrong points. All points on either side of the x-axis are extracted from the pet contour curve after removing the wrong points, and the obtained unilateral contour curve is the unilateral contour curve after removing the wrong points. Based on this, the unilateral fitting curve after fitting can be made to fit the actual contour of the target object 200 more closely, which is conducive to improving the accuracy of the body shape determination result of the target object 200.
[0086] The obvious deviation means that the distance between the point and other points on the pet contour curve exceeds a threshold. Specifically, those skilled in the art can set the threshold according to actual needs.
[0087] It should be noted that, all points on either side of the x-axis can be extracted from multiple pet contour curves to obtain multiple unilateral contour curves, and the coordinate systems of all unilateral contour curves can be overlapped to remove the wrong points that obviously deviate from other unilateral contour curves, so that the fitted unilateral fitting curve is more in line with the actual contour of the target object 200; or, steps 310 to 320 can be performed on multiple pet contour curves to obtain multiple unilateral fitting curves, and the coordinate systems of all unilateral fitting curves can be overlapped to remove the wrong line segments that obviously deviate from other unilateral fitting curves, and the fitting curves can be obtained again based on the multiple unilateral fitting curves with the wrong line segments removed as the final unilateral fitting curve, so that the fitted unilateral fitting curve is more in line with the actual contour of the pet; or, the wrong points or wrong line segments that may cause the unilateral fitting curve to deviate from the actual contour of the pet can be removed by other methods, which are not specifically limited in this embodiment. Among them, the method of removing the wrong points of the unilateral contour curve and the method of removing the wrong line segments of the unilateral fitting curve, please refer to the above content, which will not be repeated here.
[0088] Step 400: determine the unilateral fitting curve by a preset body shape determination method, obtain the body shape determination result of the target object 200, and obtain the feeding plan of the target object 200 by a preset feeding mechanism based on the body shape determination result.
[0089] The unilateral fitting curve is judged by a preset body shape judgment method to obtain the body shape judgment result of the target object 200, including: judging the unilateral fitting curve by a static judgment process to obtain a static judgment result, and obtaining the body shape judgment result based on the static judgment result.
[0090] Specifically, Figure 4 As shown, the static determination process includes:
[0091] Obtain all the curvature maxima in the unilateral fitting curve, and determine whether the number of all curvature maxima is greater than a preset threshold. If so, take the first body shape pattern as the static judgment result; otherwise, determine whether the number of all curvature maxima is equal to the preset threshold, and all curvature maxima are within the first preset numerical range. If so, take the second body shape pattern as the static judgment result; otherwise, determine whether the number of all curvature maxima is equal to the preset threshold, and all curvature maxima are within the second preset numerical range. If so, take the third body shape pattern as the static judgment result.
[0092] Among them, the values in the first preset value range are all smaller than the values in the second preset value range.
[0093] It should be noted that the curvature equation is obtained by the following calculation method: c(x) = |f"(x)| / ((1+f′(x)) 2 ) 3 / 2, c(x) is the curvature equation, and f(x) is the curve equation of the one-sided fitting curve. According to the obtained curvature equation, the maximum curvature value can be obtained, which is common knowledge in the art and will not be described in detail here.
[0094] Furthermore, the y value of the unilateral fitting curve is not less than zero. For the curves in the third and fourth quadrants of the distribution coordinate system, the curves are symmetrical with respect to the x-axis to obtain a new unilateral fitting curve so that the y value is not less than zero, and then the curvature is calculated to ensure that the maximum value point of the calculated curve corresponds to the convex position of the pet's contour rather than the concave position, thereby improving the accuracy of subsequent operations. Specifically, for curves with negative y values, operations symmetrical with respect to the x-axis are achieved by f(x)=-f(x).
[0095] For ease of understanding, the following embodiment exemplarily provides a specific implementation of a static determination process.
[0096] The first body shape mode is a thin body shape mode, the second body shape mode is a normal body shape mode, and the third body shape mode is a fat body shape mode. The preset threshold is 1, and the first preset value range is [0.001cm -1 ,0.015cm -1 ), the second preset value range is [0.015cm -1 ,∞). It should be noted that, for different types of pets, the maximum range of curvature may be different, and those skilled in the art may make adaptive modifications to this, which is not specifically limited in this embodiment.
[0097] In this embodiment, the body shape of the target object 200 is determined by the curvature and its maximum value, so as to determine the body shape of the target object 200. Specifically, the maximum value of the curvature is a convexity of the curve, and the magnitude of the curvature is the bending degree of the curve. The smoothness of the pet's trunk contour can be accurately determined by the number of maximum values of the curvature, and the convexity of the curve can be accurately expressed by the magnitude of the maximum value. Among them, when the number of maximum values of curvature is greater than 1, the pet's trunk contour contains multiple obvious protrusions, that is, the protrusions of the pet's ribs, lumbar vertebrae or pelvic bones and other bone positions can be clearly observed through the contour, and the pet is thin. The more maximum values there are, the more protruding bone positions there are, and the thinner the pet is; when the number of maximum values of curvature is equal to 1, the pet's trunk contour has only one convex part, that is, the pet's trunk contour is relatively flat, and there is no obvious bone protrusion. At this time, the convexity of the pet's contour is described by the size of the curvature maximum value: when the maximum value is small, the pet's trunk is smooth as a whole, without obvious protrusions, and the pet is of normal body shape; when the maximum value is large, the pet's trunk has no bone protrusions, but the waist and abdomen are swollen and protruding, and the pet is fat.
[0098] Furthermore, the thin body type mode includes a thin body type mode and an emaciated body type. Specifically, if the number of maximum points is greater than a preset threshold but less than an emaciated threshold, the thin body type mode is used as a static determination result. If the number of extreme points is greater than the emaciated threshold, the emaciated body type mode is used as a static determination result. It should be noted that when the static determination result is an emaciated body type mode, an unhealthy reminder is issued to the owner, for example, the owner is prompted to take the pet to the hospital for examination to screen whether the emaciated body type is caused by disease. Exemplarily, the emaciated threshold can be 3.
[0099] Furthermore, the second preset numerical range includes A preset numerical range and B preset numerical range, and the obese body type mode includes slightly obese body type and obese body type. Specifically, if the number of curvature maxima is equal to the preset threshold value, and all curvature maxima are within the A preset numerical range, the slightly obese body type mode is used as the static judgment result; if the number of curvature maxima is equal to the preset threshold value, and all curvature maxima are within the B preset numerical range, the obese body type mode is used as the static judgment result. It should be noted that when the body type static monitoring outputs the obese body type mode, an unhealthy reminder is issued to the owner, for example, it is recommended that the owner play with the pet or urge the pet to exercise to assist the pet in losing weight through exercise.
[0100] For example, the preset value range of A is [0.015cm -1 ,0.020cm -1 ), the preset value range of B is [0.001cm -1 ,∞).
[0101] Based on this, the pet feeding plan acquisition method provided in this embodiment can intelligently and conveniently determine the body shape of the target object 200 with high accuracy through a static judgment process, so as to obtain the feeding plan of the target object 200 through a preset feeding mechanism based on the body shape judgment result, so as to maintain or restore the target object 200 to a healthy state.
[0102] Exemplarily, if the static determination result is a thin body shape mode, then the body shape determination result is an overweight weight gain mode; if the static determination result is a normal body shape mode, then the body shape determination result is a maintenance mode; if the static determination result is a fat body shape mode, then the body shape determination result is an overweight weight loss mode.
[0103] Furthermore, the pet feeding plan acquisition method provided in this embodiment also acquires dynamic determination results to supplement the description of the body shape change trend of the target object 200 and assist in acquiring the body shape determination results.
[0104] Specifically, Figure 5 As shown, obtaining the body shape determination result based on the static determination result also includes:
[0105] Step 410: Obtain the target object historical image data of the preset endpoints of the preset historical time period, obtain the corresponding target object historical profile data based on each target object historical image data, and obtain the corresponding historical unilateral fitting curve based on each target object historical profile data. Please refer to the above content for the specific method of obtaining the historical unilateral fitting curve, wherein the target object image data is replaced with the target object historical image data to perform the corresponding operation, and the target object historical profile data and the historical unilateral fitting curve corresponding to the target object historical image data are obtained, which will not be described in detail here.
[0106] It should be noted that the historical time period in this embodiment refers to a time period earlier than the storage or upload time of the target object image data in step 300. For example, if the target object image data is image data uploaded at 5 pm on the same day, then the historical time period is any time period with the last feeding time before 5 pm on the same day as the end time.
[0107] The preset endpoints in this embodiment refer to two time points preset in the historical time period, such as the start time and the end time of the historical time period.
[0108] The target object historical image data in this embodiment refers to image data that is earlier than the target object image data, and is image data stored or uploaded in a historical time period.
[0109] Step 420: all historical unilateral fitting curves are judged through a dynamic judgment process to obtain a dynamic judgment result, and the static judgment result is combined with the dynamic judgment result to obtain a body shape judgment result.
[0110] Among them, Figure 6 As shown, all historical one-sided fitting curves are judged through the dynamic judgment process to obtain dynamic judgment results including:
[0111] The waist circumference growth rate of the target object 200 is obtained based on all historical one-sided fitting curves. If the waist circumference growth rate is within the first growth interval, the first body shape trend is determined to be a dynamic determination result; if the waist circumference growth rate is within the second growth interval, the second body shape trend is determined to be a dynamic determination result; if the waist circumference growth rate is within the third growth interval, the third body shape trend is determined to be a dynamic determination result; if the waist circumference growth rate is within the fourth growth interval, the fourth body shape trend is determined to be a dynamic determination result; if the waist circumference growth rate is within the fifth growth interval, the fifth body shape trend is determined to be a dynamic determination result.
[0112] Among them, the values within the first growth interval are all smaller than the values within the second growth interval, the values within the second growth interval are all smaller than the values within the third growth interval, the values within the third growth interval are all smaller than the values within the fourth growth interval, and the values within the fourth growth interval are all smaller than the values within the fifth growth interval.
[0113] It should be noted that since the waist and abdomen of a pet are generally the main areas where fat accumulates, the growth of the target object 200 can be judged intuitively and accurately through the waist circumference growth rate of the target object 200, and then the body shape change trend of the target object 200 can be determined to assist in obtaining the body shape determination result.
[0114] Specifically, take the preset endpoints as the start time and end time of the historical time period as an example, Figure 7 As shown, obtaining the waist circumference value growth rate of the target object 200 based on all historical unilateral fitting curves includes:
[0115] Step 421: taking the unilateral fitting curve corresponding to the start time in the preset historical time period as the starting unilateral fitting curve, dividing the starting unilateral fitting curve into three equal sections, extracting the curve in the middle section as the starting waist and abdomen curve, obtaining the point with the largest curvature in the starting waist and abdomen curve as the starting trunk midpoint, connecting the two end points of the starting unilateral fitting curve as the starting trunk long axis, and obtaining the starting waist circumference value of the target object 200 based on the distance from the starting trunk midpoint to the starting trunk long axis;
[0116] Step 422: taking the unilateral fitting curve corresponding to the termination time in the preset historical time period as the termination unilateral fitting curve, dividing the termination unilateral fitting curve into three equal sections, extracting the curve in the middle section as the termination waist and abdomen curve, obtaining the point with the largest curvature in the termination waist and abdomen curve as the termination trunk midpoint, connecting the two end points of the termination unilateral fitting curve as the termination trunk long axis, and obtaining the termination waist circumference value of the target object 200 based on the distance from the termination trunk midpoint to the termination trunk long axis;
[0117] Step 423: Obtain the growth rate of the ending abdominal circumference value relative to the starting abdominal circumference value as the abdominal circumference value growth rate.
[0118] Further, steps 421 to 423 are repeated to obtain multiple waist circumference value growth rates and take the average value as the final waist circumference growth rate to improve the accuracy of the dynamic determination result.
[0119] Furthermore, if Figure 8 As shown, combining the static determination result with the dynamic determination result to obtain the body shape determination result includes:
[0120] If the static determination result is the first body shape pattern, determine whether the dynamic determination result is the fourth body shape trend, if so, the body shape determination result is the third determination result; otherwise, determine whether the dynamic determination result is the fifth body shape trend, if so, the body shape determination result is the second determination result; otherwise, the body shape determination result is the first determination result;
[0121] If the static determination result is the second body shape pattern, determine whether the dynamic determination result is the first body shape trend, if so, the body shape determination result is the first determination result; otherwise, determine whether the dynamic determination result is the fifth body shape trend, if so, the body shape determination result is the fourth determination result; otherwise, the body shape determination result is the third determination result;
[0122] If the static judgment result is the third body shape pattern, determine whether the dynamic judgment result is the first body shape trend. If so, the body shape judgment result is the fifth judgment result; otherwise, determine whether the dynamic judgment result is the second body shape trend. If so, the body shape judgment result is the third judgment result; otherwise, the body shape judgment result is the fourth judgment result.
[0123] By combining the static judgment results with the dynamic judgment results, the current body shape and body shape change trend of the target object 200 can be fully described, and then the current health status and possible change trends of the target object 200 can be judged. The design of the auxiliary feeding plan can not only help the pet restore a healthy body shape, but also prevent the pet from obesity or weight loss, which is conducive to the healthy breeding of the pet.
[0124] For ease of understanding, the following embodiment exemplarily provides a specific implementation method of combining a static determination result with a dynamic determination result to obtain a body shape determination result.
[0125] The first body shape mode is a thin body shape mode, the second body shape mode is a normal body shape mode, and the third body shape mode is a fat body shape mode.
[0126] The first body shape trend is a thin body shape trend, the second body shape trend is a weight loss body shape trend, the third body shape trend is a maintenance body shape trend, the fourth body shape trend is a weight gain body shape trend, and the fifth body shape trend is an obese body shape trend. The first growth interval range is [0.15,∞), the second growth interval range is [0.10,0.15), the third growth interval range is (-0.10,0.10), the fourth growth interval range is (-0.15,-0.10], and the fifth growth interval range is (-∞,-0.15]. It should be noted that different types of pets, pets at different growth stages, and the length of historical time periods will all affect the growth interval range of abdominal circumference. Those skilled in the art can make adaptive modifications to this, and this embodiment is not specifically limited here. By way of example, in this embodiment, the month before the current time is used as the historical time period.
[0127] The first determination result is the too thin weight gain mode, the second determination result is the excessive weight gain mode, the third determination result is the maintenance mode, the fourth determination result is the overweight weight loss mode, and the fifth determination result is the excessive weight loss mode.
[0128] Among them, when the static determination result of the target object 200 is a thin body shape mode, generally speaking, the body shape determination result should be an overly thin weight gain mode, but when the dynamic determination result is a weight gain body shape trend, the target object 200 is already in the process of recovering to a normal body shape, and the target object 200 should be maintained, that is, the body shape determination result is a maintenance mode. However, if the dynamic determination result is an obesity trend, the body shape of the target object 200 is growing too fast, and the sudden change in body shape is not conducive to the health of the target object 200, and the body shape growth of the target object 200 should be appropriately slowed down, that is, the body shape determination result is an excessive weight gain mode.
[0129] Similarly, when the static determination result of the target object 200 is a normal body shape mode, generally speaking, the body shape determination result should be a maintenance mode, but when the dynamic determination result is a thin body shape trend, the body shape determination result is an overly thin weight gain mode; when the dynamic determination result is an obese body shape trend, the body shape determination result is an overly fat weight loss mode. When the static determination result of the target object 200 is a fat body shape mode, generally speaking, the body shape determination result should be an overly fat weight gain mode, but when the dynamic determination result is a weight loss body shape trend, the body shape determination result is a maintenance mode; when the dynamic determination result is a thin body shape trend, the body shape determination result is an excessive weight loss mode.
[0130] Based on this, by combining the static judgment results with the dynamic judgment results, the body shape judgment results can be made more accurate, not only to accurately judge the pet's current body shape, but also to prevent the pet from being too fat or too thin, thereby making the feeding plan obtained based on the body shape judgment results more scientific and conducive to the healthy breeding of pets.
[0131] Further, such as Fig. 9 As shown, obtaining a feeding plan for the target object 200 through a preset feeding mechanism based on the body shape determination result includes:
[0132] Determine whether the body shape determination result is the first determination result. If so, the feeding plan is: obtain the amount of food in the previous feeding plan, and increase it by 5% as the current food amount; otherwise, determine whether the body shape determination result is the second determination result. If so, the feeding plan is: obtain the amount of food in the previous feeding plan, and reduce it by 2% as the current food amount; otherwise, determine whether the body shape determination result is the third determination result. If so, the feeding plan is: obtain the amount of food in the previous feeding plan as the current food amount; otherwise, determine whether the body shape determination result is the fourth determination result. If so, the feeding plan is: obtain the amount of food in the previous feeding plan, and reduce it by 5% as the current food amount; otherwise, determine whether the body shape determination result is the fifth determination result. If so, the feeding plan is: obtain the amount of food in the previous feeding plan, and increase it by 2% as the current food amount.
[0133] Exemplarily, the first determination result is the too thin weight gain mode, the second determination result is the excessive weight gain mode, the third determination result is the maintenance mode, the fourth determination result is the overweight weight loss mode, and the fifth determination result is the excessive weight loss mode.
[0134] It should be noted that when the body shape determination result is an excessive weight gain mode, the target object 200 may be in a thin body shape mode, but its body shape is increasing too fast, that is, the body shape change trend is an obese body shape trend, which is not conducive to the health of the target object 200. Based on this, the food amount of the target object 200 is appropriately reduced to control its body shape change trend to a weight gain body shape trend. Similarly, when the body shape determination result is an excessive weight loss mode, the target object 200 may be in a fat body shape mode, but its body shape is decreasing too fast, and the food amount of the target object 200 is appropriately increased.
[0135] Exemplarily, the body shape determination result may also be actively input by the owner, and based on the body shape determination result input by the owner, a corresponding feeding plan for the target object 200 is obtained through a preset feeding mechanism.
[0136] The pet feeding plan acquisition method provided in this embodiment can intelligently and automatically monitor the pet's body shape and acquire a feeding plan based on it, so as to maintain the health of the pet and realize intelligent and scientific breeding.
[0137] The protection scope of the pet feeding plan acquisition method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0138] The embodiment of the present application also provides a pet feeding plan acquisition device, which can implement the pet feeding plan acquisition method described in the present application, but the implementation device of the pet feeding plan acquisition method described in the present application includes but is not limited to the structure of the pet feeding plan acquisition device listed in the present embodiment. All structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.
[0139] like Fig.10 As shown, a pet feeding plan acquisition device provided in this embodiment includes a fitting curve acquisition module 510 and a feeding plan acquisition module 520.
[0140] The fitting curve acquisition module 510 is used to acquire target object image data, acquire target object contour data based on the target object image data, and acquire a unilateral fitting curve of the target object 200 based on the target object contour data.
[0141] The feeding plan acquisition module 520 is used to determine the unilateral fitting curve based on a preset body shape determination method, obtain the body shape determination result of the target object 200, and obtain the feeding plan of the target object 200 based on the body shape determination result and the preset feeding mechanism.
[0142] like Fig.11 As shown, this embodiment also provides an electronic device, including: a processor 610, used to run a computer program to implement the pet feeding plan acquisition method in the above embodiment; a memory 620, used to store the computer program. Optionally, the electronic device can be a mobile electronic device, or an electronic device or other device, which is not limited to uniqueness here.
[0143] The memory 620 is connected to the processor 610 via a system bus and communicates with each other. The memory 620 is used to store computer programs, and the processor 610 is used to run computer programs so that the electronic device executes the pet feeding plan acquisition method in the above embodiment.
[0144] It should be noted that the system bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries and read-only libraries).
[0145] The above-mentioned processor 610 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0146] In addition, this embodiment further provides a storage medium storing program instructions, which, when executed by a processor, implement the pet feeding plan acquisition method in the above embodiment.
[0147] A person skilled in the art can understand that all or part of the steps in the method for implementing the above-mentioned embodiment can be completed by instructing the processor through a program, and the program can be stored in a storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above-mentioned storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid-state disk (SSD)), etc.
[0148] The embodiment of the present application may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a storage medium, or transmitted from one storage medium to another storage medium, for example, the computer instructions may be transmitted from one website site, computer or data center to another website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode.
[0149] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.
[0150] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.
[0151] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0152] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0153] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0154] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for obtaining a pet feeding plan, comprising: Acquire target object image data, acquire target object contour data based on the target object image data, and acquire a unilateral fitting curve of the target object based on the target object contour data; The unilateral fitting curve is judged based on a preset body shape judgment method to obtain a body shape judgment result of the target object, and a feeding plan for the target object is obtained based on the body shape judgment result and a preset feeding mechanism; The step of determining the unilateral fitting curve based on a preset body shape determination method to obtain the body shape determination result of the target object includes: The unilateral fitting curve is judged through a static judgment process to obtain a static judgment result, and the body shape judgment result is obtained based on the static judgment result; Determining the one-sided fitting curve through a static determination process to obtain a static determination result includes: Obtain all the maximum values of curvature in the unilateral fitting curve, and determine whether the number of all the maximum values of curvature is greater than a preset threshold value. If so, take the first body shape mode as the static determination result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the first preset numerical range. If so, take the second body shape mode as the static determination result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the second preset numerical range. If so, take the third body shape mode as the static determination result; Acquiring the body shape determination result based on the static determination result includes: Acquire historical image data of a target object at a preset endpoint within a preset historical time period, acquire corresponding historical contour data of the target object based on each of the historical image data of the target object, and acquire corresponding historical unilateral fitting curves based on each of the historical contour data of the target object; Determine all the historical unilateral fitting curves through a dynamic determination process to obtain a dynamic determination result, and combine the static determination result with the dynamic determination result to obtain the body shape determination result; Among them, the values in the first preset value range are all smaller than the values in the second preset value range.
2. The acquisition method according to claim 1, characterized in that: Determining all the historical one-sided fitting curves through a dynamic determination process to obtain dynamic determination results includes: The waist circumference value growth rate of the target object is obtained based on all the historical unilateral fitting curves. If the waist circumference value growth rate is within the first growth interval, the first body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the second growth interval, the second body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the third growth interval, the third body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the fourth growth interval, the fourth body shape trend is determined to be the dynamic determination result; if the waist circumference value growth rate is within the fifth growth interval, the fifth body shape trend is determined to be the dynamic determination result; Among them, the values within the first growth interval are all smaller than the values within the second growth interval, the values within the second growth interval are all smaller than the values within the third growth interval, the values within the third growth interval are all smaller than the values within the fourth growth interval, and the values within the fourth growth interval are all smaller than the values within the fifth growth interval.
3. The acquisition method according to claim 2, characterized in that: Acquiring the waist circumference growth rate of the target object based on all the historical unilateral fitting curves includes: The preset endpoints include the start time and end time of the historical time period; The unilateral fitting curve corresponding to the starting time is used as the starting unilateral fitting curve, the starting unilateral fitting curve is equally divided into three sections, the curve of the middle section is extracted as the starting waist and abdomen curve, the point with the largest curvature in the starting waist and abdomen curve is obtained as the starting trunk midpoint, the two end points of the starting unilateral fitting curve are connected as the starting trunk long axis, and the starting waist circumference value of the target object is obtained based on the distance from the starting trunk midpoint to the starting trunk long axis; The unilateral fitting curve corresponding to the termination time is used as the termination unilateral fitting curve, the termination unilateral fitting curve is equally divided into three sections, the curve of the middle section is extracted as the termination waist and abdomen curve, the point with the largest curvature in the termination waist and abdomen curve is obtained as the termination trunk midpoint, the two end points of the termination unilateral fitting curve are connected as the termination trunk long axis, and the termination waist circumference value of the target object is obtained based on the distance from the termination trunk midpoint to the termination trunk long axis; The growth rate of the ending abdominal circumference value relative to the starting abdominal circumference value is obtained as the abdominal circumference value growth rate.
4. The acquisition method according to claim 2, characterized in that: Combining the static determination result with the dynamic determination result to obtain the body shape determination result includes: If the static determination result is the first body shape pattern, determine whether the dynamic determination result is the fourth body shape trend, if so, the body shape determination result is the third determination result; otherwise, determine whether the dynamic determination result is the fifth body shape trend, if so, the body shape determination result is the second determination result; otherwise, the body shape determination result is the first determination result; If the static determination result is the second body shape pattern, determine whether the dynamic determination result is the first body shape trend, if so, the body shape determination result is the first determination result; otherwise, determine whether the dynamic determination result is the fifth body shape trend, if so, the body shape determination result is the fourth determination result; otherwise, the body shape determination result is the third determination result; If the static judgment result is the third body shape pattern, determine whether the dynamic judgment result is the first body shape trend, and if so, the body shape judgment result is the fifth judgment result; otherwise, determine whether the dynamic judgment result is the second body shape trend, and if so, the body shape judgment result is the third judgment result; otherwise, the body shape judgment result is the fourth judgment result.
5. The acquisition method according to claim 4, characterized in that: The first body shape mode is a thin body shape mode, the second body shape mode is a normal body shape mode, and the third body shape mode is a fat body shape mode; The first body shape trend is a thin body shape trend, the second body shape trend is a weight loss body shape trend, the third body shape trend is a maintenance body shape trend, the fourth body shape trend is a weight gain body shape trend, and the fifth body shape trend is an obese body shape trend; The first determination result is an overly thin weight gain mode, the second determination result is an excessive weight gain mode, the third determination result is a maintenance mode, the fourth determination result is an overly fat weight loss mode, and the fifth determination result is an excessive weight loss mode.
6. The acquisition method according to claim 4, characterized in that: Acquiring a feeding plan for the target object based on the body shape determination result through a preset feeding mechanism includes: Determine whether the body size determination result is the first determination result. If so, the feeding plan is: obtain the food amount of the previous feeding plan, increase it by 5% to serve as the current food amount; Otherwise, it is determined whether the body size determination result is the second determination result. If so, the feeding plan is: obtaining the food amount of the previous feeding plan and reducing it by 2% as the current food amount; Otherwise, it is determined whether the body shape determination result is the third determination result. If so, the feeding plan is: obtaining the amount of food in the previous feeding plan as the current amount of food; Otherwise, it is determined whether the body shape determination result is the fourth determination result. If so, the feeding plan is: obtaining the food amount of the previous feeding plan and reducing it by 5% as the current food amount; Otherwise, determine whether the body shape determination result is the fifth determination result. If so, the feeding plan is: obtain the food amount of the previous feeding plan, and increase it by 2% as the current food amount.
7. The acquisition method according to claim 2, characterized in that: Acquiring preset object contour data based on preset object image data, and acquiring a corresponding preset unilateral fitting curve based on the preset object contour data includes: Binarizing the preset object image data to obtain a binary image, extracting all complete closed contours in the binary image, and taking the complete closed contour with the largest enclosed area among all the complete closed contours as the preset object contour data; The straight line between the two points with the largest distance on the preset object contour data is used as the x-axis, and any straight line perpendicular to the x-axis on the plane where the preset object contour data is located is used as the y-axis, all points on the preset object contour data located on either side of the x-axis are extracted to form a one-sided contour curve, and a one-sided fitting curve of the one-sided contour curve is obtained in the coordinate system formed by the x-axis and the y-axis as the preset one-sided fitting curve; Among them, when the preset object image data is the target object image data, the preset object contour data is the target object contour data, and the preset one-sided fitting curve is the one-sided fitting curve of the target object; when the preset object image data is the target object historical image data, the preset object contour data is the target object historical contour data corresponding to the target object historical image data, and the preset one-sided fitting curve is the historical one-sided fitting curve corresponding to the target object historical contour data.
8. A device for obtaining a pet feeding plan, characterized in that: It includes a fitting curve acquisition module and a feeding plan acquisition module; The fitting curve acquisition module is used to acquire target object image data, acquire target object contour data based on the target object image data, and acquire a unilateral fitting curve of the target object based on the target object contour data; The feeding plan acquisition module is used to determine the unilateral fitting curve based on a preset body shape determination method, obtain the body shape determination result of the target object, and obtain the feeding plan of the target object based on the body shape determination result and a preset feeding mechanism; The step of determining the unilateral fitting curve based on a preset body shape determination method to obtain the body shape determination result of the target object includes: The unilateral fitting curve is judged through a static judgment process to obtain a static judgment result, and the body shape judgment result is obtained based on the static judgment result; Determining the one-sided fitting curve through a static determination process to obtain a static determination result includes: Obtain all the maximum values of curvature in the unilateral fitting curve, and determine whether the number of all the maximum values of curvature is greater than a preset threshold value. If so, take the first body shape mode as the static determination result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the first preset numerical range. If so, take the second body shape mode as the static determination result; otherwise, determine whether the number of all the maximum values of curvature is equal to the preset threshold value, and all the maximum values of curvature are within the second preset numerical range. If so, take the third body shape mode as the static determination result; Acquiring the body shape determination result based on the static determination result includes: Acquire historical image data of a target object at a preset endpoint within a preset historical time period, acquire corresponding historical contour data of the target object based on each of the historical image data of the target object, and acquire corresponding historical unilateral fitting curves based on each of the historical contour data of the target object; Determine all the historical unilateral fitting curves through a dynamic determination process to obtain a dynamic determination result, and combine the static determination result with the dynamic determination result to obtain the body shape determination result; Among them, the values in the first preset value range are all smaller than the values in the second preset value range.
9. An electronic device, comprising a memory and a processor, characterized in that: The processor is used to execute the computer program stored in the memory, so that the electronic device executes the pet feeding plan acquisition method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for obtaining a pet feeding plan according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for automatically detecting backfat body and automatically feeding animals
CN110754426A
Intelligent feeding method for growing-finishing pigs and related equipment
CN115005154A
Pet feeding control method and device, electronic equipment and storage medium
CN115968801A
Pet feeding method and device, electronic equipment and storage medium
CN116030378A
Intelligent feeding system
CN116125840A
