Intelligent logistics warehouse cargo weighing management system and method
By calculating conveyor belt data and obtaining cargo boundary contours, the average of the predicted weight and observed weight of the cargo within the weighing area is obtained, solving the problem of inaccurate conveyor belt weighing and improving the accuracy and stability of weighing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU HENGSAITE AUTOMATION TECH CO LTD
- Filing Date
- 2025-02-21
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, when weighing goods using a weighing conveyor belt, the weight measured is inaccurate if the goods have not fully entered the weighing area, resulting in unstable weighing data.
By acquiring conveyor belt data and calculating the time it takes for the midpoint of the initial profile to reach the midpoint of the weighing area, and combining this with the cargo boundary profile acquisition method, the average of the predicted weight and the observed weight is obtained as the final weight, thus solving the problem of inaccurate weighing.
It improves the accuracy and stability of weighing, ensuring more accurate weight acquisition when the goods are completely within the weighing area, and reduces the issuance of abnormal weighing signals.
Smart Images

Figure CN120106739B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cargo weighing management technology, specifically to an intelligent logistics warehouse cargo weighing management system and method. Background Technology
[0002] With the explosive growth of the logistics industry, traditional manual weighing methods can no longer meet the needs of modern logistics. Therefore, semi-automatic weighing methods have been introduced to reduce manual operation steps, achieve automatic weighing, automatic data uploading, automatic record comparison and query, and improve the efficiency of weighing goods in and out of logistics warehouses.
[0003] Semi-automated weighing methods include weighing goods via weighing conveyor belts. Weighing conveyor belts can achieve continuous and dynamic weighing of materials without stopping the conveyor belt, enabling continuous and uninterrupted weighing operations. This has significant benefits in improving the efficiency, accuracy, compliance, and cost reduction of logistics and industrial production. However, the dynamic weighing process of weighing conveyor belts leads to unstable weighing data. For example, if a large item has not yet fully entered the weighing area, the weight obtained at this time will be inaccurate. For instance, patent application CN110704701A discloses an intelligent logistics warehouse goods weighing management method and system. This method does not consider the inaccuracy of the weight obtained when the goods have not fully entered the weighing area when using a weighing conveyor belt. Therefore, existing goods weighing technologies using weighing conveyor belts suffer from inaccurate weighing. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in the prior art. It calculates the time it takes for the midpoint of the initial contour to reach the midpoint of the weighing area using data from the conveyor belt, obtains the predicted weight at that time point, obtains the final contour map of the final cargo image based on the cargo boundary contour acquisition method, obtains the observed weight when the entire final contour map is within the weighing area, calculates the average of the predicted weight and the observed weight, marks it as the final weight, and uses the final weight as the weight of the cargo. This solves the problem of inaccurate weighing when using a weighing conveyor belt to weigh cargo in existing cargo weighing technologies.
[0005] To achieve the above objectives, in a first aspect, the present invention provides an intelligent logistics warehouse cargo weighing management system, comprising a starting image acquisition module, a contour midpoint acquisition module, a predicted weight acquisition module, a final image acquisition module, an observed weight acquisition module, and a final weight acquisition module.
[0006] The starting image acquisition module is used to acquire cargo images and mark them as starting cargo images;
[0007] The contour midpoint acquisition module is used to acquire the initial contour map of the initial cargo image based on the cargo boundary contour acquisition method, and to acquire the midpoint of the initial contour map based on the initial contour map.
[0008] The predicted weight acquisition module is used to acquire data from the conveyor belt, calculate the time it takes for the midpoint of the initial contour to reach the center of the weighing area based on the data from the conveyor belt, acquire the weight of the goods weighed at that time point, and mark it as the predicted weight.
[0009] The final image acquisition module is used to acquire cargo images based on the weighing camera and mark them as final cargo images;
[0010] The observation weight acquisition module is used to acquire the final contour map of the final cargo image based on the cargo boundary contour acquisition method, and to acquire the cargo weight when the entire final contour map is within the weighing area, which is marked as the observation weight.
[0011] The final weight acquisition module is used to calculate the average of the predicted weight and the observed weight, which is marked as the final weight, and the final weight is used as the weight of the goods.
[0012] Furthermore, the initial image acquisition module is configured with a camera installation strategy, which includes:
[0013] The weighing conveyor belt includes a weighing area and a buffer area. The weighing area can transport goods and weigh them at the same time. The buffer area is used to transport goods to the weighing area and obtain the midpoint of the weighing area, which is marked as the weighing midpoint.
[0014] Set a starting line segment at the entrance of the buffer area. The starting line segment is parallel to the width direction of the weighing conveyor belt and its length is equal to the width of the weighing conveyor belt. Obtain the midpoint of the starting line segment and mark it as the buffer start point. Install cameras directly above the buffer start point and the weighing midpoint, and mark them as the start camera and the weighing camera, respectively.
[0015] Furthermore, the contour midpoint acquisition module is configured with a strategy for acquiring the starting contour map, the strategy for acquiring the starting contour map including:
[0016] Acquire an image of the initial cargo based on the starting camera;
[0017] The cargo boundary contour map of the starting cargo map is obtained using the cargo boundary contour acquisition method and marked as the starting contour map.
[0018] Furthermore, the method for obtaining the cargo boundary contour includes:
[0019] Obtain the R, G, and B values from the RGB values of each pixel in the initial cargo image;
[0020] The grayscale conversion formula converts RGB values to grayscale values.
[0021] Qwh = β1*R + β2*G + β3*B; where Qwh is the gray value of a pixel in the initial cargo image, and β1, β2 and β3 are the weights of R, G and B, respectively.
[0022] Divide the grayscale values of 0-255 into E equal intervals, and mark them as grayscale intervals;
[0023] Count the frequency of gray values in each gray range and label it as the gray range frequency;
[0024] Plot a histogram with grayscale values on the X-axis and the frequency of grayscale intervals on the Y-axis, and label it as a grayscale histogram;
[0025] The total frequency is obtained by summing the frequencies of all grayscale intervals and denoted as F;
[0026] The intervals with a grayscale frequency less than F / E are marked as low-frequency regions, and the intervals other than low-frequency regions are marked as high-frequency regions. It is determined whether there are high-frequency regions on both sides of the low-frequency region. If there are, the low-frequency region is marked as the final region.
[0027] Set the midpoint value of the x-coordinate of the final region as the background threshold; set the gray value of pixels greater than or equal to the background threshold to 255, and set the gray value of pixels less than the background threshold to 0, to obtain the binarized image of the goods.
[0028] If a pixel with a grayscale value of 255 is adjacent to a pixel with a grayscale value of 0, the pixel with a grayscale value of 0 is marked as a pixel on the edge of the goods.
[0029] Set the grayscale value of all pixels that are not at the boundary of the goods in the binarized image of the goods to 255, and mark them as the outline of the goods boundary.
[0030] Furthermore, the contour midpoint acquisition module is configured with a strategy for acquiring the starting contour midpoint, the strategy for acquiring the starting contour midpoint includes:
[0031] Establish a first plane rectangular coordinate system with the lower left corner of the initial contour drawing as the origin. The long side of the initial contour drawing is parallel to the X-axis, and the wide side of the initial contour drawing is parallel to the Y-axis. Place the initial contour drawing in the first quadrant.
[0032] Let the coordinates of the edge pixel of the cargo be (xi, yi) in the first plane Cartesian coordinate system, and obtain an x i The coordinates of the maximum value are: (x max (y0), get an x i The minimum value is: (x min ,y1), get a y iThe maximum coordinates are: (x0, y max ), get y i The coordinates of the minimum value are: (x1, y1) min Then obtain (x) max Line segments that are parallel to the Y-axis and have a length of y0 are marked as the forward line segments. The line segments that pass through (x, y0) are then identified. min Line segments that are parallel to the Y-axis and pass through (x0, y1) are marked as the rear line segments. max The line segment that is parallel to the X-axis is marked as the left line segment, and the line segment passing through (x1, y1) is obtained. min The line segment parallel to the X-axis is marked as the right line segment. The front, back, left, and right line segments form a rectangle. The lower left corner (x, y) of the rectangle is obtained. zx y zx ) and the top right corner point (x ys y ys ), Acquisition Point Mark it as the midpoint of the starting contour.
[0033] Furthermore, the predicted weight acquisition module is configured with a predicted weight acquisition strategy, which includes:
[0034] Obtain the distance between the buffer start point and the weighing midpoint, and mark it as L;
[0035] The speed of the conveyor belt is obtained and denoted as V;
[0036] The time from the starting point of the material buffer to the midpoint of the weighing is calculated as: T = L / V;
[0037] Establish a second planar rectangular coordinate system with the lower left corner of the initial cargo image as the origin. The long side of the initial cargo image is parallel to the X-axis, and the wide side of the initial cargo image is parallel to the Y-axis. Place the initial cargo image in the first quadrant.
[0038] Get the coordinates of the buffer start point;
[0039] When the x-coordinate of the midpoint of the initial contour is equal to that of the buffer starting point, timing begins. When time T is reached, the weighed weight of the goods is obtained and marked as the predicted weight.
[0040] Furthermore, the observation weight acquisition module is configured with an observation weight acquisition strategy, which includes:
[0041] The cargo boundary contour map of the final cargo image is obtained based on the cargo boundary contour acquisition method and marked as the final contour map;
[0042] Establish a third plane rectangular coordinate system with the lower left corner of the final cargo image as the origin. The long side of the final cargo image is parallel to the X-axis, and the wide side of the final cargo image is parallel to the Y-axis. Place the final cargo image in the first quadrant.
[0043] Let the coordinates of the final outline drawing in the third plane rectangular coordinate system be (m). i n i ), get an m i The maximum coordinates are denoted as (m) max (n1), obtain an m i The minimum coordinates are denoted as (m) min ,n2);
[0044] Let the coordinates of the weighing area in the third plane rectangular coordinate system be (q). i w i ), get a q i The coordinates of the maximum value are denoted as (q). max (w1), get an m i The minimum coordinates are denoted as (q). min ,w2);
[0045] When m is satisfied simultaneously max max With m min >q min When the final image of the cargo is captured, the weight of the cargo displayed in the weighing area is marked as the observed weight.
[0046] Furthermore, the final weight acquisition module is configured with a final weight acquisition strategy, which includes:
[0047] The predicted weight is labeled G1, and the observed weight is labeled Gc. j ;
[0048] Delete Gc j The maximum and minimum values in the range are denoted as Gz. i ;
[0049] Requesting Gz i The mean, denoted as
[0050] Requesting Gz i The mean square error is:
[0051] Where MSE is Gz i The mean square error, j takes the following range: j is a positive integer and 1≤j≤u;
[0052] Determine if the MSE is less than the error threshold. If it is less than the error threshold, calculate the final weight:
[0053] Where Gzz is the final weight;
[0054] The final weight will be used as the weight of the goods.
[0055] If the error exceeds the error threshold, an abnormal cargo weighing signal will be issued.
[0056] Secondly, the present invention provides a smart logistics warehouse cargo weighing management method, comprising the following steps: acquiring a cargo image and marking it as the starting cargo image;
[0057] The cargo boundary contour of the initial cargo image is obtained based on the cargo boundary contour acquisition method, and the midpoint of the initial contour is obtained based on the cargo boundary contour.
[0058] Acquire data from the conveyor belt, calculate the time it takes for the midpoint of the initial contour to reach the center of the weighing area based on the data from the conveyor belt, obtain the weight of the goods weighed at that time point, and mark it as the predicted weight;
[0059] Acquire cargo images and label them as final cargo images;
[0060] The final contour of the final cargo image is obtained based on the cargo boundary contour acquisition method. The weight of the cargo weighed when the final contour is in the entire weighing area is obtained and marked as the observed weight.
[0061] Calculate the average of the predicted weight and the observed weight, mark it as the final weight, and use the final weight as the weight of the cargo.
[0062] The beneficial effects of this invention are as follows: This invention calculates the time it takes for the midpoint of the initial contour to reach the center of the weighing area using data from the conveyor belt, obtains the predicted weight at that time point, obtains the final contour map of the final cargo image based on the cargo boundary contour acquisition method, obtains the observed weight when the entire final contour map is within the weighing area, calculates the average of the predicted weight and the observed weight, marks it as the final weight, and uses the final weight as the weight of the cargo. The advantage is that by combining image and weighing conveyor belt analysis, the weight of the cargo is obtained when the cargo is completely within the weighing area, and then the appropriate cargo weights are selected and averaged, making the final obtained cargo weight more accurate.
[0063] The present invention obtains the midpoint of the initial contour and the midpoint of the weighing, which has the advantage that when the midpoint of the initial contour and the midpoint of the weighing are close, that is, when the goods are in the exact middle of the weighing area, the weight obtained at this moment is closest to the actual weight of the goods, thus increasing the accuracy of weighing. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the system of the present invention;
[0065] Figure 2 This is a schematic diagram of the top view of the conveyor belt of the present invention;
[0066] Figure 3 This is a schematic diagram of the grayscale histogram of the present invention;
[0067] Figure 4 This is a schematic diagram illustrating the acquisition of the midpoint of the initial contour according to the present invention;
[0068] Figure 5 This is a flowchart of the steps of the present invention. Detailed Implementation
[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] Example 1, please refer to Figure 1 As shown, an intelligent logistics warehouse cargo weighing management system includes: a starting image acquisition module, a contour midpoint acquisition module, a predicted weight acquisition module, a final image acquisition module, an observed weight acquisition module, and a final weight acquisition module.
[0071] The initial image acquisition module is used to acquire an image of the cargo, which is marked as the initial cargo image; the initial cargo image is a frame image acquired by the initial camera;
[0072] The initial image acquisition module is configured with a camera installation policy, which includes:
[0073] Please see Figure 2 As shown, the weighing conveyor belt includes a weighing area and a buffer area. The weighing area can transport goods and weigh them at the same time. The buffer area is used to transport goods to the weighing area and obtain the midpoint of the weighing area, which is marked as the weighing midpoint. Setting the weighing midpoint ensures that the goods are weighed most accurately and stably at the weighing midpoint.
[0074] A starting line segment is set at the entrance of the buffer area. The starting line segment is parallel to the width direction of the weighing conveyor belt and its length is equal to the width of the weighing conveyor belt. The midpoint of the starting line segment is obtained and marked as the buffer start point. Cameras are installed directly above the buffer start point and the weighing midpoint, and are marked as the start camera and the weighing camera, respectively. The buffer area can transport goods and allow them to pass through the weighing area smoothly. Setting the buffer start point makes it easier to calculate the time it takes for the goods to reach the weighing midpoint.
[0075] The contour midpoint acquisition module is used to obtain the initial contour map of the initial cargo image based on the cargo boundary contour acquisition method, and to obtain the midpoint of the initial contour map based on the initial contour map.
[0076] The contour midpoint acquisition module is configured with a strategy for acquiring the starting contour map. The strategy for acquiring the starting contour map includes:
[0077] Acquire an image of the initial cargo based on the starting camera;
[0078] The cargo boundary contour map of the starting cargo map is obtained using the cargo boundary contour acquisition method and marked as the starting contour map.
[0079] Methods for obtaining cargo boundary contours include:
[0080] Obtain the R, G, and B values from the RGB values of each pixel in the initial cargo image;
[0081] The grayscale conversion formula converts RGB values to grayscale values.
[0082] Qwh = β1*R + β2*G + β3*B; where Qwh is the gray value of a pixel in the initial cargo image, and β1, β2, and β3 are the weights of R, G, and B, respectively; weighted average gray value conversion. The weighted average method assigns different weights to the three color channels RGB based on the different sensitivities of the human eye to red, green, and blue, specifically: Qwh = 0.299*R + 0.587*G + 0.114*B;
[0083] Divide the grayscale values from 0 to 255 into E intervals, and mark them as grayscale intervals. The setting of E can be determined by finding the background threshold between the grayscale values of the goods and the weighing conveyor belt based on the subsequent histogram. If the background threshold cannot be found, E can be appropriately increased.
[0084] Count the frequency of gray values in each gray range and label it as the gray range frequency;
[0085] Plot a histogram with grayscale values on the X-axis and the frequency of grayscale intervals on the Y-axis, and label it as a grayscale histogram;
[0086] The total frequency is obtained by summing the frequencies of all grayscale intervals and denoted as F;
[0087] Intervals with a grayscale frequency less than F / E are marked as low-frequency regions, and intervals other than low-frequency regions are marked as high-frequency regions. It is determined whether high-frequency regions exist on both sides of a low-frequency region. If they do, the low-frequency region is marked as the final region; that is, the grayscale value between the goods and the weighing conveyor belt in the final region. The principle is that the grayscale values of the background and the goods occupy the main part of the grayscale image, and the grayscale values of the background and the goods have different distribution ranges, which will show a bimodal trend. Finding the value between the two peaks can distinguish the grayscale values of the background and the goods.
[0088] Set the midpoint value of the x-coordinate of the final region as the background threshold; set the gray value of pixels greater than or equal to the background threshold to 255, and set the gray value of pixels less than the background threshold to 0, to obtain the binarized image of the goods.
[0089] In practical applications, E is set to 8 to plot a grayscale histogram. Please refer to [link / reference]. Figure 3 As shown;
[0090] If a pixel with a grayscale value of 255 is adjacent to a pixel with a grayscale value of 0, the pixel with a grayscale value of 0 is marked as a pixel on the edge of the goods.
[0091] In the binarized image of goods, set the grayscale value of all pixels that are not border pixels of goods to 255 and mark them as the outline of goods boundary; only the outline of goods boundary is retained.
[0092] The contour midpoint acquisition module is configured with a strategy for acquiring the starting contour midpoint. The strategy for acquiring the starting contour midpoint includes:
[0093] Establish a first Cartesian coordinate system with the lower left corner of the initial outline as the origin. The long side of the initial outline is parallel to the X-axis, and the wide side is parallel to the Y-axis. Place the initial outline in the first quadrant. The first Cartesian coordinate system is established for coordinate data. The lower left corner of the initial outline is the lower left corner of the entire image, not just the smallest angle of the outline. That is, the initial outline and the initial cargo image have the same size.
[0094] Obtain all cargo edge pixels and mark all cargo edge pixels as cargo edge outlines;
[0095] Please see Figure 4 As shown, the coordinates of the edge pixel of the goods are set to (xi, yi) in the first plane Cartesian coordinate system, and an x-coordinate is obtained. i The coordinates of the maximum value are: (x max (y0), get an x i The minimum value is: (x min ,y1), get a y i The maximum coordinates are: (x0, y max ), get y i The coordinates of the minimum value are: (x1, y1) min Then obtain (x) max Line segments that are parallel to the Y-axis and have a length of y0 are marked as the forward line segments. The line segments that pass through (x, y0) are then identified. min Line segments that are parallel to the Y-axis and pass through (x0, y1) are marked as the rear line segments. max The line segment that is parallel to the X-axis is marked as the left line segment, and the line segment passing through (x1, y1) is obtained. minThe line segment parallel to the X-axis is marked as the right line segment. The front, back, left, and right line segments form a rectangle. The lower left corner (x, y) of the rectangle is obtained. zx y zx ) and the top right corner point (x ys y ys ), Acquisition Point Mark it as the midpoint of the starting contour;
[0096] The specific method for obtaining the coordinates of the edge pixels of the goods is as follows: obtain the center point of all edge pixels of the goods and use the center point of the pixel as the coordinate point; the reason for obtaining the midpoint of the starting contour is that the contour of the goods may have irregular shape, and the center point of the goods is difficult to obtain. Obtain an outer rectangle, obtain the midpoint of the outer rectangle, and use the midpoint of the outer rectangle as the midpoint of the boundary contour of the goods, which is the center point of the goods.
[0097] In practical applications, obtaining an x i The maximum coordinates are (12, 6). Obtain an x... i The minimum value is (6, 6). Get a y i The maximum coordinates are (8, 13). Obtain y... i The coordinates of the minimum value are (8, 2); then, obtain the line segment passing through (12, 6) and parallel to the Y-axis, and mark it as the front line segment; obtain the line segment passing through (6, 6) and parallel to the Y-axis, and mark it as the back line segment; obtain the line segment passing through (8, 13) and parallel to the X-axis, and mark it as the left line segment; obtain the line segment passing through (8, 2) and parallel to the X-axis, and mark it as the right line segment. The front line segment, back line segment, left line segment and right line segment form a rectangle; obtain the lower left corner point (2, 6) and the upper right corner point (12, 13) of the rectangle. (2+12) / 2 = 7, (6+13) / 2 = 9.5, that is, (7, 9.5) is the midpoint of the starting contour.
[0098] The predicted weight acquisition module is used to acquire data from the conveyor belt, calculate the time it takes for the midpoint of the initial contour to reach the center of the weighing area based on the data from the conveyor belt, acquire the weight of the goods weighed at that time point, and mark it as the predicted weight.
[0099] The predicted weight acquisition module is configured with a strategy for acquiring predicted weight, which includes:
[0100] Obtain the distance between the buffer start point and the weighing midpoint, and mark it as L;
[0101] The speed of the conveyor belt is obtained and denoted as V;
[0102] The time from the starting point of the material buffer to the midpoint of the weighing is calculated as: T = L / V;
[0103] Establish a second Cartesian coordinate system with the lower left corner of the initial cargo image as the origin. The long side of the initial cargo image is parallel to the X-axis, and the wide side is parallel to the Y-axis. Place the initial cargo image in the first quadrant. The initial outline and the initial cargo image have the same size under the same camera, that is, the initial outline and the initial cargo image are in the same coordinate system. Only then can the coordinates of the buffer starting point and the coordinates of the midpoint of the initial outline be compared.
[0104] Get the coordinates of the buffer start point;
[0105] When the x-coordinate of the midpoint of the initial contour is equal to that of the buffer starting point, timing begins. When time T is reached, the weighed weight of the goods is obtained and marked as the predicted weight.
[0106] In practical applications, the distance between the buffer starting point and the weighing midpoint is L = 5m, the speed of the conveyor belt is V = 2m / s, and the time from the buffer starting point to the weighing midpoint is calculated as T = 5 / 2 = 2.5s. When the x-coordinate of the midpoint of the initial profile is equal to that of the buffer starting point, the timing starts. When the time reaches 2.5s, the weight of the weighed goods is 612g, which is the predicted weight.
[0107] The final image acquisition module is used to acquire images of the goods based on the weighing camera and mark them as the final goods images;
[0108] The observation weight acquisition module is used to obtain the final contour map of the final cargo image based on the cargo boundary contour acquisition method, and to obtain the cargo weight when the entire final contour map is within the weighing area, which is marked as the observation weight.
[0109] The observation weight acquisition module is configured with an observation weight acquisition strategy, which includes:
[0110] The cargo boundary contour map of the final cargo image is obtained based on the cargo boundary contour acquisition method and marked as the final contour map;
[0111] Establish a third plane rectangular coordinate system with the lower left corner of the final cargo image as the origin. The long side of the final cargo image is parallel to the X-axis, and the wide side of the final cargo image is parallel to the Y-axis. Place the final cargo image in the first quadrant.
[0112] Let the coordinates of the final outline drawing in the third plane rectangular coordinate system be (m). i n i ), get an m i The maximum coordinates are denoted as (m) max (n1), obtain an m i The minimum coordinates are denoted as (m) min ,n2);
[0113] Let the coordinates of the weighing area in the third plane rectangular coordinate system be (q). i w i ), get a q i The coordinates of the maximum value are denoted as (q). max (w1), get an m i The minimum coordinates are denoted as (q). min ,w2);
[0114] When m is satisfied simultaneously max max With m min >q min When the final image of the goods is captured, the weight of the goods displayed in the weighing area is recorded and marked as the observed weight. In order to achieve the weight of the goods displayed in the weighing area when the entire goods are in the weighing area, that is, when the minimum coordinate of the goods on the X-axis is greater than the minimum coordinate of the weighing area and the maximum coordinate of the goods on the X-axis is less than the maximum coordinate of the weighing area, that is, when the entire goods are in the weighing area.
[0115] In practical applications, obtaining an m i The maximum coordinates are marked as (12, 5), and an m is obtained. i The minimum coordinates are marked as (2, 5); obtain a q i The maximum coordinates are marked as (50, 0), and an m is obtained. i The minimum coordinates are marked as (0, 0); at the same time, 12 < 50 and 2 > 0 are satisfied, and the weight of the cargo displayed in the weighing area when the final cargo image is captured is 613g, that is, 613g is one of the observed weights;
[0116] The final weight acquisition module is used to calculate the average of the predicted weight and the observed weight, which is marked as the final weight and used as the weight of the goods.
[0117] The final weight acquisition module is configured with a final weight acquisition strategy, which includes:
[0118] The predicted weight is labeled G1, and the observed weight is labeled Gc. j ;
[0119] Delete Gc j The maximum and minimum values in the range are denoted as Gz. i ;
[0120] Requesting Gz i The mean, denoted as
[0121] Requesting Gz i The mean square error is:
[0122] Where MSE is Gz i The mean square error, j takes the following range: j is a positive integer and 1≤j≤u;
[0123] Determine if the MSE is less than the error threshold. If it is less than the error threshold, calculate the final weight:
[0124] Where Gzz is the final weight;
[0125] The error threshold setting is crucial. If the observed weight fluctuates significantly, meaning the measured observed weight is unstable, the weighing data is inaccurate and cannot be used as the weighing value of the goods. Therefore, the smaller the error threshold setting, the better. In other words, the difference between each set of data should not be too large. For example, if the error threshold setting is set so that the difference between each set of observed weight and the average observed weight does not exceed 2g, and there are three sets of data, then the error threshold = 4g.
[0126] If the error exceeds the error threshold, a cargo weighing anomaly signal will be issued.
[0127] In practical applications, if there is a set of Gc j It is one of 613g, 612g, 614g, 611g, or 610g; remove Gc. j The maximum value is 614g and the minimum value is 610g, Gz i Given one of 613g, 612g, or 611g, find Gz. i The mean is Requesting Gz i The mean square error is: MSE = 2 / 3g. Since MSE = 2 / 3g is less than the error threshold of 4g, the final weight is calculated to be: Gzz = 612g. 612g is taken as the weight of the goods.
[0128] Example 2, please refer to Figure 5 As shown, a smart logistics warehouse cargo weighing management method includes the following steps:
[0129] Step S1: Obtain the cargo image and mark it as the starting cargo image; Step S1 includes the following sub-steps:
[0130] Step S101: The weighing conveyor belt includes a weighing area and a buffer area. The weighing area can transport goods and weigh them at the same time. The buffer area is used to transport goods to the weighing area. The midpoint of the weighing area is obtained and marked as the weighing midpoint.
[0131] Step S102: Set a starting line segment at the entrance of the buffer area. The starting line segment is parallel to the width direction of the weighing conveyor belt and its length is equal to the width of the weighing conveyor belt. Obtain the midpoint of the starting line segment and mark it as the buffer start point. Cameras are installed directly above the buffer start point and the weighing midpoint, and are marked as the starting camera and the weighing camera, respectively.
[0132] Step S2 involves obtaining the cargo boundary contour of the initial cargo image based on the cargo boundary contour acquisition method, and then obtaining the midpoint of the initial contour based on the cargo boundary contour. Step S2 includes the following sub-steps:
[0133] Step S201: Acquire an image of the initial cargo based on the initial camera;
[0134] Step S202: Obtain the cargo boundary contour map of the initial cargo map using the cargo boundary contour acquisition method, and mark it as the initial contour map; Step S202 includes the following sub-steps:
[0135] Step S20201: Obtain the R, G, and B values from the RGB values of each pixel in the initial cargo image;
[0136] Step S20202: Convert RGB values to grayscale values using the grayscale conversion formula. The grayscale conversion formula is as follows:
[0137] Qwh = β1*R + β2*G + β3*B; where Qwh is the gray value of a pixel in the initial cargo image, and β1, β2 and β3 are the weights of R, G and B, respectively.
[0138] Step S20203: Divide the grayscale values of 0-255 into E intervals on average, and mark them as grayscale intervals;
[0139] Step S20204: Count the frequency of gray values in each gray range and mark it as the gray range frequency.
[0140] Step S20205: Plot a histogram with grayscale values on the X-axis and grayscale interval frequencies on the Y-axis, and label it as a grayscale histogram;
[0141] Step S20206: Sum the frequencies of all grayscale intervals to obtain the total frequency, and label it as F;
[0142] Step S20207: Mark the intervals with grayscale frequency less than F / E as small frequency regions, and mark the intervals other than small frequency regions as large frequency regions. Determine whether there are large frequency regions on both sides of the small frequency region. If there are, mark the small frequency region as the final region.
[0143] Step S20208: Set the midpoint value of the horizontal coordinate of the final region as the background threshold; set the gray value of pixels greater than or equal to the background threshold to 255, and set the gray value of pixels less than the background threshold to 0, to obtain the binarized image of the goods.
[0144] Step S20209: If a pixel with a grayscale value of 255 is adjacent to a pixel with a grayscale value of 0, mark the pixel with a grayscale value of 0 as a cargo edge pixel; set the grayscale value of all pixels in the cargo binarized image that are not cargo boundary pixels to 255 and mark them as cargo boundary contour images.
[0145] Step S203: Establish a first planar rectangular coordinate system with the lower left corner of the initial contour map as the origin. The long side of the initial contour map is parallel to the X-axis, and the wide side of the initial contour map is parallel to the Y-axis. Place the initial contour map in the first quadrant.
[0146] Step S204: Set the coordinates of the edge pixel of the goods to (xi, yi) in the first plane rectangular coordinate system, and obtain an x i The coordinates of the maximum value are: (x max (y0), get an x i The minimum value is: (x min ,y1), get a y i The maximum coordinates are: (x0, y max ), get y i The coordinates of the minimum value are: (x1, y1) min Then obtain (x) max Line segments that are parallel to the Y-axis and have a length of y0 are marked as the forward line segments. The line segments that pass through (x, y0) are then identified. min Line segments that are parallel to the Y-axis and pass through (x0, y1) are marked as the rear line segments. max The line segment that is parallel to the X-axis is marked as the left line segment, and the line segment passing through (x1, y1) is obtained. min The line segment parallel to the X-axis is marked as the right line segment. The front, back, left, and right line segments form a rectangle. The lower left corner (x, y) of the rectangle is obtained. zx y zx ) and the top right corner point (x ys y ys ), Acquisition Point Mark it as the midpoint of the starting contour.
[0147] Step S3: Obtain data from the conveyor belt; calculate the time it takes for the midpoint of the initial contour to reach the center of the weighing area based on the conveyor belt data; obtain the weight of the goods weighed at that time point and mark it as the predicted weight; Step S3 includes the following sub-steps:
[0148] Step S301: Obtain the distance between the buffer start point and the weighing midpoint, and mark it as L;
[0149] Step S302: Obtain the speed of the conveyor belt and label it as V;
[0150] Step S303, calculate the time from the starting point of the cargo buffer to the midpoint of the weighing: T = L / V;
[0151] Step S304: Establish a second planar rectangular coordinate system with the lower left corner of the initial cargo image as the origin. The long side of the initial cargo image is parallel to the X-axis, and the wide side of the initial cargo image is parallel to the Y-axis. Place the initial cargo image in the first quadrant.
[0152] Step S305: Obtain the coordinates of the buffer start point;
[0153] Step S306: When the x-coordinate of the midpoint of the initial contour is equal to that of the buffer starting point, start timing. When time T is reached, obtain the weighed weight of the goods and mark it as the predicted weight.
[0154] Step S4: Obtain the cargo image and mark it as the final cargo image.
[0155] Step S5: Obtain the final contour of the final cargo image based on the cargo boundary contour acquisition method, and obtain the cargo weight measured when the final contour is within the entire weighing area, which is marked as the observed weight; Step S5 includes the following sub-steps:
[0156] Step S501: Obtain the cargo boundary contour map of the final cargo image based on the cargo boundary contour acquisition method, and mark it as the final contour map;
[0157] Step S502: Establish a third plane rectangular coordinate system with the lower left corner of the final cargo image as the origin. The long side of the final cargo image is parallel to the X-axis, and the wide side of the final cargo image is parallel to the Y-axis. Place the final cargo image in the first quadrant.
[0158] Step S503, set the coordinates of the final contour drawing in the third plane rectangular coordinate system as (m i n i ), get an m i The maximum coordinates are denoted as (m) max (n1), obtain an m i The minimum coordinates are denoted as (m) min ,n2);
[0159] Step S504, set the coordinates of the weighing area in the third plane rectangular coordinate system as (q i w i ), get a q i The coordinates of the maximum value are denoted as (q). max (w1), get an m i The minimum coordinates are denoted as (q). min ,w2);
[0160] Step S505, when m is satisfied simultaneouslymax max With m min >q min When the final image of the cargo is captured, the weight of the cargo displayed in the weighing area is marked as the observed weight.
[0161] Step S6: Calculate the average of the predicted weight and the observed weight, mark it as the final weight, and use the final weight as the weight of the goods; Step S6 includes the following sub-steps:
[0162] Step S601: Label the predicted weight as G1 and the observed weight as Gc. j ;
[0163] Step S602, delete Gc j The maximum and minimum values in the range are denoted as Gz. i ;
[0164] Step S603, calculate Gz i The mean, denoted as
[0165] Step S604, calculate Gz i The mean square error is:
[0166] Where MSE is Gz i The mean square error, j takes the following range: j is a positive integer and 1≤j≤u;
[0167] Step S605: Determine if the MSE is less than the error threshold. If it is less than the error threshold, calculate the final weight as follows:
[0168] Where Gzz is the final weight; the final weight is taken as the weight of the cargo;
[0169] Step S606: If the error exceeds the error threshold, issue a cargo weighing anomaly signal.
[0170] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0171] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
Claims
1. An intelligent logistics warehouse cargo weighing management system, characterized in that, include: The module includes a starting image acquisition module, a contour midpoint acquisition module, a predicted weight acquisition module, a final image acquisition module, an observed weight acquisition module, and a final weight acquisition module. The starting image acquisition module is used to acquire cargo images and mark them as starting cargo images; The contour midpoint acquisition module is used to acquire the initial contour map of the initial cargo image based on the cargo boundary contour acquisition method, and to acquire the midpoint of the initial contour map based on the initial contour map. The predicted weight acquisition module is used to acquire data from the conveyor belt, calculate the time it takes for the midpoint of the initial contour to reach the center of the weighing area based on the data from the conveyor belt, acquire the weight of the goods weighed at that time point, and mark it as the predicted weight. The final image acquisition module is used to acquire cargo images based on the weighing camera and mark them as final cargo images; The observation weight acquisition module is used to acquire the final contour map of the final cargo image based on the cargo boundary contour acquisition method, and to acquire the cargo weight when the entire final contour map is within the weighing area, which is marked as the observation weight. The final weight acquisition module is used to calculate the average of the predicted weight and the observed weight, which is marked as the final weight, and the final weight is used as the weight of the goods. The initial image acquisition module is configured with a camera installation strategy, which includes: The weighing conveyor belt includes a weighing area and a buffer area. The weighing area can transport goods and weigh them at the same time. The buffer area is used to transport goods to the weighing area and obtain the midpoint of the weighing area, which is marked as the weighing midpoint. Set a starting line segment at the entrance of the buffer area. The starting line segment is parallel to the width direction of the weighing conveyor belt and its length is equal to the width of the weighing conveyor belt. Obtain the midpoint of the starting line segment and mark it as the buffer start point. Cameras are installed directly above the buffer start point and the weighing midpoint, and are marked as the start camera and the weighing camera, respectively. The contour midpoint acquisition module is configured with a strategy for acquiring the starting contour map, and the strategy for acquiring the starting contour map includes: Acquire an image of the initial cargo based on the starting camera; The cargo boundary contour map of the starting cargo map is obtained using the cargo boundary contour acquisition method and marked as the starting contour map; The final weight acquisition module is configured with a final weight acquisition strategy, which includes: Let the predicted weight be denoted as G1and the observed weight be denoted as Gc j ; Delete the maximum and minimum in Gc j marked as Gz i ; the mean of Gz i , labeled ; The mean square error of Gz i is: ; where MSE is Gz i the mean square error of the jth element of the vector, j is a positive integer and 1≤j≤u; Determine if the MSE is less than the error threshold. If it is less than the error threshold, calculate the final weight: ; where Gzz is the final weight; The final weight will be used as the weight of the goods. If the error exceeds the error threshold, an abnormal cargo weighing signal will be issued. 2.The intelligent logistics warehouse cargo weighing management system of claim 1, wherein, Methods for obtaining cargo boundary contours include: Obtain the R, G, and B values from the RGB values of each pixel in the initial cargo image; The grayscale conversion formula converts RGB values to grayscale values. Qwh = β1*R + β2*G + β3*B; where Qwh is the gray value of a pixel in the initial cargo image, and β1, β2 and β3 are the weights of R, G and B, respectively. Divide the grayscale values of 0-255 into E equal intervals, and mark them as grayscale intervals; Count the frequency of gray values in each gray range and label it as the gray range frequency; Plot a histogram with grayscale values on the X-axis and the frequency of grayscale intervals on the Y-axis, and label it as a grayscale histogram; The total frequency is obtained by summing the frequencies of all grayscale intervals and denoted as F; The intervals with a grayscale frequency less than F / E are marked as low-frequency regions, and the intervals other than low-frequency regions are marked as high-frequency regions. It is determined whether there are high-frequency regions on both sides of the low-frequency region. If they exist, the low-frequency region is marked as the final region. Set the midpoint value of the x-coordinate of the final region as the background threshold; set the gray value of pixels greater than or equal to the background threshold to 255, and set the gray value of pixels less than the background threshold to 0, to obtain the binarized image of the goods. If a pixel with a grayscale value of 255 is adjacent to a pixel with a grayscale value of 0, the pixel with a grayscale value of 0 is marked as a pixel on the edge of the goods. Set the grayscale value of all pixels that are not at the boundary of the goods in the binarized image of the goods to 255, and mark them as the outline of the goods boundary.
3. The intelligent logistics warehouse cargo weighing management system according to claim 2, characterized in that, The contour midpoint acquisition module is configured with a strategy for acquiring the starting contour midpoint, the strategy for acquiring the starting contour midpoint includes: Establish a first plane rectangular coordinate system with the lower left corner of the initial contour drawing as the origin. The long side of the initial contour drawing is parallel to the X-axis, and the wide side of the initial contour drawing is parallel to the Y-axis. Place the initial contour drawing in the first quadrant. Let the coordinates of the edge pixel of the cargo be (xi, yi) in the first plane Cartesian coordinate system, and obtain an x i The coordinates of the maximum value are: (x max (y0), get an x i The minimum value is: (x min ,y1), get a y i The coordinates of the maximum value are: (x0, y0) max ), get y i The coordinates of the minimum value are: (x1, y1) min Then get (x) max Line segments that are parallel to the Y-axis and have a length of y0 are marked as the preceding line segments. The line segments that have passed through (x, y0) are obtained. min Line segments that are parallel to the Y-axis and pass through (x0, y1) are marked as the rear line segments. max The line segment that is parallel to the X-axis is marked as the left line segment, and the line segment passing through (x1, y1) is obtained. min The line segment parallel to the X-axis is marked as the right line segment. The front, back, left, and right line segments form a rectangle. The lower left corner (x, y) of the rectangle is obtained. zx y zx ) and the top right corner point (x ys y ys ), Acquisition Point Mark it as the midpoint of the starting contour.
4. The intelligent logistics warehouse cargo weighing management system according to claim 3, characterized in that, The predicted weight acquisition module is configured with a predicted weight acquisition strategy, which includes: Obtain the distance between the buffer start point and the weighing midpoint, and mark it as L; The speed of the conveyor belt is obtained and denoted as V; The time from the starting point of the material buffer to the midpoint of the weighing is calculated as: T = L / V; Establish a second planar rectangular coordinate system with the lower left corner of the initial cargo image as the origin. The long side of the initial cargo image is parallel to the X-axis, and the wide side of the initial cargo image is parallel to the Y-axis. Place the initial cargo image in the first quadrant. Get the coordinates of the buffer start point; When the x-coordinate of the midpoint of the initial contour is equal to that of the buffer starting point, timing begins. When time T is reached, the weighed weight of the goods is obtained and marked as the predicted weight.
5. The intelligent logistics warehouse cargo weighing management system according to claim 4, characterized in that, The observation weight acquisition module is configured with an observation weight acquisition strategy, which includes: The cargo boundary contour map of the final cargo image is obtained based on the cargo boundary contour acquisition method and marked as the final contour map; Establish a third plane rectangular coordinate system with the lower left corner of the final cargo image as the origin. The long side of the final cargo image is parallel to the X-axis, and the wide side of the final cargo image is parallel to the Y-axis. Place the final cargo image in the first quadrant. The coordinate point of the final profile map in the third plane rectangular coordinate system is set as (m i , n i ), a maximum value coordinate of m i is obtained and marked as (m max , n1), and a minimum value coordinate of m i is obtained and marked as (m min , n2); The coordinate point of the weighing area in the third plane rectangular coordinate system is (q i , w i ), a maximum value coordinate q i is obtained, which is marked as (q max , w1), and a minimum value coordinate m i is obtained, which is marked as (q min , w2); When m max <q max When m min >q min When m >q, the weight of the goods displayed by the weighing area when the final goods image is taken is obtained, and is marked as the observation weight.
6. A method for intelligent logistics warehouse cargo weighing management, applicable to the intelligent logistics warehouse cargo weighing management system described in any one of claims 1-5, characterized in that, The steps include: acquiring a cargo image and marking it as the starting cargo image; The cargo boundary contour of the initial cargo image is obtained based on the cargo boundary contour acquisition method, and the midpoint of the initial contour is obtained based on the cargo boundary contour. Acquire data from the conveyor belt, calculate the time it takes for the midpoint of the initial contour to reach the center of the weighing area based on the data from the conveyor belt, obtain the weight of the goods weighed at that time point, and mark it as the predicted weight; Acquire cargo images and label them as final cargo images; The final contour of the final cargo image is obtained based on the cargo boundary contour acquisition method. The weight of the cargo weighed when the final contour is in the entire weighing area is obtained and marked as the observed weight. Calculate the average of the predicted weight and the observed weight, mark it as the final weight, and use the final weight as the weight of the cargo.