CN114897962A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN114897962A
CN114897962A CN202210343674.6A CN202210343674A CN114897962A CN 114897962 A CN114897962 A CN 114897962A CN 202210343674 A CN202210343674 A CN 202210343674A CN 114897962 A CN114897962 A CN 114897962A
Authority
CN
China
Prior art keywords
placing
size
space
determining
relative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210343674.6A
Other languages
Chinese (zh)
Inventor
屈鹏展
祁宏升
段居方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202210343674.6A priority Critical patent/CN114897962A/en
Publication of CN114897962A publication Critical patent/CN114897962A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Image Analysis (AREA)

Abstract

The application provides an image processing method and device, wherein the method comprises the following steps: obtaining a designated image containing at least one object to be placed; analyzing the size of the appointed image, and determining the size information of the at least one object to be placed; and matching the at least one object to be placed with the placing space according to the size information, and determining an object placing mode so that the at least one object to be placed is located in the matched placing space.

Description

Image processing method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an image processing method and apparatus.
Background
The household life can not leave the space, and the areas of the household life and the room space are closely related to the space structure. The storage design can solve the problem of space order of rooms, articles are stacked together, the occupied space of the articles is reduced, and the range of the movable space in the rooms is improved. However, since the size of the household articles is not completely consistent, the stacking sequence is often disordered, and it is often difficult to place the household articles in a minimum space. This causes waste and untidy indoor space.
Disclosure of Invention
The application provides an image processing method and device.
According to a first aspect of embodiments of the present application, there is provided an image processing method, the method including: obtaining a designated image containing at least one object to be placed; analyzing the size of the appointed image, and determining the size information of the at least one object to be placed; and adapting the at least one object to be placed and the placing space according to the size information, and determining an object placing mode so that the at least one object to be placed is located in the adapted placing space.
In an embodiment, performing a size analysis on the designated image to determine size information of the at least one object to be placed includes: performing size analysis on the specified image, determining a first relative size of the at least one object to be placed relative to the placing space, and adapting the at least one object to be placed and the placing space according to the first relative size; the designated images are one or more, and any one of the designated images comprises the placing space.
In an embodiment, the performing a size analysis on the designated image to determine size information of the at least one object to be placed includes: carrying out size analysis on the designated image, and determining a second relative size among a plurality of objects to be placed; wherein the second relative size comprises a relative three-dimensional proportion of each object to be placed and a relative object proportion among a plurality of objects to be placed.
In an embodiment, the adapting, according to the size information, the at least one object to be placed and the placing space, and determining the object placing manner so that the at least one object to be placed is located in the adapted placing space includes: performing combined analysis on the plurality of objects to be placed according to the second relative size, and determining object placement combinations meeting space conditions; and matching the object placing combination with the placing space, and determining the placing mode of the object placing combination so as to enable the object placing combination to be located in the placing space.
In an embodiment, the adapting the object placement combination and the placement space to determine the placement manner of the object placement combination so that the object placement combination is located in the placement space includes: determining a preset placing space according to the specified image or the preset three-dimensional space proportion; analyzing the size of the designated image, and determining a third relative size of a preset placing space and an object placing combination; and matching the object placing combination with the placing space according to the third relative size to determine the placing mode of the object placing combination.
In an implementation manner, the adapting, according to the size information, the at least one object to be placed and the placing space, and determining the placing manner of the object, so that the at least one object to be placed is located in the adapted placing space, includes: analyzing the size of the designated image, determining a fourth relative size of a designated placing space and one object to be placed, and obtaining a three-dimensional space proportion corresponding to the designated placing space; performing combined analysis on the plurality of objects to be placed according to the three-dimensional space proportion, the second relative size and the fourth relative size to determine a specified placement combination which is suitable for a specified space; the number of the appointed images is one or more, and any appointed image comprises the appointed placing space so as to obtain a three-dimensional space proportion corresponding to the appointed placing space; or the placing space is a preset three-dimensional space proportion.
In an embodiment, the analyzing the size of the designated image to determine the second relative size between the plurality of objects to be placed includes: determining a reference object according to the object to be placed; determining a reference proportion of the reference object; and determining a second relative size between each object to be placed and the reference object according to the reference proportion.
In an embodiment, the analyzing the size of the designated image to determine the second relative size between the plurality of objects to be placed includes: carrying out shape classification on the object to be placed, and determining a regular shape object and an irregular shape object; performing shape virtual processing on the irregular shape object to determine a virtual shape object; performing size analysis according to the regular shape object and the virtual shape object to determine the second relative size.
In an embodiment, the analyzing the size of the designated image to determine the second relative size between the plurality of objects to be placed includes: carrying out occlusion analysis on the object to be placed to determine an occluded object; determining an occluding object from the occluded object; obtaining an occlusion proportion of the occluding object, and determining the second relative size of the occluded object and the occluding object according to the occlusion proportion.
According to a second aspect of embodiments of the present application, there is provided an image processing apparatus, the apparatus including: the device comprises an obtaining module, a display module and a display module, wherein the obtaining module is used for obtaining a specified image containing at least one object to be placed; the analysis module is used for carrying out size analysis on the specified image and determining the size information of the at least one object to be placed; and the adaptation module is used for adapting the at least one object to be placed and the placing space according to the size information and determining an object placing mode so as to enable the at least one object to be placed to be located in the adapted placing space.
In one embodiment, the analysis module includes: performing size analysis on the specified image, determining a first relative size of the at least one object to be placed relative to the placing space, and adapting the at least one object to be placed and the placing space according to the first relative size; the designated images are one or more, and any one of the designated images comprises the placing space.
In one embodiment, the analysis module includes: carrying out size analysis on the designated image, and determining a second relative size among a plurality of objects to be placed; wherein the second relative size comprises a relative three-dimensional scale of each object to be placed and a relative object scale between a plurality of objects to be placed.
In an embodiment, the adaptation module includes: the combination submodule is used for performing combination analysis on the plurality of objects to be placed according to the second relative size and determining an object placement combination meeting a space condition; and the determining submodule is used for adapting the object placing combination and the placing space and determining the placing mode of the object placing combination so as to enable the object placing combination to be positioned in the placing space.
In one embodiment, the determining sub-module includes: determining a preset placing space according to the specified image or the preset three-dimensional space proportion; analyzing the size of the designated image, and determining a third relative size of a preset placing space and an object placing combination; and matching the object placing combination with the placing space according to the third relative size to determine the placing mode of the object placing combination.
In an embodiment, the adaptation module includes: the analysis submodule is used for carrying out size analysis on the designated image, determining a fourth relative size of a designated placing space and one object to be placed, and obtaining a three-dimensional space proportion corresponding to the designated placing space; the combination submodule is further used for performing combination analysis on the plurality of objects to be placed according to the three-dimensional space proportion, the second relative size and the fourth relative size so as to determine a specified placement combination which is suitable for a specified space; the number of the appointed images is one or more, and any appointed image comprises the appointed placing space so as to obtain a three-dimensional space proportion corresponding to the appointed placing space; or the placing space is a preset three-dimensional space proportion.
In one embodiment, the analysis module includes: determining a reference object according to the object to be placed; determining a reference proportion of the reference object; and determining a second relative size between each object to be placed and the reference object according to the reference proportion.
In one embodiment, the analysis module includes: carrying out shape classification on the object to be placed, and determining a regular shape object and an irregular shape object; performing shape virtual processing on the irregular shape object to determine a virtual shape object; performing size analysis according to the regular shape object and the virtual shape object to determine the second relative size.
In one embodiment, the analysis module includes: carrying out occlusion analysis on the object to be placed to determine an occluded object; determining an occluding object from the occluded object; obtaining an occlusion proportion of the occluding object, and determining the second relative size of the occluded object and the occluding object according to the occlusion proportion.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described herein.
According to a fourth aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method described herein.
According to the image processing method and device, the corresponding size information is obtained by analyzing the size of at least one object to be placed in the designated image, and then the size information is matched with the placing space, so that the object placing mode of the object to be placed is determined.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic diagram illustrating an implementation flow of an image processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating an implementation module of an image processing apparatus according to an embodiment of the present application;
fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, features and advantages of the present application more obvious and understandable, technical combinations in embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 shows a schematic implementation flow diagram of an image processing method according to an embodiment of the present application.
Referring to fig. 1, according to a first aspect of embodiments of the present application, there is provided an image processing method, including: operation 101, obtaining a designated image containing at least one object to be placed; operation 102, performing size analysis on the designated image, and determining size information of at least one object to be placed; operation 103, adapting the at least one object to be placed and the placing space according to the size information, and determining an object placing mode so that the at least one object to be placed is located in the adapted placing space.
According to the image processing method provided by the embodiment of the application, the corresponding size information is obtained by performing size analysis on at least one object to be placed in the designated image, and then the size information is adapted to the placing space, so that the object placing mode of the object to be placed is provided.
In operation 101 of the method, the designated image may be obtained by image-capturing the object to be placed by an image-capturing device. For example, when the method is applied to mobile phone software, the designated image may be obtained by acquiring an image through a camera of a mobile phone, the designated image may be one or more, each designated image includes one or more objects to be placed, and the objects to be placed in each designated image are identified by performing object identification on the designated image. The object to be placed can be an article which is required to be stored in a conventional household life, such as a shoe box, a packaging box, a book and the like.
In operation 102 of the method, after the object to be placed in the designated image is identified, the method performs size analysis on the object to be placed through a size analysis algorithm to determine size information of each object to be placed, where the size information may be relative size information of the object to be placed. The size information of the method is selected as the relative size information, the method is different from the actual size information, the relative size information does not need to know the actual size of the object to be placed, the depth of field in the image does not need to be considered, the algorithm is simpler, less computing resources are occupied, the objects to be placed and the placing space are mutually referred to, the relative size information corresponding to each object to be placed can be consistent, the subsequent adaptation between the object to be placed and the placing space is facilitated, the output object placing mode is more accurate, and errors are not prone to occur.
In operation 103 of the method, after obtaining the size information, the object to be placed in the designated image may be adapted to the placing space to provide a placing manner for the object to be placed in the placing space. When the placing spaces are multiple, the adaptation can be used for representing the placing space which is most suitable for the object to be placed, and when the placing spaces are one, the adaptation can be used for representing the scheme that the object to be placed can be placed into the placing space.
In the method, according to the actual situation, the placing space can be a space with limited size proportion or a space with no limitation on size proportion, such as a corner, a storage cabinet, a desktop, a designated area on the desktop and the like. When the placing space is a space with no limitation on the size ratio, the object placing mode of the method can comprise the placing mode of the objects to be placed or the placing combination among a plurality of the objects to be placed. When the placing space is a space with limited size ratio, the object placing mode of the method not only comprises the placing combination among a plurality of objects to be placed, but also needs to comprise the placing mode between the objects to be placed and the placing space.
Specifically, the method may employ a reinforcement learning algorithm to determine the object placing manner of placing the object to be placed in the placing space, where the reinforcement learning algorithm includes but is not limited to: genetic algorithm, simulated annealing algorithm, iterative optimization algorithm, etc.
When the method is applied to the mobile phone software, the mobile phone software can generate the simulated placing image corresponding to the object placing mode according to the object placing mode, and display the simulated placing image, so that a user can manually place the object to be placed according to the simulated placing image, and the object to be placed is stored.
In an implementation manner, the operation 102 of performing a size analysis on the designated image and determining size information of at least one object to be placed includes: analyzing the size of the designated image, determining a first relative size of at least one object to be placed relative to the placing space, and adapting the at least one object to be placed and the placing space according to the first relative size; the designated image is one or more, and any one of the designated images contains a placing space.
In an implementation scenario, the size information of the method is a first relative size between the object to be placed and the placement space, where the first relative size is used to represent a three-dimensional ratio of length, width, and height between the object to be placed and the placement space, for example, the object to be placed is a book, the placement space is a cabinet, the actual length, width, and height of the book is 15 × 30 × 3cm, the actual length, width, and height of the cabinet is 150 × 300 × 30cm, image acquisition is performed on the book and the cabinet to obtain a specified image, relative size analysis is performed on the object to be placed and the placement space in the specified image through an algorithm for calculating relative proportions between articles, and it is known that the relative proportions of length, width, and height between the object to be placed and the placement space are respectively 5: 10: 1 and 50: 100: 10.
it should be understood that there are usually a plurality of objects to be placed in the designated image, and similarly, the method may determine the first relative size between each object to be placed and the placing space, and then adapt to each object to be placed and the placing space, so as to determine the object placing manner.
In another implementation scenario, when a plurality of objects to be placed exist and a plurality of objects to be placed and a placing space cannot be shot in the same designated image during image acquisition, the method can acquire a plurality of designated images, wherein at least one designated image includes the placing space and at least one object to be placed, and thus, a first relative size of at least one object to be placed with respect to the placing space can be obtained. Further, in order to obtain a first relative size of the object to be placed relative to the placing space between the different designated images, in one implementation, the method can shoot different objects to be placed under the conditions of the same distance and the same angle, so that the relative proportions of the object to be placed and the placing space in the different designated images can be basically guaranteed to be consistent.
In another embodiment, when the placing space is a placing space with a limited size, in the case of image acquisition, the placing space may be present in each designated image, and thus, the first relative size of the object to be placed with respect to the placing space may be determined based on the placing space. After the first relative size is obtained, the method can adapt the object to be placed and the placing space, so that the object placing mode adaptive to the placing space is obtained.
In this way, the object to be placed in one of the designated images and the object to be placed in at least one of the other designated images can be used as a reference object, and the relative proportion between all the objects to be placed in the two designated images can be determined.
In an implementation manner, the operation 102, performing a size analysis on the designated image, and determining size information of at least one object to be placed, includes: carrying out size analysis on the designated image, and determining a second relative size among a plurality of objects to be placed; wherein the second relative size comprises a relative three-dimensional scale of each object to be placed and a relative object scale between the plurality of objects to be placed.
In another implementation scenario, when there are a plurality of objects to be placed, in addition to the adaptation between the objects to be placed and the placing space, the relative three-dimensional ratio between the objects to be placed needs to be analyzed, so as to determine the placing combination between the objects to be placed. The combination is used for indicating the placing and abutting modes of a plurality of objects to be placed in the upper and lower directions, the left and right directions, the front and back directions and other directions. Specifically, the second relative size refers to a relative three-dimensional ratio of the object to be placed, that is, a ratio of length, width and height of the object to be placed, and a relative object ratio between the object to be placed and the object to be placed, for example, the object to be placed is two books, the sizes of the books are 15 × 40 × 3cm, and as can be seen from size analysis, the relative three-dimensional ratio between the length, width and height of the object to be placed is 15: 40: 3, the relative object proportion between the object to be placed and the object to be placed is specifically as follows: the length, width and height relative ratios are respectively 1: 1. and by utilizing the second relative size, a relative size basis can be provided for the combination of the objects to be placed, so that the combination analysis is carried out by utilizing an algorithm, and the object placing mode meeting the requirement is obtained. The method of combined analysis may employ a reinforcement learning algorithm.
In an implementation manner, the operation 103 of adapting, according to the size information, at least one object to be placed and the placing space, and determining a placing manner of the object, so that the at least one object to be placed is located in the adapted placing space, includes: firstly, performing combined analysis on a plurality of objects to be placed according to a second relative size to determine object placement combinations meeting space conditions; then, the object placing combination and the placing space are adapted, and the placing mode of the object placing combination is determined, so that the object placing combination is located in the placing space.
In an implementation scenario, the method may first determine an object placement combination between objects to be placed, and then adapt the object placement combination to a placement space. The method firstly performs combination analysis according to the second relative size to determine the object placement combination meeting the space condition. The space condition can be a condition for limiting the length-width-height three-dimensional proportion of the object placing combination. For example, the space condition may be set to place the object to be placed in a rectangular parallelepiped having a length-width-height ratio of 3 × 4 × 5. It will be appreciated that the particular value of the high ratio of length to width may be modified by the user depending on the circumstances. The spatial conditions may also be such that no actual scale is involved, or that all relative three-dimensional scales are required to be set; but rather a certain condition is reached, for example, the spatial condition limit is: the placement mode with the minimum occupied space, the placement mode without exceeding the designated height, the placement mode without exceeding the designated width and the like.
After the equipment obtains the second relative sizes of all the objects to be placed in pairs, the combination simulation is carried out through an algorithm, one or more object placing combinations meeting space conditions can be obtained, and the space conditions can be selected more. It can be understood that according to actual needs, the method can output various object placement combinations meeting different or same spatial conditions for selection by the user. The method can also adapt the obtained object placing combination and placing space to screen various object placing combinations, thereby determining the placing mode of the object placing combination meeting the user requirements. Specifically, when the placing space is the placing space with space limitation, the method can screen the object placing combinations according to the limited proportion of the placing space, so that the object placing combinations meeting the requirements are obtained. It should be added that the combinations referred to by the method include, but are not limited to, up-and-down stacking, left-and-right abutting, front-and-back abutting, partial abutting and the like between the objects to be placed.
In an implementation manner, the adapting the object placement combination and the placement space to determine the placement manner of the object placement combination so that the object placement combination is located in the placement space includes: firstly, determining a preset placing space according to a specified image or a preset three-dimensional space proportion; then, carrying out size analysis on the designated image, and determining a third relative size of a preset placing space and an object placing combination; and then, matching the object placing combination with the placing space according to the third relative size, and determining the placing mode of the object placing combination.
Specifically, when the placing space is a placing space with a limited proportion, the placing space and the corresponding space limitation need to be determined first. In an implementation scenario, when a placing space exists in a designated image, the method can determine the placing space by identifying the designated image, then determine a first relative size by using an object to be placed in the designated image as a proportion reference, and perform size analysis on the placing space to determine a three-dimensional space proportion of the placing space, namely a relative length-width-height proportion, and after obtaining an object placing combination by using a second relative proportion, determine a third relative size of a preset placing space and the object placing combination by using the first relative proportion, thereby adapting the object placing combination and the placing space according to the third relative size and determining a placing mode of the object placing combination.
In an implementation manner, the operation 103 of adapting, according to the size information, at least one object to be placed and the placing space, and determining a placing manner of the object, so that the at least one object to be placed is located in the adapted placing space, includes: firstly, carrying out size analysis on an appointed image, determining a fourth relative size of an appointed placing space and one object to be placed in the appointed placing space, and obtaining a three-dimensional space proportion corresponding to the appointed placing space; then, performing combined analysis on the plurality of objects to be placed according to the three-dimensional space proportion, the second relative size and the fourth relative size to determine a specified placement combination which is suitable for a specified space; the system comprises a plurality of designated images, a display device and a display control device, wherein the designated images are one or more, and any one designated image comprises a designated placing space so as to obtain a three-dimensional space proportion corresponding to the designated placing space; or, the placing space is appointed to be a preset three-dimensional space proportion.
In an implementation scenario, when there is a specific placement space with space limitation in the specific image, the method may first determine a fourth relative size between the object to be placed and the specific placement space, and then determine a specific placement combination capable of matching the specific placement space according to the specific placement space. Specifically, the method can analyze the sizes of the placing space and the objects to be placed in the designated image, determine the fourth relative size of the designated placing space and one of the objects to be placed, and obtain the three-dimensional space proportion corresponding to the designated placing space. According to the three-dimensional space proportion corresponding to the appointed placing space, the space condition of the method can be set to be that the three-dimensional proportion of the appointed placing combination does not exceed the three-dimensional space proportion of the appointed placing space, the accommodating space proportion of the appointed placing combination is determined according to the second relative size and the fourth relative size, and the plurality of objects to be placed are subjected to combined analysis based on the space condition to obtain the appointed placing combination adaptive to the appointed space.
In an embodiment, the size analysis of the designated image to determine the second relative size between the plurality of objects to be placed includes: firstly, determining a reference object according to an object to be placed; then, determining a reference proportion of a reference object; and then, determining a second relative size between each object to be placed and the reference object according to the reference proportion.
Because there are a plurality of objects to be placed, in the case of performing a combined analysis of the objects to be placed, the method needs to know the second relative size between the objects to be placed, specifically, the method can randomly or specifically select one of the objects to be placed as a reference object among all the objects to be placed, and set the three-dimensional ratio of the reference object to X: y: and Z, calculating the relative proportion between each other object to be placed and the reference object through a relative size algorithm, wherein the relative proportion of the object A is 1.1X: 1.2Y: 1.3Z, relative proportion of subject B1.2X: 1.1Y: 1.1Z, when the combination between object a and object B is performed, the ratio of 1.1X: 1.2Y: 1.3Z and 1.2X: 1.1Y: 1.1Z to perform the dimensional fit to enable subsequent combinatorial analysis.
In an embodiment, the size analysis of the designated image to determine the second relative size between the plurality of objects to be placed includes: firstly, carrying out shape classification on an object to be placed, and determining a regular shape object and an irregular shape object; then, performing shape virtual processing on the irregular shape object to determine a virtual shape object; and then, performing size analysis according to the regular shape object and the virtual shape object to determine a second relative size.
The regular-shaped object referred to by the method is in a cuboid shape, and the irregular-shaped object referred to by the method is any other object except the cuboid shape. In one implementation scenario, the objects to be placed include regular shaped objects such as shoes, books, etc. and irregular shaped objects such as cups, spheres, etc. When the designated image is identified and the irregular shape object is determined to exist in the object to be placed, the method performs shape virtual processing on the irregular shape object to determine a virtual shape object, wherein the virtual shape object is used for representing and virtualizing the irregular shape object into the regular shape object. For example, if a cup in a cylindrical shape is recognized in the designated image, and the size information is 3 high and 3 radius, the cup is virtualized to obtain a virtual shape object in a cube having a virtual shape of 3 × 3 × 3. In performing the size analysis, all of the irregular shaped objects are size analyzed in the virtual shape to determine a second relative size. That is, when the object to be placed is in a regular shape, the second relative size is used to characterize the relative proportion between the object to be placed and the reference object. When the object to be placed is in an irregular shape, the second relative size is used for representing the relative proportion between the virtual regular shape corresponding to the object to be placed and the reference object. By the operation, all the objects to be placed are combined in the shape of the cuboid during size analysis, so that the object placing combination can be obtained more quickly and conveniently.
In an embodiment, the size analysis of the designated image to determine the second relative size between the plurality of objects to be placed includes: firstly, carrying out occlusion analysis on an object to be placed, and determining an occluded object; determining an occluding object from the occluded object; then, obtaining the occlusion proportion of the occlusion object, and determining the second relative size of the occluded object and the occlusion object according to the occlusion proportion.
In an implementation scenario, when a plurality of objects to be placed are subjected to image acquisition, and it may occur that the objects to be placed in the images partially overlap, when the method determines that an occluded object exists in the objects to be placed by performing image recognition on a specified image, the method needs to analyze the size of the occluded object to determine the second relative size of the occluded object. In particular, the method may determine the relative proportion of occluded objects based on the relative proportion of occluded objects. The occlusion object refers to an object to be placed in the designated image, which occludes the occluded object. For example, in the designated image, there are a shoe box a and a shoe box B, and the shoe box a is an occlusion object and is occluded in the width direction of the shoe box B, so that the relative width of the shoe box B cannot be obtained. The length, width and height relative ratios in the second relative size of the shoe box A and the reference object are respectively 1: 2: 3, the relative size of the missing width in the second relative size of the shoe box B and the reference object is known, namely, the relative ratio of length, width and height in the second relative size between the shoe box B and the reference object is respectively 2: is it a question of : 4. the method can determine the width proportion of the shielding object to the reference object as the relative proportion of the shielded object to the reference object, namely, the relative proportions of length, width and height in the second relative size between the shoe box B and the reference object are respectively 2: 2: 4. in this way, the method can obtain the second relative size between all the objects to be placed in the designated image.
To facilitate further understanding of the foregoing embodiments, a specific implementation scenario is provided below, in which the method is applied to a mobile phone software for providing help for article storage.
When a user needs to place a plurality of articles in a placing space with space size limitation, the user acquires images of the plurality of articles and the placing space through a mobile phone camera to obtain one or more appointed images. When the designated images are multiple, at least one article to be placed in any one designated image and the article to be placed in at least one other designated image are the same article to be placed, or at least one placing space in any one designated image and the placing space in at least one other designated image are the same placing space.
The method needs to perform relative size analysis of the three-dimensional ratio of the placement space and the at least one to-be-placed object in the designated image to obtain the relative three-dimensional ratio between the at least one to-be-placed object and the placement space. In addition, the method needs to perform relative size analysis of the three-dimensional ratio between the articles to be placed so as to determine the relative three-dimensional ratio between the articles to be placed. Then, the space limitation condition of the placing space can be determined according to the relative three-dimensional ratio between at least one article to be placed and the placing space, for example, 10 articles to be placed exist, wherein the self three-dimensional ratio of one article to be placed is 1: 1: 1, the relative three-dimensional proportion between the article to be placed and the placing space is respectively 1: 10,1: 8,1: 9, the relative three-dimensional ratio of the placing space to the article to be placed can be determined to be 10: 8: 9. namely, 10 articles to be placed need to be placed in a relative three-dimensional ratio of 10: 8: 9 in the space for placing. It can be understood that, with the article to be placed as a reference article, the relative three-dimensional proportions between other articles to be placed and the article to be placed can be determined, and after the relative three-dimensional proportions of the article without opinions are obtained, a plurality of articles to be placed can be combined and analyzed to obtain a combination mode of the articles to be placed which can be placed in the placing space.
When a user needs to place a plurality of articles in a placing space without space size limitation, the method can directly combine the articles to be placed according to the relative three-dimensional proportion of the articles to be placed so as to obtain the combination mode of the articles to be placed. The specific combination style can be limited by presetting a three-dimensional proportion, if preset, combining a plurality of articles to be placed into a combined object with a relative three-dimensional proportion of 4: 5: 6, placing and combining articles; or a plurality of articles to be placed are combined into an article placing combination with the smallest space and floor area in a preset manner; or preset to combine a plurality of articles to be placed into an article placement combination with a specified height limit, and the like. The specific preset conditions can be determined by inputting in the mobile phone software by the user.
After the combination mode of the objects to be placed is determined, the method can generate images according to the combination mode of the objects to be placed, generate corresponding virtual placement images to display, so that a user can obtain the combination mode of the objects to be placed more intuitively, place the objects to be placed according to the virtual placement images, and complete storage of the objects to be placed.
Fig. 2 shows a schematic diagram of an implementation module of an image processing apparatus according to an embodiment of the present application.
Referring to fig. 2, according to a second aspect of the embodiments of the present application, there is provided an image processing apparatus including: an obtaining module 201, configured to obtain a specified image including at least one object to be placed; the analysis module 202 is configured to perform size analysis on the designated image and determine size information of at least one object to be placed; the adapting module 203 is configured to adapt at least one object to be placed and the placing space according to the size information, and determine an object placing manner, so that the at least one object to be placed is located in the adapted placing space.
In one embodiment, the analysis module 202 includes: analyzing the size of the designated image, determining a first relative size of at least one object to be placed relative to the placing space, and adapting the at least one object to be placed and the placing space according to the first relative size; the designated image is one or more, and any one of the designated images contains a placing space.
In one embodiment, the analysis module 202 includes: carrying out size analysis on the designated image, and determining a second relative size among a plurality of objects to be placed; wherein the second relative size comprises a relative three-dimensional proportion of each object to be placed and a relative object proportion among the plurality of objects to be placed.
In an embodiment, the adaptation module 203 includes: the combination submodule 2031 is configured to perform combination analysis on the multiple objects to be placed according to the second relative size, and determine an object placement combination that meets the spatial condition; the determining submodule 2032 is configured to adapt the object placement combination to the placement space, and determine a placement manner of the object placement combination, so that the object placement combination is located in the placement space.
In one embodiment, the determining sub-module 2032 comprises: determining a preset placing space according to the specified image or the preset three-dimensional space proportion; analyzing the size of the designated image, and determining a third relative size of a preset placing space and an object placing combination; and matching the object placing combination with the placing space according to the third relative size to determine the placing mode of the object placing combination.
In an embodiment, the adaptation module 203 includes: the analysis submodule 2033 is configured to perform size analysis on the designated image, determine a fourth relative size between the designated placement space and one of the objects to be placed, and obtain a three-dimensional space ratio corresponding to the designated placement space; the combination sub-module 2031 is further configured to perform combination analysis on the multiple objects to be placed according to the three-dimensional space proportion, the second relative size, and the fourth relative size, so as to determine a specified placement combination adapted to the specified space; the system comprises a plurality of designated images, a display device and a display control device, wherein the designated images are one or more, and any one designated image comprises a designated placing space so as to obtain a three-dimensional space proportion corresponding to the designated placing space; or the placing space is a preset three-dimensional space proportion.
In one embodiment, the analysis module 202 includes: determining a reference object according to an object to be placed; determining a reference proportion of a reference object; and determining a second relative size between each object to be placed and the reference object according to the reference proportion.
In one embodiment, the analysis module 202 includes: classifying the shape of an object to be placed, and determining a regular shape object and an irregular shape object; performing shape virtual processing on the irregular shape object to determine a virtual shape object; a size analysis is performed based on the regular shape object and the virtual shape object to determine a second relative size.
In one embodiment, the analysis module 202 includes: carrying out occlusion analysis on an object to be placed, and determining an occluded object; determining an occluding object from the occluded object; and obtaining the shielding proportion of the shielding object, and determining the second relative size of the shielded object and the shielding object according to the shielding proportion.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
FIG. 3 shows a schematic block diagram of an example electronic device 300 that may be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 3, the apparatus 300 includes a computing unit 301 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)302 or a computer program loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The calculation unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 301 executes the respective methods and processes described above, such as an image processing method. For example, in some embodiments, the image processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 300 via ROM 302 and/or communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the image processing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure may be performed in parallel or sequentially or in a different order, and are not limited herein as long as the desired results of the combination of techniques disclosed herein can be achieved.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of image processing, the method comprising:
obtaining a designated image containing at least one object to be placed;
analyzing the size of the appointed image, and determining the size information of the at least one object to be placed;
and adapting the at least one object to be placed and the placing space according to the size information, and determining an object placing mode so that the at least one object to be placed is located in the adapted placing space.
2. The method of claim 1, wherein performing a size analysis on the designated image to determine size information of the at least one object to be placed comprises:
performing size analysis on the specified image, determining a first relative size of the at least one object to be placed relative to the placing space, and adapting the at least one object to be placed and the placing space according to the first relative size;
the designated images are one or more, and any one of the designated images comprises the placing space.
3. The method of claim 1, wherein the analyzing the size of the designated image to determine the size information of the at least one object to be placed comprises:
carrying out size analysis on the designated image, and determining a second relative size among a plurality of objects to be placed;
wherein the second relative size comprises a relative three-dimensional proportion of each object to be placed and a relative object proportion among a plurality of objects to be placed.
4. The method according to claim 3, wherein the adapting the at least one object to be placed and the placing space according to the size information and determining the placing manner of the object so that the at least one object to be placed is located in the adapted placing space comprise:
performing combined analysis on the plurality of objects to be placed according to the second relative size, and determining object placement combinations meeting space conditions;
and matching the object placing combination with the placing space, and determining the placing mode of the object placing combination so as to enable the object placing combination to be located in the placing space.
5. The method of claim 4, wherein the adapting the object arrangement combination and the arrangement space to determine the arrangement manner of the object arrangement combination so that the object arrangement combination is located in the arrangement space comprises:
determining a preset placing space according to the specified image or the preset three-dimensional space proportion;
analyzing the size of the designated image, and determining a third relative size of a preset placing space and an object placing combination;
and matching the object placing combination with the placing space according to the third relative size to determine the placing mode of the object placing combination.
6. The method according to claim 3, wherein the adapting the at least one object to be placed and the placing space according to the size information and determining the placing manner of the object so that the at least one object to be placed is located in the adapted placing space comprise:
analyzing the size of the designated image, determining a fourth relative size of a designated placing space and one object to be placed, and obtaining a three-dimensional space proportion corresponding to the designated placing space;
performing combined analysis on the plurality of objects to be placed according to the three-dimensional space proportion, the second relative size and the fourth relative size to determine a specified placement combination which is suitable for a specified space;
the number of the appointed images is one or more, and any appointed image comprises the appointed placing space so as to obtain a three-dimensional space proportion corresponding to the appointed placing space; or the appointed placing space is a preset three-dimensional space proportion.
7. The method of claim 3, wherein the analyzing the specified image for size to determine a second relative size between the plurality of objects to be placed comprises:
determining a reference object according to the object to be placed;
determining a reference proportion of the reference object;
and determining a second relative size between each object to be placed and the reference object according to the reference proportion.
8. The method of claim 3, wherein the analyzing the specified image for size to determine a second relative size between the plurality of objects to be placed comprises:
carrying out shape classification on the object to be placed, and determining a regular shape object and an irregular shape object;
performing shape virtual processing on the irregular shape object to determine a virtual shape object;
performing size analysis according to the regular shape object and the virtual shape object to determine the second relative size.
9. The method of claim 3, wherein the analyzing the specified image for size to determine a second relative size between the plurality of objects to be placed comprises:
carrying out occlusion analysis on the object to be placed to determine an occluded object;
determining an occluding object from the occluded object;
obtaining an occlusion proportion of the occluding object, and determining the second relative size of the occluded object and the occluding object according to the occlusion proportion.
10. An image processing apparatus, the apparatus comprising:
the device comprises an obtaining module, a display module and a display module, wherein the obtaining module is used for obtaining a specified image containing at least one object to be placed;
the analysis module is used for carrying out size analysis on the specified image and determining the size information of the at least one object to be placed;
and the adaptation module is used for adapting the at least one object to be placed and the placing space according to the size information and determining an object placing mode so as to enable the at least one object to be placed to be located in the adapted placing space.
CN202210343674.6A 2022-03-31 2022-03-31 Image processing method and device Pending CN114897962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210343674.6A CN114897962A (en) 2022-03-31 2022-03-31 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210343674.6A CN114897962A (en) 2022-03-31 2022-03-31 Image processing method and device

