Object depth information acquisition method and device, computer device and storage medium

By acquiring images under different characteristic lighting conditions using a single camera device, and extracting depth information by grouping them using the light source feature matrix and mathematical model, the problem of high cost in acquiring object depth information in existing technologies is solved, and economical depth information acquisition is achieved.

CN115482266BActive Publication Date: 2026-01-02LINGYANGE SEMICONDUCTOR, INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110587656.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-27
Publication Date
2026-01-02
Estimated Expiration
2041-05-27

AI Technical Summary

Technical Problem

In existing technologies, methods for obtaining object depth information mostly use depth cameras or dual-camera cameras, which are costly. A more economical method is needed.

Method used

Images of objects under different characteristic lights are captured by a single camera device. Brightness information is extracted using the light source feature matrix and mathematical model. Based on the similarity of feature information, the depth information of the objects is obtained.

Benefits of technology

A method for acquiring object depth information at a lower cost has been developed, reducing equipment costs and improving the economic efficiency of information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482266B_ABST
    Figure CN115482266B_ABST
Patent Text Reader

Abstract

The application provides an object depth information acquisition method and device, a computer device and a storage medium. The method comprises the following steps: acquiring a plurality of images of an object to be measured under different characteristic lights collected by a camera, dividing each image into a plurality of regions, and extracting the brightness information of each corresponding region in the plurality of images, wherein the brightness information of the same region in all images under different characteristic lights is represented by a light source characteristic matrix; inputting the light source characteristic matrix into a preset mathematical model in sequence to obtain the characteristic information of each light source characteristic matrix; grouping the plurality of characteristic information based on the similarity of the characteristic information to obtain a plurality of groups of characteristic information, setting a corresponding depth value for each group of characteristic information, and composing the depth information of the object to be measured according to the corresponding depth value of the plurality of groups of characteristic information. The object depth information acquisition method is more economical.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an object depth information acquisition method and device, computer device and storage medium. BACKGROUND

[0002] At present, the method for acquiring object depth information is mostly depth camera or dual-camera, and the cost of the object depth information acquisition method of the depth camera or dual-camera is high. In some manufacturing fields, there is an urgent need for a low-cost method to acquire the depth information of the measured object. SUMMARY

[0003] In view of the above, it is necessary to provide an object depth information acquisition method, device, computer device and storage medium, so that the object depth information acquisition method is more economical.

[0004] The first aspect of the present application provides an object depth information acquisition method, which comprises: acquiring a plurality of images of a measured object under different characteristic lights collected by a camera device, dividing each of the images into a plurality of regions, and extracting the brightness information of each corresponding region in the plurality of images, wherein the brightness information of the same region in all images under different characteristic lights is represented by a light source characteristic matrix; inputting the light source characteristic matrix into a preset mathematical model in sequence to obtain the characteristic information of each light source characteristic matrix, wherein the characteristic information includes the gradient change of the light source characteristic matrix in any direction; grouping the plurality of characteristic information based on the similarity of the characteristic information to obtain a plurality of groups of characteristic information, setting a corresponding depth value for each group of characteristic information, and composing the depth information of the measured object according to the corresponding depth value of the plurality of groups of characteristic information.

[0005] Optionally, the different characteristic lights include a combination of different light intensities and different light modes, wherein the light modes include one or more of light emitting angle, light emitting position, light spectrum and light field distribution.

[0006] Optionally, the camera device is a single-camera camera device.

[0007] Optionally, the method comprises: dividing the plurality of images according to the same preset rule.

[0008] Optionally, the preset mathematical model is a mathematical model based on a classification algorithm, wherein the classification algorithm includes any one of a binary classification algorithm, a decision tree algorithm and a least square algorithm.

