Device for measuring the size of an object, method for measuring the size of an object, and program

The device measures irregularly shaped objects by generating a voxel assembly, deforming it to eliminate irregularities, and rotating to calculate accurate dimensions, addressing the inefficiencies of existing parcel size measurement systems.

JP2026101054APending Publication Date: 2026-06-22ATR ADVANCED TELECOMM RES INST INT

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
ATR ADVANCED TELECOMM RES INST INT
Filing Date
2024-12-10
Publication Date
2026-06-22

Smart Images

  • Figure 2026101054000001_ABST
    Figure 2026101054000001_ABST
Patent Text Reader

Abstract

To provide a device for measuring the size of an object that can measure the appropriate size of an irregularly shaped object. [Solution] The object size measuring device (10) is equipped with depth sensors (14V, 14H) that acquire a 3D image of the object to be measured. A preprocessing means (22, 40e) preprocesses the 3D image to remove noise and other imperfections to generate a preprocessed 3D image. This preprocessed 3D image is converted into a voxel assembly by a voxelization means (22, 40f). A deformation means (22, 40g) deforms the voxel assembly, for example, to eliminate irregularities in the voxel assembly, thereby generating a deformed voxel assembly. A rotation means (22, 40h) rotates the circumscribing rectangle of the projection image on at least one slice plane of the deformed voxel assembly to find the rotation angle at which the four sides of the circumscribing rectangle are shortest, and a calculation means (22, 40i) calculates the length, width, and height of the deformed voxel assembly at that rotation angle. [Effect] Allows for efficient measurement of the correct size of irregularly shaped objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a measurement object size measurement device, a measurement object size measurement method, and a program and more particularly, to a measurement object size measurement device, a measurement object size measurement method, and a program for measuring an appropriate size of a deformed measurement object such as a packaged load that is not in an amorphous box shape

Background Art

[0002] In recent years, the number of people who purchase products through mail-order sales rather than in stores has increased, and on the sales side, stores that only conduct mail-order sales without having physical stores have also increased. In addition, transactions between individuals such as auctions and flea markets have also increased. As a result, the number of parcels handled by courier services has doubled from 2.57 billion in 2000 to 5.06 billion in 2022. There has been a cry of a logistics crisis for a long time due to a shortage of truck drivers and problems with working hours with respect to the increasing volume of goods, and in order to improve the situation, further efficiency and labor saving of operations are required

[0003] One issue being considered for this operational efficiency is the problem of measuring the size of delivery parcels

[0004] Non-Patent Documents 1-4 propose systems for measuring the size of such delivery parcels

[0005] The systems of Non-Patent Documents 1 and Non-Patent Document 2 are systems for measuring the size of parcels flowing on a belt conveyor, and measure the size with lasers from three directions covering the upper part and both sides of the belt conveyor called a gate sensor, and measure the total size of three sides within which the parcel fits

[0006] The system of Non-Patent Document 3 is a system that enables measurement of the dimensions of three sides with one depth sensor installed on the upper part, rather than a gate type The system of Non-Patent Document 4 is a system that measures size using a portable type depth sensor

Prior Art Documents

[0007] [Non-Patent Document 1] https: / / lplanners.jp / products / spk3000 / [Non-Patent Document 2] https: / / www.teraokaseiko.com / jp / l / logistics / products / meter / smart-qbing / [Non-Patent Document 3] ttps: / / www.necplatforms.co.jp / product / size-meas-conveyor / index.html [Non-Patent Document 4] https: / / www.macnica.co.jp / business / semiconductor / articles / basic / 143259 / [Disclosure of the Invention] [Problems that the invention aims to solve]

[0008] However, the systems described in Non-Patent Documents 1-4 are all systems for measuring the size of standard-shaped boxes and cannot properly measure irregularly shaped items such as pre-packaged items that are not box-shaped. Generally, shipping costs for packages are determined by size and weight. Therefore, in order to ship more packages while keeping costs down, shippers often pack goods into boxes or bags to the maximum size allowed. When soft items such as clothing are packed in bags, the bags may deform, and this deformation can occur during handling or transportation to the size measuring device. As a result, some parts may be concave while others are convex, causing one of the length, width, or height dimensions to exceed the specified size, and the package may be treated as larger than it would have originally been, resulting in increased shipping costs—a problem unique to the size of irregularly shaped items.

[0009] Therefore, this disclosure provides a novel object size measuring device, object size measuring method, and program.

[0010] This disclosure provides a device for measuring the size of an object, a method for measuring the size of an object, and a program that can measure the appropriate size of an irregularly shaped object. [Means for solving the problem]

[0011] This disclosure adopts the following configuration to solve the above-mentioned problems. The reference numerals and supplementary explanations in parentheses indicate the correspondence with embodiments described later to aid in understanding the present invention, and do not limit the present invention in any way.