Publications (1)

Publication Number Publication Date
CN114897962A true CN114897962A (en) 2022-08-12

Family

ID=82715854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210343674.6A Pending CN114897962A (en) 2022-03-31 2022-03-31 Image processing method and device

Country Status (1)

Country Link
CN (1) CN114897962A (en)

Similar Documents

Publication Publication Date Title
JP2020533254A (en) Methods and equipment for sorting cargo
EP4167194A1 (en) Key point detection method and apparatus, model training method and apparatus, device and storage medium
CN113065614B (en) Training method of classification model and method for classifying target object
EP4239491A1 (en) Method and system for processing data tables and automatically training machine learning model
CN110866008A (en) Data processing method, device and system
CN111897660B (en) Model deployment method, model deployment device and terminal equipment
CN111127612A (en) Game scene node updating method and device, storage medium and electronic equipment
CN114120414A (en) Image processing method, image processing apparatus, electronic device, and medium
CN113643260A (en) Method, apparatus, device, medium and product for detecting image quality
CN115578486A (en) Image generation method and device, electronic equipment and storage medium
CN113627298A (en) Training method of target detection model and method and device for detecting target object
CN110222621B (en) Similar house type detection method, electronic equipment and storage medium
CN114897962A (en) Image processing method and device
US11068739B1 (en) Method and system for comparison of object contours
US10909177B1 (en) Percentile determination system
CN113220815B (en) Regional information processing method and device
CN111652281B (en) Information data classification method, device and readable storage medium
CN109064393B (en) Face special effect processing method and device
CN113326203A (en) Information recommendation method, equipment and storage medium
CN111310618A (en) Article identification method and device, electronic equipment and readable storage medium
WO2023062724A1 (en) Image analysis system, image analysis method and program
CN111723247A (en) Graph-based hypothetical computation
CN113362117B (en) Visual analysis method, system, equipment and storage medium for commodity data
CN114615092B (en) Network attack sequence generation method, device, equipment and storage medium
CN112861034B (en) Method, device, equipment and storage medium for detecting information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination