Cigarette case shape regularity determination method, device, equipment and medium
By obtaining the height data and cross-sectional data of the cigarette box and determining the squareness and inclination evaluation attributes, the problems of low accuracy in detection of geometric shape regularity of cigarette box in the prior art are solved, and more efficient detection results are achieved.
Patent Information
- Application Number
- CN202510098544.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art has problems of low accuracy and incomplete dimensions in the detection of cigarette box geometric shape regularity, and the detection efficiency is low.
By acquiring the height data, the first cross-section and the second cross-section data of the cigarette box, the squareness evaluation attribute and the inclination evaluation attribute are determined based on these data, and the geometric shape regularity of the cigarette box is then comprehensively evaluated.
It improves the dimension comprehensiveness and accuracy of the regularity evaluation of cigarette boxes, improves the detection efficiency, and reduces the cumbersomeness of human operations.
Smart Images

Figure CN120101729A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of cigarette box shape detection, and in particular to a method, device, equipment and medium for determining the regularity of a cigarette box shape. Background Art
[0002] The current quality standards for cigarette products are mainly based on the basic product requirements that cigarette products should meet to enter the "market threshold" during design, production and circulation. With the development of the cigarette industry and the upgrading and changes in consumer demand, it is particularly important to strengthen the control of consumer experience indicators. The geometric regularity of cigarette boxes (referred to as cigarette boxes) is an important external characteristic indicator of consumer visual perception.
[0003] At present, the regularity detection of the geometric shape of cigarette boxes is mainly based on the image method. This method mainly uses an image capture device to collect images of the front view, side view, and top view of the cigarette box, combines image processing and analysis, calculates the squareness of the cigarette box, and measures the geometric regularity of the cigarette box through the squareness.
[0004] However, the above method has the following problems: First, in order to ensure that the tested cigarette box can be photographed from an undistorted angle, it is necessary to adjust the position and angle of the image capture device when using the image, but for different tested cigarette boxes, it is impossible to ensure that the position and posture of the image capture device remain completely consistent each time, which makes the geometric regularity between different tested cigarette boxes have large differences, resulting in low accuracy of shape regularity. Second, after the image is collected, it is necessary to use a variety of image processing tools to manually perform a series of image processing operations to finally obtain the squareness of the cigarette box. This process is not only cumbersome to operate, but also takes a lot of time. Third, the geometric regularity of the cigarette box cannot be effectively and comprehensively evaluated only by the squareness of the cigarette box. Based on this, there are technical problems such as incomplete evaluation dimensions, low accuracy and low determination efficiency of the geometric regularity of the cigarette box. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, equipment and medium for determining the shape regularity of a cigarette box, so as to comprehensively evaluate the geometric shape regularity of a cigarette box through squareness evaluation attributes and inclination evaluation attributes, thereby improving the comprehensiveness of the evaluation dimensions of the geometric shape regularity of a cigarette box and enhancing the accuracy and determination efficiency of the geometric shape regularity of a cigarette box.
[0006] In a first aspect, an embodiment of the present invention provides a method for determining the shape regularity of a cigarette box, the method comprising:
[0007] Acquire height data of the cigarette box to be detected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area;
[0008] Determining a squareness evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data and the second cross-sectional data;
[0009] Determining a tilt evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data, the second cross-sectional data and the height data;
[0010] Based on the squareness evaluation attribute and the inclination evaluation attribute, the geometric regularity of the cigarette box to be inspected is determined.
[0011] In a second aspect, an embodiment of the present invention further provides a device for determining the shape regularity of a cigarette box, the device comprising:
[0012] A data acquisition module, used to acquire height data of the cigarette box to be detected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area;
[0013] A squareness evaluation module, used to determine a squareness evaluation attribute of the cigarette box to be tested based on the first cross-sectional data and the second cross-sectional data;
[0014] An inclination evaluation module, used to determine an inclination evaluation attribute of the cigarette box to be tested based on the first cross-sectional data, the second cross-sectional data, and the height data;
[0015] The shape regularity determination module is used to determine the geometric shape regularity of the cigarette box to be tested based on the squareness evaluation attribute and the inclination evaluation attribute.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the shape regularity of a cigarette box as described in any one of the embodiments of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the method for determining the shape regularity of a cigarette box as described in any one of the embodiments of the present invention.
[0021] The technical solution of the embodiment of the present invention obtains the height data of the cigarette box to be detected, the first cross-sectional data corresponding to the first cross-sectional data, and the second cross-sectional data corresponding to the second cross-sectional data, and then determines the squareness evaluation attribute of the cigarette box to be detected based on the first cross-sectional data and the second cross-sectional data, and determines the inclination evaluation attribute of the cigarette box to be detected based on the first cross-sectional data, the second cross-sectional data, and the height data, thereby determining the geometric regularity of the cigarette box to be detected based on the squareness evaluation attribute and the inclination evaluation attribute. The technical solution provided by this embodiment does not require cumbersome manual operations, that is, it can automatically perform squareness evaluation and inclination evaluation processing according to the geometric measurement data of the cigarette box to be detected, and comprehensively evaluates the geometric regularity of the cigarette box through the squareness evaluation attribute and the inclination evaluation attribute, thereby improving the comprehensiveness of the evaluation dimension of the geometric regularity of the cigarette box, and improving the accuracy and determination efficiency of the geometric regularity of the cigarette box. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A schematic diagram of a flow chart of a method for determining the shape regularity of a cigarette box provided in an embodiment of the present invention;
[0024] Figure 2 Schematic diagram of a cigarette box to be tested according to an embodiment of the present invention;
[0025] Figure 3 It is a structural schematic diagram of a tobacco digital projector involved in an embodiment of the present invention;
[0026] Figure 4 It is a schematic diagram of a cigarette box to be inspected according to an embodiment of the present invention being placed on a mobile platform in a first placement posture;
[0027] Figure 5 It is a schematic diagram of a cigarette box to be inspected according to an embodiment of the present invention being placed on a mobile platform in a second placement posture;
[0028] Figure 6 It is a schematic diagram of a cigarette box to be inspected according to an embodiment of the present invention being placed on a mobile platform in a third placement posture;
[0029] Figure 7 A schematic flow chart of another method for determining the shape regularity of a cigarette box provided by an embodiment of the present invention;
[0030] Figure 8It is a schematic diagram of the principle of a first preset slope function involved in an embodiment of the present invention;
[0031] Fig. 9 A schematic diagram of the structure of a device for determining the shape regularity of a cigarette box provided by an embodiment of the present invention;
[0032] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0034] Before introducing the technical solution, the application scenario of the embodiment of the present invention can be described first. The technical solution provided by the embodiment of the present invention can be applied in any scenario where the geometric regularity of a cigarette box needs to be evaluated.
[0035] With the development of the cigarette industry and the upgrading of consumer demand, the industry has attached more and more importance to the quality management of cigarette consumption experience. Experience quality is a comprehensive evaluation of the product's use function, performance, and user experience during use, based on the consumer's perspective, and the value-added part of the experience. Consumer experience refers to the consumer's specific feelings about cigarette products, including three aspects: sensory feelings, physical feelings, and emotional feelings. By evaluating and testing the geometric shape regularity of cigarette boxes, the cigarette boxes can be effectively adjusted in a standardized manner, thereby improving the consumer's experience quality. The technical solution provided by the embodiment of the present invention aims to propose a method for efficiently and accurately determining the geometric shape regularity of cigarette boxes, in order to further improve the standardization of the squareness detection of cigarette strip boxes and small boxes, ensure the consistency and accuracy of the cigarette box shape regularity detection results, and provide a technical basis for the continuous improvement of consumer experience quality.
[0036] Embodiment 1
[0037] Figure 1 A flow chart of a method for determining the shape regularity of a cigarette box provided in an embodiment of the present invention is provided. This embodiment is applicable to any situation where a cigarette box needs to be evaluated for its geometric regularity. The method can be performed by a device for determining the shape regularity of a cigarette box. The device can be implemented in the form of software and / or hardware. The hardware can be an electronic device, such as a mobile terminal, a PC, or a server.
[0038] like Figure 1 As shown, the method for determining the shape regularity of a cigarette box includes:
[0039] S110, obtaining height data of the cigarette box to be inspected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area.
[0040] The cigarette box to be tested is a cigarette box on which geometric regularity evaluation is to be performed. Optionally, the cigarette box to be tested can be a cigarette box for carrying at least one cigarette, or a cigarette box for carrying at least one cigarette box. In the following embodiments, the cigarette box to be tested is taken as an example of a cigarette box.
[0041] Among them, the first cross-section is different from the second cross-section. The first cross-section is a cross-section at a first preset distance from the top of the cigarette box to be detected; the second cross-section is a cross-section at a second preset distance from the top of the cigarette box to be detected, and the first preset distance is less than the second preset distance. In other words, the first cross-section is a cross-section close to the top of the cigarette box to be detected, and the second cross-section is a cross-section close to the bottom of the cigarette box to be detected. The first cross-section data refers to the first length data and the first width data corresponding to the first cross-section in the cigarette box to be detected. The second cross-section data refers to the second length data and the second width data corresponding to the second cross-section in the cigarette box to be detected. The height data refers to the height value determined according to the height data of the cigarette box to be detected. More specifically, the height data is the average value of at least one cigarette box height data, for example, the height data is the average value of the first cigarette box height data at the third preset distance from the left side of the front of the cigarette box to be detected and the second cigarette box height data at the fourth preset distance from the left side of the front of the cigarette box to be detected. Exemplarily, the schematic diagram of the cigarette box to be detected is shown in Figure 2 , the front of the cigarette box to be tested faces forward, the cross section in the upper part of the figure is the first cross section, and the cross section in the lower part of the figure is the second cross section. The schematic diagram of the first cross section data, the second cross section data and the cigarette box height measurement value can be found in Figure 2 The annotation text in .
[0042] In this embodiment, the height data of the cigarette box to be inspected, the first cross-sectional data corresponding to the first cross-sectional data, and the second cross-sectional data corresponding to the second cross-sectional data can be obtained by a tobacco digital projector. The tobacco digital projector is a precise and efficient measuring instrument integrating optics, machinery, and electricity, which can efficiently amplify and accurately detect the contours and surface shapes of various complex workpieces.
[0043] Specifically, see the schematic diagram of the tobacco digital projector Figure 3 ,like Figure 3 (a) is a front view of a tobacco digital projector, which includes a projection collection lens and a mobile platform facing the projection collection lens. Figure 3(b) is a top view of the mobile platform, which includes a fixing device for fixing the cigarette box to be tested, a rectangular transparent area is configured on the mobile platform, a light source is configured below the transparent area, and the center point of the light source is aligned with the center point of the projection acquisition lens. In the specific application process, the mobile platform is fixed with the cigarette box to be tested by the fixing device. When the tobacco digital projector is started, the mobile platform moves along the preset platform movement direction. In this process, the measurement data of the cigarette box to be tested is recorded by the projection acquisition lens.
[0044] Next, how to collect the first cross-sectional data, the second cross-sectional data and the height data by the tobacco digital projector is described in detail. Optionally, the specific implementation method of collecting the height data, the first cross-sectional data and the second cross-sectional data may include the following steps:
[0045] (1) When the cigarette box to be inspected is placed on a mobile platform of a tobacco digital projector in a first placement posture, first length data and second length data are collected based on the tobacco digital projector.
[0046] The first placement posture refers to placing the front of the cigarette box to be tested facing the projection acquisition lens of the tobacco digital projector, and the long side of the cross section of the cigarette box to be tested is consistent with the moving direction of the mobile platform. For example, the schematic diagram of the cigarette box to be tested placed on the mobile platform in the first placement posture is shown in FIG. Figure 4 , the first posture is as follows Figure 4 (a) shown.
[0047] Specifically, after placing the cigarette box to be tested on the fixing device in the first placement posture, the start control can be triggered in the start control page of the tobacco digital projector, and the mobile platform will move along the preset moving direction. In the process of the mobile platform driving the cigarette box to be tested to move, when the left edge of the cigarette box to be tested coincides with the center line of the projection collection lens, this is the collection starting point; when the right edge of the cigarette box to be tested coincides with the center line of the projection collection lens, this is the collection ending point. Thus, the first projection collection data of the cigarette box to be tested in the first placement posture can be obtained. The schematic diagram of the first projection collection data at this time can be seen in Figure 4 (b) The first projection acquisition data may represent the side length values of the cross sections of the cigarette box to be detected at different heights. Thus, according to the specific position of the top of the cigarette box to be detected in the first projection acquisition data, the first preset distance and the second preset distance, the first length data of the first cross section and the second length data of the second cross section are determined.
[0048] (2) When the cigarette box to be inspected is placed on the mobile platform of the tobacco digital projector in the second placement posture, the first width data and the second width data are collected based on the tobacco digital projector.
[0049] The second placement posture refers to placing the side of the cigarette box to be tested directly against the projection collection lens of the tobacco digital projector, and the wide side of the cross section of the cigarette box to be tested is consistent with the moving direction of the mobile platform. For example, the schematic diagram of the cigarette box to be tested placed on the mobile platform in the second placement posture is shown in FIG. Figure 5 , the second posture is as follows Figure 5 (a) shown.
[0050] Specifically, after placing the cigarette box to be tested in the second placement posture on the fixing device, the start control can be triggered in the start control page of the tobacco digital projector, and the mobile platform moves along the preset moving direction. In the process of the mobile platform driving the cigarette box to be tested to move, the process of determining the second projection acquisition data of the cigarette box to be tested in the second placement posture is consistent with step (1), which will not be repeated here. The schematic diagram of the final second projection acquisition data can be seen in Figure 5 (b) The second projection acquisition data may represent the width values of the cross sections of the cigarette box to be detected at different heights. Thus, according to the specific position of the top of the cigarette box to be detected in the second projection acquisition data, the first preset distance and the second preset distance, the first width data of the first cross section and the second width data of the second cross section are determined.
[0051] (3) When the cigarette box to be tested is placed on the mobile platform of the tobacco digital projector in the third placement posture, at least one cigarette box height data is collected based on the tobacco digital projector.
[0052] The third placement posture refers to placing the front of the cigarette box to be tested facing the projection acquisition lens of the tobacco digital projector, and the height side of the cigarette box to be tested is consistent with the moving direction of the mobile platform. For example, the schematic diagram of the cigarette box to be tested placed on the mobile platform in the third placement posture is shown in FIG. Figure 6 , the third position is as follows Figure 6 (a) shown.
[0053] Specifically, after placing the cigarette box to be tested in the third placement posture on the fixing device, the start control can be triggered in the start control page of the tobacco digital projector, and the mobile platform moves along the preset moving direction. In the process of the mobile platform driving the cigarette box to be tested to move, the process of determining the third projection acquisition data of the cigarette box to be tested in the third placement posture is consistent with step (1), which will not be repeated here. The schematic diagram of the final third projection acquisition data can be seen in Figure 6 (b) The third projection acquisition data can represent the height values of the cigarette box to be detected at different positions, that is, at least one cigarette box height data. Therefore, the height data of the cigarette box to be detected can be obtained by averaging the at least one cigarette box height data.
[0054] S120 : Determine a squareness evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data and the second cross-sectional data.
[0055] The squareness evaluation attribute is used to characterize the degree to which the geometric shape of the cigarette box to be tested is close to a cube or a cuboid. For example, the larger the value of the squareness evaluation attribute, the closer the geometric shape of the cigarette box to be tested is to a cube or a cuboid; the smaller the value of the squareness evaluation attribute, the less close the geometric shape of the cigarette box to be tested is to a cube or a cuboid.
[0056] Specifically, the specific implementation method of determining the squareness evaluation attribute of the cigarette box to be tested based on the first cross-sectional data and the second cross-sectional data may include: determining the first cross-sectional area based on the first length data and the first width data of the first cross-sectional area; determining the second cross-sectional area based on the second length data and the second width data of the second cross-sectional area; determining the cross-sectional area ratio of the cigarette box to be tested based on the first cross-sectional area and the second cross-sectional area; determining the squareness evaluation attribute of the cigarette box to be tested based on the cross-sectional area ratio.
[0057] In this embodiment, the first cross-sectional area corresponding to the first cross-sectional area can be calculated according to the first length data and the first width data of the first cross-sectional data; the second cross-sectional area corresponding to the second cross-sectional area can be calculated according to the second length data and the second width data of the second cross-sectional data; thus, the cross-sectional area ratio can be determined according to the first cross-sectional area, the second cross-sectional area and the first preset function, wherein the first preset function can be expressed as: In the formula, F H Represents the cross-sectional area ratio of the cigarette box to be tested, S 1 represents the first cross-sectional area, S 2 represents the second cross-sectional area; thus, according to the cross-sectional area ratio and the first association relationship between the cross-sectional area ratio and the squareness attribute value set in advance, the squareness evaluation attribute of the cigarette box to be tested is determined. Wherein, the first association relationship includes: if the cross-sectional area ratio between the first cross-sectional area and the second cross-sectional area is closer to 1, the squareness evaluation attribute is greater; conversely, if the cross-sectional area ratio between the first cross-sectional area and the second cross-sectional area is less close to 1, the squareness evaluation attribute is smaller.
[0058] S130 : Determine the inclination evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data, the second cross-sectional data and the height data.
[0059] The tilt evaluation attribute is used to characterize the tilt degree of the cigarette box to be detected. For example, the larger the value of the tilt evaluation attribute, the more serious the tilt degree of the cigarette box to be detected; the smaller the value of the tilt evaluation attribute, the less severe the tilt degree of the cigarette box to be detected.
[0060] In this embodiment, the inclination evaluation attribute of the cigarette box to be inspected can be determined based on the first length data in the first cross-sectional data, the second length data in the second cross-sectional data, and the height data; the inclination evaluation attribute of the cigarette box to be inspected can also be determined based on the first width data in the first cross-sectional data, the second width data in the second cross-sectional data, and the height data.
[0061] Exemplarily, the length difference between the first length data and the second length data can be determined, so that the tilt angle calculation value corresponding to the front of the cigarette box to be detected can be determined according to the height data and the length difference, so that the tilt evaluation attribute of the cigarette box to be detected can be determined according to the second association relationship between the tilt angle calculation value and the preset tilt angle and the tilt attribute value; it can also be determined that the width difference between the first width data and the second width data is determined, so that the tilt angle calculation value corresponding to the side of the cigarette box to be detected can be determined according to the height data and the width difference, so that the tilt evaluation attribute of the cigarette box to be detected can be determined according to the second association relationship between the tilt angle calculation value and the preset tilt angle and the tilt attribute value. Wherein, the second association relationship includes: if the tilt angle calculation value is closer to 90 degrees, the tilt evaluation attribute is greater; conversely, the less the tilt angle calculation value is closer to 90 degrees, the smaller the squareness evaluation attribute is.
[0062] S140: Determine the geometric regularity of the cigarette box to be inspected based on the squareness evaluation attribute and the inclination evaluation attribute.
[0063] The geometric regularity refers to the quantitative score of the geometric regularity of the cigarette box to be tested. For example, the higher the geometric regularity value, the better the geometric regularity of the cigarette box to be tested, and the lower the geometric regularity value, the worse the geometric regularity of the cigarette box to be tested.
[0064] In this embodiment, the geometric regularity of the cigarette box to be inspected may be determined according to a comprehensive quantitative value based on the squareness evaluation attribute and the inclination evaluation attribute.
[0065] Optionally, the specific implementation method of determining the geometric shape regularity of the cigarette box to be inspected based on the squareness evaluation attribute and the tilt evaluation attribute includes: determining the geometric shape regularity of the cigarette box to be inspected based on a preset squareness weight, a preset tilt weight, the squareness evaluation attribute and the tilt evaluation attribute.
[0066] The preset squareness weight and the preset inclination weight are both pre-set weight values. For example, the preset squareness weight can be expressed as W1, and the preset inclination weight can be expressed as W2. It should be noted that the values of the preset squareness weight and the preset inclination weight are not specifically limited and can be adjusted according to the actual scenario.
[0067] In this embodiment, based on the squareness evaluation attribute and the inclination evaluation attribute, the weighted sum of the squareness evaluation attribute and the inclination evaluation attribute can be calculated according to the preset squareness weight and the preset inclination weight, and the final weighted sum result is determined as the geometric shape regularity of the cigarette box to be tested.
[0068] On the basis of the above-mentioned embodiment, a cigarette box sample regularity detection report including squareness evaluation attributes, inclination evaluation attributes and geometric shape regularity can also be generated. Thus, the user can improve the data basis for cigarette box production rectification according to the data content recorded in the cigarette box sample regularity detection report, so as to improve the geometric shape regularity of the cigarette box.
[0069] The technical solution of the embodiment of the present invention obtains the height data of the cigarette box to be detected, the first cross-sectional data corresponding to the first cross-sectional data, and the second cross-sectional data corresponding to the second cross-sectional data, and then determines the squareness evaluation attribute of the cigarette box to be detected based on the first cross-sectional data and the second cross-sectional data, and determines the inclination evaluation attribute of the cigarette box to be detected based on the first cross-sectional data, the second cross-sectional data, and the height data, thereby determining the geometric regularity of the cigarette box to be detected based on the squareness evaluation attribute and the inclination evaluation attribute. The technical solution provided by this embodiment does not require cumbersome manual operations, that is, it can automatically perform squareness evaluation and inclination evaluation processing according to the geometric measurement data of the cigarette box to be detected, and comprehensively evaluates the geometric regularity of the cigarette box through the squareness evaluation attribute and the inclination evaluation attribute, thereby improving the comprehensiveness of the evaluation dimension of the geometric regularity of the cigarette box, and improving the accuracy and determination efficiency of the geometric regularity of the cigarette box.
[0070] Embodiment 2
[0071] Figure 7 This is a flow chart of a method for determining the shape regularity of a cigarette box provided in the second embodiment of the present invention. Based on the above embodiment, S130 is further refined. The specific implementation method can refer to the detailed description of the embodiment of the present disclosure. The technical features that are the same or similar to the above embodiment are not repeated here.
[0072] like Figure 7 As shown, the method for determining the shape regularity of a cigarette box includes:
[0073] S210, obtaining height data of the cigarette box to be inspected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area.
[0074] S220: Determine a squareness evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data and the second cross-sectional data.
[0075] S230: Determine a first tilt angle calculation value based on the first length data, the second length data, the height data and the first preset slope function, so as to determine a front tilt evaluation attribute of the cigarette box to be tested based on the first tilt angle calculation value.
[0076] The front inclination evaluation attribute is used to characterize the inclination of the front of the cigarette box to be detected. The first preset inclination function refers to a function used to determine the inclination of the front of the cigarette box to be detected. The principle diagram of the first preset inclination function is shown in Figure 8 , the expression of the first preset slope function can be expressed as:
[0077]
[0078] In the formula, I z represents the first inclination angle calculation value, H represents height data, L1 represents first length data, and L2 represents second length data.
[0079] In this embodiment, the first length data, the second length data, and the height data can be substituted into the first preset slope function to obtain a first tilt angle calculation value corresponding to the front side of the cigarette box to be inspected; then, based on the first tilt angle calculation value and the second association relationship between the preset tilt angle and the tilt evaluation attribute, the tilt evaluation attribute of the cigarette box to be inspected is obtained.
[0080] S240: Determine a second inclination angle calculation value based on the first width data, the second width data, the height data and the second preset slope function, so as to determine a side inclination evaluation attribute of the cigarette box to be detected based on the second inclination angle calculation value.
[0081] The side slope evaluation attribute is used to characterize the slope of the side of the cigarette box to be detected. The second preset slope function refers to a function used to determine the slope of the side of the cigarette box to be detected. The expression of the second preset slope function can be expressed as:
[0082]
[0083] In the formula, I c represents the second inclination angle calculated value, H represents height data, W1 represents first width data, and W2 represents second width data.
[0084] In this embodiment, the first width data, the second width data, and the height data can be substituted into the second preset slope function to obtain a second inclination angle calculation value corresponding to the side of the cigarette box to be inspected; then, based on the second association relationship between the second inclination angle calculation value and the preset inclination angle and the inclination evaluation attribute, the side inclination evaluation attribute of the cigarette box to be inspected is obtained.
[0085] S250: Determine the inclination assessment attribute of the cigarette box to be inspected based on the front inclination assessment attribute and the side inclination assessment attribute.
[0086] In this embodiment, the front inclination evaluation attribute can be determined as the inclination evaluation attribute of the cigarette box to be detected; the side inclination evaluation attribute can also be determined as the inclination evaluation attribute of the cigarette box to be detected; the inclination evaluation attribute of the cigarette box to be detected can also be determined based on the weighted sum of the front inclination evaluation attribute and the side inclination evaluation attribute.
[0087] S260: Determine the geometric regularity of the cigarette box to be inspected based on the squareness evaluation attribute and the inclination evaluation attribute.
[0088] The technical solution of this embodiment, when determining the inclination evaluation attribute of the cigarette box to be detected based on the first cross-sectional data, the second cross-sectional data, and the height data, can determine the front inclination evaluation attribute of the cigarette box to be detected based on the first length data, the second length data, the height data, and the first preset slope function, and determine the side inclination evaluation attribute of the cigarette box to be detected based on the first width data, the second width data, the height data, and the second preset slope function, thereby determining the inclination evaluation attribute of the cigarette box to be detected based on the front inclination evaluation attribute and the side inclination evaluation attribute. The technical solution provided by this embodiment, by performing inclination evaluation processing on the front and side of the cigarette box to be detected, further improves the comprehensiveness of the evaluation dimension of the geometric regularity of the cigarette box, and improves the accuracy and determination efficiency of the geometric regularity of the cigarette box.
[0089] Embodiment 3
[0090] Fig. 9 A schematic diagram of a device for determining the shape regularity of a cigarette box provided by an embodiment of the present invention is shown in FIG. Fig.10 As shown, the device includes: a data acquisition module 310, a squareness evaluation module 320, a tilt evaluation module 330 and a shape regularity determination module 340.
[0091] The data acquisition module 310 is used to acquire the height data of the cigarette box to be detected, the first cross-sectional data corresponding to the first cross-sectional data, and the second cross-sectional data corresponding to the second cross-sectional data;
[0092] A squareness evaluation module 320, configured to determine a squareness evaluation attribute of the cigarette box to be tested based on the first cross-sectional data and the second cross-sectional data;
[0093] An inclination evaluation module 330, configured to determine an inclination evaluation attribute of the cigarette box to be tested based on the first cross-sectional data, the second cross-sectional data, and the height data;
[0094] The shape regularity determination module 340 is used to determine the geometric shape regularity of the cigarette box to be inspected based on the squareness evaluation attribute and the inclination evaluation attribute.
[0095] Based on the above embodiment, optionally, the first cross-sectional data includes measured first length data and first width data of the first cross-sectional area, the second cross-sectional data includes second length data and second width data of the second cross-sectional area, and the height data is an average value of at least one cigarette box height data.
[0096] On the basis of the above-mentioned embodiment, optionally, the device for determining the shape regularity of a cigarette box also includes: a data acquisition module; a data acquisition module, specifically used to place the cigarette box to be tested on a mobile platform of a tobacco digital projector in a first placement posture, so as to collect the first length data and the second length data based on the tobacco digital projector; place the cigarette box to be tested on the mobile platform of the tobacco digital projector in a second placement posture, so as to collect the first width data and the second width data based on the tobacco digital projector; place the cigarette box to be tested on the mobile platform of the tobacco digital projector in a third placement posture, so as to collect at least one cigarette box height data based on the tobacco digital projector.
[0097] Based on the above embodiment, optionally, the squareness evaluation module 320 includes:
[0098] a first area determining unit, configured to determine a first cross-sectional area based on first length data and first width data of the first cross-sectional area;
[0099] a second area determining unit, configured to determine a second cross-sectional area based on second length data and second width data of the second cross-sectional area;
[0100] an area ratio determination unit, configured to determine a cross-sectional area ratio of the cigarette box to be tested based on the first cross-sectional area and the second cross-sectional area;
[0101] The squareness evaluation unit is used to determine the squareness evaluation attribute of the cigarette box to be tested based on the cross-sectional area ratio.
[0102] Based on the above embodiment, optionally, the inclination assessment module 330 includes:
[0103] a first inclination determination unit, configured to determine a first inclination angle calculation value based on the first length data, the second length data, the height data and a first preset inclination function, so as to determine a front inclination evaluation attribute of the cigarette box to be detected based on the first inclination angle calculation value;
[0104] a second inclination determination unit, configured to determine a second inclination angle calculation value based on the first width data, the second width data, the height data and a second preset inclination function, so as to determine a side inclination evaluation attribute of the cigarette box to be detected based on the second inclination angle calculation value;
[0105] The inclination evaluation unit is used to determine the inclination evaluation attribute of the cigarette box to be detected based on the front inclination evaluation attribute and the side inclination evaluation attribute.
[0106] Based on the above embodiment, optionally, the first preset slope function is:
[0107]
[0108] In the formula, I z represents the first tilt angle calculation value, H represents the height data, L1 represents the first length data, and L2 represents the second length data;
[0109] The second preset slope function is:
[0110]
[0111] In the formula, I c represents the second inclination angle calculated value, H represents height data, W1 represents first width data, and W2 represents second width data.
[0112] Based on the above embodiment, optionally, the shape regularity determination module 340 is specifically configured to determine the geometric shape regularity of the cigarette box to be detected based on a preset squareness weight, a preset inclination weight, the squareness evaluation attribute and the inclination evaluation attribute.
[0113] The technical solution of the embodiment of the present invention obtains the height data of the cigarette box to be detected, the first cross-sectional data corresponding to the first cross-sectional data, and the second cross-sectional data corresponding to the second cross-sectional data, and then determines the squareness evaluation attribute of the cigarette box to be detected based on the first cross-sectional data and the second cross-sectional data, and determines the inclination evaluation attribute of the cigarette box to be detected based on the first cross-sectional data, the second cross-sectional data, and the height data, thereby determining the geometric regularity of the cigarette box to be detected based on the squareness evaluation attribute and the inclination evaluation attribute. The technical solution provided by this embodiment does not require cumbersome manual operations, that is, it can automatically perform squareness evaluation and inclination evaluation processing according to the geometric measurement data of the cigarette box to be detected, and comprehensively evaluates the geometric regularity of the cigarette box through the squareness evaluation attribute and the inclination evaluation attribute, thereby improving the comprehensiveness of the evaluation dimension of the geometric regularity of the cigarette box, and improving the accuracy and determination efficiency of the geometric regularity of the cigarette box.
[0114] The device for determining the shape regularity of a cigarette box provided in the embodiment of the present invention can execute the method for determining the shape regularity of a cigarette box provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0115] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0116] Embodiment 4
[0117] Fig.10 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.10 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Fig.10 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0118] like Fig.10 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).
[0119] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0120] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0121] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 not shown, usually called a "hard drive"). Although Fig.10 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.
[0122] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.
[0123] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 40, and / or may communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Fig.10 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0124] The processing unit 401 executes various functional applications and page processing by running the programs stored in the system memory 402, for example, implementing the method for determining the shape regularity of a cigarette box provided in an embodiment of the present invention.
[0125] Embodiment 5
[0126] The embodiment of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a method for determining the shape regularity of a cigarette box when executed by a computer processor, the method comprising:
[0127] Acquire height data of the cigarette box to be detected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area;
[0128] Determining a squareness evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data and the second cross-sectional data;
[0129] Determining a tilt evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data, the second cross-sectional data and the height data;
[0130] Based on the squareness evaluation attribute and the inclination evaluation attribute, the geometric regularity of the cigarette box to be inspected is determined.
[0131] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0132] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0133] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0134] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0135] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining the shape regularity of a cigarette box, characterized in that: include: Acquire height data of the cigarette box to be detected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area; Determining a squareness evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data and the second cross-sectional data; Determining a tilt evaluation attribute of the cigarette box to be inspected based on the first cross-sectional data, the second cross-sectional data and the height data; Based on the squareness evaluation attribute and the inclination evaluation attribute, the geometric regularity of the cigarette box to be inspected is determined.
2. The method according to claim 1, characterized in that The first cross-sectional data includes measured first length data and first width data of the first cross-sectional area, the second cross-sectional data includes second length data and second width data of the second cross-sectional area, and the height data is average data of at least one cigarette box height data.
3. The method according to claim 2, characterized in that The method further comprises: When the cigarette box to be inspected is placed on a mobile platform of a tobacco digital projector in a first placement posture, the first length data and the second length data are collected based on the tobacco digital projector; When the cigarette box to be inspected is placed on the mobile platform of the tobacco digital projector in a second placement posture, the first width data and the second width data are collected based on the tobacco digital projector; When the cigarette box to be inspected is placed on the mobile platform of the tobacco digital projector in the third placement posture, the at least one cigarette box height data is collected based on the tobacco digital projector.
4. The method according to claim 2, characterized in that: The determining, based on the first cross-sectional data and the second cross-sectional data, a squareness evaluation attribute of the cigarette box to be inspected includes: determining a first cross-sectional area based on first length data and first width data of the first cross-section; determining a second cross-sectional area based on the second length data and the second width data of the second cross-section; Determining a ratio of the cross-sectional areas of the cigarette box to be tested based on the first cross-sectional area and the second cross-sectional area; Based on the cross-sectional area ratio, a squareness evaluation attribute of the cigarette box to be inspected is determined.
5. The method according to claim 3, characterized in that: The step of determining the inclination evaluation attribute of the cigarette box to be detected based on the first cross-sectional data, the second cross-sectional data, and the height data includes: Determine a first tilt angle calculation value based on the first length data, the second length data, the height data and a first preset slope function, so as to determine a front tilt evaluation attribute of the cigarette box to be tested based on the first tilt angle calculation value; Determine a second inclination angle calculation value based on the first width data, the second width data, the height data and a second preset slope function, so as to determine the side inclination evaluation attribute of the cigarette box to be detected based on the second inclination angle calculation value; Based on the front inclination assessment attribute and the side inclination assessment attribute, the inclination assessment attribute of the cigarette box to be inspected is determined.
6. The method according to claim 5, characterized in that The first preset slope function is: In the formula, I z represents the first tilt angle calculation value, H represents the height data, L1 represents the first length data, and L2 represents the second length data; The second preset slope function is: In the formula, I c represents the second inclination angle calculated value, H represents height data, W1 represents first width data, and W2 represents second width data.
7. The method according to claim 1, characterized in that The step of determining the geometric regularity of the cigarette box to be tested based on the squareness evaluation attribute and the inclination evaluation attribute includes: The geometric regularity of the cigarette box to be inspected is determined based on the preset squareness weight, the preset inclination weight, the squareness evaluation attribute and the inclination evaluation attribute.
8. A device for determining the regularity of a cigarette box shape, characterized in that: include: A data acquisition module, used to acquire height data of the cigarette box to be detected, first cross-sectional data corresponding to the first cross-sectional area, and second cross-sectional data corresponding to the second cross-sectional area; A squareness evaluation module, used to determine a squareness evaluation attribute of the cigarette box to be tested based on the first cross-sectional data and the second cross-sectional data; An inclination evaluation module, used to determine an inclination evaluation attribute of the cigarette box to be tested based on the first cross-sectional data, the second cross-sectional data, and the height data; The shape regularity determination module is used to determine the geometric shape regularity of the cigarette box to be tested based on the squareness evaluation attribute and the inclination evaluation attribute.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the shape regularity of a cigarette box as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the shape regularity of a cigarette box according to any one of claims 1 to 7 when executed.