[0012] A first embodiment of the present disclosure is a device for measuring the external dimensions of an irregularly shaped object, comprising: a three-dimensional image acquisition means for acquiring a three-dimensional image of the object; a voxel assembly generation means for generating a voxel assembly based on the three-dimensional image; a deformation processing means for deforming the voxel assembly to eliminate irregularities in the voxel assembly and generating a deformed voxel assembly; a rotation means for rotating the circumscribing rectangle of the projection image on at least one slice surface of the deformed voxel assembly to determine the rotation angle at which the four sides of the circumscribing rectangle are shortest; and a calculation means for calculating the length, width, and height of the deformed voxel assembly at the rotation angle.

[0013] In the first embodiment, a device for measuring the external dimensions of an irregularly shaped object to be measured (10: a reference numeral used to illustrate a corresponding part in the embodiment, not intended to limit it; the same applies hereinafter) and a three-dimensional image acquisition means (22, 40c, 40d) acquire a three-dimensional image of the object to be measured (100) by, for example, scanning the object to be measured (100) with a depth sensor (14V, 14H) and converting the scan data into three-dimensional image data. A voxel aggregate generation means (22, 40f, S7, S31) generates a voxel aggregate (110) consisting of multiple voxels by, for example, making a predetermined number of bits of a three-dimensional image, which is a bitmap image, into one voxel. A deformation processing means (22, 40g, S9, S33-S37) deforms the voxel aggregate to eliminate the unevenness of the voxel aggregate and generates a deformed voxel aggregate (112). The rotation means (22, 40h, S11, S41-S57) rotates the circumscribing rectangle of the projection image on at least one slice plane of the deformed voxel assembly to find the rotation angle at which the four sides of the circumscribing rectangle are shortest, and the calculation means (22, 40i, S13) calculates the length, width, and height of the deformed voxel assembly at the rotation angle.

[0014] According to the first embodiment, since the measurement is performed after the unevenness of the voxel aggregate is eliminated by deforming the voxel aggregate, even irregularly shaped objects to be measured, such as packaged goods that are not irregularly shaped boxes, can have their external dimensions, i.e., their correct size, measured efficiently.

[0015] The second embodiment is a device for measuring the size of an object to be measured, which is dependent on the first embodiment, and the deformation processing means includes a distance parameter assigning means that assigns numerical values ​​of vertical and horizontal distance parameters to each voxel, with the central voxel of the two-dimensional contour of the voxel aggregate as the reference, and a moving means that moves the voxel with the largest distance parameter to the blank voxel area with the smallest distance parameter.

[0016] In the second embodiment, the deformation processing means (22, 40g, S9, S33-S37) assigns numerical values ​​for vertical and horizontal distance parameters to each voxel, using the central voxel of the two-dimensional contour of the voxel aggregate as a reference, and the movement means (22, 40g, S37) moves the voxel with the largest distance parameter to the empty voxel area with the smallest distance parameter to generate a deformed voxel aggregate without irregularities.

[0017] According to the second embodiment, by performing deformation processing on a voxel aggregate, deformation processing can be performed more efficiently compared to, for example, deformation processing on a bitmap image.

[0018] A third embodiment is a device for measuring the size of an object to be measured, which is dependent on the first or second embodiment, and further comprises preprocessing means for preprocessing a 3D image to remove noise and the like to generate a preprocessed 3D image, and a voxel aggregate generation means generates a voxel aggregate based on the preprocessed 3D image.

[0019] In the third embodiment, the 3D image is preprocessed by the preprocessing means (22, 40e, S5, S23-S29) to remove noise, "whiskers" (106), etc. from the 3D image and generate a preprocessed 3D image. Therefore, the voxel aggregate generation means performs the voxelization process described above based on the data of the preprocessed 3D image, which is free of whiskers and noise.

[0020] According to the third embodiment, by voxelizing a pre-processed 3D image, it is possible to voxelize an accurate 3D image that is free from the influence of extraneous elements (such as noise and whiskers 106) contained in the 3D image.

[0021] The fourth embodiment is a method for measuring the outer dimensions of a non-regular object to be measured. The method includes obtaining a three-dimensional image of the object to be measured, generating a voxel aggregate based on the three-dimensional image, forming the voxel aggregate to generate a deformed voxel aggregate, rotating the circumscribed rectangle of the projection image on at least one slice plane in the deformed voxel aggregate to obtain the rotation angle at which the four sides of the circumscribed rectangle are the shortest, and calculating the vertical, horizontal, and height of the deformed voxel aggregate at the rotation angle.

[0022] The fifth embodiment is a program for measuring the size of an object to be measured, which is executed by a computer of a device for measuring the size of an object to be measured for measuring the outer dimensions of a non-regular object to be measured. The program causes the computer to function as a three-dimensional image acquisition means for obtaining a three-dimensional image of the object to be measured, a voxel aggregate generation means for generating a voxel aggregate based on the three-dimensional image, a deformation processing means for forming the voxel aggregate to generate a deformed voxel aggregate, a rotation means for rotating the circumscribed rectangle of the projection image on at least one slice plane in the deformed voxel aggregate to obtain the rotation angle at which the four sides of the circumscribed rectangle are the shortest, and a calculation means for calculating the vertical, horizontal, and height of the deformed voxel aggregate at the rotation angle.

[0023] According to the fourth and fifth embodiments, the same effects as those of the first embodiment can be expected.

Advantages of the Invention

[0024] According to the present disclosure, the appropriate size of a non-regular object to be measured, such as a packed parcel that is not in an indefinite box shape, can be efficiently measured.

[0025] The above objects, other objects, features, and advantages of this invention will become more apparent from the following detailed description of the embodiments with reference to the drawings.

Brief Description of the Drawings

[0026] [Figure 1] FIG. 1 is a block diagram showing a device for measuring the size of an object to be measured according to an embodiment of the present disclosure. [Figure 2] Figure 2 is an illustrative diagram showing an example of the external shape of an object to be measured, as acquired by the depth sensor in the embodiment shown in Figure 1. [Figure 3] Figure 3 is another illustrative diagram showing the external shape of the object being measured, as acquired by the depth sensor in the embodiment shown in Figure 1. [Figure 4] Figure 4 is a block diagram showing an example of the computer in the embodiment shown in Figure 1. [Figure 5] Figure 5 is an illustrative diagram showing an example of a memory map of RAM in the computer's memory in the embodiment shown in Figure 4. [Figure 6] Figure 6 is a flowchart showing an example of the overall operation of the embodiment shown in Figure 1. [Figure 7] Figure 7 is a flowchart that shows in detail some of the steps (S5, S7, and S9) in the embodiment shown in Figure 6. [Figure 8] Figure 8 is an illustrative diagram showing an example of the three-dimensional shape of the object to be measured in the embodiment shown in Figure 6. [Figure 9] Figure 9 is an illustrative diagram showing an example of the pretreatment in the embodiment shown in Figure 6. Figure 9(A) shows an example of the original shape, and Figure 9(B) shows an example of the shape after pretreatment. [Figure 10] Figure 10 is an illustrative diagram showing an example of the voxelization process in the embodiment shown in Figure 6. Figure 10(A) shows an example of the three-dimensional shape of the object to be measured, and Figure 10(B) shows an example of a voxel aggregate after voxelization. [Figure 11] Figure 11 is an illustrative diagram showing an example of a matrix used for deformation processing in the embodiment shown in Figure 6. [Figure 12] Figure 12 is an illustrative diagram showing an example of the deformation process in the embodiment shown in Figure 6. Figure 12(A) shows an example of the original three-dimensional shape of the object being measured, Figure 12(B) shows the distance from the center of the voxel aggregate, Figure 12(C) illustrates the voxels before deformation along the original three-dimensional shape of the object being measured, and Figure 12(D) shows the voxels after the deformation process. [Figure 13] Figure 13 is a three-dimensional diagram illustrating an example of the deformation process in the embodiment shown in Figure 6. Figure 13(A) shows an example of the original voxel assembly, and Figure 13(B) shows the voxel assembly after the deformation process. [Figure 14] Figure 14 is a two-dimensional diagram illustrating an example of the rotation process in the embodiment shown in Figure 6. Figure 14(A) illustrates the principle of the rotation process, and Figure 14(B) schematically illustrates a specific example of the rotation process. [Figure 15] Figure 15 is a flowchart showing an example of the rotation process in the embodiment shown in Figure 6. [Best Mode for Carrying Out the Invention]

[0027] Referring to Figure 1, an object size measuring device 10 (hereinafter sometimes simply referred to as "measuring device") according to one embodiment of the present disclosure includes depth sensors 12V and 12H that illuminate the object 100 placed on the mounting table 12. In this embodiment, the object 100 is intended to be an irregularly shaped object such as a packaged package that is not an irregularly shaped box.

[0028] The 12V and 12H depth sensors, also known as 3D sensors, are sensors that can capture the shape of an object in three dimensions.

[0029] Depth sensor 12V is provided to measure the object 100 from the vertical direction, and depth sensor 12H is provided to measure the object 100 from the horizontal direction. Therefore, as schematically shown in Figure 2, data on the overall shape of the object 100 can be collected without any blind spots.

[0030] However, with respect to the depth sensor 14, only one depth sensor may be used. In this case, for example, if only depth sensor 14V is used, a blind spot 104 will occur as shown in Figure 3, but this will not be a problem for the object size measuring device 10 of the embodiment.

[0031] In this way, the shape data acquired by depth sensors 14V and 14H is provided to computer 16. Computer 16 is equipped with a display 18 and a printer 20.

[0032] As shown in Figure 4, the computer 16 includes a CPU 22, to which a memory 26 and a communication unit 28 are connected via a bus 24. The memory 26 includes RAM and ROM, and the RAM has a program storage area and a data storage area as described later. The CPU 22 executes a program (described later) that is pre-set in the RAM to calculate the external dimensions (size) of the object to be measured 100.

[0033] The communication unit 28 is used to transmit the calculation results (length, width, and height dimensions) from the CPU 22 to an external network (not shown), and for the CPU 22 to receive information or data from an external source via the network. However, the network may be a wired network or a wireless network.

[0034] Measurement data from depth sensors 14V and 14H are acquired into memory 26 via sensor interface (I / F) 30 and stored (accumulated) as needed.

[0035] The display 18 is connected to the bus 24 via the display I / F 32, and the printer 20 is connected to the bus 24 via the printer I / F 33.

[0036] Figure 5 illustrates the memory map of RAM 34 in memory 26, where RAM 34 includes a program storage area 36 and a data storage area 38.

[0037] The program storage area 36 is pre-configured with basic control programs for the computer 16 (not shown, such as OS), an image display program 40a, an operation detection program 40b, and other programs for measuring the size of the object to be measured 100 in this embodiment, including a scan program 40c, a data conversion program 40d, a pre-processing program 40e, a voxelization program 40f, a deformation program 40g, a rotation program 40h, and a calculation program 40i.

[0038] The image display program 40a is a program that displays an image on the display 18.

[0039] The operation detection program 40b is a program that detects operations performed on the input device (such as a keyboard) of the computer 16.

[0040] The scan program 40c is a program for controlling depth sensors 14V and 14H to acquire data of an external image of the object to be measured 100. If depth sensors 14V and 14H are movable, the scan program 40c moves depth sensor 14V around a horizontal axis (not shown) to capture the entire vertical circumference of the object to be measured 100. However, in this case, it is desirable that the mounting portion of the mounting table 12 is made of a transparent material. On the other hand, the depth sensor 14H is moved around a vertical axis (not shown) to capture the entire horizontal circumference of the object to be measured 100.

[0041] Furthermore, the depth sensors 14V and / or 14H do not need to be movable, and as mentioned above, it is also possible to use only one depth sensor.

[0042] In scan program 40c, data obtained from depth sensors 14V and 14H is further calibrated using the position and angle of each sensor (or characteristics such as the shape and size of the measured object) to construct three-dimensional shape data of the object to be measured 100.

[0043] Furthermore, using only one depth sensor, the blind spot 104 shown in Figure 3 is treated as if a part of the object being measured 100 is present.

[0044] Furthermore, if the depth sensors 14V and / or 14H are movable, measurements can be taken continuously, and the measurement status can be displayed on the display 18 in real time. In this case, the scan program 40c can also display the blind spot range and reduce the blind spot by changing the measurement position and angle.

[0045] The data conversion program 40d is a program for constructing 3D contour data of the object to be measured 100 based on the measurement data (scan data) obtained in this way. Specifically, it converts the data into 3D data based on the distance from the depth sensor to each point (of the object to be measured 100).

[0046] The preprocessing program 40e is a program for preprocessing the 3D contour data of the object to be measured 100. Typical preprocessing tasks include removing noise and further removing "whiskers" and other unwanted features.

[0047] The voxelization program 40f is a program that reproduces the 3D contour data of the pre-processed object 100 as a collection of voxels (boxes with pre-defined side sizes).

[0048] The deformation program 40g is a program that moves specific voxels in the voxel aggregate generated by the voxelization program 40f to deform the voxel aggregate, eliminate irregularities, and flatten it into a plate.

[0049] Rotation program 40h is a program that rotates a voxel assembly flattened by deformation program 40g in each direction sequentially to find the angle at which the lengths of the four sides of the circumscribed rectangle are shortest.

[0050] The calculation program 40i is a program for calculating the length, width, and height dimensions of the object to be measured 100 based on the lengths of the four sides of the shortest circumscribed rectangle.

[0051] In the memory map shown in Figure 5, the data storage area 38 is pre-configured with image generation data storage area 42a, operation data storage area 42b, temporary storage area 42c, deformable flag 42d, and the like.

[0052] The image generation data storage area 42a stores image generation data, including polygon data and texture data that are pre-configured for generating data for various screens to be displayed on the display 18.

[0053] The operation data storage area 42b stores data input from the computer 16's input device (not shown) in chronological order.

