Data processing method, device and system, medium and computer equipment
By detecting the difference between the top view of the stack and the detection frame of a single object, the stacking state is determined, and the problem of low stack recognition efficiency in the prior art is solved, and efficient and accurate stack recognition is achieved.
Patent Information
- Application Number
- CN202180002733.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-09-13
- Filing Date
- 2021-09-24
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-09-24
AI Technical Summary
In computer vision technology, prior art is difficult to accurately identify the stacking state and object categories of stacks, especially when dealing with complex stacks, resulting in low recognition efficiency and low accuracy.
By obtaining the top view of the stack, the detection frame of the stack is detected, and the stacking status information is determined based on the difference between the detection frame and the detection frame of a single object. A simple object detection method is adopted, which avoids complex recognition algorithms and improves the Processing efficiency.
It realizes accurate identification of stacked states of stack objects, reduces processing complexity and cost, improves recognition efficiency, and is suitable for applications such as game currency stacks in game scenarios.
Smart Images

Figure CN113748427B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Singapore patent application number 10202110060Y filed on September 13, 2021, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of computer vision technology, and in particular to data processing methods, devices and systems, media and computer equipment. Background Art
[0004] In practical applications, it is often necessary to process stacked objects, for example, to identify the types of objects forming the stack and / or to detect the number of objects forming the stack. Different stacking states of the stack have a certain influence on the processing method and processing result of the stack. Therefore, in order to obtain accurate processing results, it is necessary to determine the stacking state information of the stack. Summary of the invention
[0005] The present disclosure provides a data processing method, apparatus and system, medium and computer equipment.
[0006] According to a first aspect of an embodiment of the present disclosure, a data processing method is provided, the method comprising: obtaining a top view of a stack, the stack comprising at least one object and being formed by stacking the at least one object; performing target detection on the top view to obtain a detection frame of the stack; determining first size information of the stack based on the detection frame of the stack; determining a difference between the first size information and second size information of a single object, wherein the second size information of the single object is obtained based on the top view of the single object; and determining stacking state information of the stack based on the difference.
[0007] In some embodiments, determining the first size information of the stack based on the detection frame of the stack includes: determining the size information of the detection frame of the stack as the first size information; the second size information includes: the size information of the detection frame of a single object obtained by performing target detection on a top view of a single object; the top view of the stack and the top view of the single object are acquired based on the same image acquisition parameters.
[0008] In some embodiments, the difference between the first size information and the second size information includes at least one of the following: the difference between the side length of the detection frame of the stack and the side length of the detection frame of a single object; the difference between the area of the detection frame of the stack and the area of the detection frame of a single object; the difference between the diagonal length of the detection frame of the stack and the diagonal length of the detection frame of a single object.
[0009] In some embodiments, the stacking state information includes information for characterizing the stacking manner of the objects forming the stack.
[0010] In some embodiments, the stacking method includes a spread stacking method and an upright stacking method; determining the stacking state information of the stack based on the difference includes: when the difference is greater than a preset difference threshold, determining that the stacking method of the various objects forming the stack is the spread stacking method; and / or when the difference is less than or equal to the preset difference threshold, determining that the stacking method of the various objects forming the stack is the upright stacking method.
[0011] In some embodiments, the method further includes: when the stack is formed by the spread stacking method, determining the categories of individual objects forming the stack based on a top view of the stack; and / or when the stack is formed by the upright stacking method, determining the categories and / or quantity of objects forming the stack based on a side view of the stack.
[0012] In some embodiments, the stacking state information includes a degree of overlap of the objects forming the stack.
[0013] In some embodiments, the method further includes: identifying the categories of each object forming the stack based on a top view of the stack to obtain a first recognition result; identifying the categories of each object forming the stack based on a side view of the stack to obtain a second recognition result; and fusing the first recognition result and the second recognition result based on the degree of overlap to obtain the categories of each object forming the stack.
[0014] In some embodiments, the fusing of the first recognition result and the second recognition result based on the degree of overlap includes: determining a first weight of the first recognition result and a second weight of the second recognition result based on the degree of overlap; and performing weighted fusion of the first recognition result and the second recognition result according to the first weight and the second weight.
[0015] In some embodiments, the individual objects forming the stack are of the same size and shape.
[0016] In some embodiments, the number of the stacks is greater than 1; the method further includes: for each stack, performing the following operations respectively: identifying the objects forming the stack to obtain the category of a single object; determining the size of the detection frame of the identified single object from a plurality of pre-acquired sizes based on the category of the single object and the pre-constructed correspondence between the object category and the detection frame size.
[0017] In some embodiments, the method further includes: determining the position of a single object based on a top view of the stack, the position of the single object corresponding to the size of a detection frame of the object; and selecting the size of the detection frame of the single object from a plurality of pre-acquired sizes based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object.
[0018] In some embodiments, the stack is a pile of game coins in a game area, the objects are game coins, and a top view of the stack is obtained by imaging the game area through an image acquisition device above the game area.
[0019] According to a second aspect of an embodiment of the present disclosure, a data processing device is provided, the device comprising: a first acquisition module, for acquiring a top view of a stack, the stack comprising at least one object and being formed by stacking the at least one object; a detection module, for performing target detection on the top view, and acquiring a detection frame of the stack; a first determination module, for determining first size information of the stack according to the detection frame of the stack; a second determination module, for determining the difference between the first size information and second size information of a single object, wherein the second size information of the single object is obtained based on the top view of the single object; and a third determination module, for determining stacking status information of the stack based on the difference.
[0020] In some embodiments, the first determination module is used to: determine the size information of the detection frame of the stack as the first size information; the second size information includes: the size information of the detection frame of a single object obtained by performing target detection on a top view of a single object; the top view of the stack and the top view of the single object are obtained based on the same image acquisition parameters.
[0021] In some embodiments, the difference between the first size information and the second size information includes at least one of the following: the difference between the side length of the detection frame of the stack and the side length of the detection frame of a single object; the difference between the area of the detection frame of the stack and the area of the detection frame of a single object; the difference between the diagonal length of the detection frame of the stack and the diagonal length of the detection frame of a single object.
[0022] In some embodiments, the stacking state information includes information for characterizing the stacking manner of the objects forming the stack.
[0023] In some embodiments, the stacking method includes a spread stacking method and an upright stacking method; the third determination module is used to: when the difference is greater than a preset difference threshold, determine that the stacking method of the various objects forming the stack is the spread stacking method; and / or when the difference is less than or equal to the preset difference threshold, determine that the stacking method of the various objects forming the stack is the upright stacking method.
[0024] In some embodiments, the device also includes: a fourth determination module for determining the categories of individual objects forming the stack based on a top view of the stack when the stack is formed by the spread stacking method; and / or a fifth determination module for determining the categories and / or quantity of objects forming the stack based on a side view of the stack when the stack is formed by the upright stacking method.
[0025] In some embodiments, the stacking state information includes a degree of overlap of the objects forming the stack.
[0026] In some embodiments, the device also includes: a first recognition module, used to identify the categories of each object forming the stack based on a top view of the stack to obtain a first recognition result; a second recognition module, used to identify the categories of each object forming the stack based on a side view of the stack to obtain a second recognition result; and a fusion module, used to fuse the first recognition result and the second recognition result based on the degree of overlap to obtain the categories of each object forming the stack.
[0027] In some embodiments, the fusion module includes: a weight determination unit, used to determine a first weight of the first recognition result and a second weight of the second recognition result based on the degree of overlap; and a fusion unit, used to perform weighted fusion of the first recognition result and the second recognition result according to the first weight and the second weight, respectively.
[0028] In some embodiments, the individual objects forming the stack are of the same size and shape.
[0029] In some embodiments, the number of the stacks is greater than 1; the device also includes: a third recognition module, which is used to perform the following operations for each stack: identifying the objects forming the stack to obtain the category of a single object; based on the category of the single object and the pre-constructed correspondence between the object category and the detection frame size, determining the size of the detection frame of the identified single object from a plurality of pre-acquired sizes.
[0030] In some embodiments, the device also includes: a sixth determination module, used to determine the position of a single object based on the top view of the stack, the position of the single object corresponding to the size of the detection frame of the single object; a selection module, used to select the size of the detection frame of the single object from a plurality of pre-acquired sizes based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object.
[0031] In some embodiments, the stack is a pile of game coins in a game area, the objects are game coins, and a top view of the stack is obtained by imaging the game area through an image acquisition device above the game area.
[0032] According to a third aspect of an embodiment of the present disclosure, a data processing system is provided, the system comprising: an image acquisition unit disposed above a game area, for acquiring a top view of a stack from the game area, the stack comprising at least one object and being formed by stacking the at least one object; and a processing unit communicatively connected to the image acquisition unit, for: performing target detection on the top view to obtain a detection frame of the stack; determining first size information of the stack based on the detection frame of the stack; determining a difference between the first size information and second size information of a single object, wherein the second size information of the single object is obtained based on the top view of the single object; and determining stacking state information of the stack based on the difference.
[0033] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any embodiment is implemented.
[0034] According to a fifth aspect of an embodiment of the present disclosure, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the embodiments is implemented.
[0035] In the embodiment of the present disclosure, a detection frame of the stack is detected from the top view of the stack, and then the first size information of the stack is determined based on the detection frame of the stack, and the stacking state information of the stack is determined based on the difference between the first size information and the second size information of a single object. In the data processing method provided in the embodiment of the present disclosure, the stacking state information of the stack can be determined by only detecting the top view of the stack to obtain the detection frame of the stack, without using a complex recognition algorithm, and the processing efficiency is high.
[0036] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0038] Figure 1A , Figure 1B and Figure 1C They are schematic diagrams of stacked objects under ideal conditions.
[0039] Figure 2 It is a flow chart of the data processing method of the embodiment of the present disclosure.
[0040] Figure 3A , Figure 3B and Figure 3C They are respectively schematic diagrams of the upright stacking method of the embodiments of the present disclosure.
[0041] Figure 4A , Figure 4B and Figure 4C They are respectively schematic diagrams of the spreading and stacking methods of the embodiments of the present disclosure.
[0042] Figure 5A is a schematic diagram of a detection frame of a single object according to an embodiment of the present disclosure.
[0043] Figure 5B and 5C They are schematic diagrams of detection frames of stacked objects according to embodiments of the present disclosure.
[0044] Fig. 6A and 6B They are schematic diagrams of methods for determining stacking status information according to embodiments of the present disclosure.
[0045] Figure 7 It is a block diagram of a data processing device according to an embodiment of the present disclosure.
[0046] Figure 8 is a schematic diagram of a data processing system according to an embodiment of the present disclosure.
[0047] Fig. 9 It is a schematic diagram of the structure of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0048] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0049] The terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items. In addition, the term "at least one" herein means any combination of at least two of any one or more of a plurality of.
[0050] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0051] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present disclosure and to make the above-mentioned purposes, features and advantages of the embodiments of the present disclosure more obvious and understandable, the technical solutions in the embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings.
[0052] In practical applications, it is often necessary to identify stacked objects, for example, to identify the categories and / or quantities of the various objects forming the stacked objects. A stacked object refers to an object formed by stacking a plurality of objects, and in particular, a single object can also be regarded as a stacked object. Stacking two objects means that the two objects at least partially overlap, for example, one object is placed on top of another object, and the two objects together form a stacked object. The sizes and / or shapes of the multiple objects forming a stacked object can be the same or different. The various objects can be stacked in the same direction or in different directions.
[0053] Figures 1A to 1C Three different stacking methods are shown in the figure. Figure 1A As shown, a plurality of objects are stacked in a vertical direction in a standing stacking manner to form a stack 101. Figure 1B As shown, a plurality of objects are stacked in a horizontal direction in a vertical (lying) stacking manner to form a stack 102. Figure 1C As shown, multiple objects are stacked in a spread stacking manner to form stacks 103, 104 and 105. It should be noted that in any stacking manner, there is at least partial overlap between the objects forming the same stack, and objects that do not overlap each other form different stacks, for example, Figure 1C The objects in the three dotted boxes in the figure form three different stacks 103, 104 and 105 respectively, and one or more objects in the same dotted box form the same stack. Although the objects forming the stacks 101 and 102 in the figure are completely overlapped, the objects in the stacks formed by the upright stacking method or the vertical stacking method can also be partially overlapped, which is only exemplified in the figure. It can be understood by those skilled in the art that in addition to the three stacking methods exemplified above, one or more objects can also form a stack by other methods, for example, they can be stacked in directions other than the horizontal direction and the vertical direction to form a stack, and the present disclosure will not illustrate this one by one.
[0054] See also Figures 1A to 1C , when the viewing angles of the image acquisition units used to capture the top view of the stack are the same (for example, both are vertically downward), in the top view of the stack, the angle between the stacking direction v2 of the stack formed by the standing stacking method and the viewing angle v1 of the image acquisition unit used to capture the top view of the stack is recorded as θ1, the angle between the stacking direction v4 of the stack formed by the lying stacking method and the viewing angle v3 of the image acquisition unit used to capture the top view of the stack is recorded as θ2, and the angle between the stacking direction v6 of the stack formed by the spread stacking method and the viewing angle v5 of the image acquisition unit used to capture the top view of the stack is recorded as θ3, then θ1>θ3>θ2. For example, in Figure 1A In the example, the θ1 corresponding to the stack 101 is 180°; Figure 1B In the example, the θ2 corresponding to the stack 102 is 90°; Figure 1C , θ3 corresponding to the stack 104 is an angle between 90° and 180°.
[0055] In the case where the viewing angles of the image acquisition units used to capture the top view of the stack are the same (for example, both are vertically downward), for the top view of the stack, if the angle θ between the stacking direction of the stack in the top view and the viewing angle of the image acquisition unit used to capture the top view of the stack is greater than or equal to a first angle threshold, then the stack in the top view is a stack formed by stacking in a standing stacking manner; if θ is less than the first angle threshold and greater than or equal to a second angle threshold, then the stack in the top view is a stack formed by stacking in a spread stacking manner; if θ is less than the second angle threshold, then the stack in the top view is a stack formed by stacking in a lying stacking manner. Wherein, the first angle threshold is greater than or equal to the second angle threshold.
[0056] Different stacking states of stacked objects have a certain influence on the identification method and identification result of the stacked objects. Therefore, in order to accurately identify the stacked objects, it is necessary to determine the stacking state information of the stacked objects. The stacking state information includes information for indicating the stacking state, and may also include information such as the overlap between the objects in the stacking state, the stacking direction, and the tilt direction.
[0057] For example, stacks with different stacking states are usually identified using different image recognition methods. In the case where multiple objects form a stack in an upright stacking manner, the number and type of each object forming the stack is identified based on a side view of the stack. In the case where multiple objects form a stack in a vertical or spread stacking manner, the number and / or type of objects forming the stack is identified based on a top view of the stack. The side view can be acquired by an image acquisition unit (e.g., a camera) on the side of the plane where the stack is located, and the top view can be acquired based on an image acquisition unit above the plane where the stack is located.
[0058] For another example, the overlap and tilt direction between objects will affect the accuracy of the recognition results. In the case where multiple objects form a stack in an upright stacking manner, when the camera is shooting a side view of the stack, if the stack is tilted, the multiple objects forming the stack in the side view may block each other, resulting in inaccurate recognition results. In the case where multiple objects form a stack in a spread stacking manner, when the camera is shooting a top view, as the overlap of the objects forming the stack increases, the accuracy of the recognition result based on the top view decreases. The more orderly the objects in the stack formed by the upright stacking manner, the higher the overlap between the objects, and the higher the confidence of the recognition result obtained by identifying the stack through the side view. The lower the overlap of the objects in the stack formed by the spread stacking manner, the higher the confidence of the recognition result obtained by identifying the stack through the top view.
[0059] In some related technologies, a computer vision deep learning algorithm is used to identify stacked objects with the help of a neural network, so as to determine the stacking state information of the stacked objects. For example, a neural network can be used to identify the stacking mode of the stacked objects, or the overlap between the objects forming the stacked objects can be obtained through a neural network to quantify the stacking state information. However, the processing process of the recognition algorithm is time-consuming, resulting in low processing efficiency when determining the stacking state information.
[0060] Based on this, the present disclosure provides a data processing method, such as Figure 2 As shown, the method includes:
[0061] Step 201: Acquire a top view of a stack, wherein the stack includes at least one object and is formed by stacking the at least one object;
[0062] Step 202: performing target detection on the top view to obtain a detection frame of the stacked object;
[0063] Step 203: determining first size information of the stacked object according to the detection frame of the stacked object;
[0064] Step 204: Determine a difference between the first size information and second size information of a single object of the at least one object, wherein the second size information of the single object of the at least one object is obtained based on a top view of the single object;
[0065] Step 205: Determine stacking status information of the stack based on the difference.
[0066] In step 201, a top view of the stacked object may be captured by an image capture unit above the stacked object. In theory, the higher the height of the image capture unit, the closer it faces the stacked object, and the larger the focal length, the smaller the perspective deformation of the stacked object in the top view captured by the image capture unit. Therefore, in order to reduce the influence of perspective deformation, the image capture unit may be set directly above the stacked object, and the distance between the image capture unit and the stacked object may be set to a value greater than a preset distance, and the focal length of the image capture unit may be set to a value greater than a preset focal length.
[0067] The stack may include only a single object, or may be formed by stacking at least two of the objects. The objects forming the same stack may be objects of the same shape and size, objects of the same size but different shapes, objects of different sizes but the same shape, or objects of different sizes and shapes. For example, the shape of the object presented in the viewing angle along the stacking direction may include but is not limited to a circle, an ellipse, a heart shape, a triangle, a rectangle, a pentagon, a hexagon, etc. In the case where the size and shape of each object are the same, the accuracy of obtaining the stacking state information of the stack by the method of the embodiment of the present disclosure is high.
[0068] The stacking method of each object forming the stack may include, but is not limited to, an upright stacking method and a spreading stacking method. In the upright stacking method, some of the objects forming the stack can contact a plane for placing the stack, and any one of the objects forming the stack at least partially overlaps with other objects forming the stack.
[0069] like FIG. 3A to FIG. 3C The following are schematic diagrams of several vertical stacking methods. Figure 3A In the figure, objects 301 to 304 together constitute a stack. Only the lower surface of object 301 can contact the plane for placing the stack, object 302 partially overlaps object 301, object 303 partially overlaps object 302, object 304 partially overlaps object 303, and the overlapping directions of the objects are the same, that is, the offset direction of object 302 relative to object 301, the offset direction of object 303 relative to object 302, and the offset direction of object 304 relative to object 303 are the same, and the offset directions are shown by arrows in the figure. Figure 3B The stacking shown is similar to Figure 3A The stacking shown differs in that Figure 3B In the example, the overlapping directions of the objects are different. For example, object 302 partially overlaps object 301 along the direction of arrow 1, object 303 partially overlaps object 302 along the direction of arrow 2, and object 304 partially overlaps object 303 along the direction of arrow 3. Figure 3C In the stacking manner shown, objects 305, 306 and 307 together form a stack. Only the lower surface of object 305 and the lower surface of object 307 can contact the plane for placing the stack, and object 306 partially overlaps objects 305 and 307.
[0070] In the spreading stacking mode, the stack is formed by stacking at least two objects; each of the at least two objects can contact the plane for placing the stack, and any one object forming the stack partially overlaps with other objects forming the stack.
[0071] like FIG. 4A to FIG. 4C The following are schematic diagrams of several spreading and stacking methods. Figure 4A In the embodiment, objects 401 to 404 together constitute a stack. The lower surface of object 404 can contact a plane for placing the stack, the side of object 403 can contact a plane for placing the stack, and the lower surface of object 403 partially overlaps with the upper surface of object 404. The side of object 402 can contact a plane for placing the stack, and the lower surface of object 402 partially overlaps with the upper surface of object 403. The side of object 401 can contact a plane for placing the stack, and the lower surface of object 401 partially overlaps with the upper surface of object 402.
[0072] exist Figure 4B In the embodiment, objects 405 to 408 together constitute a stack. The lower surface of object 407 can contact the plane for placing the stack, the sides of objects 406 and 408 can contact the plane for placing the stack, and the lower surfaces of objects 406 and 408 respectively partially overlap with the upper surface of object 407. The side of object 405 can contact the plane for placing the stack, and the lower surface of object 405 partially overlaps with the upper surface of object 406.
[0073] exist Figure 4C In the embodiment, objects 409, 410, and 411 together constitute a stack. The lower surface of object 410 can contact a plane for placing the stack, the side of object 409 can contact a plane for placing the stack, and the lower surface of object 409 partially overlaps with the upper surface of object 410. The side of object 411 can contact a plane for placing the stack, and the lower surface of object 411 partially overlaps with the upper surface of object 409 and the upper surface of object 410, respectively.
[0074] In addition to the above-mentioned cases, the objects in the embodiments of the present disclosure can also form a stack in other ways, which will not be described one by one here. The plane for placing the stack can be a horizontal plane such as a desktop or the ground, or a plane with a certain inclination angle, and the present disclosure does not limit this.
[0075] In step 202, target detection may be performed on the top view of the stack to obtain a detection frame of the stack. The detection frame of the stack may be a rectangular frame that includes the stack, for example, a bounding box of the stack. A top view may include one or more stacks, each stack is formed by at least one object, and there is no overlap between objects forming different stacks.
[0076] In some embodiments, the detection frames of the various stacked objects in the top view may be obtained separately through a computer deep learning detection algorithm, or only the detection frames of the stacked objects in a specific area in the top view may be obtained. Specifically, a region of interest may be determined from the top view, target detection may be performed on the region of interest, and the detection frames of the stacked objects in the region of interest may be obtained. The region of interest may be selected in advance, for example, a target region may be selected on the plane where the stacked objects are placed, and the corresponding region of the target region in the top view may be determined based on the position of the target region on the plane and the external parameters of the image acquisition unit used to acquire the top view, and the corresponding region may be determined as the region of interest.
[0077] In step 203, the first size information of the stacked object may be determined based on the detection frame of the stacked object. For example, the actual size information of the stacked object in the physical space may be determined based on the size of the detection frame of the stacked object and the image acquisition parameters including the focal length of the camera that acquires the top view of the stacked object, and the actual size information may be used as the first size information. For another example, the size information of the detection frame of the stacked object may be directly determined as the first size information.
[0078] If the first size information obtained is the actual size information of the stacked objects, in step 204, the actual size information of the single object in the physical space can be used as the second size information, and the difference between the two can be determined. If the first size information obtained is the size information of the detection frame of the stacked objects, in step 204, the size information of the detection frame of the single object can be used as the second size information, and the difference between the two can be determined. The following takes the example of determining the size information of the detection frame of the stacked objects as the first size information and using the size information of the detection frame of the single object as the second size information to illustrate the solution of the embodiment of the present disclosure.
[0079] like Figure 5AAs shown, it is a schematic diagram of the detection frame of a single object. A single object can be placed flat on a plane, and a top view of the single object (referred to as a top view P1) can be collected by an image acquisition unit arranged on the plane. The detection frame of the single object is calibrated based on the top view P1 to obtain the size of the detection frame of the single object. In order to reduce the calibration error, multiple top views P1 can be obtained, and the detection frame of the single object can be calibrated based on each top view P1, and the average of the results of multiple calibrations can be taken to obtain the size of the detection frame of the single object. Among them, the multiple top views P1 are obtained based on the same image acquisition parameters, that is, the image acquisition parameters of the image acquisition units used to acquire the multiple top views P1 are the same, or the multiple top views P1 are converted into images corresponding to the same image acquisition parameters after being acquired by image acquisition units with different image acquisition parameters. The image acquisition parameters may include the focal length, distortion parameters, posture, etc. of the image acquisition unit.
[0080] like Figure 5B and 5C FIG. 1 is a schematic diagram of a detection frame of a stack. It can be seen that the detection frame of the stack includes all objects forming the stack. Therefore, the number of objects forming the stack, the stacking method, the degree of overlap, the stacking direction, etc. will affect the size of the detection frame of the stack.
[0081] In the case where the image acquisition parameters for acquiring the top view of a single object are different from the image acquisition parameters for acquiring the top view of a stack, even if the actual size of the detection frame of the stack is the same as the actual size of the detection frame of the single object, the size information of the detection frame of the stack and the size information of the detection frame of the single object may be different. Therefore, in order to reduce the processing error caused by the different image acquisition parameters, the top view of the stack and the top view of the single object can be acquired by the same image acquisition parameters, so that the acquired first size information and the second size information are comparable. For example, the top view of the stack and the top view of the single object can be acquired respectively by an image acquisition unit with the same image acquisition parameters, or, after the top view of the stack and the top view of the single object are acquired respectively by an image acquisition unit with different image acquisition parameters, the top view of the stack and the top view of the single object can be converted into images corresponding to the same image acquisition parameters. For example, the top view of the stacked objects is acquired based on the focal length f1, and the top view of a single object is acquired based on the focal length f2, and f1≠f2. Then, the top view of the stacked objects and the top view of the single object can be converted into images corresponding to the focal length f through image scaling processing and the like, where f can be one of f1 and f2, or other focal length values other than f1 and f2.
[0082] Furthermore, since objects of different categories often correspond to different detection frame sizes, in order to improve the accuracy of the detection frame size of a single object, the objects forming the stack may be identified to obtain the category of the single object, and the size of the detection frame of the identified single object may be determined from a plurality of sizes obtained in advance based on the category of the single object and the pre-constructed correspondence between the object category and the detection frame size. For example, an area includes a stack of coins and a stack of cards, and the detection frame size of a single coin is S1, and the detection frame size of a single card is S2. Then, when the objects forming the stack are identified as coins, S1 is determined as the size of the detection frame of the single object forming the stack, and when the objects forming the stack are identified as cards, S2 is determined as the size of the detection frame of the single object forming the stack.
[0083] In some embodiments, due to reasons such as the viewing angle and distortion characteristics of the image acquisition unit, the detection frame of the same object may have different sizes when it is in different positions. In order to improve the accuracy of the size of the detection frame of a single object, the position of the single object can be determined based on the top view of the stack, and the position of the single object corresponds to the size of the detection frame of the single object. Based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object, the size of the detection frame of the single object is selected from a plurality of sizes acquired in advance. For example, the entire image acquisition area can be divided into a plurality of sub-areas, and the sub-area in which the object is located is determined by acquiring the position of the object. Assuming that the size of the detection frame of the object corresponding to sub-area 1 is S3, and the size of the detection frame of the object corresponding to sub-area 2 is S4, then when the object is detected in sub-area 1, S3 is determined as the size of the detection frame of the object; when the object is detected in sub-area 2, S4 is determined as the size of the detection frame of the object.
[0084] After obtaining the first size information and the second size information, the difference between the first size information and the second size information can be determined. The difference described in this step may include at least one of the following: the difference between the side length of the detection frame of the stack and the side length of the detection frame of a single object; the difference between the area of the detection frame of the stack and the area of the detection frame of a single object; the difference between the diagonal length of the detection frame of the stack and the diagonal length of the detection frame of a single object. Among them, the side length may include the length of at least any one side of the detection frame, or only the maximum side length of the detection frame is used. For the convenience of description, the detection frame of a single object is referred to as the standard detection frame, and the detection frame of the stack is referred to as the actual detection frame.
[0085] In step 205, the stacking state information of the stack may be determined based on the difference between the size of the detection frame of the stack and the size of the detection frame of a single object. The stacking state information includes but is not limited to at least any of the following: information on the stacking method of the objects forming the stack, information on the stacking direction, information on the degree of overlap, quantity information, and category information.
[0086] The stacking state information of the stacked objects can be determined based on the difference between the side length, diagonal length or area of the actual detection frame and the standard detection frame. The difference can be measured by the difference or ratio of the side length, diagonal length or area. In the case of measuring the difference by the ratio, the difference θ of the side length is Lr , the difference in area θ Sr The difference between the length of the diagonal line θ Xr They can be recorded as:
[0087]
[0088]
[0089]
[0090] In the case where the difference is measured by the difference, the difference in the side lengths θ ΔL , the difference in area θ ΔS The difference between the length of the diagonal line θ Δx They can be recorded as:
[0091] θ ΔL =Lmax-Ls
[0092] θ ΔS =Lmax*Lmin-Ls 2
[0093] θ Δx =Lx-Lsx
[0094] Where Ls is the side length of the standard detection frame, Lmax is the maximum side length of the actual detection frame, Lmin is the minimum side length of the actual detection frame, Lsx is the diagonal length of the standard detection frame, and Lx is the diagonal length of the actual detection frame.
[0095] In some embodiments, when the difference is greater than a preset difference threshold, it is determined that the objects forming the stack are stacked in the spread stacking manner. In other embodiments, when the difference is less than or equal to the preset difference threshold, it is determined that the objects forming the stack are stacked in the upright stacking manner. In some embodiments, the preset difference threshold is greater than or equal to 2 times the size of the standard detection frame. In other embodiments, the preset difference threshold can also be set to other values.
[0096] like Fig. 6A and 6B , which are schematic diagrams of methods for determining stacking status information according to embodiments of the present disclosure. Fig. 6A The stack shown may be a top view of a stack in a standing state or a spread state, wherein the shape of the object is circular, and therefore the shape of the standard detection frame is a square, and the length and width of the standard detection frame respectively represent the length and width of a single object, and both values are Ls, but the actual situation is not limited thereto. Taking the difference between the standard detection frame and the actual detection frame measured by the side length as an example, the greater the difference between the side lengths of the standard detection frame and the actual detection frame, the smaller the degree of overlap of the objects in the stack; conversely, the smaller the difference between the side lengths of the standard detection frame and the actual detection frame, the greater the degree of overlap of the objects in the stack. If the difference between the two reaches twice the side length of the standard detection frame, it indicates that the stack is in a spread state; if the difference between the two is less than twice the side length of the standard detection frame, it indicates that the stack is in a standing state.
[0097] Figure 6B A top view of a stack in a lying state is shown, where Ls1 is the length of the standard detection frame, which is used to indicate the length of a single object, and Ls2 is the width of the standard detection frame, which is used to indicate the thickness of a single object. For sheet-like stacks, their thickness is generally much smaller than the side length. The length of the side parallel to Ls1 in the actual detection frame is recorded as Lmax. The greater the difference between Lmax and Ls1, the smaller the overlap of the objects in the stack; conversely, the smaller the difference between Lmax and Ls1, the greater the overlap of the objects in the stack. The greater the difference between Lmax and Ls1, the more objects there are in the stack; conversely, the smaller the difference between Lmax and Ls1, the fewer objects there are in the stack.
[0098] In some embodiments, when the stack is formed by the spreading stacking method, the categories of the various objects forming the stack can be determined based on the top view of the stack. In other embodiments, when the stack is formed by the upright stacking method, the number and category of the objects forming the stack can be determined based on the side view of the stack. In other embodiments, when the stack is formed by the vertical stacking method, the category and number of the objects forming the stack can be determined based on the top view of the stack. In other words, for stacks in different stacking states, different processing logics can be used to process the stack. Different processing logics can be encapsulated in different processing modules. Through this embodiment, the processing module that matches the stacking method of the stack can be called to process the stack.
[0099] In some embodiments, the categories of the various objects forming the stack can be identified based on a top view of the stack to obtain a first identification result; the categories of the various objects forming the stack can be identified based on a side view of the stack to obtain a second identification result; the first identification result and the second identification result are merged based on the degree of overlap to obtain the categories of the various objects forming the stack.
[0100] For example, when the degree of overlap is greater than a preset overlap threshold, the categories of the objects forming the stack can be determined based on the second recognition result, and when the degree of overlap is less than or equal to the preset overlap threshold, the categories of the objects forming the stack can be determined based on the first recognition result. For another example, a first weight of the first recognition result and a second weight of the second recognition result can be determined based on the degree of overlap, and the first recognition result and the second recognition result can be weighted fused according to the first weight and the second weight, respectively. Through weighted fusion processing, the accuracy of category recognition can be improved.
[0101] In the embodiment of the present disclosure, a detection frame of the stack is detected from the top view of the stack, first size information of the stack is determined based on the detection frame of the stack, and stacking state information of the stack is determined based on the difference between the first size information and the second size information of a single object. In this data processing method, since only the top view of the stack needs to be detected to determine the stacking state information of the stack, the processing complexity is low. In addition, the embodiment of the present disclosure only needs to perform target detection on the top view of the stack and the top view of a single object, and there is no need to use a recognition algorithm. The demand for computing power and hardware is low, thereby reducing the processing cost when determining the stacking state information, and since the target detection process is less time-consuming, it can improve processing efficiency.
[0102] In addition, the solution of the embodiment of the present disclosure also has the following advantages:
[0103] (1) In the embodiments of the present disclosure, only one image from a top-down perspective needs to be acquired to determine the stacking state information of the stacked objects, thereby reducing the processing complexity.
[0104] (2) In the embodiments of the present disclosure, the stacking state information of the stacked objects can be determined by only using a detection algorithm to detect a detection frame of the stacked objects, thereby achieving low-complexity and high-efficiency processing.
[0105] (3) In the embodiments of the present disclosure, there is no need to label the data, which reduces processing complexity and saves labeling costs.
[0106] (4) Compared with the related art, which is unable to describe quantitative information such as the degree of overlap of each object in a stack formed in an upright state and the degree of overlap of each object in a stack formed in a spread state, or requires a large amount of labeled data to obtain the above information, in the embodiment of the present disclosure, various quantitative information can be determined through the difference between the standard detection frame and the actual detection frame.
[0107] The disclosed embodiment can be used in a game scene, in which the stack is a pile of game coins in a game area, and the individual objects forming the stack are game coins, which are used to count during the game. The game area can be imaged by an image acquisition device above the game area to obtain a top view of the stack.
[0108] The placement of game coins in the game area requires judging the stacking method of the game coins. Different ways of stacking game coins will have different effects during the game. For example, game coins in the standing state are used for betting, and game coins in the spread state are used to show the number of game coins in a stack of game coins. Game coins in different stacking states will trigger different processing logic as identifiers. In addition, in addition to the game itself needing to distinguish the stacking state of game coins, when the computer recognizes the stack formed by game coins, the verticality, inclination or stacking degree of the stack in the spreading method will affect the recognition. For example, when it is necessary to identify each piece of game coins in a pile of game coins, if there is a tilt, the side view of the stack will block each other, resulting in inaccurate recognition. In general, it is necessary to judge the shape of the game coins in the game area, and the game coins in the game area are generally in a standing state or a spread state.
[0109] Since game coins of the same type are of equal shape and size, the stacking method can be determined by the top view of the stack. The size of the detection frame of a piece of flat game coins determined by the computer vision detection algorithm can be used as the "standard size" of the detection frame. The neatness information is obtained by comparing the size of the detection frame of a pile of game coins in the top view with the "standard size". When the height, focal length and other parameters of the camera when obtaining the standard size are the same as the height, focal length and other parameters of the camera when obtaining the stack, the "straighter" the stack is, the smaller the detection frame size of the stack is, the closer it is to the "standard size", and the higher the overlap of the game coins in the stack when viewed from above. The difference or ratio of the detection frame size can be used as a quantitative value to measure the overlap of the game coins in the stack.
[0110] The above data processing method is universal in the two states of standing and spreading. When the overlap is greater than or equal to a certain threshold, the stacking state of the stack is the standing state. When the overlap is lower than a certain threshold, the stacking state of the stack is the spread state. The threshold is set based on experience. The spread state can be regarded as a state in which the game coins in the standing state are overly tilted. In the standing state, the overlap can be used to describe the neatness of the placement of the game coins. The higher the overlap, the neater. In the spread state, the overlap can be used to describe the spreading degree of the game coins. The lower the overlap, the more dispersed the spreading.
[0111] Due to the limitation of the detection frame direction, the border direction of the detection frame may not be along the spreading direction of the game coins, but this does not affect the rule that the size of the stack detection frame increases with the discrete degree of spreading. If the game coins spread to separate, the detection algorithm will detect two stacks. Therefore, by comparing the size of the stack detection frame with the "standard size" to obtain the comparison result, we can get the quantitative value of measuring the overlap degree and tilt degree of the game coins in the stack.
[0112] The above method only needs to adopt a detection algorithm and only needs a top view, and various quantitative information of the stack can be obtained through simple arithmetic operations. The above method can also be used for poker games, with low cost and high speed, and can effectively solve the algorithm detection and recognition accuracy problems in actual games. The above method has simple logic but strong constraints, is easy to implement and has high accuracy, and is highly versatile. The stacked object posture, neatness, inclination, spread, etc. can be judged by quantitative values.
[0113] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0114] like Figure 7 As shown, the present disclosure also provides a data processing device, the device comprising:
[0115] A first acquisition module 701 is used to acquire a top view of a stack, wherein the stack includes at least one object and is formed by stacking the at least one object;
[0116] A detection module 702 is used to perform target detection on the top view to obtain a detection frame of the stacked object;
[0117] A first determining module 703, configured to determine first size information of the stack according to a detection frame of the stack;
[0118] A second determining module 704 is configured to determine a difference between the first size information and second size information of a single object, wherein the second size information of the single object is obtained based on a top view of the single object;
[0119] The third determining module 705 is configured to determine the stacking state information of the stack based on the difference.
[0120] In some embodiments, the first determination module is used to: determine the size information of the detection frame of the stack as the first size information; the second size information includes: the size information of the detection frame of a single object obtained by performing target detection on a top view of a single object; the top view of the stack and the top view of the single object are obtained based on the same image acquisition parameters.
[0121] In some embodiments, the difference between the first size information and the second size information includes at least one of the following: the difference between the side length of the detection frame of the stack and the side length of the detection frame of a single object; the difference between the area of the detection frame of the stack and the area of the detection frame of a single object; the difference between the diagonal length of the detection frame of the stack and the diagonal length of the detection frame of a single object.
[0122] In some embodiments, the stacking state information includes information for characterizing the stacking manner of the objects forming the stack.
[0123] In some embodiments, the stacking method includes a spread stacking method and an upright stacking method; the third determination module is used to: when the difference is greater than a preset difference threshold, determine that the stacking method of the various objects forming the stack is the spread stacking method; and / or when the difference is less than or equal to the preset difference threshold, determine that the stacking method of the various objects forming the stack is the upright stacking method.
[0124] In some embodiments, the device also includes: a fourth determination module for determining the categories of individual objects forming the stack based on a top view of the stack when the stack is formed by the spread stacking method; and / or a fifth determination module for determining the categories and / or quantity of objects forming the stack based on a side view of the stack when the stack is formed by the upright stacking method.
[0125] In some embodiments, the stacking state information includes a degree of overlap of the objects forming the stack.
[0126] In some embodiments, the device also includes: a first recognition module, used to identify the categories of each object forming the stack based on a top view of the stack to obtain a first recognition result; a second recognition module, used to identify the categories of each object forming the stack based on a side view of the stack to obtain a second recognition result; and a fusion module, used to fuse the first recognition result and the second recognition result based on the degree of overlap to obtain the categories of each object forming the stack.
[0127] In some embodiments, the fusion module includes: a weight determination unit, used to determine a first weight of the first recognition result and a second weight of the second recognition result based on the degree of overlap; and a fusion unit, used to perform weighted fusion of the first recognition result and the second recognition result according to the first weight and the second weight, respectively.
[0128] In some embodiments, the individual objects forming the stack are of the same size and shape.
[0129] In some embodiments, the number of the stacks is greater than 1; the device also includes: a third recognition module, which is used to perform the following operations for each stack: identifying the objects forming the stack to obtain the category of a single object; based on the category of the single object and the pre-constructed correspondence between the object category and the detection frame size, determining the size of the detection frame of the identified single object from a plurality of pre-acquired sizes.
[0130] In some embodiments, the device also includes: a sixth determination module, used to determine the position of a single object based on the top view of the stack, the position of the single object corresponding to the size of the detection frame of the object; a selection module, used to select the size of the detection frame of the single object from a plurality of pre-acquired sizes based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object.
[0131] In some embodiments, the stack is a pile of game coins in a game area, the objects are game coins, and a top view of the stack is obtained by imaging the game area through an image acquisition device above the game area.
[0132] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0133] like Figure 8 As shown, the present disclosure also provides a data processing system, the system comprising:
[0134] an image acquisition unit 801 disposed above the game area, for acquiring a top view of a stack from the game area, the stack comprising at least one object and formed by stacking the at least one object; and
[0135] The processing unit 802, which is in communication with the image acquisition unit 801, is used for:
[0136] Performing target detection on the top view to obtain a detection frame of the stacked object;
[0137] determining first size information of the stack according to a detection frame of the stack;
[0138] Determining a difference between the first size information and second size information of the single object, wherein the second size information of the single object is obtained based on a top view of the single object;
[0139] Stacking state information of the stack is determined based on the difference.
[0140] The game area of the disclosed embodiment can be as follows Figure 8 As shown in the middle gray area, the game area is a partial area on a desktop. The image acquisition unit 801 can be a device with an image acquisition function, such as a camera, which is arranged directly above the game area. By arranging the image acquisition unit 801 directly above the game area, on the one hand, the field of view of the image acquisition unit 801 can cover the entire game area as much as possible, and on the other hand, the perspective distortion caused by the angle tilt can be reduced. The processing unit 802 can communicate with the image acquisition unit 801 via a wired or wireless manner, and the processing unit 802 can be a single processor or a processor cluster including multiple processors. The processing unit 802 can adopt the data processing method described in any embodiment of the present disclosure to obtain the stacking state information of the stacked objects in the game area.
[0141] An embodiment of the present specification also provides a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the above embodiments is implemented.
[0142] Fig. 9 A more specific hardware structure diagram of a computing device provided in an embodiment of this specification is shown, and the device may include: a processor 901, a memory 902, an input / output interface 903, a communication interface 904, and a bus 905. The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other in communication within the device through the bus 905.
[0143] The processor 901 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., for executing relevant programs to implement the technical solutions provided in the embodiments of this specification. The processor 901 can also include a graphics card, which can be a Nvidia titan X graphics card or a 1080Ti graphics card, etc.
[0144] The memory 902 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 902 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 902 and are called and executed by the processor 901.
[0145] The input / output interface 903 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0146] The communication interface 904 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0147] The bus 905 includes a path that transmits information between various components of the device (eg, the processor 901 , the memory 902 , the input / output interface 903 , and the communication interface 904 ).
[0148] It should be noted that, although the above device only shows a processor 901, a memory 902, an input / output interface 903, a communication interface 904, and a bus 905, in a specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0149] The present disclosure also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any of the above embodiments is implemented.
[0150] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0151] The embodiments of the present disclosure further provide a computer program, which is stored in a storage medium. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0152] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the embodiments of this specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of this specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of this specification or some parts of the embodiments.
[0153] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0154] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.
Claims
1. A data processing method, the method comprising: Acquire a top view of a stack, wherein the stack includes at least one object and is formed by stacking the at least one object, wherein the stack is a pile of game coins in a game area, and the top view of the stack is obtained by imaging the game area through an image acquisition device above the game area; Performing target detection on the top view to obtain a detection frame of the stacked object; Determining first size information of the stack according to a detection frame of the stack, wherein determining the first size information of the stack according to the detection frame of the stack includes: determining size information of the detection frame of the stack as the first size information; Determining a difference between the first size information and second size information of a single object among the at least one object, wherein the single object is a game coin, and the second size information of the single object is obtained based on a top view of the single object; determining stacking state information of the stacked object based on the difference; The method further comprises: Determine the position of the single object based on the top view of the stack, the position of the single object corresponding to the size of the detection frame of the single object; Based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object, the size of the detection frame of the single object is selected from a plurality of pre-acquired sizes.
2. The method according to claim 1, wherein: The top view of the stack and the top view of the single object are acquired based on the same image acquisition parameters.
3. The method according to claim 2, wherein: The difference between the first size information and the second size information includes at least one of the following: a difference between a side length of a detection frame of the stack and a side length of a detection frame of the single object; a difference between an area of a detection frame of the stack and an area of a detection frame of the single object; The difference between the diagonal length of the detection frame of the stack and the diagonal length of the detection frame of the single object.
4. The method according to any one of claims 1 to 3, wherein: The stacking state information includes information for characterizing the stacking manner of the objects forming the stack.
5. The method according to claim 4, wherein: The stacking method includes a spreading stacking method and an upright stacking method; The determining the stacking state information of the stacked object based on the difference comprises: When the difference is greater than a preset difference threshold, determining that the stacking mode of the objects forming the stack is the spreading stacking mode; and / or When the difference is less than or equal to the preset difference threshold, it is determined that the stacking manner of the objects forming the stack is the upright stacking manner.
6. The method according to claim 5, further comprising: In a case where the stack is formed by stacking in the spreading stacking manner, determining the category of each object forming the stack based on a top view of the stack; and / or In the case where the stack is formed by stacking in the upright stacking manner, the type and / or number of objects forming the stack is determined based on a side view of the stack.
7. The method according to any one of claims 1 to 3, wherein: The stacking state information includes the degree of overlap of the objects forming the stack.
8. The method according to claim 7, wherein: The method further comprises: Identifying the categories of the objects forming the stack based on the top view of the stack to obtain a first identification result; identifying the categories of the objects forming the stack based on the side view of the stack to obtain a second identification result; The first recognition result and the second recognition result are fused based on the overlap degree to obtain the categories of the objects forming the stack.
9. The method according to claim 8, wherein: The fusing the first recognition result and the second recognition result based on the overlap degree includes: Determining a first weight of the first recognition result and a second weight of the second recognition result based on the degree of overlap; The first recognition result and the second recognition result are weightedly fused according to the first weight and the second weight.
10. The method according to any one of claims 1 to 3, characterized in that: The individual objects forming the stack are of the same size and shape.
11. The method according to any one of claims 1 to 3, wherein the number of the stacked objects is greater than 1; the method further comprising: For each stack, do the following: Identifying objects forming the stack to obtain categories of the individual objects; Based on the category of the single object and the pre-constructed correspondence between the object category and the detection frame size, the size of the identified detection frame of the single object is determined from a plurality of pre-acquired sizes.
12. A data processing device, comprising: A first acquisition module is used to acquire a top view of a stack, wherein the stack includes at least one object and is formed by stacking the at least one object, the stack is a pile of game coins in a game area, and the top view of the stack is obtained by imaging the game area through an image acquisition device above the game area; A detection module, used for performing target detection on the top view to obtain a detection frame of the stacked object; A first determining module is configured to determine first size information of the stack according to a detection frame of the stack, wherein determining the first size information of the stack according to the detection frame of the stack includes: determining size information of the detection frame of the stack as the first size information; A second determination module is used to determine the difference between the first size information and second size information of a single object among the at least one object, wherein the single object is a game coin, and the second size information of the single object is obtained based on a top view of the single object; a third determining module, configured to determine stacking state information of the stacked object based on the difference; The second determining module is further used for: Determine the position of the single object based on the top view of the stack, the position of the single object corresponding to the size of the detection frame of the single object; Based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object, the size of the detection frame of the single object is selected from a plurality of pre-acquired sizes.
13. A data processing system, the system comprising: An image acquisition unit disposed above the game area, used to acquire a top view of a stack from the game area, the stack comprising at least one object and formed by stacking the at least one object, the stack being a pile of game coins in the game area; as well as A processing unit in communication with the image acquisition unit, configured to: Performing target detection on the top view to obtain a detection frame of the stacked object; Determining first size information of the stack according to a detection frame of the stack, wherein determining the first size information of the stack according to the detection frame of the stack includes: determining size information of the detection frame of the stack as the first size information; Determining a difference between the first size information and second size information of a single object among the at least one object, wherein the single object is a game coin, and the second size information of the single object is obtained based on a top view of the single object; determining stacking state information of the stacked object based on the difference; The processing unit is also used for: Determine the position of the single object based on the top view of the stack, the position of the single object corresponding to the size of the detection frame of the single object; Based on the position of the single object and the correspondence between the position of the single object and the size of the detection frame of the single object, the size of the detection frame of the single object is selected from a plurality of pre-acquired sizes.
14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 11.
15. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 11 when executing the computer program.
Citation Information
Patent Citations
Sample image acquisition method and apparatus, and electronic device
CN112292689A
Method and device for detecting object stacking state and intelligent shelf
US20200043192A1