[0009] Optionally, the training method of the preset mathematical model comprises: obtaining a plurality of light source feature matrices of known feature information, dividing the light source feature matrices into a training set and a validation set; establishing a mathematical model based on a classification algorithm, and training parameters of the mathematical model based on the classification algorithm using the training set; verifying the trained mathematical model based on the classification algorithm using the validation set, inputting the light source feature matrices in the validation set into the mathematical model based on the classification algorithm, comparing the feature information output by the model with the known feature information, and statistically obtaining a prediction accuracy of the mathematical model based on the classification algorithm according to the comparison result; determining whether the prediction accuracy of the mathematical model based on the classification algorithm is less than a preset threshold; if the prediction accuracy of the mathematical model based on the classification algorithm is not less than the preset threshold, taking the trained mathematical model based on the classification algorithm as the preset mathematical model; if the prediction accuracy of the mathematical model based on the classification algorithm is less than the preset threshold, adjusting parameters of the mathematical model based on the classification algorithm and / or adjusting the number of training set samples, and retraining the adjusted mathematical model based on the classification algorithm using the adjusted training set until the prediction accuracy of the model obtained by verifying the validation set is not less than the preset threshold.

[0010] Optionally, the method of grouping the plurality of feature information based on feature information similarity comprises: grouping the plurality of feature information according to a similarity matching method, wherein the similarity matching method comprises: dividing the gradient change of the feature information into a plurality of intervals according to different threshold values according to the gradient change of the feature information, and dividing the feature information in the same interval into a group.

[0011] The second aspect of the present application provides an object depth information acquisition device, the device comprising: an acquisition module for acquiring a plurality of images of a to-be-measured object under different characteristic lights collected by a camera device, dividing each of the images into a plurality of regions, and extracting the brightness information of each corresponding region in the plurality of images, wherein the brightness information of the same region in all images under different characteristic lights is represented by a light source feature matrix; an extraction module for inputting the light source feature matrix into a preset mathematical model in sequence to obtain the feature information of each light source feature matrix, wherein the feature information comprises the gradient change of the light source feature matrix in any direction; an execution module for grouping the plurality of feature information based on feature information similarity to obtain a plurality of groups of feature information, setting a corresponding depth value for each group of feature information, and composing the depth information of the to-be-measured object according to the corresponding depth values of the plurality of groups of feature information.

[0012] The third aspect of the present application provides a computer device, which comprises a processor configured to implement the object depth information acquisition method when executing a computer program stored in a memory.

[0013] The fourth aspect of the present application provides a computer readable storage medium, which stores at least one computer program configured to implement the object depth information acquisition method when executed by a processor.

[0014] The object depth information acquisition method, device, computer device and storage medium provided by the present application can acquire an image of an object to be measured by a single camera, and acquire depth information corresponding to different regions in the image by the object depth information acquisition method, so that the object depth information acquisition method is performed in a more economical manner. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.

[0016] Figure 1 is an application environment architecture diagram of the object depth information acquisition method provided by the embodiments of the present application.

[0017] Figure 2 is a flowchart of the object depth information acquisition method provided by the embodiments of the present application.

[0018] Figure 3 is a structure diagram of the object depth information acquisition device provided by the embodiments of the present application.

[0019] Figure 4 is a schematic diagram of the computer device provided by the embodiments of the present application.

[0020] Explanation of main element symbols

[0021] Computer device 1 Camera device 2 Adjustable light source 3 Object depth information acquisition device 10 Acquisition module 101 Extraction module 102 Execution module 103 Memory 20 Processor 30 Computer program 40

[0022] The following specific embodiments will further illustrate the present application in combination with the above drawings. DETAILED DESCRIPTION

[0023] In order to more clearly illustrate the above-mentioned purposes, features and advantages of the present application, the present application will be described in detail below in combination with the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0024] In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present application. The described embodiments are merely part of the embodiments of the present application, and are not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0026] Reference Figure 1 As shown in the application environment architecture schematic diagram of the object depth information acquisition method provided by the embodiments of the present application.

[0027] The object depth information acquisition method in the embodiments of the present application is applied in a computer device 1, which is in communication connection with a camera device 2 and an adjustable light source 3 through a network. The network can be a wired network or a wireless network, such as radio, wireless fidelity (WIFI), cellular, satellite, broadcast, etc. The adjustable light source 3 is used to emit light with different characteristics, which refers to the combined characteristic light of different light emitting intensities and different light emitting modes, wherein the light emitting modes include one or more of light emitting angle, light emitting position, spectrum, and light field distribution. The camera device 2 is used to collect image information of an object under illumination of light with different characteristics, and send the image information to the computer device 1. The computer device 1 is used to switch different light emitting intensities and light emitting modes of the adjustable light source 3 to emit light with different characteristics, and is also used to receive the image information collected by the camera device 2, acquire brightness information of the image information, extract feature information of the brightness information, group the feature information according to a preset method, set a corresponding depth value for each group of feature information according to a preset rule, and obtain object depth information by combining the depth values corresponding to the feature information.

[0028] The computer device 1 can be an electronic device installed with object depth information acquisition software, such as a personal computer, a server, etc., wherein the server can be a single server, a server cluster, or a cloud server, etc.

[0029] The camera device 2 is a single camera device with a shooting function, including but not limited to a mobile phone, a camera, a tablet computer, a monitor, etc.

[0030] The adjustable light source 3 can adjust one or more of the light intensity, light angle, light position, spectrum, and light field distribution, thereby achieving different modes of light emission. In one embodiment, the adjustable light source 3 can include, but is not limited to, an adjustable LED lamp, an adjustable light box, etc.

[0031] In one embodiment, the computer device 1 can be located in the camera device 2, and the computer device is used to receive image information collected by the camera device 2 and obtain depth information of the image according to the object depth information acquisition method.

[0032] Referring to Figure 2 The flowchart of the object depth information acquisition method provided by the embodiment of the present application is shown. The order of the steps in the flowchart can be changed, and some steps can be omitted according to different requirements.

[0033] Step S1: Obtain a plurality of images of a to-be-measured object under different characteristic lights collected by a camera device, divide each of the images into a plurality of regions, and extract brightness information of each corresponding region in the plurality of images, wherein the brightness information of the same region in all images under different characteristic lights is represented by a light source characteristic matrix.

[0034] The specific implementation steps of step S1 are as follows:

[0035] (1) Obtain a plurality of images of a to-be-measured object under different characteristic lights collected by a camera device.

[0036] The different characteristic lights refer to the combination of different light intensities and different light modes, wherein the light modes include one or more of the light angle, light position, spectrum, and light field distribution.

[0037] In the same light mode, the light intensity of the light source is set to M orders, and for each order of light intensity, the camera device 2 obtains an image of the object. For the same light mode, a total of M images are obtained under different light intensities of the light source. If the light mode includes N kinds, the total number of images obtained is MxN. For example, the light intensity of the light source is divided into 100 orders, and for each order of light intensity, an image under different light modes, i.e., the images of the object under the light modes of light angle, light position, spectrum, and light field distribution are obtained. The total number of images of the object under the light source with the light intensity of 100 orders and the light mode of 4 kinds is 100x4 images.

[0038] (2) The computer device 1 divides each of the images into a plurality of regions.

[0039] In one embodiment, the plurality of images are divided in the same manner. The dividing manner can be dividing the images in equal proportions or preset proportions in the horizontal and vertical directions to divide the images into HxV regions, where H and V are positive integers, H represents the number of segments divided in the horizontal direction of the image, and V represents the number of segments divided in the vertical direction of the image. The dividing manner can also be dividing the images into a plurality of regions according to a side of the image as a reference and a diagonal line at a preset angle with the reference side.

[0040] (3) The computer device 1 extracts the luminance information of each corresponding region in the plurality of images, respectively.

[0041] The method for retrieving the luminance of the image comprises converting the chrominance value of a pixel point RGB in the image into Yuv value by a color gamut conversion method, where Y represents the luminance information of the pixel point, and uv represents the chrominance information of the pixel point, and the color gamut conversion method comprises any one of a neural network-based color gamut conversion method, a tetrahedron-based color gamut conversion method, and a linear regression-based color gamut conversion method.