[0054] The temporary storage area 42c is used as the working area of ​​the computer 16 and temporarily stores all the data necessary for processing by the CPU 22, including scan data of the object to be measured 100 captured by the depth sensors 14V and 14H (for example, the depth sensor), 3D image data created based on that scan data, deformed 3D image data processed by the deformation program 40g, the number of deformable objects, the length of the circumscribing rectangle in each direction during rotation processing by the rotation program 40h, and the length, width, and height data of the object to be measured 100 calculated based on that.

[0055] However, the number of deformable steps is the number of deformation processes allowed for a single voxel assembly 110 (Figure 10(B)), such as 10 times, and is determined by the contents of the object being measured 100, such as clothing or liquid.

[0056] The deformable flag 42d is a flag that sets whether the object being measured can be deformed by the deformation program 40g. It can be set, for example, by the user, or as a result of reading a barcode (not shown) attached to the object being measured 100. If the object being measured is deformable, this deformable flag 42d is set to "1".

[0057] Objects that cannot be deformed are typically rectangular or cube-shaped objects that are packaged in a way that allows for measurement of their length, width, and height while maintaining their original shape. On the other hand, deformable objects are irregularly shaped objects that are packaged in a way that prevents measurement of their length, width, and height in their original three-dimensional form. Examples include packaged liquids or clothing. Therefore, the deformable flag 42d can also be considered a deformation-required flag, indicating whether the object 100 is an irregularly shaped object that requires deformation processing.

[0058] The operation of the object size measuring device 10 in this embodiment will be explained below, focusing on the flowcharts in Figures 6, 7, and 15.

[0059] In the first step S1 of Figure 6, according to the scan program 40c, the CPU 22 controls the depth sensors 14V and 14H through the sensor I / F 30 to scan the object to be measured 100 placed on the mounting table 12. The scan data from these depth sensors 14V and 14H is stored in the temporary storage area 42c of the RAM 34.

[0060] In the following step S3, the CPU 22 generates the external shape (contour) of the object to be measured 100 as 3D image data according to the data conversion program 40d. An example of this 3D image is shown in Figure 8.

[0061] The three-dimensional image in Figure 8 is defined by a contour 102, and in this example, whiskers 106 are formed as projections at the upper end.

[0062] In the preprocessing step in step S5, according to the preprocessing program 40e, the 3D image shown in Figure 8 is processed to remove, for example, noise components or unwanted parts such as the whiskers 106 mentioned above. Specifically, the preprocessing is performed in steps S23-S29 shown in Figure 7.

[0063] In step S7, the preprocessed 3D image is reconstructed as a collection of boxes with pre-set side sizes (e.g., 5 mm) according to the measurement accuracy, following the voxelization program 40f. Each of these boxes is defined as a voxel (Figure 10). The voxelization process is performed in step S31 of Figure 7.

[0064] In step S9, if deformation is pre-set, the deformation program 40g flattens the voxel assembly by moving voxels from the point furthest from the 3D center of the voxel assembly to the concave part closest to the 3D center, within a range calculated from the pre-set deformation tolerance ratio (or within that range). However, instead of moving voxels from the convex parts to the concave parts of the voxel assembly, the same result as moving the convex parts is achieved by continuously moving voxels adjacent to the concave parts (Figure 11). Steps S33-S37 in Figure 7 correspond to the deformation process.

[0065] In step S11, the rotation program 40h sets a bounding rectangle around the flattened voxel assembly and rotates it to minimize the lengths of the four sides of the bounding rectangle. Specifically, the process is carried out according to the flowchart in Figure 15.

[0066] Finally, in step S13, the calculation program 40i calculates the length, width, and height when the lengths of the four sides are minimized by the rotation process.

[0067] One aspect of this embodiment is not simply measuring the size of a package that is not a standard box shape. That is, soft and deformable items such as clothing may become misshapen during transport, resulting in an oversized measurement of length, width, and height. While it is possible to measure the correct size by pressing the edges or straightening the edges, simply measuring the dimensions and shape of a package in its deformed state will not yield an accurate size. In such cases, the core of the embodiment described in detail below is to use an algorithm to "straighten" the shape of the object being measured so that the correct size can be measured.

[0068] The flowchart shown in Figure 7 is executed after steps S1 and S3 in Figure 6. In other words, the process in Figure 7 starts after the CPU 22 obtains 3D image data of the object to be measured 100. This 3D image data is stored in the temporary storage area 42c (Figure 5).

[0069] In the first step S21 of Figure 7, the CPU 22 refers to the deformable flag 42d to determine whether the object being measured 100 is deformable. As mentioned above, if the deformable flag 42d is "1", the CPU determines "YES" in step S21, and if it is "0", the CPU determines "NO" and returns to Figure 6. If the deformable flag 42d is "0", it means that the object being measured 100 does not need to be deformed, and in this case, the size is measured using a different procedure in order to process it as an object that does not need to be deformed.

