WO2019196871A1 - Modeling method and related device - Google Patents

Modeling method and related device Download PDF

Info

Publication number
WO2019196871A1
WO2019196871A1 PCT/CN2019/082082 CN2019082082W WO2019196871A1 WO 2019196871 A1 WO2019196871 A1 WO 2019196871A1 CN 2019082082 W CN2019082082 W CN 2019082082W WO 2019196871 A1 WO2019196871 A1 WO 2019196871A1
Authority
WO
WIPO (PCT)
Prior art keywords
interest
points
target space
images
dimensional images
Prior art date
Application number
PCT/CN2019/082082
Other languages
French (fr)
Chinese (zh)
Inventor
叶青
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019196871A1 publication Critical patent/WO2019196871A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to a modeling method and related devices.
  • the embodiment of the present application provides a modeling method and related apparatus for providing a convenient three-dimensional space modeling manner.
  • an embodiment of the present application provides a modeling method, including:
  • N depth images of the target space the N being an integer greater than 1;
  • an embodiment of the present application provides a modeling apparatus, including:
  • An acquiring unit configured to acquire N depth images of the target space, where N is an integer greater than 1;
  • a first determining unit configured to determine, according to the point of interest algorithm, at least one point of interest in each of the depth images to obtain a plurality of points of interest
  • a second determining unit configured to determine related information of each of the points of interest, where the related information includes depth information
  • a modeling unit configured to establish a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
  • an embodiment of the present application provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the foregoing memory, and are configured by the foregoing processing. Executing, the above program includes instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
  • the embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the embodiment of the present application.
  • an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to perform the implementation as in the present application. Some or all of the steps described in any of the methods of the first aspect.
  • the computer program product can be a software installation package.
  • the mobile terminal acquires N depth images of the target space, and then determines a plurality of interest points in the N depth images, and finally builds according to depth information and space corresponding to the multiple interest points.
  • the modulo algorithm establishes a model of the target space. It realizes that the stereo space can be modeled only by the mobile terminal, and the operation is convenient and the user experience is improved.
  • FIG. 1 is a schematic flow chart of a modeling method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a cutoff distance function of a voxel grid provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of another modeling method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a modeling apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the mobile terminal may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of User Equipment (UE), mobile stations ( Mobile Station, MS), terminal device, etc.
  • UE User Equipment
  • MS Mobile Station
  • terminal device etc.
  • modeling stereo space is usually a combination of mobile terminals and external devices.
  • the external device can accurately measure the distance between any two points by using a laser. Since the external device combines the augmented reality technology AR, the user can select the place where the measurement is needed on the display screen of the mobile terminal to complete the measurement; After the distance information, the 3D image is automatically generated by the software built in the external device, and the generated 3D image is presented on the display screen of the mobile terminal, so that the mobile terminal can model the stereo space by means of the external device.
  • the present application provides a modeling method, and the specific implementation manner of the modeling method is as follows.
  • FIG. 1 is a schematic flowchart of a modeling method provided by an embodiment of the present application, where the method includes:
  • Step 101 The mobile terminal acquires N depth images of the target space, where N is an integer greater than 1.
  • the target space refers to a three-dimensional space, and the three-dimensional space may be a closed space or a semi-closed space, which is not limited herein.
  • the depth image refers to a three-dimensional image reflecting the geometry of the visible surface in the space.
  • Each depth image corresponds to an angle, and an angle corresponding to each depth image is different, and an angle of each depth image is an average of a plurality of angles corresponding to the plurality of two-dimensional images that synthesize the depth image.
  • the mobile terminal acquires N depth images of the target space, including:
  • the mobile terminal acquires M two-dimensional images of the target space by using a camera of the mobile terminal, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other.
  • the angle corresponding to the two-dimensional image is determined when the two-dimensional image is acquired, and the M is an integer greater than one;
  • the mobile terminal converts the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, and each of the three-dimensional images is converted by a plurality of two-dimensional images, and the plurality of two corresponding to the three-dimensional images
  • the angle difference corresponding to any two of the two-dimensional images in the dimension image is smaller than the first threshold, and the M is greater than the N;
  • the mobile terminal uses the N three-dimensional images as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
  • the number of cameras may be one or multiple.
  • the one camera may be a front camera, a rear camera or a depth camera; in the case where the number of cameras is two, the two cameras may be front dual cameras, Can be a rear dual camera.
  • the angle of each two-dimensional image includes three angles of the X-axis, the Y-axis, and the Z-axis of the mobile terminal and the three-dimensional coordinate system when the mobile terminal captures the two-dimensional image by using an angle detecting device (such as a gyroscope);
  • an angle detecting device such as a gyroscope
  • the angle of the two-dimensional image i is three angles of the X-axis, the Y-axis and the Z-axis of the two-dimensional image i mobile terminal and the three-dimensional coordinate system 1
  • the angle of the two-dimensional image j is a two-dimensional image j mobile terminal Three angles with the X-axis, the Y-axis, and the Z-axis of the three-dimensional coordinate system 2, wherein the three-dimensional coordinate system 1 and the three-dimensional coordinate system 2 are the same three-dimensional coordinate system, and the two-dimensional image i and the two-dimensional image j are both M One of the two-dimensional images.
  • the plurality of two-dimensional images include a two-dimensional image of a front surface, an upper surface, a rear surface, and a lower surface of the rectangular parallelepiped photographed by the camera in the first direction, and the camera is in the second direction a two-dimensional image of the left, upper, right, and lower surfaces of the cuboid, each surface corresponding to a plurality of two-dimensional images, the first direction being different from the second direction; since the camera is photographed in both the first direction and the second direction There are upper and lower surfaces of the rectangular parallelepiped, and thus a plurality of two-dimensional images have overlapping regions.
  • the three-dimensional reconstruction algorithm has Disney new image algorithm, Structure From Motion (SFM) algorithm, etc.; in the case that the camera is a depth camera, the three-dimensional reconstruction algorithm has Kinect Fusion algorithm .
  • the angle difference is the sum of the angles of the angle i and the angle j of the three angles of the X-axis, the Y-axis and the Z-axis, wherein the angle i and the angle j are each one of M angles.
  • the first threshold may be set by the user, or may be set by the mobile terminal, and is not limited herein.
  • the mobile terminal converts the plurality of two-dimensional images whose M-angle images have an angle difference smaller than the first threshold into a three-dimensional image according to the three-dimensional reconstruction algorithm.
  • the mobile terminal converts multiple two-dimensional images corresponding to the front surface of the rectangular parallelepiped captured in the first direction into a three-dimensional image corresponding to the front surface according to the Kinect Fusion algorithm, and the angle difference between the plurality of two-dimensional images corresponding to the front surface is smaller than a first threshold; the mobile terminal repeats the above operations on the upper surface, the lower surface, and the rear surface of the rectangular parallelepiped; the mobile terminal sequentially converts the plurality of two-dimensional images corresponding to the left surface of the rectangular parallelepiped captured in the second direction into corresponding ones of the left surface according to the Kinect Fusion algorithm A three-dimensional image, the angle difference of the plurality of two-dimensional images corresponding to the left surface is smaller than the first threshold; and the mobile terminal repeats the above operations on the upper surface, the right surface, and the lower surface of the rectangular parallelepiped.
  • Step 102 The mobile terminal determines at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest.
  • the point of interest refers to a pixel having a special property in the depth image.
  • the point of interest may be a corner point of the room.
  • the interest point algorithm has an edge extraction method, a corner point detection method, an interest operator method, and the like.
  • Step 103 The mobile terminal determines related information of each of the points of interest, where the related information includes depth information.
  • the related information further includes color information and an angle, and the color information refers to red R, green G, and blue B information of the point of interest.
  • the depth information of the point of interest includes the three-dimensional coordinates of the point of interest in the target space.
  • the mobile terminal determines the depth information and the color information of each point of interest.
  • the specific implementation manner is: the mobile terminal directly converts each depth image into a point cloud of the point cloud library PCL; the mobile terminal determines each point of interest in the PCL. Corresponding point cloud data; the mobile terminal uses point cloud data corresponding to each point of interest as depth information and color information corresponding to each point of interest.
  • the angle of the point of interest i and the angle of the point of interest j are the same; the point of interest i and the point of interest j are different depth images In the case of a point of interest, the angle of the point of interest i and the angle of the point of interest j are different.
  • Step 104 The mobile terminal establishes a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
  • the spatial modeling algorithm may be a 3D block matching algorithm.
  • the mobile terminal establishes a model of the target space according to related information and a spatial modeling algorithm corresponding to the multiple points of interest, including:
  • the mobile terminal determines a local descriptor of each of the points of interest according to the three-dimensional convolution model and related information of each of the points of interest;
  • the mobile terminal divides the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest includes two points of interest, and the depth images corresponding to the two points of interest are different;
  • the mobile terminal determines an Euler distance of each set of points of interest according to a Euler formula and a local descriptor of the points of interest included in each set of points of interest;
  • the mobile terminal removes one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold
  • the mobile terminal determines a model of the target space according to remaining points of interest among the plurality of points of interest.
  • the three-dimensional convolution model is a pre-trained model
  • the specific implementation manner of constructing the three-dimensional convolution model according to the reference sample data includes: inputting the reference sample data into the initial three-dimensional convolution model, and performing N-layer forward operation to obtain an output.
  • the gradient corresponding to the output result is obtained according to the output result
  • the gradient corresponding to the output result is subjected to the N-layer inverse operation to obtain the weight gradient of each layer, and the weight of each layer is updated according to the weight gradient of each layer.
  • the final iterative calculation results in the final weight, and the final weight is used as the convolution kernel of the initial three-dimensional convolution model to obtain a three-dimensional convolution model.
  • the reference sample data may be derived from data in an image taken by the mobile terminal, an open source data set, or data of an image obtained in other modeling processes; the reference sample data has diversity, thereby improving the three-dimensional convolution model. The accuracy of the operation.
  • the specific implementation manner of the local terminal determining the local descriptor of each interest point according to the three-dimensional convolution model and the related information of each interest point is: the mobile terminal expresses the depth information of the interest point i as 30*30*30 voxels The truncation distance function of the grid (as shown in Fig. 2); the mobile terminal inputs the truncation distance function of the 30*30*30 voxel grid corresponding to the point of interest i into the three-dimensional convolution model to obtain the local descriptor of the point of interest i,
  • the point of interest i is one of a plurality of points of interest.
  • Euler's formula is:
  • the second threshold value represents a maximum value corresponding to the Euler distances of the two points of interest when the two points of interest in the different depth images are the same point of interest in the target space, that is, when two points of interest in the different depth images
  • the two points of interest are the same point of interest in the target space
  • the Euler distances of the two points of interest in the different depth images are greater than or equal to the second threshold, the two points of interest are targets Different points of interest in space.
  • the mobile terminal determines a model of the target space according to the remaining points of interest in the plurality of points of interest.
  • the mobile terminal connects the remaining points of interest in the plurality of points of interest to form a model of the target space.
  • each surface corresponds to a depth image
  • each surface has 4 points of interest
  • the second threshold is 0.2.
  • the point of interest ie, the Euler distance of the set of points of interest is less than 0.2
  • the mobile terminal connects the remaining points of interest of the 24 points of interest to form a model of the target space.
  • the mobile terminal acquires N depth images of the target space, and then determines a plurality of interest points in the N depth images, and finally builds according to depth information and space corresponding to the multiple interest points.
  • the modulo algorithm establishes a model of the target space. It realizes that the stereo space can be modeled only by the mobile terminal, and the operation is convenient and the user experience is improved.
  • the method before the mobile terminal acquires the N depth images of the target space, the method further includes:
  • the mobile terminal performs a setting prompt by the prompting device, and the setting prompt is used to prompt the user to acquire N depth images of the target space.
  • the prompting device comprises a display screen and a microphone.
  • the manner in which the mobile terminal performs setting prompts through the prompting device includes: a text prompt, a voice prompt, a comic reminder, a short video prompt, and the like.
  • the method before the mobile terminal acquires the N depth images of the target space, the method further includes:
  • the mobile terminal determines that the mobile terminal satisfies a setting condition, the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting Environment; a voice instruction that is modeled for the current target space is detected.
  • the virtual button may be represented by an application icon set on the desktop of the mobile terminal.
  • the virtual button adopts the application icon, if the user needs to model the current space, if the mobile terminal is in the lock screen, the user needs to unlock the screen of the mobile terminal, and click the virtual button corresponding to the desktop of the mobile terminal.
  • the application icon which in turn quickly launches spatial modeling capabilities.
  • the virtual button can also be set in the interface of the modeling application of the mobile terminal, which is not limited herein.
  • the setting environment is that the user is in a closed space, or the user is in a semi-enclosed space, such as the user is in the house, or the user is in the car.
  • a non-enclosed space such as a playground in which the user is in the open air and surrounded by a wall
  • the playground since the playground is open-air and there is no surrounding wall, it is meaningless for the mobile terminal to spatially model the playground.
  • the user may interact with the mobile terminal in the form of voice, for example, the voice is “modeling for the current target space”, and the mobile terminal detects that the current target space is built.
  • the voice command of the mode the space modeling function is started to model the current target space, which is convenient and quick, and enhances the user experience.
  • the method further includes:
  • the mobile terminal displays a model of the target space through a display screen of the mobile terminal.
  • the mobile terminal displays the model of the target space through the display screen.
  • the user can use the model of the target space to display and explain to others, thereby improving the user experience.
  • the embodiment of the present application further provides another more detailed method flow, as shown in FIG. 3, the method includes:
  • Step 301 The mobile terminal determines that the mobile terminal satisfies a setting condition, where the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal In a setting environment; a voice instruction that models the current target space is detected.
  • the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal In a setting environment; a voice instruction that models the current target space is detected.
  • Step 302 The mobile terminal acquires M two-dimensional images of the target space by using a camera of the mobile terminal, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other.
  • the angle corresponding to each of the two-dimensional images is determined when the two-dimensional image is acquired, and the M is an integer greater than one.
  • Step 303 The mobile terminal converts the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, and each of the three-dimensional images is converted by a plurality of two-dimensional images, and each of the three-dimensional images corresponds to the The angle difference corresponding to any two of the plurality of two-dimensional images is smaller than a first threshold, and the M is greater than the N.
  • Step 304 The mobile terminal uses the N three-dimensional images as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
  • Step 305 The mobile terminal determines at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest.
  • Step 306 The mobile terminal determines related information of each of the points of interest, where the related information includes depth information.
  • Step 307 The mobile terminal determines a local descriptor of each of the points of interest according to the three-dimensional convolution model and related information of each of the points of interest.
  • Step 308 The mobile terminal divides the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest includes two points of interest, and the depth images corresponding to the two points of interest are different.
  • Step 309 The mobile terminal determines the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the point of interest included in each set of points of interest.
  • Step 310 The mobile terminal removes one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold.
  • Step 311 The mobile terminal determines a model of the target space according to remaining points of interest in the plurality of points of interest.
  • FIG. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • the mobile terminal includes a processor, a memory, a communication interface, and a Or a plurality of programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising instructions for performing the following steps:
  • N depth images of the target space the N being an integer greater than 1;
  • the program before acquiring the N depth images of the target space, the program further includes instructions for performing the following steps:
  • the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; A voice instruction that models the current target space is detected.
  • the program before acquiring the N depth images of the target space, the program further includes instructions for performing the following steps:
  • a setting prompt is provided by the prompting means for prompting to acquire N depth images of the target space.
  • the above program in acquiring N depth images of the target space, includes instructions specifically for performing the following steps:
  • the N three-dimensional images are used as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
  • the program in establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest, includes instructions specifically for performing the following steps:
  • the program in determining a model of the target space according to remaining points of interest in the plurality of points of interest, includes instructions specifically for performing the following steps:
  • the remaining points of interest of the plurality of points of interest are joined to form a model of the target space.
  • the above program further includes instructions for performing the following steps:
  • the model of the target space is displayed.
  • each depth image corresponds to an angle, and the angle corresponding to each depth image is different.
  • the point of interest is a pixel having a special property in the depth image.
  • the mobile terminal includes corresponding hardware structures and/or software modules for performing various functions.
  • the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for each particular application to implement the described functionality, but such implementation should not be considered to be beyond the scope of the application.
  • the embodiment of the present application may divide the functional unit into the modeling device according to the foregoing method example.
  • each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 5 shows a block diagram of one possible functional unit composition of the modeling apparatus involved in the above embodiment.
  • the modeling apparatus 500 includes a processing unit 501, a storage unit 502, and a communication unit 503.
  • the processing unit 501 includes an acquisition unit, a first determination unit, a second determination unit, and a modeling unit, where:
  • An acquiring unit configured to acquire N depth images of the target space, where N is an integer greater than 1;
  • a first determining unit configured to determine, according to the point of interest algorithm, at least one point of interest in each of the depth images to obtain a plurality of points of interest
  • a second determining unit configured to determine related information of each of the points of interest, where the related information includes depth information
  • a modeling unit configured to establish a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
  • the processing unit 501 further includes:
  • a third determining unit configured to determine that the mobile terminal satisfies a setting condition before acquiring the N depth images of the target space, where the setting condition includes at least one of: detecting a click operation for the virtual button, A virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; a voice instruction that is modeled for the current target space is detected.
  • the processing unit 501 further includes:
  • the prompting unit is configured to perform a setting prompt by using a prompting device, and the setting prompt is used to prompt to acquire N depth images of the target space before acquiring the N depth images of the target space.
  • the acquiring unit in acquiring N depth images of the target space, is specifically configured to:
  • the N three-dimensional images are used as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
  • the modeling unit is specifically configured to: according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest to establish a model of the target space:
  • the modeling unit in determining a model of the target space according to remaining points of interest in the plurality of points of interest, is specifically configured to:
  • the remaining points of interest of the plurality of points of interest are joined to form a model of the target space.
  • the processing unit 501 further includes:
  • a display unit configured to display a model of the target space in a case where a confirmation instruction for displaying the model of the target space is detected.
  • each depth image corresponds to an angle, and the angle corresponding to each depth image is different.
  • the point of interest is a pixel having a special property in the depth image.
  • the processing unit 501 may be a processor or a controller, and may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and a dedicated integrated controller (Application). -Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof.
  • the storage unit 502 may be a memory, and the communication unit 503 may It is a transceiver, a transceiver controller, a radio frequency chip, a communication interface, and the like.
  • the modeling apparatus may be the mobile terminal shown in FIG.
  • the mobile terminal includes: a shell, a circuit board, a camera, a display screen, an angle detecting device, a control camera, a display screen, and an angle detecting device.
  • the controller; the camera, the angle detecting device and the controller are disposed on the circuit board, the display screen is connected to the controller, and the angle detecting device comprises a gyroscope, an angle sensor, etc., wherein:
  • a controller configured to acquire N depth images of the target space, where N is an integer greater than 1; determining at least one interest point in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest; determining each Relevant information of the points of interest, the related information includes depth information; and a model of the target space is established according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
  • the mobile terminal further includes at least one functional component, and the controller is coupled to the at least one functional component, and the at least one functional component includes at least one of the following: a speaker, a microphone, a face recognition device, a proximity sensor, and an ambient light sensor.
  • the display screen comprises a touch screen and a display screen
  • the display screen comprises an organic light emitting diode display screen OLED.
  • the controller may comprise a processor and a memory, the control center of the mobile terminal, connecting various parts of the entire mobile terminal by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory And invoking data stored in the memory, performing various functions of the mobile terminal and processing data, thereby performing overall monitoring of the mobile terminal.
  • the processor can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor may also not be integrated into the processor.
  • the memory can be used to store software programs and modules, and the processor executes various functional applications and data processing of the mobile terminal by running software programs and modules stored in the memory.
  • the memory may mainly include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the mobile terminal, and the like.
  • the memory may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the mobile terminal acquires N depth images of the target space, and then determines a plurality of interest points in the N depth images, and finally builds related information and space corresponding to the plurality of interest points.
  • the modulo algorithm establishes a model of the target space. It realizes that the stereo space can be modeled only by the mobile terminal, and the operation is convenient and the user experience is improved.
  • the controller is further configured to:
  • the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; A voice instruction that models the current target space is detected.
  • a camera for acquiring M two-dimensional images of the target space, where M is an integer greater than one;
  • An angle detecting device configured to determine an angle of the two-dimensional image when the camera acquires the two-dimensional image, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other;
  • the controller is specifically configured to: convert the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, where each of the three-dimensional images is converted by a plurality of two-dimensional images, and each of the three-dimensional images corresponds to An angle difference corresponding to any two of the two-dimensional images is smaller than a first threshold, the M is greater than the N; the N three-dimensional images are N depth images, and the N The three-dimensional image is in one-to-one correspondence with the N depth images.
  • the controller in establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest, is specifically configured to:
  • the display screen is specifically configured to:
  • the model of the target space is displayed.
  • the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to perform some or all of the steps of any of the methods described in the foregoing method embodiments.
  • the above computer includes a mobile terminal.
  • the embodiment of the present application further provides a computer program product, where the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause the computer to execute any one of the methods described in the foregoing method embodiments. Part or all of the steps of the method.
  • the computer program product can be a software installation package, and the computer includes a mobile terminal.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described above as separate components may or may not be physically separated.
  • the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the above integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present application.
  • the foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • ROM Read-Only Memory
  • RAM Random Access Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Disclosed in the present application are a modeling method and a related device, the method comprising: acquiring N depth images of a target space; according to a point of interest algorithm, determining at least one point of interest in each depth image so as to obtain a plurality of points of interest; determining relevant information of each point of interest, the relevant information comprising depth information; according to the relevant information corresponding to the plurality of points of interest and a space modeling algorithm, establishing a model of the target space. By using an embodiment of the present application, a three-dimensional space may be modeled merely by means of a mobile terminal.