[0042] (4) The computer device 1 represents the luminance information of the same region in different characteristic lights in all images by a light source characteristic matrix.

[0043] The size of the matrix is MxN, where MxN represents the number of different characteristic lights. For example, the computer device 1 divides the images collected by the camera 2 into HxV regions in a preset manner, obtains the luminance information of the region under the illumination of MxN characteristic light sources for any one region, and forms a light source characteristic matrix by the MxN luminance information obtained, where the element a 01 represents the luminance information of the region under the illumination of a light source with an emission intensity of 0 and a first mode of emission. Similarly, the luminance information of each region in the image under different characteristic light sources is obtained, and a plurality of light source characteristic matrices are formed by the luminance information of different regions, where the number of the light source characteristic matrices is equal to the number of the divided regions of the object image.

[0044] Step S2: The light source characteristic matrix is sequentially input into a preset mathematical model to obtain the characteristic information of each light source characteristic matrix, where the characteristic information comprises the gradient change of the light source characteristic matrix in any direction.

[0045] The light source feature matrix is sequentially input into a preset mathematical model, and feature information of the light source feature matrix is extracted, the number of the feature information being equal to the number of the light source feature matrix. In an embodiment, the segmented region of the image of the object to be tested is HxV, the HxV regions correspond to HxV optical feature matrices, the HxV optical feature matrices are input into a preset data model, and the number of the extracted feature information is HxV. The feature information includes gradient changes of the brightness information in any direction, the preset mathematical model obtains the feature information in the light source feature matrix based on a classification algorithm-based mathematical model, and the classification algorithm includes but is not limited to a binary classification algorithm, a decision tree algorithm, and a least square algorithm.

[0046] In an embodiment, the preset mathematical model is a classification algorithm-based mathematical model, and a training method of the preset mathematical model includes:

[0047] A plurality of light source feature matrices with known feature information are obtained, and the light source feature matrices are divided into a training set and a verification set.

[0048] A classification algorithm-based mathematical model is established, and parameters of the classification algorithm-based mathematical model are trained by using the training set.

[0049] The trained classification algorithm-based mathematical model is verified by using the verification set, the light source feature matrices in the verification set are input into the classification algorithm-based mathematical model, the feature information output by the model is compared with the known feature information, and a prediction accuracy of the classification algorithm-based mathematical model is obtained according to a comparison result.

[0050] It is judged whether the prediction accuracy of the classification algorithm-based mathematical model is less than a preset threshold.

[0051] If the prediction accuracy of the classification algorithm-based mathematical model is not less than the preset threshold, the trained classification algorithm-based mathematical model is used as the preset mathematical model.

[0052] If the prediction accuracy of the classification algorithm-based mathematical model is less than the preset threshold, parameters of the classification algorithm-based mathematical model and / or the number of the training set samples are adjusted, the adjusted classification algorithm-based mathematical model is retrained by using the adjusted training set, and the prediction accuracy of the model verified by using the verification set is not less than the preset threshold.

[0053] In step S3, the plurality of feature information is grouped based on feature information similarity, a plurality of groups of feature information is obtained, a corresponding depth value is set for each group of feature information, and the depth information of the object to be tested is composed according to the corresponding depth values of the plurality of groups of feature information.

[0054] In one embodiment, the HxV feature information is grouped by a similarity matching method, which includes: sorting the HxV feature information according to a preset rule; dividing the sorted feature information into different intervals according to a preset interval, dividing at least one feature information in the same interval into a group, and assigning a corresponding depth value to the feature information in the same group, and the depth information of the object to be measured is composed of multiple groups of depth values.

[0055] In one embodiment, the HxV feature information is grouped by a machine learning algorithm-based classification method. The machine learning algorithm includes a support vector machine algorithm classification method, a Bayesian classification algorithm, etc. The HxV feature information is grouped by the machine learning algorithm, and a corresponding depth value is assigned to the feature information in the same group, and the depth information of the object to be measured is composed of multiple groups of depth values.

[0056] The above Figure 2 The object depth information acquisition method of the present application is described in detail below. The function modules of the software device for implementing the object depth information acquisition method and the hardware device architecture for implementing the object depth information acquisition method are described below with reference to FIGS. 3-4.

[0057] It should be understood that the embodiments are only for illustration and are not limited in the scope of the patent application by this structure.

[0058] Figure 3 The structure diagram of the preferred embodiment of the object depth information acquisition device of the present application.

[0059] In some embodiments, the object depth information acquisition device 10 runs in a computer device. The computer device is connected to multiple user terminals through a network. The object depth information acquisition device 10 can include multiple function modules composed of program code segments. The program code of each program segment in the object depth information acquisition device 10 can be stored in the memory of the computer device and executed by the at least one processor to implement the object depth information acquisition function.

[0060] In this embodiment, the object depth information acquisition device 10 can be divided into multiple function modules according to the functions it performs. Referring to FIG. 1, Figure 3 the function modules can include an acquisition module 101, an extraction module 102, and an execution module 103. The module referred to in the present application refers to a series of computer program segments that can be executed by at least one processor and can complete a fixed function, which are stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0061] The acquisition module 101 is configured to acquire a plurality of images of an object to be measured under different characteristic lights collected by a camera, divide each of the images into a plurality of regions, and extract brightness information of each corresponding region in the plurality of images respectively, wherein the brightness information of the same region in all images under different characteristic lights is represented by a light source characteristic matrix.

[0062] The specific implementation steps of the acquisition module 101 are as follows:

[0063] (1) The acquisition module 101 acquires a plurality of images of an object to be measured under different characteristic lights collected by a camera.

[0064] The different characteristic lights refer to combination characteristic lights of different light emitting intensities and different light emitting modes, wherein the light emitting modes include one or more of light emitting angles, light emitting positions, spectra, and light field distributions.

[0065] In the same light emitting mode, the light emitting intensity of the light source is set to M orders, and for each order of light emitting intensity, the camera 2 acquires an image of the object. For the same light emitting mode, under different light emitting intensities of the light source, a total of M images are acquired. If the light emitting mode includes N kinds, the total number of images acquired is MxN. For example, the light emitting intensity of the light source is divided into 100 orders, and for each order of light emitting intensity, an image under different light emitting modes, i.e., images of the object under four light emitting modes of light emitting angles, light emitting positions, spectra, and light field distributions are acquired. The total number of images of the object under the light source with light emitting intensity of 100 orders and four light emitting modes is 100x4 images.

[0066] (2) The acquisition module 101 divides each of the images into a plurality of regions.

[0067] In an embodiment, the plurality of images are divided in the same manner. The division manner can be to divide the image into HxV regions in equal proportions or preset proportions in the horizontal and vertical directions of the image, wherein H and V are positive integers, H represents the number of segments divided in the horizontal direction of the image, and V represents the number of segments divided in the vertical direction of the image. The division manner can also be to divide the image into a plurality of regions according to a reference edge of the image and a diagonal line at a preset angle with the reference edge.

[0068] (3) The acquisition module 101 extracts brightness information of each corresponding region in the plurality of images respectively.

[0069] The method for obtaining the image brightness comprises converting the chrominance value of a pixel point RGB in the image into a Yuv value through a gamut conversion method, wherein Y represents the brightness information of the pixel point, and uv represents the chrominance information of the pixel point, and the gamut conversion method comprises any one of a gamut conversion method based on a neural network, a gamut conversion method based on a tetrahedron, and a gamut conversion method based on linear regression.

[0070] (4) The acquisition module 101 represents the brightness information of the same region in all images under different characteristic lights by using one light source characteristic matrix.

[0071] The size of the matrix is MxN, wherein MxN represents the number of different characteristic lights. For example, the computer device 1 divides the image collected by the camera 2 into HxV regions according to a preset mode, obtains the brightness information of the region under the illumination of MxN characteristic light sources for any one region, and groups the obtained MxN pieces of brightness information into one light source characteristic matrix. The element a 01 in the matrix represents the brightness information of the region under the illumination of a light source with the light intensity of 0 and the first mode. Similarly, the brightness information of each region in the image under different characteristic light sources is obtained, and a plurality of light source characteristic matrices are formed by using the brightness information of different regions. The number of the light source characteristic matrices is equal to the number of the segmented regions of the object image.

[0072] The extraction module 102 is configured to input the light source characteristic matrix into a preset mathematical model to obtain the characteristic information of each light source characteristic matrix, wherein the characteristic information comprises the gradient change of the light source characteristic matrix in any direction.

[0073] The light source characteristic matrix is input into a preset mathematical model to extract the characteristic information of the light source characteristic matrix. The number of the characteristic information is equal to the number of the light source characteristic matrices. In an embodiment, the segmented region of the image of the object to be tested is HxV, the HxV regions correspond to HxV optical characteristic matrices, the HxV optical characteristic matrices are input into a preset data model, and the number of the extracted characteristic information is HxV. The characteristic information comprises the gradient change of the brightness information in any direction. The preset mathematical model obtains the characteristic information in the light source characteristic matrix by using a mathematical model based on a classification algorithm, and the classification algorithm comprises but is not limited to a binary classification algorithm, a decision tree algorithm, and a least square algorithm.

[0074] In an embodiment, the preset mathematical model is a mathematical model based on a classification algorithm, and the training method of the preset mathematical model comprises:

[0075] Obtaining a plurality of light source feature matrices of known feature information, and dividing the light source feature matrices into a training set and a validation set;

[0076] Establishing a mathematical model based on a classification algorithm, and training parameters of the mathematical model based on the classification algorithm using the training set;

[0077] Verifying the trained mathematical model based on the classification algorithm using the validation set, inputting the light source feature matrices in the validation set into the mathematical model based on the classification algorithm, comparing the feature information output by the model with the known feature information, and statistically obtaining a prediction accuracy of the mathematical model based on the classification algorithm according to a comparison result;

[0078] Determining whether the prediction accuracy of the mathematical model based on the classification algorithm is less than a preset threshold;

[0079] If the prediction accuracy of the mathematical model based on the classification algorithm is not less than the preset threshold, the trained mathematical model based on the classification algorithm is used as the preset mathematical model;

[0080] If the prediction accuracy of the mathematical model based on the classification algorithm is less than the preset threshold, parameters of the mathematical model based on the classification algorithm and / or a number of training set samples are adjusted, the adjusted mathematical model based on the classification algorithm is retrained using the adjusted training set, and the process is repeated until the prediction accuracy of the model verified by the validation set is not less than the preset threshold.

[0081] The execution module 103 is configured to group the plurality of feature information based on feature information similarity, obtain a plurality of groups of feature information, set a corresponding depth value for each group of feature information, and form depth information of the object to be measured according to the corresponding depth values of the plurality of groups of feature information.

[0082] In one embodiment, the plurality of feature information, for example, the HxV feature information mentioned in the extraction module 102, is grouped according to a similarity matching method, wherein the similarity matching method includes: sorting the plurality of feature information according to a preset rule; dividing the sorted feature information into different intervals according to a preset interval, dividing at least one feature information in the same interval into a group, and assigning a corresponding depth value to the feature information in the same group, and forming the depth information of the object to be measured by a plurality of depth values.

[0083] In one embodiment, the HxV feature information is grouped using a classification method based on a machine learning algorithm. The machine learning algorithm includes a classification method of a support vector machine algorithm, a Bayesian classification algorithm, etc. The HxV features are assigned corresponding depth values for feature information within the same group by the machine learning algorithm, and the depth information of the object to be detected is composed of multiple groups of depth values.

[0084] Figure 4 A schematic diagram of a preferred embodiment of a computer device 1 of the present application.

[0085] The computer device 1 includes a memory 20, a processor 30, and a computer program 40 stored in the memory 20 and executable on the processor 30, such as an object depth information acquisition program. The processor 30 implements the steps in the above-mentioned embodiment of the object depth information acquisition method when executing the computer program 40, such as steps S1-S3 shown in the above-mentioned embodiment. Figure 2 Alternatively, the processor 30 implements the functions of each module / unit in the above-mentioned embodiment of the object depth information acquisition device when executing the computer program 40, such as units 101-103 in the above-mentioned embodiment. Figure 3

[0086] For example, the computer program 40 can be divided into one or more modules / units, which are stored in the memory 20 and executed by the processor 30 to complete the present application. The one or more modules / units can be a series of computer program instruction segments that can complete a specific function, which are used to describe the execution process of the computer program 40 in the computer device 1. For example, the computer program 40 can be divided into the acquisition module 101, the extraction module 102, and the execution module 103 in the above-mentioned embodiment. Figure 3

[0087] The computer device 1 can be a desktop computer, a notebook, a palm computer, and a cloud server, etc. Those skilled in the art can understand that the schematic diagram is only an example of the computer device 1 and does not limit the computer device 1, which can include more or fewer components than the diagram, or combine certain components, or different components, such as the computer device 1 can also include an input / output device, a network access device, a bus, etc.

[0088] ​​The processor 30 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, or the like. The general-purpose processor can be a microprocessor or the processor 30 can also be any conventional processor. The processor 30 is a control center of the computer device 1, and is connected to various parts of the computer device 1 through various interfaces and lines.

[0089] The memory 20 can be used to store the computer program 40 and / or modules / units. The processor 30 realizes various functions of the computer device 1 by running or executing the computer program and / or modules / units stored in the memory 20, and calling data stored in the memory 20. The memory 20 can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, or the like), and the like; and the data storage area can store data (such as audio data, a phone book, or the like) created according to use of the computer device 1, and the like. In addition, the memory 20 can include a high-speed random access memory, and can also include a nonvolatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory device.

[0090] The modules / units integrated in the computer device 1 are stored in a computer readable storage medium if they are implemented in the form of software function units and sold or used as independent products. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program is executed by a processor, and the computer program can implement the steps of each method embodiment described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable storage medium can include any entity or device, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. that can carry the computer program code. It should be noted that the computer readable storage medium includes content that can be appropriately added, deleted, or modified according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer readable storage medium does not include electrical carrier signals and telecommunication signals.

[0091] In several embodiments provided in the present application, it should be understood that the disclosed computer device and method can be implemented in other ways. For example, the above-described computer device embodiments are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, another division mode can be used.

[0092] In addition, each functional unit in each embodiment of the present application can be integrated in the same processing unit, or each unit can be physically present separately, or two or more units can be integrated in the same unit. The integrated unit can be implemented in the form of hardware or hardware plus software function modules.

[0093] It is apparent for a person skilled in the art that the application is not limited to the details of the above-described exemplary embodiments, but that the application can be implemented in other concrete forms without departing from the spirit or essential characteristics of the application. Therefore, the embodiments should be considered in all respects as illustrative and not restrictive, the scope of the application being defined by the appended claims rather than that of the above description, and all changes coming within the meaning and range of equivalents of the claims are therefore intended to be embraced therein. Any reference signs in the claims should not be construed as limiting the claims concerned. Furthermore, it is expressly intended that the words "comprise", "include" and "contain" should not be construed as limiting the scope of the claims to only the listed items. The singular forms "a", "an" and "the" include plural references unless the context clearly dictates otherwise. The multiple units or computer means stated in the computer means claims can also be implemented by one unit or computer means by means of software or hardware. The words first, second etc. are used to indicate names and not any particular order.

[0094] Finally, it should be noted that the above embodiments are merely intended to illustrate the technical solutions of the present application, rather than limit the same, and although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the present application.

Claims

1. An object depth information acquisition method characterized by comprising: The method comprises: acquiring a plurality of images of a to-be-measured object under different characteristic lights collected by a camera, wherein the different characteristic lights refer to combined characteristic lights of different light emitting intensities and different light emitting modes, and the light emitting modes include one or more of light emitting angles, light emitting positions, light spectrums, and light field distributions; segmenting each of the images into a plurality of regions, and extracting brightness information of each corresponding region in the plurality of images respectively, wherein the brightness information of the same region in all images under different characteristic lights is represented by a light source feature matrix; inputting the light source feature matrix into a preset mathematical model in sequence to obtain feature information of each light source feature matrix, wherein the feature information includes gradient changes of the light source feature matrix in any direction; grouping the feature information based on feature information similarity to obtain a plurality of groups of feature information, setting a corresponding depth value for each group of feature information, and composing depth information of the to-be-measured object according to the depth values corresponding to the plurality of groups of feature information.

2. The object depth information acquisition method according to claim 1, wherein The different characteristic lights include combined characteristic lights of different light emitting intensities and different light emitting modes, and the light emitting modes include one or more of light emitting angles, light emitting positions, light spectrums, and light field distributions.

3. The method of acquiring object depth information according to claim 1, wherein The camera is a single camera.

4. The method of acquiring object depth information according to claim 1, wherein The method comprises: segmenting the plurality of images according to the same preset rule.

5. The object depth information acquisition method of claim 1, wherein The preset mathematical model is a mathematical model based on a classification algorithm, and the classification algorithm includes any one of a binary classification algorithm, a decision tree algorithm, and a least square algorithm.

6. The object depth information acquisition method according to claim 5, wherein The training method of the preset mathematical model comprises: acquiring a plurality of light source feature matrices of known feature information, and dividing the light source feature matrices into a training set and a validation set; establishing a mathematical model based on a classification algorithm, and training parameters of the mathematical model based on the classification algorithm by using the training set; verifying the mathematical model based on the classification algorithm after training by using the validation set, comparing feature information output by the model with known feature information, and statistically obtaining a prediction accuracy of the mathematical model based on the classification algorithm according to a comparison result; determining whether the prediction accuracy of the mathematical model based on the classification algorithm is less than a preset threshold value; if the prediction accuracy of the mathematical model based on the classification algorithm is not less than the preset threshold value, taking the mathematical model based on the classification algorithm after training as the preset mathematical model; if the prediction accuracy of the mathematical model based on the classification algorithm is less than the preset threshold value, adjusting parameters of the mathematical model based on the classification algorithm and / or adjusting a number of training set samples, and re-training the mathematical model based on the classification algorithm after adjustment by using the adjusted training set until a model prediction accuracy obtained by verifying the validation set is not less than the preset threshold value.

7. The method of acquiring object depth information according to Claim 1, wherein The method for grouping the plurality of feature information based on feature information similarity to obtain a plurality of groups of feature information comprises: The multiple sets of feature information are grouped according to a similarity matching method, wherein the similarity matching method comprises dividing the gradient variation of the feature information into multiple intervals according to different threshold values according to the gradient variation of the feature information, and grouping the feature information in the same interval.

8. An object depth information acquisition apparatus for implementing the object depth information acquisition method according to claim 1, characterized by, The device comprises: An acquisition module is configured to acquire multiple images of a to-be-measured object under different characteristic lights collected by a camera, divide each of the images into multiple regions, and extract brightness information of each corresponding region in the multiple images, wherein the brightness information of the same region under different characteristic lights in all images is represented by a light source feature matrix; An extraction module is configured to input the light source feature matrix into a preset mathematical model in sequence to obtain feature information of each of the light source feature matrices, wherein the feature information comprises gradient variation of the light source feature matrix in any direction; An execution module is configured to group the feature information based on feature information similarity to obtain multiple sets of feature information, set a corresponding depth value for each set of feature information, and compose depth information of the to-be-measured object according to the corresponding depth values of the multiple sets of feature information.

9. A computer apparatus, characterized by: The computer device comprises a processor configured to implement the object depth information acquisition method in any one of claims 1 to 7 when executing a computer program stored in a memory.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one computer program, and the at least one computer program is executed by a processor to implement the object depth information acquisition method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Measurement texture geometric feature reconstruction method based on photometric stereo

    CN105787989A

  • Device and method for shape measurement

    JP2004271311A