[0070] Furthermore, if the deformable flag 42d is "1", it means that the object to be measured requires deformation processing, and the processing from step S23 onwards will be executed.

[0071] In steps S23-S29, preprocessing is performed on the 3D image data according to the preprocessing program 40e.

[0072] First, in step S23, a projected image is created based on the 3D image data shown in Figure 8, as shown in Figure 9(A), and this projected image is then binarized. The projected image in Figure 9(A) is obtained by projecting the 3D image from Figure 8 in the vertical direction and then binarizing it.

[0073] Common methods for removing noise during image preprocessing include closing and opening. Closing involves performing multiple dilation operations on a binary image, followed by the same number of condensation operations, which effectively removes black noise and black lines. Opening, on the other hand, involves performing multiple condensation operations on a binary image, followed by the same number of dilation operations, which effectively removes white noise and white lines.

[0074] In the subsequent step S25, the CPU 22 removes all but the largest area of ​​the binary image that underwent noise reduction processing in step S23, leaving one object to be processed. In other words, it identifies that the binary image with the largest area is that of the object being measured 100.

[0075] In the next step, S27, a mask image is created. The method for creating a mask is well known, but for example, parts of the object 100 whose cross-sectional area or volume of protruding parts is below a certain level are excluded from the contour data. This removes the "whiskers" 106 shown in Figures 8 and 9(A), and a binary image without protrusions is obtained, as shown in Figure 9(B). This is used as the mask. Then, the 3D image data and the mask image data are subjected to an AND (logical conjunction) operation.

[0076] In the next step S29, the CPU 22 determines whether the processing described in steps S23-S27 has been completed on the two projection planes (the projection plane from above and the projection plane from the side). If the answer in step S29 is "NO", the process returns to step S23; if "YES", the process proceeds to the next step S31.

[0077] However, the processing in steps S23-S27 may be performed for only one projection plane (for example, a projection plane from above), or it may be performed for three projection planes (a projection plane from above and two projection planes from the side).

[0078] When performing the process on three projection planes, the same process is applied to the vertical projection plane from above (plane) and the two horizontal projection planes (sides). Mask data is then created from the processing results and performed an AND (logical AND) operation with the 3D image data.

[0079] In this way, the preprocessing means performs preprocessing to remove noise and the like in steps S23-S29 to generate a preprocessed 3D image.

[0080] In step S31, the 3D image shown in Figure 10(A), from which the whiskers 106 (Figure 8) have been removed as a result of the above-described preprocessing, is voxed according to the voxelization program 40f to generate the voxel set 110 shown in Figure 10(B). Various voxelization methods have been proposed, but in this embodiment, a method is used in which the preprocessed 3D image is converted into a bitmap image, and a predetermined number of bits constituting that bitmap image are grouped together as one voxel. In this case, the number of bits constituting each voxel must be the same. Therefore, in order to accurately voxelize the 3D image, the size of the voxel (length of the four sides), that is, the number of bits constituting one voxel, is determined by a calculation based on the shape of the object to be measured 100.

[0081] In this way, by voxelizing a pre-processed 3D image, it is possible to create an accurate 3D image that is free from the influence of extraneous elements (such as noise and whiskers 106) contained in the 3D image.

[0082] Furthermore, while deformation processing is extremely difficult with 3D images, when a 3D image is converted into a voxel collection, as in this embodiment, deformation can be performed by moving the voxels individually, thus facilitating the deformation processing described below.

[0083] However, methods other than those described above may be used for voxelization.

[0084] In the subsequent steps S33-S37, the CPU 22 executes the deformation process shown in step S9 of Figure 6 according to the deformation program 40g.

[0085] First, in step S33, the distance from the center (minimum within the voxel) is set as a parameter for the voxel collection 110. As shown in Figure 11, instead of the distance from the center, the larger of the vertical and horizontal distances from the center is used as the weight. Therefore, voxels with the same number become rectangles. This is because if we simply use the distance from the center, it will converge to a circle, and the vertical and horizontal sizes may actually become larger.

[0086] Subsequently, in step S35, it is determined whether the number of possible transformations has been exceeded, for example, by setting the temporary storage 42c of the data storage area 38. Initially, "NO" is determined in step S35, and the process proceeds to the following step S37, where the specific transformation process begins.

[0087] The reason for setting the number of possible deformations is that some irregularly shaped packages (objects being measured) cannot be deformed, and in such cases, they are treated as undeformable. However, while soft packages like clothing can be significantly reshaped (deformed), somewhat hard packages cannot be significantly reshaped, so the number of possible deformations is controlled accordingly.