Description

建模方法及相关装置Modeling method and related device 技术领域Technical field
本申请涉及电子技术领域,尤其涉及一种建模方法及相关装置。The present application relates to the field of electronic technologies, and in particular, to a modeling method and related devices.
背景技术Background technique
当前随着智能手机等移动终端的日益普及,智能手机已成为智能手机用户生活中密不可分的一部分。用户可以通过智能手机拍照、图像处理等。目前,对立体空间(如封闭空间和半封闭空间)建模通常是需要移动终端与外部设备相结合来完成,操作比较复杂。With the increasing popularity of mobile terminals such as smart phones, smart phones have become an inseparable part of the lives of smartphone users. Users can take photos, image processing, etc. through their smartphones. At present, modeling a three-dimensional space (such as a closed space and a semi-enclosed space) usually requires a combination of a mobile terminal and an external device, and the operation is complicated.
发明内容Summary of the invention
本申请实施例提供一种建模方法及相关装置,用于提供便捷的立体空间建模方式。The embodiment of the present application provides a modeling method and related apparatus for providing a convenient three-dimensional space modeling manner.
第一方面,本申请实施例提供一种建模方法,包括:In a first aspect, an embodiment of the present application provides a modeling method, including:
获取目标空间的N个深度图像,所述N为大于1的整数;Obtaining N depth images of the target space, the N being an integer greater than 1;
根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;Determining at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest;
确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;Determining related information of each of the points of interest, the related information including depth information;
根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。And establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
第二方面,本申请实施例提供一种建模装置,包括:In a second aspect, an embodiment of the present application provides a modeling apparatus, including:
获取单元,用于获取目标空间的N个深度图像,所述N为大于1的整数;An acquiring unit, configured to acquire N depth images of the target space, where N is an integer greater than 1;
第一确定单元,用于根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;a first determining unit, configured to determine, according to the point of interest algorithm, at least one point of interest in each of the depth images to obtain a plurality of points of interest;
第二确定单元,用于确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;a second determining unit, configured to determine related information of each of the points of interest, where the related information includes depth information;
建模单元,用于根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。And a modeling unit, configured to establish a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
第三方面,本申请实施例提供一种移动终端,包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本申请实施例第一方面任一方法中的步骤的指令。In a third aspect, an embodiment of the present application provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the foregoing memory, and are configured by the foregoing processing. Executing, the above program includes instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。In a fourth aspect, the embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the embodiment of the present application. Some or all of the steps described in either method.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to perform the implementation as in the present application. Some or all of the steps described in any of the methods of the first aspect. The computer program product can be a software installation package.
可以看出,在本申请实施例中,首先,移动终端获取目标空间的N个深度图像,然后确定N个深度图像中的多个兴趣点,最后根据多个兴趣点对应的深度信息和空间建模算法建立目标空间的模型。实现了仅通过移动终端即可对立体空间进行建模,操作方便,提升用户体验。It can be seen that, in the embodiment of the present application, first, the mobile terminal acquires N depth images of the target space, and then determines a plurality of interest points in the N depth images, and finally builds according to depth information and space corresponding to the multiple interest points. The modulo algorithm establishes a model of the target space. It realizes that the stereo space can be modeled only by the mobile terminal, and the operation is convenient and the user experience is improved.
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the drawings to be used in the embodiments of the present application or the background art will be described below.
图1是本申请实施例提供的一种建模方法的流程示意图;1 is a schematic flow chart of a modeling method provided by an embodiment of the present application;
图2是本申请实施例提供的体素网格的截断距离函数的示意图;2 is a schematic diagram of a cutoff distance function of a voxel grid provided by an embodiment of the present application;
图3是本申请实施例提供的另一种建模方法的流程示意图;3 is a schematic flowchart of another modeling method provided by an embodiment of the present application;
图4是本申请实施例提供的一种移动终端的结构示意图;4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
图5是本申请实施例提供的一种建模装置的结构示意图;FIG. 5 is a schematic structural diagram of a modeling apparatus according to an embodiment of the present disclosure;
图6是本申请实施例提供的一种移动终端的结构示意图。FIG. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is an embodiment of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope shall fall within the scope of the application.
以下分别进行详细说明。The details are described below separately.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", and "fourth" and the like in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not used to describe a specific order. . Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。References to "an embodiment" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。The mobile terminal may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of User Equipment (UE), mobile stations ( Mobile Station, MS), terminal device, etc.
目前,对立体空间建模通常是移动终端与外部设备相结合的方式。该外部设备能够使用激光精确测量任意两点之间的距离,由于该外部设备结合了增强现实技术AR,用户在移动终端的显示屏上选择需要测量的地方即可完成测量;在获取到所需要的距离信息之后,通过该外部设备内置的软件自动生成3D图像,将生成的3D图像呈现在移动终端的显示屏上,这样就实现了移动终端借助于外部设备对立体空间建模。At present, modeling stereo space is usually a combination of mobile terminals and external devices. The external device can accurately measure the distance between any two points by using a laser. Since the external device combines the augmented reality technology AR, the user can select the place where the measurement is needed on the display screen of the mobile terminal to complete the measurement; After the distance information, the 3D image is automatically generated by the software built in the external device, and the generated 3D image is presented on the display screen of the mobile terminal, so that the mobile terminal can model the stereo space by means of the external device.
针对上述问题,本申请提供一种建模方法,该建模方法的具体实现方式请参见下述的内容。In view of the above problems, the present application provides a modeling method, and the specific implementation manner of the modeling method is as follows.
请参阅图1,图1是本申请实施例提供的一种建模方法的流程示意图,该方法包括:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a modeling method provided by an embodiment of the present application, where the method includes:
步骤101:移动终端获取目标空间的N个深度图像,所述N为大于1的整数。Step 101: The mobile terminal acquires N depth images of the target space, where N is an integer greater than 1.
其中,目标空间指的是立体空间,该立体空间可以是封闭空间,也可以是半封闭空间,在此不作限定。The target space refers to a three-dimensional space, and the three-dimensional space may be a closed space or a semi-closed space, which is not limited herein.
其中,深度图像指的是反映空间内可见表面的几何形状的三维图像。Among them, the depth image refers to a three-dimensional image reflecting the geometry of the visible surface in the space.
其中,每个深度图像对应一个角度,每个深度图像对应的角度是不同的,每个深度图像的角度是合成该深度图像的多个二维图像对应的多个角度的平均值。Each depth image corresponds to an angle, and an angle corresponding to each depth image is different, and an angle of each depth image is an average of a plurality of angles corresponding to the plurality of two-dimensional images that synthesize the depth image.
在本申请的一实施例中,移动终端获取目标空间的N个深度图像,包括:In an embodiment of the present application, the mobile terminal acquires N depth images of the target space, including:
移动终端通过所述移动终端的摄像头获取所述目标空间的M个二维图像,每个所述二维图像对应一个角度,且所述M个二维图像对应的角度互不相同,每个所述二维图像对应的角度是在获取所述二维图像时确定的,所述M为大于1的整数;The mobile terminal acquires M two-dimensional images of the target space by using a camera of the mobile terminal, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other. The angle corresponding to the two-dimensional image is determined when the two-dimensional image is acquired, and the M is an integer greater than one;
移动终端根据三维重建算法将所述M个二维图像转换为N个三维图像,每个所述三维 图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图像对应的角度差值小于第一阈值,所述M大于所述N;The mobile terminal converts the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, and each of the three-dimensional images is converted by a plurality of two-dimensional images, and the plurality of two corresponding to the three-dimensional images The angle difference corresponding to any two of the two-dimensional images in the dimension image is smaller than the first threshold, and the M is greater than the N;
移动终端将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。The mobile terminal uses the N three-dimensional images as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
其中,摄像头的数量可以是一个,也可以是多个。在摄像头的数量为一个的情况下,该一个摄像头可以是前置摄像头、后置摄像头或是深度摄像头;在摄像头的数量为两个的情况下,该两个摄像头可以是前置双摄像头,也可以是后置双摄像头。The number of cameras may be one or multiple. In the case where the number of cameras is one, the one camera may be a front camera, a rear camera or a depth camera; in the case where the number of cameras is two, the two cameras may be front dual cameras, Can be a rear dual camera.
其中,每个二维图像的角度包括移动终端通过角度检测装置(如陀螺仪等)拍摄该二维图像时移动终端与三维坐标系的X轴、Y轴和Z轴的三个夹角;The angle of each two-dimensional image includes three angles of the X-axis, the Y-axis, and the Z-axis of the mobile terminal and the three-dimensional coordinate system when the mobile terminal captures the two-dimensional image by using an angle detecting device (such as a gyroscope);
其中,二维图像i的角度为拍摄二维图像i移动终端与三维坐标系1的X轴、Y轴和Z轴的三个夹角,二维图像j的角度为拍摄二维图像j移动终端与三维坐标系2的X轴、Y轴和Z轴的三个夹角,其中,三维坐标系1与三维坐标系2为同一个三维坐标系,二维图像i和二维图像j均是M个二维图像中的其中一个。The angle of the two-dimensional image i is three angles of the X-axis, the Y-axis and the Z-axis of the two-dimensional image i mobile terminal and the three-dimensional coordinate system 1, and the angle of the two-dimensional image j is a two-dimensional image j mobile terminal Three angles with the X-axis, the Y-axis, and the Z-axis of the three-dimensional coordinate system 2, wherein the three-dimensional coordinate system 1 and the three-dimensional coordinate system 2 are the same three-dimensional coordinate system, and the two-dimensional image i and the two-dimensional image j are both M One of the two-dimensional images.
具体地,在目标空间近似为长方体的情况下,多个二维图像包括摄像头沿第一方向拍摄的长方体的前表面、上表面、后表面和下表面的二维图像,以及摄像头沿第二方向拍摄的长方体的左表面、上表面、右表面和下表面的二维图像,每个表面均对应多张二维图像,第一方向不同于第二方向;由于摄像头沿第一方向和第二方向均拍摄有长方体的上表面和下表面,因此多个二维图像存在重叠区域。Specifically, in a case where the target space is approximately a rectangular parallelepiped, the plurality of two-dimensional images include a two-dimensional image of a front surface, an upper surface, a rear surface, and a lower surface of the rectangular parallelepiped photographed by the camera in the first direction, and the camera is in the second direction a two-dimensional image of the left, upper, right, and lower surfaces of the cuboid, each surface corresponding to a plurality of two-dimensional images, the first direction being different from the second direction; since the camera is photographed in both the first direction and the second direction There are upper and lower surfaces of the rectangular parallelepiped, and thus a plurality of two-dimensional images have overlapping regions.
其中,在摄像头为非深度摄像头的情况下,三维重建算法有迪斯尼新图像算法、运动构建模型(Structure From Motion,SFM)算法等;在摄像头为深度摄像头的情况下,三维重建算法有Kinect Fusion算法。Among them, in the case that the camera is a non-depth camera, the three-dimensional reconstruction algorithm has Disney new image algorithm, Structure From Motion (SFM) algorithm, etc.; in the case that the camera is a depth camera, the three-dimensional reconstruction algorithm has Kinect Fusion algorithm .
其中,角度差值是角度i和角度j在X轴、Y轴和Z轴的三个夹角差值之和,其中,角度i和角度j均为M个角度中的其中一个。Wherein, the angle difference is the sum of the angles of the angle i and the angle j of the three angles of the X-axis, the Y-axis and the Z-axis, wherein the angle i and the angle j are each one of M angles.
其中,第一阈值可以是用户设置的,也可以是移动终端设置的,在此不作限定。The first threshold may be set by the user, or may be set by the mobile terminal, and is not limited herein.
具体地,在目标空间近似为长方体和摄像头为深度摄像头的情况下,移动终端根据三维重建算法将M个二维图像中角度差值小于第一阈值的多个二维图像转换为一个三维图像的具体实施方式有:移动终端根据Kinect Fusion算法将沿第一方向拍摄的长方体的前表面对应的多张二维图像转换为前表面对应的一张三维图像,前表面对应的多张二维图像的角度差值小于第一阈值;移动终端对长方体的上表面、下表面和后表面重复上述操作;移动终端根据Kinect Fusion算法依次将沿第二方向拍摄的长方体的左表面对应的多张二维图像转换为左表面对应的一张三维图像,左表面对应的多张二维图像的角度差值小于第一阈值;移动终端对长方体的上表面、右表面和下表面重复上述操作。Specifically, in a case where the target space is approximately a rectangular parallelepiped and the camera is a depth camera, the mobile terminal converts the plurality of two-dimensional images whose M-angle images have an angle difference smaller than the first threshold into a three-dimensional image according to the three-dimensional reconstruction algorithm. The mobile terminal converts multiple two-dimensional images corresponding to the front surface of the rectangular parallelepiped captured in the first direction into a three-dimensional image corresponding to the front surface according to the Kinect Fusion algorithm, and the angle difference between the plurality of two-dimensional images corresponding to the front surface is smaller than a first threshold; the mobile terminal repeats the above operations on the upper surface, the lower surface, and the rear surface of the rectangular parallelepiped; the mobile terminal sequentially converts the plurality of two-dimensional images corresponding to the left surface of the rectangular parallelepiped captured in the second direction into corresponding ones of the left surface according to the Kinect Fusion algorithm A three-dimensional image, the angle difference of the plurality of two-dimensional images corresponding to the left surface is smaller than the first threshold; and the mobile terminal repeats the above operations on the upper surface, the right surface, and the lower surface of the rectangular parallelepiped.
步骤102:移动终端根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点。Step 102: The mobile terminal determines at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest.
其中,兴趣点指的是深度图像中具有特殊性质的像素点。比如,在目标空间为房间的情况下,兴趣点可以是房间的角点。Among them, the point of interest refers to a pixel having a special property in the depth image. For example, in the case where the target space is a room, the point of interest may be a corner point of the room.
其中,兴趣点算法有边缘提取法、角点检测法、兴趣算子法,等等。Among them, the interest point algorithm has an edge extraction method, a corner point detection method, an interest operator method, and the like.
步骤103:移动终端确定每个所述兴趣点的相关信息,所述相关信息包括深度信息。Step 103: The mobile terminal determines related information of each of the points of interest, where the related information includes depth information.
其中,该相关信息还包括颜色信息和角度,该颜色信息指的是兴趣点的红色R、绿色G和蓝色B信息。The related information further includes color information and an angle, and the color information refers to red R, green G, and blue B information of the point of interest.
其中,兴趣点的深度信息包括兴趣点在目标空间的三维坐标。The depth information of the point of interest includes the three-dimensional coordinates of the point of interest in the target space.
具体地,移动终端确定每个兴趣点的深度信息和颜色信息的具体实施方式有:移动终端将每个深度图像直接转换成点云库PCL的点云;移动终端确定每个兴趣点在PCL中对应的点云数据;移动终端将每个兴趣点对应的点云数据作为每个兴趣点对应的深度信息和颜 色信息。Specifically, the mobile terminal determines the depth information and the color information of each point of interest. The specific implementation manner is: the mobile terminal directly converts each depth image into a point cloud of the point cloud library PCL; the mobile terminal determines each point of interest in the PCL. Corresponding point cloud data; the mobile terminal uses point cloud data corresponding to each point of interest as depth information and color information corresponding to each point of interest.
其中,在兴趣点i和兴趣点j为同一深度图像中的兴趣点的情况下,兴趣点i的角度和兴趣点j的角度是相同的;在兴趣点i和兴趣点j是不同的深度图像中的兴趣点的情况下,兴趣点i的角度和兴趣点j的角度是不同的。Wherein, in the case where the point of interest i and the point of interest j are points of interest in the same depth image, the angle of the point of interest i and the angle of the point of interest j are the same; the point of interest i and the point of interest j are different depth images In the case of a point of interest, the angle of the point of interest i and the angle of the point of interest j are different.
步骤104:移动终端根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。Step 104: The mobile terminal establishes a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
其中,空间建模算法可以是3D块匹配算法。The spatial modeling algorithm may be a 3D block matching algorithm.
在本申请的一实施例中,移动终端根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型,包括:In an embodiment of the present application, the mobile terminal establishes a model of the target space according to related information and a spatial modeling algorithm corresponding to the multiple points of interest, including:
移动终端根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符;The mobile terminal determines a local descriptor of each of the points of interest according to the three-dimensional convolution model and related information of each of the points of interest;
移动终端将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同;The mobile terminal divides the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest includes two points of interest, and the depth images corresponding to the two points of interest are different;
移动终端根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离;The mobile terminal determines an Euler distance of each set of points of interest according to a Euler formula and a local descriptor of the points of interest included in each set of points of interest;
移动终端将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除;The mobile terminal removes one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold;
移动终端根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。The mobile terminal determines a model of the target space according to remaining points of interest among the plurality of points of interest.
具体地,三维卷积模型为预先训练好的模型,根据基准样本数据构建三维卷积模型的具体实施方式有:将基准样本数据输入到初始三维卷积模型中,执行N层正向运算得到输出结果,根据输出结果得到输出结果对应的梯度,将输出结果对应的梯度执行N层反向运算得到每层的权值梯度,根据每层的权值梯度对每层的权值进行更新,经过多次迭代计算得到最终的权值,将该最终的权值作为初始三维卷积模型的卷积核,得到三维卷积模型。其中,基准样本数据可以来源于通过移动终端拍摄的图像中的数据、开源的数据集或者进行其他建模过程中得到的图像的数据;该基准样本数据具有多样性,进而提高了三维卷积模型的运算精度。Specifically, the three-dimensional convolution model is a pre-trained model, and the specific implementation manner of constructing the three-dimensional convolution model according to the reference sample data includes: inputting the reference sample data into the initial three-dimensional convolution model, and performing N-layer forward operation to obtain an output. As a result, the gradient corresponding to the output result is obtained according to the output result, and the gradient corresponding to the output result is subjected to the N-layer inverse operation to obtain the weight gradient of each layer, and the weight of each layer is updated according to the weight gradient of each layer. The final iterative calculation results in the final weight, and the final weight is used as the convolution kernel of the initial three-dimensional convolution model to obtain a three-dimensional convolution model. The reference sample data may be derived from data in an image taken by the mobile terminal, an open source data set, or data of an image obtained in other modeling processes; the reference sample data has diversity, thereby improving the three-dimensional convolution model. The accuracy of the operation.
其中,移动终端根据三维卷积模型和每个兴趣点的相关信息确定每个兴趣点的局部描述符的具体实施方式为:移动终端将兴趣点i的深度信息表示为30*30*30体素网格的截断距离函数(如图2所示);移动终端将兴趣点i对应的30*30*30体素网格的截断距离函数输入三维卷积模型,得到兴趣点i的局部描述符,兴趣点i为多个兴趣点中的其中一个。The specific implementation manner of the local terminal determining the local descriptor of each interest point according to the three-dimensional convolution model and the related information of each interest point is: the mobile terminal expresses the depth information of the interest point i as 30*30*30 voxels The truncation distance function of the grid (as shown in Fig. 2); the mobile terminal inputs the truncation distance function of the 30*30*30 voxel grid corresponding to the point of interest i into the three-dimensional convolution model to obtain the local descriptor of the point of interest i, The point of interest i is one of a plurality of points of interest.
其中,欧拉公式为:Among them, Euler's formula is:
e ix=cos x+i sin x e ix =cos x+i sin x
其中,e为自然对数的底,i为虚数单位。Where e is the base of the natural logarithm and i is the imaginary unit.
其中,第二阈值表征不同深度图像中的两个兴趣点为目标空间中的同一兴趣点时两个兴趣点的欧拉距离所对应的最大值,即当不同深度图像中的两个兴趣点的欧拉距离小于第二阈值时,两个兴趣点为目标空间中的同一兴趣点;当不同深度图像中的两个兴趣点的欧拉距离大于或等于第二阈值时,两个兴趣点为目标空间中的不同兴趣点。Wherein, the second threshold value represents a maximum value corresponding to the Euler distances of the two points of interest when the two points of interest in the different depth images are the same point of interest in the target space, that is, when two points of interest in the different depth images When the Euler distance is less than the second threshold, the two points of interest are the same point of interest in the target space; when the Euler distances of the two points of interest in the different depth images are greater than or equal to the second threshold, the two points of interest are targets Different points of interest in space.
具体地,移动终端根据多个兴趣点中的剩余兴趣点确定目标空间的模型的具体实施方式有:移动终端将多个兴趣点中的剩余兴趣点连接形成目标空间的模型。Specifically, the mobile terminal determines a model of the target space according to the remaining points of interest in the plurality of points of interest. The mobile terminal connects the remaining points of interest in the plurality of points of interest to form a model of the target space.
举例来说,假设目标空间近似为长方体,每个表面对应一个深度图像,每个表面均有4个兴趣点,第二阈值为0.2,移动终端根据三维卷积模型和每个兴趣点的深度信息确定每个兴趣点的局部描述符,移动终端将24个兴趣点划分为80组兴趣点集,每组兴趣点集包括的两个兴趣点对应长方体不同的表面,移动终端根据欧拉公式e ix=cos x+i sin x和80组 兴趣点集中的每组兴趣点集包括的两个兴趣点的局部描述符确定每组兴趣点集的欧拉距离,移动终端将兴趣点集中相同的两个兴趣点(即该组兴趣点集的欧拉距离小于0.2)去除其中一个,移动终端将24个兴趣点中剩余的不同兴趣点连接形成目标空间的模型。 For example, suppose the target space is approximated as a rectangular parallelepiped, each surface corresponds to a depth image, each surface has 4 points of interest, and the second threshold is 0.2. The mobile terminal according to the three-dimensional convolution model and the depth information of each point of interest Determining the local descriptor of each point of interest, the mobile terminal divides the 24 points of interest into 80 sets of points of interest, each set of points of interest includes two points of interest corresponding to different surfaces of the cuboid, and the mobile terminal according to the Euler formula e ix =cos x+i sin x and 80 sets of interest points in each set of points of interest include local descriptors of two points of interest to determine the Euler distance of each set of points of interest, and the mobile terminal sets the same two points of interest The point of interest (ie, the Euler distance of the set of points of interest is less than 0.2) is removed, and the mobile terminal connects the remaining points of interest of the 24 points of interest to form a model of the target space.
可以看出,在本申请实施例中,首先,移动终端获取目标空间的N个深度图像,然后确定N个深度图像中的多个兴趣点,最后根据多个兴趣点对应的深度信息和空间建模算法建立目标空间的模型。实现了仅通过移动终端即可对立体空间进行建模,操作方便,提升用户体验。It can be seen that, in the embodiment of the present application, first, the mobile terminal acquires N depth images of the target space, and then determines a plurality of interest points in the N depth images, and finally builds according to depth information and space corresponding to the multiple interest points. The modulo algorithm establishes a model of the target space. It realizes that the stereo space can be modeled only by the mobile terminal, and the operation is convenient and the user experience is improved.
在本申请的一实施例中,移动终端获取目标空间的N个深度图像之前,所述方法还包括:In an embodiment of the present application, before the mobile terminal acquires the N depth images of the target space, the method further includes:
移动终端通过提示装置进行设定提示,所述设定提示用于提示用户获取目标空间的N个深度图像。The mobile terminal performs a setting prompt by the prompting device, and the setting prompt is used to prompt the user to acquire N depth images of the target space.
其中,提示装置包括显示屏和麦克风。Wherein, the prompting device comprises a display screen and a microphone.
具体地,移动终端通过提示装置进行设定提示的方式有:文字提示、语音提示、漫画提示、短视频提示,等等。Specifically, the manner in which the mobile terminal performs setting prompts through the prompting device includes: a text prompt, a voice prompt, a comic reminder, a short video prompt, and the like.
在本申请的一实施例中,移动终端获取目标空间的N个深度图像之前,所述方法还包括:In an embodiment of the present application, before the mobile terminal acquires the N depth images of the target space, the method further includes:
移动终端确定所述移动终端满足设定条件,所述设定条件包括以下至少一种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。The mobile terminal determines that the mobile terminal satisfies a setting condition, the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting Environment; a voice instruction that is modeled for the current target space is detected.
具体地,虚拟按钮可以采用设置在移动终端的桌面上的应用图标表示。在虚拟按钮采用应用图标的情况下,若用户需要对当前空间进行建模,此时移动终端若处于锁屏的情况下,用户需要解锁移动终端的屏幕,以及点击移动终端的桌面上虚拟按钮对应的应用图标,进而快速启动空间建模功能。虚拟按钮也可以设置在移动终端的建模应用的界面中,在此不作限定。Specifically, the virtual button may be represented by an application icon set on the desktop of the mobile terminal. In the case that the virtual button adopts the application icon, if the user needs to model the current space, if the mobile terminal is in the lock screen, the user needs to unlock the screen of the mobile terminal, and click the virtual button corresponding to the desktop of the mobile terminal. The application icon, which in turn quickly launches spatial modeling capabilities. The virtual button can also be set in the interface of the modeling application of the mobile terminal, which is not limited herein.
具体地,设定环境为用户处于封闭空间,或者用户处于半封闭空间,比如用户处于房子中,或用户处于汽车中。在用户处于非封闭空间的情况下,比如用户处于露天且四周无围墙的操场中,由于操场露天且四周无围墙,移动终端对该操场进行空间建模无意义。Specifically, the setting environment is that the user is in a closed space, or the user is in a semi-enclosed space, such as the user is in the house, or the user is in the car. In the case where the user is in a non-enclosed space, such as a playground in which the user is in the open air and surrounded by a wall, since the playground is open-air and there is no surrounding wall, it is meaningless for the mobile terminal to spatially model the playground.
具体地,若用户需要对当前目标空间进行建模时,用户可以采用语音的形式与移动终端进行交互,比如语音为“针对当前目标空间进行建模”,移动终端检测到针对当前目标空间进行建模的语音指令,启动空间建模功能对当前目标空间进行建模,方便快捷,提升用户的体验。Specifically, if the user needs to model the current target space, the user may interact with the mobile terminal in the form of voice, for example, the voice is “modeling for the current target space”, and the mobile terminal detects that the current target space is built. The voice command of the mode, the space modeling function is started to model the current target space, which is convenient and quick, and enhances the user experience.
在本申请的一实施例中,移动终端根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型之后,所述方法还包括:In an embodiment of the present application, after the mobile terminal establishes the model of the target space according to the related information and the spatial modeling algorithm corresponding to the multiple points of interest, the method further includes:
在检测到针对所述目标空间的模型进行显示的确认指令的情况下,移动终端通过所述移动终端的显示屏显示所述目标空间的模型。In the case where a confirmation instruction for displaying the model of the target space is detected, the mobile terminal displays a model of the target space through a display screen of the mobile terminal.
可见,在本申请实施例中,在检测到针对目标空间的模型进行显示的确认指令的情况下,移动终端通过显示屏显示目标空间的模型。这样用户可以采用该目标空间的模型向他人进行展示说明,提升用户的体验。It can be seen that, in the embodiment of the present application, in the case that the confirmation instruction for displaying the model of the target space is detected, the mobile terminal displays the model of the target space through the display screen. In this way, the user can use the model of the target space to display and explain to others, thereby improving the user experience.
本申请实施例还提供了另一更为详细的方法流程,如图3所示,该方法包括:The embodiment of the present application further provides another more detailed method flow, as shown in FIG. 3, the method includes:
步骤301:移动终端确定所述移动终端满足设定条件,所述设定条件包括以下至少一 种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。Step 301: The mobile terminal determines that the mobile terminal satisfies a setting condition, where the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal In a setting environment; a voice instruction that models the current target space is detected.
步骤302:移动终端通过所述移动终端的摄像头获取所述目标空间的M个二维图像,每个所述二维图像对应一个角度,且所述M个二维图像对应的角度互不相同,每个所述二维图像对应的角度是在获取所述二维图像时确定的,所述M为大于1的整数。Step 302: The mobile terminal acquires M two-dimensional images of the target space by using a camera of the mobile terminal, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other. The angle corresponding to each of the two-dimensional images is determined when the two-dimensional image is acquired, and the M is an integer greater than one.
步骤303:移动终端根据三维重建算法将所述M个二维图像转换为N个三维图像,每个所述三维图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图像对应的角度差值小于第一阈值,所述M大于所述N。Step 303: The mobile terminal converts the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, and each of the three-dimensional images is converted by a plurality of two-dimensional images, and each of the three-dimensional images corresponds to the The angle difference corresponding to any two of the plurality of two-dimensional images is smaller than a first threshold, and the M is greater than the N.
步骤304:移动终端将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。Step 304: The mobile terminal uses the N three-dimensional images as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
步骤305:移动终端根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点。Step 305: The mobile terminal determines at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest.
步骤306:移动终端确定每个所述兴趣点的相关信息,所述相关信息包括深度信息。Step 306: The mobile terminal determines related information of each of the points of interest, where the related information includes depth information.
步骤307:移动终端根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符。Step 307: The mobile terminal determines a local descriptor of each of the points of interest according to the three-dimensional convolution model and related information of each of the points of interest.
步骤308:移动终端将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同。Step 308: The mobile terminal divides the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest includes two points of interest, and the depth images corresponding to the two points of interest are different.
步骤309:移动终端根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离。Step 309: The mobile terminal determines the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the point of interest included in each set of points of interest.
步骤310:移动终端将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除。Step 310: The mobile terminal removes one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold.
步骤311:移动终端根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。Step 311: The mobile terminal determines a model of the target space according to remaining points of interest in the plurality of points of interest.
需要说明的是,图3所示方法的各个步骤的具体实现过程可参见上述方法的具体实现过程,在此不再叙述。It should be noted that the specific implementation process of each step of the method shown in FIG. 3 can be referred to the specific implementation process of the foregoing method, and is not described herein.
与上述图1和图3所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种移动终端的结构示意图,该移动终端包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:FIG. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure. The mobile terminal includes a processor, a memory, a communication interface, and a Or a plurality of programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising instructions for performing the following steps:
获取目标空间的N个深度图像,所述N为大于1的整数;Obtaining N depth images of the target space, the N being an integer greater than 1;
根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;Determining at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest;
确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;Determining related information of each of the points of interest, the related information including depth information;
根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。And establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
在本申请的一实施例中,在获取目标空间的N个深度图像之前,上述程序还包括用于执行以下步骤的指令:In an embodiment of the present application, before acquiring the N depth images of the target space, the program further includes instructions for performing the following steps:
确定所述移动终端满足设定条件,所述设定条件包括以下至少一种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。Determining that the mobile terminal satisfies a setting condition, the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; A voice instruction that models the current target space is detected.
在本申请的一实施例中,在获取目标空间的N个深度图像之前,上述程序还包括用于执行以下步骤的指令:In an embodiment of the present application, before acquiring the N depth images of the target space, the program further includes instructions for performing the following steps:
通过提示装置进行设定提示,所述设定提示用于提示获取所述目标空间的N个深度图像。A setting prompt is provided by the prompting means for prompting to acquire N depth images of the target space.
在本申请的一实施例中,在获取目标空间的N个深度图像方面,上述程序包括具体用于执行以下步骤的指令:In an embodiment of the present application, in acquiring N depth images of the target space, the above program includes instructions specifically for performing the following steps:
获取所述目标空间的M个二维图像,每个所述二维图像对应一个角度,且所述M个二维图像的角度互不相同,每个所述二维图像对应的角度是在获取所述二维图像时确定的,所述M为大于1的整数;Obtaining M two-dimensional images of the target space, each of the two-dimensional images corresponding to an angle, and the angles of the M two-dimensional images are different from each other, and the angle corresponding to each of the two-dimensional images is acquired When the two-dimensional image is determined, the M is an integer greater than one;
根据三维重建算法将所述M个二维图像转换为N个三维图像,每个所述三维图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图像对应的角度差值小于第一阈值,所述M大于所述N;Converting the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, each of the three-dimensional images being converted by a plurality of two-dimensional images, the plurality of two-dimensional images corresponding to each of the three-dimensional images The angle difference corresponding to any two of the two-dimensional images is less than a first threshold, and the M is greater than the N;
将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。The N three-dimensional images are used as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
在本申请的一实施例中,在根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型方面,上述程序包括具体用于执行以下步骤的指令:In an embodiment of the present application, in establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest, the program includes instructions specifically for performing the following steps:
根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符;Determining a local descriptor of each of the points of interest according to a three-dimensional convolution model and related information of each of the points of interest;
将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同;Dividing the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest comprising two points of interest, wherein the depth images corresponding to the two points of interest are different;
根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离;Determining the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the points of interest included in each set of points of interest;
将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除;Removing one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold;
根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。Determining a model of the target space based on remaining points of interest among the plurality of points of interest.
在本申请的一实施例中,在根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型方面,上述程序包括具体用于执行以下步骤的指令:In an embodiment of the present application, in determining a model of the target space according to remaining points of interest in the plurality of points of interest, the program includes instructions specifically for performing the following steps:
将所述多个兴趣点中的剩余兴趣点连接形成所述目标空间的模型。The remaining points of interest of the plurality of points of interest are joined to form a model of the target space.
在本申请的一实施例中,上述程序还包括用于执行以下步骤的指令:In an embodiment of the present application, the above program further includes instructions for performing the following steps:
在检测到针对所述目标空间的模型进行显示的确认指令的情况下,显示所述目标空间的模型。In the case where a confirmation instruction for displaying the model of the target space is detected, the model of the target space is displayed.
在本申请的一实施例中,每个深度图像对应一个角度,每个深度图像对应的角度是不同的。In an embodiment of the present application, each depth image corresponds to an angle, and the angle corresponding to each depth image is different.
在本申请的一实施例中,所述兴趣点为所述深度图像中具有特殊性质的像素点。In an embodiment of the present application, the point of interest is a pixel having a special property in the depth image.
需要说明的是,本实施例的具体实现过程可参见上述方法实施例所述的具体实现过程,在此不再叙述。It should be noted that the specific implementation process of the embodiment may be referred to the specific implementation process described in the foregoing method embodiment, and is not described herein.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,移动终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above description mainly introduces the solution of the embodiment of the present application from the perspective of the method side execution process. It can be understood that, in order to implement the above functions, the mobile terminal includes corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art will readily appreciate that the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for each particular application to implement the described functionality, but such implementation should not be considered to be beyond the scope of the application.
本申请实施例可以根据上述方法示例对建模装置进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional unit into the modeling device according to the foregoing method example. For example, each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
在采用集成的单元的情况下,图5示出了上述实施例中所涉及的建模装置的一种可能的功能单元组成框图。该建模装置500包括处理单元501、存储单元502和通信单元503,处理单元501包括获取单元、第一确定单元、第二确定单元和建模单元,其中:In the case of employing an integrated unit, FIG. 5 shows a block diagram of one possible functional unit composition of the modeling apparatus involved in the above embodiment. The modeling apparatus 500 includes a processing unit 501, a storage unit 502, and a communication unit 503. The processing unit 501 includes an acquisition unit, a first determination unit, a second determination unit, and a modeling unit, where:
获取单元,用于获取目标空间的N个深度图像,所述N为大于1的整数;An acquiring unit, configured to acquire N depth images of the target space, where N is an integer greater than 1;
第一确定单元,用于根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;a first determining unit, configured to determine, according to the point of interest algorithm, at least one point of interest in each of the depth images to obtain a plurality of points of interest;
第二确定单元,用于确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;a second determining unit, configured to determine related information of each of the points of interest, where the related information includes depth information;
建模单元,用于根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。And a modeling unit, configured to establish a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
在本申请的一实施例中,所述处理单元501还包括:In an embodiment of the present application, the processing unit 501 further includes:
第三确定单元,用于在获取目标空间的N个深度图像之前,确定所述移动终端满足设定条件,所述设定条件包括以下至少一种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。a third determining unit, configured to determine that the mobile terminal satisfies a setting condition before acquiring the N depth images of the target space, where the setting condition includes at least one of: detecting a click operation for the virtual button, A virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; a voice instruction that is modeled for the current target space is detected.
在本申请的一实施例中,所述处理单元501还包括:In an embodiment of the present application, the processing unit 501 further includes:
提示单元,用于在获取目标空间的N个深度图像之前,通过提示装置进行设定提示,所述设定提示用于提示获取所述目标空间的N个深度图像。The prompting unit is configured to perform a setting prompt by using a prompting device, and the setting prompt is used to prompt to acquire N depth images of the target space before acquiring the N depth images of the target space.
在本申请的一实施例中,在获取目标空间的N个深度图像方面,所述获取单元具体用于:In an embodiment of the present application, in acquiring N depth images of the target space, the acquiring unit is specifically configured to:
获取所述目标空间的M个二维图像,每个所述二维图像对应一个角度,且所述M个二维图像对应的角度互不相同,每个所述二维图像对应的角度是在获取所述二维图像时确定的,所述M为大于1的整数;Obtaining M two-dimensional images of the target space, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other, and the angle corresponding to each of the two-dimensional images is Determined when the two-dimensional image is acquired, the M is an integer greater than one;
根据三维重建算法将所述M个二维图像转换为N个三维图像,每个所述三维图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图形对应的角度差值小于第一阈值,所述M大于所述N;Converting the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, each of the three-dimensional images being converted by a plurality of two-dimensional images, the plurality of two-dimensional images corresponding to each of the three-dimensional images The angle difference corresponding to any two of the two-dimensional graphics is less than a first threshold, and the M is greater than the N;
将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。The N three-dimensional images are used as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
在本申请的一实施例中,在根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型方面,所述建模单元具体用于:In an embodiment of the present application, the modeling unit is specifically configured to: according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest to establish a model of the target space:
根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符;Determining a local descriptor of each of the points of interest according to a three-dimensional convolution model and related information of each of the points of interest;
将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同;Dividing the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest comprising two points of interest, wherein the depth images corresponding to the two points of interest are different;
根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离;Determining the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the points of interest included in each set of points of interest;
将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除;Removing one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold;
根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。Determining a model of the target space based on remaining points of interest among the plurality of points of interest.
在本申请的一实施例中,在根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型方面,所述建模单元具体用于:In an embodiment of the present application, in determining a model of the target space according to remaining points of interest in the plurality of points of interest, the modeling unit is specifically configured to:
将所述多个兴趣点中的剩余兴趣点连接形成所述目标空间的模型。The remaining points of interest of the plurality of points of interest are joined to form a model of the target space.
在本申请的一实施例中,所述处理单元501还包括:In an embodiment of the present application, the processing unit 501 further includes:
显示单元,用于在检测到针对所述目标空间的模型进行显示的确认指令的情况下,显示所述目标空间的模型。And a display unit configured to display a model of the target space in a case where a confirmation instruction for displaying the model of the target space is detected.
在本申请的一实施例中,每个深度图像对应一个角度,每个深度图像对应的角度是不同的。In an embodiment of the present application, each depth image corresponds to an angle, and the angle corresponding to each depth image is different.
在本申请的一实施例中,所述兴趣点为所述深度图像中具有特殊性质的像素点。In an embodiment of the present application, the point of interest is a pixel having a special property in the depth image.
其中,处理单元501可以是处理器或控制器,(例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP), 专用集成控制器(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。存储单元502可以是存储器,通信单元503可以是收发器、收发控制器、射频芯片、通信接口等。The processing unit 501 may be a processor or a controller, and may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and a dedicated integrated controller (Application). -Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. The storage unit 502 may be a memory, and the communication unit 503 may It is a transceiver, a transceiver controller, a radio frequency chip, a communication interface, and the like.
当处理单元501为处理器,存储单元502为存储器,通信单元503为通信接口时,本申请实施例所涉及的建模装置可以为图4所示的移动终端。When the processing unit 501 is a processor, the storage unit 502 is a memory, and the communication unit 503 is a communication interface, the modeling apparatus according to the embodiment of the present application may be the mobile terminal shown in FIG.
本申请实施例还提供了一种移动终端的结构示意图,如图6所示,该移动终端包括:壳体、电路板、摄像头、显示屏、角度检测装置、控制摄像头、显示屏和角度检测装置的控制器;摄像头、角度检测装置和控制器设置在电路板上,显示屏与控制器连接,角度检测装置包括陀螺仪,角度传感器等,其中:The embodiment of the present application further provides a schematic structural diagram of a mobile terminal. As shown in FIG. 6 , the mobile terminal includes: a shell, a circuit board, a camera, a display screen, an angle detecting device, a control camera, a display screen, and an angle detecting device. The controller; the camera, the angle detecting device and the controller are disposed on the circuit board, the display screen is connected to the controller, and the angle detecting device comprises a gyroscope, an angle sensor, etc., wherein:
控制器,用于获取目标空间的N个深度图像,所述N为大于1的整数;根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。a controller, configured to acquire N depth images of the target space, where N is an integer greater than 1; determining at least one interest point in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest; determining each Relevant information of the points of interest, the related information includes depth information; and a model of the target space is established according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
其中,移动终端还包括至少一个功能组件,控制器与至少一个功能组件连接,至少一个功能组件包括以下至少一种:扬声器、麦克风、人脸识别装置、接近传感器、环境光传感器。The mobile terminal further includes at least one functional component, and the controller is coupled to the at least one functional component, and the at least one functional component includes at least one of the following: a speaker, a microphone, a face recognition device, a proximity sensor, and an ambient light sensor.
其中,显示屏包括触控屏和显示屏,显示屏包括有机发光二极管显示屏OLED。Wherein, the display screen comprises a touch screen and a display screen, and the display screen comprises an organic light emitting diode display screen OLED.
其中,控制器可以包括处理器和存储器,该处理器是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器内的软件程序和/或模块,以及调用存储在存储器内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。可选的,处理器可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,所述调制解调处理器也可以不集成到处理器中。Wherein, the controller may comprise a processor and a memory, the control center of the mobile terminal, connecting various parts of the entire mobile terminal by using various interfaces and lines, by running or executing software programs and/or modules stored in the memory And invoking data stored in the memory, performing various functions of the mobile terminal and processing data, thereby performing overall monitoring of the mobile terminal. Optionally, the processor can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor may also not be integrated into the processor.
其中,存储器可用于存储软件程序以及模块,处理器通过运行存储在存储器的软件程序以及模块,从而执行移动终端的各种功能应用以及数据处理。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据移动终端的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory can be used to store software programs and modules, and the processor executes various functional applications and data processing of the mobile terminal by running software programs and modules stored in the memory. The memory may mainly include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the mobile terminal, and the like. Further, the memory may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
可以看出,在本申请实施例中,首先,移动终端获取目标空间的N个深度图像,然后确定N个深度图像中的多个兴趣点,最后根据多个兴趣点对应的相关信息和空间建模算法建立目标空间的模型。实现了仅通过移动终端即可对立体空间进行建模,操作方便,提升用户体验。It can be seen that, in the embodiment of the present application, first, the mobile terminal acquires N depth images of the target space, and then determines a plurality of interest points in the N depth images, and finally builds related information and space corresponding to the plurality of interest points. The modulo algorithm establishes a model of the target space. It realizes that the stereo space can be modeled only by the mobile terminal, and the operation is convenient and the user experience is improved.
在本申请的一实施例中,控制器还用于:In an embodiment of the present application, the controller is further configured to:
确定所述移动终端满足设定条件,所述设定条件包括以下至少一种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。Determining that the mobile terminal satisfies a setting condition, the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; A voice instruction that models the current target space is detected.
在本申请的一实施例中,在获取目标空间的N个深度图像方面,In an embodiment of the present application, in acquiring N depth images of a target space,
摄像头,用于获取所述目标空间的M个二维图像,所述M为大于1的整数;a camera for acquiring M two-dimensional images of the target space, where M is an integer greater than one;
角度检测装置,用于摄像头获取所述二维图像时确定所述二维图像的角度,每个所述二维图像对应一个角度,且所述M个二维图像对应的角度互不相同;An angle detecting device, configured to determine an angle of the two-dimensional image when the camera acquires the two-dimensional image, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other;
控制器具体用于:根据三维重建算法将所述M个二维图像转换为N个三维图像,每个 所述三维图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图像对应的角度差值小于第一阈值,所述M大于所述N;将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。The controller is specifically configured to: convert the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, where each of the three-dimensional images is converted by a plurality of two-dimensional images, and each of the three-dimensional images corresponds to An angle difference corresponding to any two of the two-dimensional images is smaller than a first threshold, the M is greater than the N; the N three-dimensional images are N depth images, and the N The three-dimensional image is in one-to-one correspondence with the N depth images.
在本申请的一实施例中,在根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型方面,控制器具体用于:In an embodiment of the present application, in establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest, the controller is specifically configured to:
根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符;Determining a local descriptor of each of the points of interest according to a three-dimensional convolution model and related information of each of the points of interest;
将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同;Dividing the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest comprising two points of interest, wherein the depth images corresponding to the two points of interest are different;
根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离;Determining the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the points of interest included in each set of points of interest;
将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除;Removing one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold;
根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。Determining a model of the target space based on remaining points of interest among the plurality of points of interest.
在本申请的一实施例中,显示屏具体用于:In an embodiment of the present application, the display screen is specifically configured to:
在检测到针对所述目标空间的模型进行显示的确认指令的情况下,显示所述目标空间的模型。In the case where a confirmation instruction for displaying the model of the target space is detected, the model of the target space is displayed.
需要说明的是,本实施例的具体实现过程可参见下述方法所述的具体实现过程,在此不再叙述。It should be noted that the specific implementation process of this embodiment can be referred to the specific implementation process described in the following method, and is not described herein.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to perform some or all of the steps of any of the methods described in the foregoing method embodiments. The above computer includes a mobile terminal.
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。The embodiment of the present application further provides a computer program product, where the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause the computer to execute any one of the methods described in the foregoing method embodiments. Part or all of the steps of the method. The computer program product can be a software installation package, and the computer includes a mobile terminal.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present application is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present application. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可 以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The above integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present application. The foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。A person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable memory, and the memory can include: a flash drive , read-only memory (English: Read-Only Memory, referred to as: ROM), random accessor (English: Random Access Memory, referred to as: RAM), disk or CD.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实现方式及应用范围上均会有改变之处,综上上述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been described in detail above. The principles and implementations of the present application are described in the specific examples. The description of the above embodiments is only used to help understand the method and core ideas of the present application. A person skilled in the art will have a change in the specific implementation and application scope according to the idea of the present application. In the above, the content of the present specification should not be construed as limiting the present application.

Claims (20)

  1. 一种建模方法,其特征在于,包括:A modeling method, comprising:
    获取目标空间的N个深度图像,所述N为大于1的整数;Obtaining N depth images of the target space, the N being an integer greater than 1;
    根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;Determining at least one point of interest in each of the depth images according to a point of interest algorithm to obtain a plurality of points of interest;
    确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;Determining related information of each of the points of interest, the related information including depth information;
    根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。And establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
  2. 根据权利要求1所述的方法,其特征在于,所述获取目标空间的N个深度图像之前,所述方法还包括:The method according to claim 1, wherein before the acquiring the N depth images of the target space, the method further comprises:
    确定所述移动终端满足设定条件,所述设定条件包括以下至少一种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。Determining that the mobile terminal satisfies a setting condition, the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; the mobile terminal is in a setting environment; A voice instruction that models the current target space is detected.
  3. 根据权利要求1所述的方法,其特征在于,所述获取目标空间的N个深度图像之前,所述方法还包括:The method according to claim 1, wherein before the acquiring the N depth images of the target space, the method further comprises:
    通过提示装置进行设定提示,所述设定提示用于提示获取所述目标空间的N个深度图像。A setting prompt is provided by the prompting means for prompting to acquire N depth images of the target space.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述获取目标空间的N个深度图像,包括:The method according to any one of claims 1-3, wherein the acquiring the N depth images of the target space comprises:
    通过所述移动终端的摄像头获取所述目标空间的M个二维图像,每个所述二维图像对应一个角度,且所述M个二维图像对应的角度互不相同,每个所述二维图像对应的角度是在获取所述二维图像时确定的,所述M为大于1的整数;Acquiring, by the camera of the mobile terminal, M two-dimensional images of the target space, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other, and each of the two The angle corresponding to the dimension image is determined when the two-dimensional image is acquired, and the M is an integer greater than one;
    根据三维重建算法将所述M个二维图像转换为N个三维图像,每个所述三维图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图像对应的角度差值小于第一阈值,所述M大于所述N;Converting the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, each of the three-dimensional images being converted by a plurality of two-dimensional images, the plurality of two-dimensional images corresponding to each of the three-dimensional images The angle difference corresponding to any two of the two-dimensional images is less than a first threshold, and the M is greater than the N;
    将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。The N three-dimensional images are used as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型,包括:The method according to any one of claims 1-4, wherein the establishing a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest comprises:
    根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符;Determining a local descriptor of each of the points of interest according to a three-dimensional convolution model and related information of each of the points of interest;
    将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同;Dividing the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest comprising two points of interest, wherein the depth images corresponding to the two points of interest are different;
    根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离;Determining the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the points of interest included in each set of points of interest;
    将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除;Removing one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold;
    根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。Determining a model of the target space based on remaining points of interest among the plurality of points of interest.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型,包括:The method according to claim 5, wherein the determining the model of the target space according to the remaining points of interest in the plurality of points of interest comprises:
    将所述多个兴趣点中的剩余兴趣点连接形成所述目标空间的模型。The remaining points of interest of the plurality of points of interest are joined to form a model of the target space.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型之后,所述方法还包括:The method according to any one of claims 1-6, wherein after the establishing the model of the target space according to the related information and the spatial modeling algorithm corresponding to the plurality of points of interest, the method further comprises :
    在检测到针对所述目标空间的模型进行显示的确认指令的情况下,通过所述移动终端的显示屏显示所述目标空间的模型。In the case where a confirmation instruction for displaying the model of the target space is detected, the model of the target space is displayed by the display screen of the mobile terminal.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,每个深度图像对应一个角度,每个深度图像对应的角度是不同的。The method according to any one of claims 1 to 7, wherein each depth image corresponds to an angle, and the angle corresponding to each depth image is different.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述兴趣点为所述深度图像中具有特殊性质的像素点。The method according to any one of claims 1-8, wherein the point of interest is a pixel having a special property in the depth image.
  10. 一种建模装置,其特征在于,包括:A modeling device, comprising:
    获取单元,用于获取目标空间的N个深度图像,所述N为大于1的整数;An acquiring unit, configured to acquire N depth images of the target space, where N is an integer greater than 1;
    第一确定单元,用于根据兴趣点算法确定每个所述深度图像中的至少一个兴趣点,以得到多个兴趣点;a first determining unit, configured to determine, according to the point of interest algorithm, at least one point of interest in each of the depth images to obtain a plurality of points of interest;
    第二确定单元,用于确定每个所述兴趣点的相关信息,所述相关信息包括深度信息;a second determining unit, configured to determine related information of each of the points of interest, where the related information includes depth information;
    建模单元,用于根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型。And a modeling unit, configured to establish a model of the target space according to related information and a spatial modeling algorithm corresponding to the plurality of points of interest.
  11. 根据权利要求10所述的建模装置,其特征在于,所述装置还包括:The modeling apparatus according to claim 10, wherein the apparatus further comprises:
    第三确定单元,用于确定所述移动终端满足设定条件,所述设定条件包括以下至少一种:检测到针对虚拟按钮的点击操作,所述虚拟按钮用于触发空间建模;所述移动终端处于设定环境;检测到针对当前所述目标空间进行建模的语音指令。a third determining unit, configured to determine that the mobile terminal satisfies a setting condition, where the setting condition includes at least one of: detecting a click operation for a virtual button, the virtual button is used to trigger spatial modeling; The mobile terminal is in a setting environment; a voice instruction for modeling the current target space is detected.
  12. 根据权利要求10所述的建模装置,其特征在于,所述装置还包括:The modeling apparatus according to claim 10, wherein the apparatus further comprises:
    提示单元,用于通过提示装置进行设定提示,所述设定提示用于提示获取所述目标空间的N个深度图像。a prompting unit, configured to perform a setting prompt by using a prompting device, where the setting prompt is used to prompt to acquire N depth images of the target space.
  13. 根据权利要求10-12任一项所述的建模装置,其特征在于,在获取目标空间的N个深度图像方面,所述获取单元具体用于:The modeling apparatus according to any one of claims 10 to 12, wherein the acquiring unit is specifically configured to:
    获取所述目标空间的M个二维图像,每个所述二维图像对应一个角度,且所述M个二维图像对应的角度互不相同,每个所述二维图像对应的角度是在获取所述二维图像时确定的,所述M为大于1的整数;Obtaining M two-dimensional images of the target space, each of the two-dimensional images corresponding to an angle, and the angles corresponding to the M two-dimensional images are different from each other, and the angle corresponding to each of the two-dimensional images is Determined when the two-dimensional image is acquired, the M is an integer greater than one;
    根据三维重建算法将所述M个二维图像转换为N个三维图像,每个所述三维图像是由多个二维图像转换的,每个所述三维图像对应的所述多个二维图像中任意两个所述二维图像对应的角度差值小于第一阈值,所述M大于所述N;Converting the M two-dimensional images into N three-dimensional images according to a three-dimensional reconstruction algorithm, each of the three-dimensional images being converted by a plurality of two-dimensional images, the plurality of two-dimensional images corresponding to each of the three-dimensional images The angle difference corresponding to any two of the two-dimensional images is less than a first threshold, and the M is greater than the N;
    将所述N个三维图像作为N个深度图像,所述N个三维图像与所述N个深度图像一一对应。The N three-dimensional images are used as N depth images, and the N three-dimensional images are in one-to-one correspondence with the N depth images.
  14. 根据权利要求10-13任一项所述的建模装置,其特征在于,在根据所述多个兴趣点对应的相关信息和空间建模算法建立所述目标空间的模型方面,所述建模单元具体用于:The modeling apparatus according to any one of claims 10 to 13, wherein the modeling is performed on a model of the target space based on correlation information and a spatial modeling algorithm corresponding to the plurality of points of interest The unit is specifically used to:
    根据三维卷积模型和每个所述兴趣点的相关信息确定每个所述兴趣点的局部描述符;Determining a local descriptor of each of the points of interest according to a three-dimensional convolution model and related information of each of the points of interest;
    将所述多个兴趣点划分为多组兴趣点集,每组兴趣点集包括两个兴趣点,所述两个兴趣点对应的深度图像不同;Dividing the plurality of points of interest into a plurality of sets of points of interest, each set of points of interest comprising two points of interest, wherein the depth images corresponding to the two points of interest are different;
    根据欧拉公式和每组兴趣点集中包括的兴趣点的局部描述符确定每组兴趣点集的欧拉距离;Determining the Euler distance of each set of points of interest according to the Euler formula and the local descriptor of the points of interest included in each set of points of interest;
    将所述欧拉距离小于第二阈值的所述兴趣点集中的其中一个兴趣点去除;Removing one of the points of interest in the set of points of interest whose Euler distance is less than a second threshold;
    根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型。Determining a model of the target space based on remaining points of interest among the plurality of points of interest.
  15. 根据权利要求14所述的建模装置,其特征在于,在根据所述多个兴趣点中的剩余兴趣点确定所述目标空间的模型方面,所述建模单元具体用于:The modeling apparatus according to claim 14, wherein the modeling unit is specifically configured to: determine a model of the target space according to remaining points of interest in the plurality of points of interest:
    将所述多个兴趣点中的剩余兴趣点连接形成所述目标空间的模型。The remaining points of interest of the plurality of points of interest are joined to form a model of the target space.
  16. 根据权利要求14所述的建模装置,其特征在于,所述装置还包括:The modeling apparatus according to claim 14, wherein the apparatus further comprises:
    显示单元,用于在检测到针对所述目标空间的模型进行显示的确认指令的情况下,通过所述移动终端的显示屏显示所述目标空间的模型。a display unit, configured to display a model of the target space through a display screen of the mobile terminal in a case where a confirmation instruction for displaying a model of the target space is detected.
  17. 根据权利要求10-16任一项所述的建模装置,其特征在于,每个深度图像对应一个角度,每个深度图像对应的角度是不同的。The modeling apparatus according to any one of claims 10-16, wherein each depth image corresponds to an angle, and each of the depth images corresponds to an angle different.
  18. 根据权利要求10-17任一项所述的建模装置,其特征在于,所述兴趣点为所述深 度图像中具有特殊性质的像素点。The modeling apparatus according to any one of claims 10-17, wherein the point of interest is a pixel having a special property in the depth image.
  19. 一种移动终端,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法中的步骤的指令。A mobile terminal, comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, The program comprises instructions for performing the steps in the method of any of claims 1-9.
  20. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。A computer readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method of any one of claims 1-9.
PCT/CN2019/082082 2018-04-12 2019-04-10 Modeling method and related device WO2019196871A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810326626.XA CN110378993A (en) 2018-04-12 2018-04-12 Modeling method and relevant apparatus
CN201810326626.X 2018-04-12

Publications (1)

Publication Number Publication Date
WO2019196871A1 true WO2019196871A1 (en) 2019-10-17

Family

ID=68163871

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082082 WO2019196871A1 (en) 2018-04-12 2019-04-10 Modeling method and related device

Country Status (2)

Country Link
CN (1) CN110378993A (en)
WO (1) WO2019196871A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818224A (en) * 2021-01-26 2021-05-18 北京百度网讯科技有限公司 Information recommendation method and device, electronic equipment and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723681B (en) * 2020-05-28 2024-03-08 北京三快在线科技有限公司 Indoor road network generation method and device, storage medium and electronic equipment
CN113252678A (en) * 2021-03-24 2021-08-13 上海万物新生环保科技集团有限公司 Appearance quality inspection method and equipment for mobile terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033621A (en) * 2015-03-17 2016-10-19 阿里巴巴集团控股有限公司 Three-dimensional modeling method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914874B (en) * 2014-04-08 2017-02-01 中山大学 Compact SFM three-dimensional reconstruction method without feature extraction
US10574974B2 (en) * 2014-06-27 2020-02-25 A9.Com, Inc. 3-D model generation using multiple cameras
CN107845126A (en) * 2017-11-21 2018-03-27 江西服装学院 A kind of three-dimensional animation manufacturing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033621A (en) * 2015-03-17 2016-10-19 阿里巴巴集团控股有限公司 Three-dimensional modeling method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818224A (en) * 2021-01-26 2021-05-18 北京百度网讯科技有限公司 Information recommendation method and device, electronic equipment and readable storage medium
CN112818224B (en) * 2021-01-26 2024-02-20 北京百度网讯科技有限公司 Information recommendation method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN110378993A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
US11270460B2 (en) Method and apparatus for determining pose of image capturing device, and storage medium
WO2019184889A1 (en) Method and apparatus for adjusting augmented reality model, storage medium, and electronic device
US10963727B2 (en) Method, device and storage medium for determining camera posture information
JP6258953B2 (en) Fast initialization for monocular visual SLAM
US9779508B2 (en) Real-time three-dimensional reconstruction of a scene from a single camera
WO2020253655A1 (en) Method for controlling multiple virtual characters, device, apparatus, and storage medium
US20190156504A1 (en) Three-dimensional (3d) reconstructions of dynamic scenes using a reconfigurable hybrid imaging system
WO2019233229A1 (en) Image fusion method, apparatus, and storage medium
CN109151442B (en) Image shooting method and terminal
CN111932664A (en) Image rendering method and device, electronic equipment and storage medium
WO2019196745A1 (en) Face modelling method and related product
WO2019196871A1 (en) Modeling method and related device
KR102129458B1 (en) Method for reconstructing three dimension information of object and apparatus for the same
CN111311757B (en) Scene synthesis method and device, storage medium and mobile terminal
CN114019473A (en) Object detection method and device, electronic equipment and storage medium
CN110473293A (en) Virtual objects processing method and processing device, storage medium and electronic equipment
CN109688343A (en) The implementation method and device of augmented reality studio
CN112270709A (en) Map construction method and device, computer readable storage medium and electronic device
JP2021192244A (en) Positional information generating method, related apparatus, and computer program product
CN112233146B (en) Position recommendation method and device, computer readable storage medium and electronic equipment
CN114093020A (en) Motion capture method, motion capture device, electronic device and storage medium
US20230326147A1 (en) Helper data for anchors in augmented reality
US11379950B1 (en) System and method for projecting content in an environment
TWI748439B (en) Positioning method and device based on shared map, electronic equipment and computer readable storage medium
CN112837375B (en) Method and system for camera positioning inside real space

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19786021

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19786021

Country of ref document: EP

Kind code of ref document: A1