A personalized fertilization guidance method and system based on user planting images
By decoupling and geometrically correcting the multi-scale illumination components of plant images within planting containers, the plant growth index is calculated, solving the problem of fertilization misjudgment for home and classroom gardening users, realizing personalized fertilization guidance, and improving planting results and experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANGLING LINKE ECOLOGICAL TECH CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-10
AI Technical Summary
Home and classroom gardening users often lack professional knowledge and find it difficult to accurately judge the growth status of plants by their appearance, leading to misjudgments about the timing of fertilization. This can result in over-fertilization or under-fertilization, affecting plant growth and reducing the gardening experience and teaching effectiveness.
By acquiring images of plants inside user-grown containers, multi-scale light component decoupling is performed, the reflection component image is extracted, the image angle is corrected using geometric inversion and homography transformation matrix, a volume gain coefficient is constructed, the plant growth index is calculated, and personalized fertilization guidance is output.
It improves the scientific nature and effectiveness of fertilization decisions, reduces the difficulty of planting operations, adapts to different shooting angles and lighting conditions, and enhances the planting experience and teaching effect.
Smart Images

Figure CN121505015B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a personalized fertilization guidance method and system based on user planting images. Background Technology
[0002] Home gardening and classroom gardening have become common scenarios that combine practical life experience with educational significance. Home users can cultivate green plants by using indoor potted plants or balcony gardening, which can not only meet their leisure needs but also achieve food self-sufficiency or environmental beautification.
[0003] Planting experiences, as a practical component of biology teaching, can help students intuitively understand the basic principles of plant growth cycles and photosynthesis, and improve their practical skills and scientific understanding. Planting activities in this context usually use small planting containers such as potted plants or seedling boxes as carriers, and the planting objects are mostly vegetables, herbaceous flowers or ornamental green plants. They are characterized by limited planting space, simple management conditions and relatively short planting cycles.
[0004] Home gardeners and students in classrooms are generally non-professional growers who lack experience in fertilization. They cannot accurately judge the growth status of plants by their appearance, which can easily lead to misjudgment of the timing of fertilization. Furthermore, due to a lack of understanding of the matching relationship between plant varieties, growth stages, and nutrients, they may over-fertilize or under-fertilize, which can not only lead to poor plant growth, wilting, or even death, but also reduce the experience of home gardening and the practical effectiveness of classroom teaching.
[0005] The growth status of plants is directly reflected in characteristics such as leaf color, shape, size, and overall plant growth. These characteristics can be presented intuitively through image information. Therefore, it is necessary to provide users with personalized fertilization guidance based on images of the plants they are growing, thereby reducing the need for users to have experience in fertilization during the planting process. Summary of the Invention
[0006] To provide personalized fertilization guidance to users by combining images of plants taken by the user, this application provides a method and system for personalized fertilization guidance based on user planting images.
[0007] According to a first aspect of the embodiments of this application, a personalized fertilization guidance method based on user planting images is provided, comprising:
[0008] The system acquires original images of plants within planting containers taken by the user. Multi-scale illumination component decoupling is performed on the original images to obtain a reflection component image containing surface attributes. The longitudinal boundary lines of the planting containers are extracted from the reflection component images, and the intersections of different longitudinal boundary lines are used as cancellation points. Based on the coordinates of the cancellation points and the camera's intrinsic parameters, the camera's pitch angle is determined through geometric inversion. Based on the pitch angle and the physical aspect ratio of the planting containers, a homography transformation matrix is constructed. This homography transformation matrix is used to reconstruct the reflection component images into orthorectified images, determining the dark channel intensity of the plant region in the orthorectified image. A volume gain coefficient characterizing the degree of leaf layering is constructed based on the dark channel intensity. The volume gain coefficient is used to weight and sum the pixel physical areas of the orthorectified image to obtain a plant growth index. This plant growth index is then used to output fertilization guidance information for the plants corresponding to the planting containers.
[0009] In this way, by decoupling the multi-scale illumination components, the influence of uneven ambient lighting on plant surface texture can be effectively filtered out; by using geometric inversion and homography transformation based on the ablation point, perspective images taken by users at arbitrary angles can be corrected into standard orthophoto images, eliminating geometric distortion errors caused by the shooting angle, so that the final fertilization guidance information can match the growth needs of plants, improving the scientificity and effectiveness of fertilization decisions.
[0010] Optionally, the original image is decoupled from its illumination components at multiple scales to obtain a reflection component image containing object surface properties, including: ,in, For the reflection component image in coordinates Pixel value at that location, The total number of scales, For the first Weighting coefficients for each scale It is a logarithmic function. For the original image in coordinates The grayscale value at that location; for The pixel at the th The ambient illumination component values are estimated at each scale; the ambient illumination component values are obtained by convolving the original image with the Gaussian kernel function of the corresponding scale.
[0011] Optionally, the ambient illumination component estimate is determined as follows: For the target pixel in the original image, the square of the Euclidean distance between the target pixel and the neighboring pixels is determined. The square is divided by negative two times the square of the standard deviation of the Gaussian kernel and then exponentially calculated to obtain the distance weight. The pixel values of the neighboring pixels are weighted and averaged using the distance weight to obtain the ambient illumination component estimate of the target pixel.
[0012] In this way, estimating the ambient illumination component using a Gaussian weighted average method conforms to the smooth spatial distribution characteristics of light, and can accurately fit the background illumination field, providing an accurate benchmark for subsequent extraction of the reflection component.
[0013] Optionally, extracting the longitudinal boundary line of the planting container in the reflection component image includes: performing edge detection on the reflection component image using the probabilistic Hough transform algorithm, and taking the two longitudinal long sides that conform to the geometric features of the planting container from the edge detection results as the longitudinal boundary line.
[0014] In this way, the probabilistic Hough transform can be used to efficiently identify the straight line features of the planting container from the complex background texture, and combined with geometric feature constraints, specific longitudinal boundaries can be selected, providing reliable geometric primitives for the calculation of the disappearance point.
[0015] Optionally, based on the coordinates of the disappearance point and the camera's intrinsic parameter data, the pitch angle during camera shooting is determined through geometric inversion, including: ,in, The pitch angle of the camera's optical axis relative to the horizontal plane; It is the arctangent function. The ordinate of the disappearance point; The ordinate of the optical center of the original image; This is the equivalent physical focal length of the camera; This refers to the pixel density of an image sensor per unit length.
[0016] In this way, by utilizing the property of the vanishing point in the principle of perspective projection, the spatial pose parameters at the time of shooting can be deduced from the geometric features of a single image, which reduces hardware costs and improves universality.
[0017] Optionally, the reflection component image is reconstructed into an orthophoto image using a homography transformation matrix, including: setting the coordinates of four target corner points on a virtual physical plane based on the physical dimensions of a standard planting container; solving the homography transformation matrix based on the target corner point coordinates and the corresponding corner point coordinates in the reflection component image using a direct linear transformation algorithm combined with singular value decomposition; calculating the inverse matrix of the homography transformation matrix to establish an inverse mapping relationship from the orthophoto image plane to the reflection component image plane; traversing the pixel grid of the orthophoto image plane, finding the corresponding coordinates in the reflection component image using the inverse mapping relationship, and filling the corresponding positions in the orthophoto image plane with pixel values obtained through bilinear interpolation to generate an orthophoto image.
[0018] In this way, by constructing inverse mapping and bilinear interpolation, it is possible to ensure that the pixel distribution of the reconstructed orthophoto image is uniform and continuous, effectively correcting any possible perspective distortion, and making the geometric measurement values in the image linearly proportional to the physical real values.
[0019] Optionally, a volume gain coefficient characterizing the degree of blade stacking can be constructed based on the dark channel intensity, including: ,in, pixel coordinates in an orthophoto image The volume gain coefficient at a given point is used to characterize the relative thickness or overlap of the blades. The preset overlap compensation coefficient, Pixel coordinates In the local dark channel value of the green channel, The sensitivity threshold, It is a natural exponential function.
[0020] In this way, by utilizing the positive correlation between dark channel values and leaf overlap, a greater area weight is assigned to highly overlapping areas, thereby simulating the integral effect of three-dimensional volume on a two-dimensional plane and solving the problem that a single plane projection cannot characterize longitudinal growth.
[0021] Optionally, the plant growth index is obtained by weighting and summing the physical areas of pixels in the orthophoto image using the volume gain coefficient, including: determining the physical area represented by a unit pixel in the orthophoto image; for each pixel in the plant region, the product of the physical area and the volume gain coefficient corresponding to the pixel is used as the weighted area of the pixel; and the weighted areas of all pixels in the plant region are accumulated to obtain the plant growth index.
[0022] Optionally, the fertilization guidance information for the plant corresponding to the planting container is output using the plant growth index, including: taking the difference between the plant growth index and the standard index corresponding to the current time point in the preset standard growth model as the error value; using proportional-integral-derivative control logic to determine the proportional term of the error value, the derivative term of the error value changing with time, and the integral term of the error value accumulating with time; weighting and summing the proportional term, derivative term, and integral term to determine the fertilization adjustment coefficient, and outputting the fertilization adjustment coefficient as the fertilization guidance information.
[0023] According to a second aspect of the embodiments of this application, a personalized fertilization guidance system based on user planting images is provided, comprising: a processor and a memory, wherein the memory stores determination machine program instructions, and the determination machine program instructions, when executed by the processor, implement the steps of the personalized fertilization guidance method based on user planting images provided in the first aspect of this application.
[0024] The technical solutions provided by the embodiments of this application may include the following beneficial effects: acquiring the original image taken by the user of the plant in the planting container, being able to decouple the original image from the multi-scale illumination components to obtain the reflection component image, the reflection component image can better reflect the information of the plant leaf surface, using the reflection component image to obtain the orthophoto image, and using the dark channel intensity of the pixels in the plant area in the orthophoto image to determine the volume gain coefficient, the volume gain coefficient taking into account the possible overlap between leaves, using the volume gain coefficient to obtain the plant growth index, using the plant growth index to output more accurate fertilization guidance information for the plant corresponding to the planting container, and the fertilization guidance information obtained from the image can adapt to more diverse shooting angles or lighting, which can reduce the difficulty of planting operations for groups such as students who are experiencing planting.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating a personalized fertilization guidance method based on a user's planting image, according to an exemplary embodiment.
[0027] Figure 2 This is a schematic diagram of a grayscale image of an orthophoto of the plants grown by the user.
[0028] Figure 3 This is a schematic diagram of the volume gain coefficient at different locations on the plant surface;
[0029] Figure 4 This is a schematic diagram illustrating the structure of a personalized fertilization guidance system based on user planting images, according to an exemplary embodiment. Detailed Implementation
[0030] First, a brief introduction to the application scenarios of this application embodiment will be given. In the application scenarios of this application, users may grow potted plants, such as economic or ornamental crops such as strawberries, tomatoes or basil, on their balconies, living rooms or courtyards. Or, student users may experience growing potted plants in the classroom.
[0031] Users' experience in growing these potted plants may be useful. Therefore, it is necessary to provide users with personalized fertilization guidance by combining the pictures of potted plants taken by the users. However, the lighting conditions of the shooting environment are uncontrollable. There may be strong direct sunlight, shadows from buildings, or complex interference from indoor artificial lighting, making it difficult to provide accurate fertilization guidance information directly using the acquired images.
[0032] To address the aforementioned technical problems, embodiments of this application provide a method and system for personalized fertilization guidance based on user planting images. Figure 1 This is a flowchart illustrating a personalized fertilization guidance method based on a user's planting image, according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0033] In step S101, the original image taken by the user of the plant in the planting container is obtained, and the original image is decoupled from the multi-scale illumination component to obtain a reflection component image containing the surface properties of the object.
[0034] For example, when providing potted plants for student users to experience planting, the same planting containers and tools are usually provided for different student users. The color, size and type of plants planted in the planting containers can be determined in advance or specified by the teacher users.
[0035] In one embodiment, decoupling the original image from multiple illumination components to obtain a reflection component image containing object surface properties includes: ,in, For the reflection component image in coordinates Pixel value at that location, The total number of scales, For the first The weighting coefficients for each scale, where log is a logarithmic function. For the original image in coordinates The grayscale value at that location; for The pixel at the th The ambient illumination component values are estimated at each scale; the ambient illumination component values are obtained by convolving the original image with the Gaussian kernel function of the corresponding scale.
[0036] The total number of scales is the number of different Gaussian kernels used in illumination estimation, for example, it can be 3, corresponding to three different scales; the sum of the weight coefficients of all scales is 1, for example, it can be set to 0.33, 0.33 and 0.34 respectively under the three scales; the logarithmic function is used to convert the multiplicative illumination model into an additive model in order to facilitate linear separation.
[0037] If the original image is a color image, it can be pre-converted to a color space such as HSV to extract the lightness component, or the RGB three channels can be processed independently.
[0038] First, the acquired original image is converted from the non-linear RGB color space to the logarithmic domain, and then the calculation is performed. During the process, Gaussian kernel functions with different standard deviations can be constructed. For example, 15 pixels can be set as the first scale parameter to extract subtle lighting changes in the image; 30 pixels can be set as the second scale parameter to extract local color distribution features of the lighting; and 50 pixels can be set as the third scale parameter to extract the dynamic range changes of the overall environment.
[0039] For pixels in the image matrix Discrete convolution operations are performed between the original image and the three preset Gaussian kernels to obtain ambient light estimation components at three different frequency domain scales. In the logarithmic domain, the logarithmic values of the three ambient light components are subtracted from the logarithmic values of the original image to obtain the reflection components at three scales.
[0040] Using preset weighting coefficients The three reflection components are linearly weighted and fused, and the data is restored to the linear real number domain through exponential transformation to obtain the reflection component image.
[0041] In home or educational planting environments, the distribution of light sources may be uneven. For example, a plant placed in a corner of a balcony may receive strong direct sunlight on the side facing the window, while the side facing away from the light is in deep shadow created by the building structure.
[0042] If the original image is used directly for computer vision analysis, the leaf on the shaded side may be misjudged by the algorithm as a dead leaf or soil background because the pixel value is too low, while the leaf on the light side may lose the details of the leaf vein texture due to excessive reflection.
[0043] In this embodiment, multi-scale illumination component decoupling is adopted. Larger-scale components can handle overall illumination gradation, such as the left-right brightness difference caused by window light; smaller-scale components can retain high-frequency texture information such as leaf veins, thus adapting to different illumination conditions.
[0044] Since the illumination component typically corresponds to the low-frequency spatial variation of ambient light, while the reflection component corresponds to the high-frequency texture details of the object's surface, the influence of the ambient light field is effectively avoided by subtracting the Gaussian blurred version of different scales, i.e., the estimated illumination component, from the logarithmic domain. This makes the leaf texture that may be hidden in the shadows clearer, and restores the normal color gradation in areas of overexposed highlights.
[0045] In one embodiment, the ambient illumination component estimate is determined as follows: for the target pixel in the original image, the square of the Euclidean distance between the target pixel and the neighboring pixels is determined, the square is divided by negative two times the square of the Gaussian kernel standard deviation and then exponentially calculated to obtain the distance weight, and the pixel values of the neighboring pixels are weighted and averaged using the distance weight to obtain the ambient illumination component estimate of the target pixel.
[0046] For a target pixel in the original image, a two-dimensional window centered on the target pixel can be defined, for example... or For a given matrix region, for neighboring pixels within the window, calculate the square of the spatial Euclidean distance between the neighboring pixels and the target pixel.
[0047] Substituting the square of the distance into the formula of the Gaussian distance weight function, the distance weight corresponding to the distance between the neighboring pixels and the target pixel is calculated; the pixel values of all neighboring pixels in the two-dimensional window are multiplied by their corresponding distance weights and summed, and then divided by the sum of all distance weights for normalization, so as to obtain the estimated value of the ambient illumination component of the target pixel; the Gaussian distance weight function is common knowledge to those skilled in the art, and will not be described in detail in this embodiment.
[0048] In the original images of plants, the changes in light intensity are usually spatially smooth and continuous. For example, sunlight shines through clouds or windows onto the leaves as light spots, and the edges of plants show a gradual characteristic. Using Gaussian weighting can make the pixels closer to the center have a larger weight, while the distance weight of neighboring pixels farther from the center decays exponentially, which is consistent with the physical characteristics of photons spreading and scattering in space.
[0049] By using a Gaussian kernel-based spatial weighted averaging operation, high-frequency texture information such as leaf veins, edges, or jagged edges of plants in the original image is effectively smoothed out, while low-frequency brightness variation information is preserved.
[0050] When subsequent steps subtract this estimated ambient illumination component from the original image, the illumination bias field superimposed on the object surface can be removed, enabling consistent plant reflectance characteristics to be obtained when shooting under soft diffused light in the early morning or strong direct light at noon, thus improving the stability of ambient illumination component estimation at different time periods or under different weather conditions.
[0051] In step S102, the longitudinal boundary line of the planting container in the reflection component image is extracted, and the intersection of different longitudinal boundary lines is taken as the cancellation point. Based on the coordinates of the cancellation point and the camera's intrinsic parameter data, the pitch angle of the camera during shooting is determined by geometric inversion.
[0052] In one embodiment, extracting the longitudinal boundary line of the planting container in the reflection component image includes: performing edge detection on the reflection component image using the probabilistic Hough transform algorithm, and taking the two longitudinal long sides that conform to the geometric features of the planting container from the edge detection results as the longitudinal boundary line.
[0053] For example, the Canny edge detection operator can be applied to the reflection component image, which includes steps such as Gaussian smoothing and noise reduction, calculation of gradient magnitude and direction, non-maximum suppression, and double threshold connection, to obtain a binarized edge map.
[0054] By finding the peak value of the accumulated value in the Hough parameter space, multiple candidate line segments can be calculated. Logical screening can be performed by combining the prior geometric features of the planting container, such as the side of a standard rectangular flower pot, which is usually a long vertical line.
[0055] When filtering, line segments with a length less than a preset threshold, such as 20% of the image height, can be removed, as well as horizontal line segments with an angle greater than 45 degrees away from the vertical direction. The most prominent vertical line segments located on the left and right sides of the container are retained as vertical boundary lines.
[0056] Planting containers, such as standard rectangular or round flower pots, typically have regular geometric shapes in their tangents. The edges of the planting containers are the most prominent and stable geometric features in the scene besides the plants themselves. In home or educational shooting environments, the background of an image may contain interfering straight lines such as gaps in floor tiles, balcony railings, or power lines.
[0057] By using the probabilistic Hough transform and combining it with the longitudinal long side features of the planting container as constraints, the outline of the planting container can be located relatively well. In the imaging principle of perspective projection, a set of parallel edges of the container, namely two vertical edges, will converge at a point on the image plane.
[0058] By extracting two vertical boundary lines, a set of lines that are originally parallel in three-dimensional space but converge in perspective in two-dimensional images can be obtained. Compared with feature point matching based on texture, localization based on the macroscopic geometric features of the edge of the planting container can reduce the sensitivity to changes in lighting and local occlusion.
[0059] Even if part of the edge of the planting container is obscured by overflowing leaves, the probabilistic Hough transform can still fit the complete straight line parameters from the remaining unobscured part, thus ensuring the robustness of subsequent attitude calculations.
[0060] In one embodiment, based on the coordinates of the disappearance point and the camera's intrinsic parameter data, the pitch angle during camera shooting is determined through geometric inversion, including: pitch angle. ,in, The pitch angle of the camera's optical axis relative to the horizontal plane; It is the arctangent function; The ordinate of the disappearance point; The ordinate of the optical center of the original image; This is the equivalent physical focal length of the camera; This refers to the pixel density of an image sensor per unit length.
[0061] The equivalent physical focal length of a camera is usually measured in millimeters, while the pixel density is measured in pixels per millimeter. The focal length used to convert the physical focal length to pixels is the vertical coordinate of the optical center of the original image, which is usually located at half the image height. The arctangent function is used to convert the ratio to an angle value.
[0062] Two longitudinal boundary lines were determined using a system of linear equations in analytic geometry. and The coordinates of the intersection point The intersection point is the vertical disappearance point. Then, the camera's physical focal length is obtained by reading the EXIF metadata of the image file. .
[0063] Different smartphones may have different sensor pixel sizes. The pixel density can be calculated either by pre-obtaining a database of the sensor specifications built into the user's smartphone or by using the ratio of image resolution to the sensor's physical size. .
[0064] Due to height and operating habits, users usually tilt their phones downwards at a certain angle when taking pictures of plants. This tilt causes perspective distortion, where objects in the image appear larger when closer and smaller when farther away. If this distortion is not corrected, plants at the far end of the flowerpot will appear smaller than those at the near end, leading to inaccurate estimations of growth.
[0065] By utilizing the principle of shadow-eliminating points generated by parallel lines inherent in the planting scene, such as the edge of a flowerpot, and combining this with the camera's intrinsic parameter data, the shooting angle can be adaptively calculated even without a calibration object.
[0066] Based on the pinhole camera imaging model and projective geometry principles, the ordinate of the point of disappearance on the imaging plane is calculated using a parallel line perpendicular to the ground in three-dimensional space. With camera tilt angle There are trigonometric relationships: The pitch angle obtained through inverse transformation The geometric posture during shooting was precisely quantified. This is the equivalent physical focal length of the camera.
[0067] In addition to being used for subsequent image correction, the obtained pitch angle can also serve as feedback information to prompt the user. For example, if the calculated pitch angle tilt causes the correction error to exceed the predetermined deviation, it can indicate that the shooting angle is too low, so that the user can change the shooting angle of the phone when shooting.
[0068] In step S103, based on the pitch angle and the physical aspect ratio of the planting container, a homography transformation matrix is constructed. The homography transformation matrix is used to reconstruct the reflection component image into an orthophoto image, and the dark channel intensity of the plant region in the orthophoto image is determined.
[0069] In one embodiment, reconstructing an orthophoto image from a reflection component image using a homography transformation matrix includes: setting the coordinates of four target corner points on a virtual physical plane based on the physical dimensions of a standard planting container; solving for the homography transformation matrix using a direct linear transformation algorithm combined with singular value decomposition, based on the target corner point coordinates and the corresponding corner point coordinates in the reflection component image; calculating the inverse matrix of the homography transformation matrix to establish an inverse mapping relationship from the orthophoto image plane to the reflection component image plane; traversing the pixel grid of the orthophoto image plane, finding the corresponding coordinates in the reflection component image using the inverse mapping relationship, and obtaining pixel values through bilinear interpolation to fill the corresponding positions in the orthophoto image plane to generate an orthophoto image.
[0070] The memory can pre-store the standard physical dimensions of the planting container, for example, a standard physical dimension of 40cm in length and 20cm in width. Based on the standard physical dimensions, four ideal corner points can be defined on the virtual orthophoto plane, for example... , , as well as The coordinate unit is pixels scaled proportionally.
[0071] The four actual corner points of the container are identified in the current reflection component image, or determined by the intersection of the longitudinal boundary line and the transverse line of the container opening plane. A system of linear equations is constructed using the corresponding four pairs of point coordinates, and the system of equations containing eight degrees of freedom is solved using singular value decomposition (SVD). Homography matrix.
[0072] For every integer coordinate point on the orthophoto Using matrices Calculate its floating-point coordinates in the original image. Since floating-point coordinates are usually not integers, we can select the neighboring pixels of the pixel and perform bilinear interpolation. That is, we combine the pixel values of the four points according to the distance weight to obtain the pixel value of the pixel after bilinear interpolation.
[0073] By performing inverse operations of rotation, translation, and perspective shrinkage on the plane containing the original image through homography transformation, the original image was aligned from the camera coordinate system to the horizontal plane in the world coordinate system. By using inverse mapping and bilinear interpolation techniques, the generated orthophoto image was guaranteed to have smooth texture and clear edges, avoiding visual interference from shooting angles such as pitch or tilt on the plant morphology, making subsequent area statistics and volume estimation more accurate.
[0074] In step S104, a volume gain coefficient representing the degree of leaf stacking is constructed based on the dark channel intensity. The volume gain coefficient is used to perform a weighted summation of the pixel physical areas of the orthophoto image to obtain the plant growth index. The plant growth index is used to output fertilization guidance information for the plant corresponding to the planting container.
[0075] In one embodiment, a volume gain coefficient characterizing the degree of blade stacking is constructed based on the dark channel intensity. ,in, pixel coordinates in an orthophoto image Volume gain coefficient at the location; The preset overlap compensation coefficient, Pixel coordinates In the local dark channel value of the green channel, The sensitivity threshold, It is a natural exponential function.
[0076] The overlap compensation coefficient is used to control the maximum magnitude of the volume gain. For example, when the weight of the region with the highest overlap is 3 times that of the single-layer blade region, the pitch angle parameter can be set to 2. The sensitivity threshold is used to control the response speed of the gain function to changes in the dark channel.
[0077] For each pixel in the plant region, the pixel's position can be calculated, for example... The minimum pixel value in the green channel of all pixels within the pixel neighborhood is used as... The green channel effectively reflects the characteristics of the plants grown by the user. In areas deep within the plant canopy or where leaves overlap densely, light has difficulty penetrating and shadows are heavy, resulting in a lower dark channel value. It exhibits specific distribution characteristics.
[0078] In the formula for calculating the volume gain coefficient, when When the size is larger, for example, when a pixel corresponds to a shallow leaf or edge, The value of is closer to 1, avoiding overweighting of normal single-layer blades; conversely, when Smaller pixels, for example, those located in deeper or overlapping areas of a plant. The value of is greater than 1, which simulates the inverse process of the exponential decay law of light in the plant medium, so that the final calculated growth index can truly reflect the biomass volume of the plant.
[0079] In one embodiment, the plant growth index is obtained by weighting and summing the physical areas of pixels in an orthophoto using a volume gain coefficient, including: determining the physical area represented by a unit pixel in the orthophoto; for each pixel within the plant region, using the product of the physical area and the volume gain coefficient corresponding to the pixel as the weighted area of the pixel; and summing the weighted areas of all pixels within the plant region to obtain the plant growth index.
[0080] Since the volume gain coefficient corresponding to a pixel takes into account the possible overlap between leaves, the product of the physical area and the volume gain coefficient corresponding to the pixel is used as the weighted area of the pixel. The weighted areas of all pixels in the plant area are accumulated to obtain the plant growth index. The plant growth index can better reflect the growth information of the plant in the planting container.
[0081] Figure 2 This is a schematic diagram of a grayscale image of an orthophoto of the plants grown by the user, such as... Figure 2 The degree of overlap between different parts of the plants planted by the user is shown.
[0082] By utilizing the pixel volume gain coefficient determination steps in the embodiments of this application, the following can be obtained: Figure 3 The diagram shows the volume gain coefficients at different locations on the plant surface, as shown below. Figure 3 As shown, Figure 2 The single-layer blades or regions with lower overlap determined a lower volume gain coefficient. Figure 3 This is manifested as a smaller grayscale value.
[0083] In one embodiment, the fertilization guidance information for the plant corresponding to the planting container is output using the plant growth index, including: taking the difference between the plant growth index and the standard index corresponding to the current time point in the preset standard growth model as the error value; using proportional-integral-derivative control logic to determine the proportional term of the error value, the derivative term of the error value changing with time, and the integral term of the error value accumulating with time; performing a weighted summation of the proportional term, the derivative term, and the integral term to determine the fertilization adjustment coefficient, and outputting the fertilization adjustment coefficient as the fertilization guidance information.
[0084] The database can store standard growth curves for the same plant variety, such as curves representing the relationship between time and growth index. If the current day is the 20th day after planting, the standard index can be obtained by looking up the table. , and the calculated actual index By comparison, the error was obtained. .
[0085] A proportional-integral-derivative (PID) control algorithm is introduced, where the proportional term reflects the degree of nutrient deficiency at the current moment; the integral term reflects the long-term cumulative nutrient deficiency; and the derivative term reflects the rate of change of the growth trend.
[0086] The obtained fertilization adjustment coefficient can be positive or negative. If the fertilization adjustment coefficient is positive, it is recommended to increase fertilization; if the fertilization adjustment coefficient is negative, it is recommended to reduce or stop fertilization.
[0087] Plant growth is a dynamic biochemical process with significant lag. A single measurement underestimation may be due to measurement error or it may be the result of long-term malnutrition. If only the current deviation is considered, a measurement fluctuation caused by a single poor image quality may lead to drastic changes in fertilization recommendations. Introducing an integral term can comprehensively consider the growth status over a period of time, ensuring the continuity and stability of the fertilization strategy.
[0088] Introducing differential terms can predict growth trends. For example, if the current index is low but the growth rate is fast, it indicates that the plant is recovering and the amount of topdressing can be reduced appropriately.
[0089] Introducing the proportional-integral-differential algorithm into biological fertilization decision-making can adaptively smooth fertilization recommendations, avoiding misleading results caused by poor image quality or fluctuations in ambient light. At the same time, it can keenly capture the changing trends of plant growth rates, thus providing forward-looking fertilization guidance.
[0090] Through the technical solution provided in this application embodiment, users such as students who are experiencing plant cultivation can obtain corresponding fertilization guidance information by uploading photos taken of the planting container. Moreover, the obtained fertilization guidance information can adapt to different shooting angles or lighting conditions, which can effectively reduce the threshold of planting operation for users and improve their planting experience.
[0091] Figure 4 This is a schematic diagram illustrating the structure of a personalized fertilization guidance system 1000 based on a user's planting image, according to an exemplary embodiment. (Refer to...) Figure 4 The personalized fertilization guidance system 1000 based on user planting images includes a processor 1100 and a memory 1200. The memory 1200 stores determination machine program instructions. When the determination machine program instructions are executed by the processor 1100, they implement all or part of the steps of the personalized fertilization guidance method based on user planting images in this application.
[0092] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.
[0093] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for providing individualized fertilization guidance based on a user's planting image, characterized by, The method comprises the following steps: acquiring an original image taken by a user for a plant in a planting container; The original image is subjected to multi-scale light component decoupling to obtain a reflection component image containing object surface attributes, including: , is a pixel value of the reflection component image at coordinates , is a total number of scales, is a weight coefficient of the th scale, and log is a logarithmic function, is a gray value of the original image at coordinates ; is a pixel point at coordinates estimated to obtain an ambient illumination component value at the th scale; the ambient illumination component value is obtained by performing convolution operation on the original image and a Gaussian kernel function corresponding to the scale. extracting the longitudinal boundary lines of the planting container in the reflection component image, and taking the intersection points of different longitudinal boundary lines as the vanishing points; based on the coordinates of the vanishing points and the internal parameter data of the camera, the pitch angle of the camera when taking the image is determined through geometric inversion; based on the pitch angle and the physical length-width ratio of the planting container, a homographic transformation matrix is constructed, the reflection component image is reconstructed into an orthographic image by using the homographic transformation matrix, and the dark channel intensity of the plant region in the orthographic image is determined; Constructing a volume gain coefficient representing the degree of leaf layering based on the dark channel intensity, including: , is the volume gain coefficient at pixel coordinate in the orthographic image, used to represent the relative thickness or overlap of the leaf; is a preset overlap compensation coefficient, is the pixel coordinate in the local dark channel value of the green channel, is the sensitivity threshold, and exp is the natural exponential function; the plant growth index is obtained by using the volume gain coefficient to perform weighted summation on the pixel physical area of the orthographic image; the fertilization guidance information of the plant corresponding to the planting container is output by using the plant growth index, including: taking the difference between the plant growth index and the standard index corresponding to the current time point in the preset standard growth model as an error value; the proportional term of the error value, the differential term of the error value changing with time, and the integral term of the error value accumulating with time are determined by using proportional-integral-derivative control logic; the proportional term, the differential term, and the integral term are weighted and summed to determine the fertilization adjustment coefficient, and the fertilization adjustment coefficient is taken as the fertilization guidance information output. 2.The user’s planting image-based personalized fertilization guidance method according to claim 1, characterized in that, The ambient illumination component estimation value is determined in the following manner: For a target pixel point in the original image, the square of the Euclidean distance between the neighborhood pixel points and the target pixel point is determined, the square is divided by the negative two times of the square of the Gaussian kernel standard deviation, and then the exponential operation is performed to obtain the distance weight; the pixel values of the neighborhood pixel points are weighted and averaged by using the distance weight to obtain the ambient illumination component estimation value of the target pixel point. 3.The user’s planting image-based personalized fertilization guidance method according to claim 1, characterized in that, The longitudinal boundary lines of the planting container in the reflection component image are extracted, including: using a probabilistic Hough transform algorithm to perform edge detection on the reflection component image, and taking two longitudinal long sides from the edge detection result that meet the geometric characteristics of the planting container as the longitudinal boundary lines. 4.The user’s planting image-based personalized fertilization guidance method according to claim 1, wherein, Based on the coordinates of the vanishing points and the internal parameter data of the camera, the pitch angle of the camera when taking the image is determined through geometric inversion, including: wherein, is the pitch angle of the optical axis of the camera relative to the horizontal plane; is the arctangent function, is the ordinate of the vanishing point; is the ordinate of the optical center of the original image; is the equivalent physical focal length of the camera; is the pixel density contained in a unit length of the image sensor. 5.The user’s planting image-based personalized fertilization guidance method according to claim 1, wherein, The reflection component image is reconstructed into an orthographic image by using the homographic transformation matrix, including: Based on the physical size of the standard planting container, four target corner point coordinates on the virtual physical plane are set; the homographic transformation matrix is solved based on the target corner point coordinates and the corresponding corner point coordinates in the reflection component image by using a direct linear transform algorithm combined with singular value decomposition; The inverse matrix of the homographic transformation matrix is calculated to establish the inverse mapping relationship from the orthographic image plane to the reflection component image plane; the pixel grid of the orthographic image plane is traversed, the inverse mapping relationship is used to find the corresponding coordinates in the reflection component image, and the pixel values are obtained by bilinear interpolation to fill the corresponding positions of the orthographic image plane to generate the orthographic image. 6.The user’s planting image-based personalized fertilization guidance method according to claim 1, wherein, The plant growth index is obtained by using the volume gain coefficient to perform weighted summation on the pixel physical area of the orthographic image, including: determining the physical area represented by a unit pixel in the orthographic image; for each pixel point in the plant region, the product of the physical area and the volume gain coefficient corresponding to the pixel point is taken as the weighted area of the pixel point; the weighted areas of all pixel points in the plant region are accumulated to obtain the plant growth index.
7. A personalized fertilization guidance system based on a user's planting image, characterized by, The method comprises the following steps: A processor and a memory, the memory storing computer program instructions which, when executed by the processor, implement the user-planting-image-based personalized fertilization guidance method according to any one of claims 1-6.
Citation Information
Patent Citations
Defogging method and device based on infrared light and visible light image fusion
CN120655540A
Multiprocessing-based iris image enhancement method and apparatus, and device and medium
WO2019223067A1