[0088] In step S37, as shown in Figure 12, this parameter is applied to each voxel representing the shape of the actual object to be measured 100. Figure 12(A) shows the two-dimensional contour of the voxel collection 110, and as shown in Figure 12(B), the center of this voxel collection 110 is set to "0", and the parameters shown in Figure 11 are sequentially assigned as numerical values ​​for the vertical and horizontal distances from the center voxel. Then, as shown in Figures 12(C) and 12(D), the voxel with the largest distance parameter (the voxel with the value "5" in Figure 12(C)) is moved to the smallest blank voxel area (the blank voxel with the value "2" in Figure 12(C)). Similarly in Figure 12(D), the voxel with the largest distance parameter is moved to the smallest blank voxel area.

[0089] This transformation process is repeated until the number of transformations set in the temporary storage area 42c is reached.

[0090] As a result, as shown in Figure 10(B), or more specifically Figure 13(A), the uneven voxel aggregate 110 is flattened, becoming a deformed voxel aggregate 112 that is a rectangular parallelepiped overall. However, the shape of the deformed voxel aggregate 112 as a result of the deformation process is not limited to a rectangular parallelepiped; it may also be a cube. In either case, the edges indicating the length, width, and height become clearly defined.

[0091] After determining "YES" in step S35, the process returns to step S11 in Figure 6.

[0092] Then, according to the rotation program 40h, the rotation process shown in step S11 of Figure 6 is executed.

[0093] Referring to Figure 14, this rotation process will be briefly explained before the detailed flowchart shown in Figure 15 is described.

[0094] As shown in Figure 13(B), a bounding rectangle 114 is determined for the projection plane of the deformed voxel aggregate 112, with the top left corner at (x1, y1) and the bottom right corner at (x2, y2) when the horizontal plane of the 3D data is viewed from the upper vertical direction. Then, the projection plane is rotated around the center point 116, which is the midpoint of the vertical and horizontal lengths of the bounding rectangle 114, to find the lengths of the four sides of the bounding rectangle 114 that are shortest and the rotation angle. The optimal solution for the rotation angle is estimated from the shape of the object, or it is determined by rotating 180 degrees in predetermined increments to find the rotation angle that results in the shortest lengths of the four sides of the bounding rectangle 114.

[0095] Next, the data obtained from the shortest horizontal rotation is rotated similarly on the projection plane when viewed from the side to find the angle at which the lengths of the four sides of the circumscribed rectangle 114 are shortest.

[0096] Next, we rotate the projection plane, sliced ​​at a 45-degree angle, diagonally to find the angle at which the lengths of the four sides of the circumscribed rectangle 114 are minimized.

[0097] Similarly, the same process is repeated by slicing and rotating the image at an angle 90 degrees from the angle of projection and rotation. As a result, as shown in the rightmost figure of Figure 14(B), the rotation angle that minimizes the total length of the circumscribed rectangle 114 can finally be determined.

[0098] Referring to Figure 15, in the first step S41, the first slice plane is set to a horizontal plane, which is the view of the deformed voxel assembly 112 (Figure 13(B)) from vertically above. Then, in step S43, projection data on that slice plane is created from the 3D data of the deformed voxel assembly 112. Although not specifically explained each time in the following description, projection data and the like are stored in the temporary storage area 42c at the necessary timings for processing by the CPU 22.

[0099] In the next step S45, the CPU 22 determines the circumscribed rectangle 114 on the projection plane as shown in Figure 14, and sets its center as the center 116 for subsequent rotations. The coordinates of the circumscribed rectangle 114 and the coordinates of the rotation center 116 are also stored in the temporary storage area 42c.

[0100] In the next step, S47, the CPU 22 finds the bounding rectangle of the projection plane after rotation, calculates the vertical and horizontal dimensions, and records the minimum values ​​and rotation angle in the temporary storage area 42c if necessary. However, the vertical and horizontal dimensions in this case may be estimated using the number of voxels or may be the actual dimensions.

[0101] In step S49, a predetermined angle, such as 45 degrees, is added to the initial rotation in step S47. If the rotation angle after this addition reaches 180 degrees, "YES" is determined in step S51. However, if the rotation angle after this addition does not reach 180 degrees, "NO" is determined in step S51, and the process returns to step S47. After the rotation, the circumscribing rectangle of the projection plane is determined, the vertical and horizontal sizes are calculated, and if the minimum value is found, that value and the rotation angle are recorded in the temporary storage area 42c.

[0102] In other words, in step S47, the projection plane is rotated in 45-degree increments on the initially set projection plane until the rotation angle reaches 180 degrees. After rotation, the bounding rectangle of the projection plane is determined, and the vertical and horizontal sizes are calculated. If the minimum value is found, that value and the rotation angle are recorded in the temporary storage area 42c.

[0103] Then, after making a "YES" decision in step S51, the CPU 22 rotates the deformed voxel assembly 112, as shown in Figure 13(B), in step S53 so that the rotation angle is such that the vertical and horizontal sizes are minimized in the processing of step S47.

[0104] Subsequently, in step S55, the CPU 22 determines whether the number of rotation directions has reached a predetermined value, for example, set in the temporary storage area 42c. If the determination is "NO", it sets a different slice plane in step S57 and returns to step S45.

[0105] On the other hand, if “YES” is determined in step S55, that is, if the rotation process has been performed on the planned number of slice planes, the process returns to step S13 in Figure 6.

[0106] However, in the rotation process, the order in which the slice planes are set does not matter, and the process can involve rotation in only one direction or only two or three directions.

[0107] Subsequently, in step S13 of Figure 6, the lengths of X, Y, and Z at the angle in which the lengths of the four sides of the circumscribing rectangle on the slice surface of the deformed voxel assembly 112 are shortest are taken as the lengths of the three sides of the package: length, width, and height. This measurement result can be displayed on, for example, the display 18 (Figure 1), printed to the printer 20, or transmitted to another computer via the communication unit 28.

[0108] In the above embodiment, a depth sensor was used to obtain a 3D image of the object to be measured 100, but other methods may also be used, such as generating a 3D image in bitmap format from a camera image.

[0109] The specific numerical values ​​and other details mentioned in the above-mentioned examples are merely examples and do not imply any limitations; it goes without saying that they can be appropriately modified according to the specifications of the actual product. [Explanation of Symbols]

[0110] 10 ... Device for measuring the size of the object to be measured 14V, 14H… Depth sensor 16… Computer 18…Display 22 ...CPU 26…memory 28 ... Communications Department 36 ... Program memory area 38 ...Data storage area 100 ... object to be measured 110 ... Voxel aggregate 112 ...Deformed voxel aggregate 114 …circumscribed rectangle 116 ... Center of rotation

Claims

1. A device for measuring the external dimensions of an irregularly shaped object, A three-dimensional image acquisition means for acquiring a three-dimensional image of the object to be measured, Voxel aggregate generation means for generating a voxel aggregate based on the aforementioned three-dimensional image, Deformation processing means for generating a deformed voxel aggregate by deforming the voxel aggregate so as to eliminate the irregularities of the voxel aggregate, A rotation means for rotating the circumscribing rectangle of the projection image on at least one slice plane of the deformed voxel assembly to determine the rotation angle at which the four sides of the circumscribing rectangle are shortest, and A device for measuring the size of an object to be measured, comprising a calculation means for calculating the length, width, and height of the deformed voxel assembly at the aforementioned rotation angle.

2. The object size measuring device according to claim 1, wherein the deformation processing means includes distance parameter assigning means for assigning numerical values ​​of vertical and horizontal distance parameters to each voxel, based on the central voxel of the two-dimensional contour of the voxel aggregate, and moving means for moving the voxel with the largest distance parameter to the blank voxel area with the smallest distance parameter.

3. The system further comprises preprocessing means for preprocessing the aforementioned three-dimensional image to remove noise and other elements, thereby generating a preprocessed three-dimensional image. The object size measuring device according to claim 1 or 2, wherein the voxel aggregate generation means generates the voxel aggregate based on the pre-processed three-dimensional image.

4. A method for measuring the external dimensions of an irregularly shaped object, A three-dimensional image of the object to be measured is acquired, A voxel collection is generated based on the aforementioned three-dimensional image, The voxel aggregate is deformed to eliminate the irregularities of the voxel aggregate, thereby generating a deformed voxel aggregate. The rotation angle is determined by rotating the circumscribing rectangle of the projection image on at least one slice plane of the deformed voxel assembly so that the four sides of the circumscribing rectangle are as short as possible, and A method for measuring the size of an object, comprising calculating the length, width, and height of the deformed voxel assembly at the aforementioned rotation angle.

5. A program for measuring the size of an object to be measured, which is executed by the computer of an object size measuring device for measuring the external dimensions of an irregularly shaped object to be measured, wherein the computer is: A three-dimensional image acquisition means for acquiring a three-dimensional image of the object to be measured, Voxel aggregate generation means for generating a voxel aggregate based on the aforementioned three-dimensional image, Deformation processing means for generating a deformed voxel aggregate by deforming the voxel aggregate so as to eliminate the irregularities of the voxel aggregate, A rotation means for rotating the circumscribing rectangle of the projection image on at least one slice plane of the deformed voxel assembly to determine the rotation angle at which the four sides of the circumscribing rectangle are shortest, and Calculation means for calculating the length, width, and height of the deformed voxel assembly at the aforementioned rotation angle. A program for measuring the size of an object to be measured, which functions as such.