WO2019153196A1 - 图像处理的方法、装置、计算机系统和可移动设备 - Google Patents

图像处理的方法、装置、计算机系统和可移动设备 Download PDF

Info

Publication number
WO2019153196A1
WO2019153196A1 PCT/CN2018/075847 CN2018075847W WO2019153196A1 WO 2019153196 A1 WO2019153196 A1 WO 2019153196A1 CN 2018075847 W CN2018075847 W CN 2018075847W WO 2019153196 A1 WO2019153196 A1 WO 2019153196A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
block
frequency component
high frequency
depth information
Prior art date
Application number
PCT/CN2018/075847
Other languages
English (en)
French (fr)
Inventor
周游
朱振宇
杜劼熹
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2018/075847 priority Critical patent/WO2019153196A1/zh
Priority to CN201880012612.9A priority patent/CN110326028A/zh
Publication of WO2019153196A1 publication Critical patent/WO2019153196A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/536Depth or shape recovery from perspective effects, e.g. by using vanishing points
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof

Definitions

  • the present invention relates to the field of information technology, and more particularly to a method, apparatus, computer system and mobile device for image processing.
  • Computer vision relies on the imaging system instead of the visual organ as an input sensitive means.
  • the most common is the camera.
  • a dual camera can form a basic vision system called the Stereo Vision System.
  • the binocular camera system uses two cameras to capture two photos at the same time and at different angles, and then through the difference between the two photos and the position and angle relationship between the two cameras, the triangle and the camera can be used to calculate the scene and the camera.
  • the distance relationship is plotted on a map as the Depth Map. That is to say, the binocular camera system acquires the depth information of the scene by the difference of two photos at different angles at the same time. This difference may be due to shooting at different angles, in which case the calculated scene depth is correct.
  • the two cameras themselves are caused by differences in imaging, for example, the camera is occluded or bad weather, and the calculated depth information is wrong.
  • Embodiments of the present invention provide a method, an apparatus, a computer system, and a mobile device for image processing, which can improve the accuracy of acquiring depth information.
  • a method of image processing comprising: determining an occlusion region in a first image and a second image, wherein the first image and the second image are at a different angle to capture a target scene at the same time Obtaining an image; replacing pixel points in the occlusion area of the first image and the second image with a random point; acquiring the first image and the second image after replacing the random point The depth information of the target scene.
  • a method of image processing comprising: dividing a first image and a second image into segments, wherein the first image and the second image are shot at different angles at the same time An image obtained by the scene; detecting a matching degree of the block corresponding to the first image and the second image; a first block in the first image and a second block in the corresponding second image Removing the high-frequency component details in the first partition and the second partition when the cost corresponding to the matching degree is greater than the cost threshold; the first partition and the removal according to the high-frequency component details The second block acquires depth information of the target scene.
  • an apparatus for image processing comprising: a determining unit configured to determine an occlusion region in the first image and the second image, wherein the first image and the second image are at different angles at the same time Obtaining an image obtained by the target scene; processing unit, configured to replace pixel points in the occlusion area of the first image and the second image with random points; and acquiring unit, configured to perform, according to the replacement of the random point
  • the first image and the second image acquire depth information of the target scene.
  • a fourth aspect provides an apparatus for image processing, comprising: a segmentation unit for dividing a first image and a second image into segments, wherein the first image and the second image are at the same time The image obtained by the target scene is captured at different angles; the detecting unit is configured to detect a matching degree of the block corresponding to the first image and the second image; and the processing unit is configured to use the first point in the first image Removing the high frequency component details in the first partition and the second partition when the cost corresponding to the matching degree of the second partition in the corresponding second image is greater than the cost threshold; the acquiring unit, Obtaining depth information of the target scene according to the first partition and the second partition after removing the high frequency component details.
  • a computer system comprising: a memory for storing computer executable instructions; a processor for accessing the memory, and executing the computer executable instructions to perform the first or second The operation in the aspect of the method.
  • a mobile device comprising: the apparatus for image processing of the third or fourth aspect; or the computer system of the above fifth aspect.
  • a computer storage medium having stored therein program code, the program code being operative to indicate a method of performing the first or second aspect described above.
  • the technical solution of the embodiment of the present invention calculates the depth information after replacing the pixel points in the occlusion region with the random points, so that the obtained depth information is more accurate than the depth information obtained by directly using the occluded pixel points, thereby improving the acquisition.
  • the accuracy of the depth information is more accurate than the depth information obtained by directly using the occluded pixel points, thereby improving the acquisition.
  • FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present invention is applied.
  • FIG. 2 is a schematic architectural diagram of a mobile device according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method of image processing according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a method of image processing according to another embodiment of the present invention.
  • FIG. 5 is a schematic flow chart of removing details of high frequency components according to an embodiment of the present invention.
  • FIG. 6 is a schematic block diagram of an apparatus for image processing according to an embodiment of the present invention.
  • Figure 7 is a schematic block diagram of an apparatus for image processing according to another embodiment of the present invention.
  • Figure 8 is a schematic block diagram of a computer system in accordance with an embodiment of the present invention.
  • the size of the sequence numbers of the processes does not imply a sequence of executions, and the order of execution of the processes should be determined by its function and internal logic, and should not be construed as an embodiment of the present invention.
  • the implementation process constitutes any limitation.
  • FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present invention is applied.
  • the system 100 can receive the image to be processed 102 and process the image to be processed 102 to obtain a processing result 108.
  • system 100 can receive two images taken by a binocular camera system and process the two images to obtain depth information.
  • components in system 100 may be implemented by one or more processors, which may be processors in a computing device or processors in a mobile device (eg, a drone).
  • the processor may be any type of processor, which is not limited in this embodiment of the present invention.
  • One or more memories may also be included in system 100.
  • the memory can be used to store instructions and data, such as computer-executable instructions to implement the technical solution of the embodiments of the present invention, the image to be processed 102, the processing result 108, and the like.
  • the memory may be any kind of memory, which is not limited in this embodiment of the present invention.
  • the technical solution of the embodiment of the present invention can be applied to an electronic device having a dual camera or a multi-camera, for example, a mobile device, a VR/AR glasses, or a dual camera mobile phone.
  • the mobile device may be a drone, an unmanned ship, an autonomous vehicle, a robot, or an aerial vehicle, but the embodiment of the present invention is not limited thereto.
  • FIG. 2 is a schematic architectural diagram of a removable device 200 in accordance with one embodiment of the present invention.
  • the mobile device 200 can include a power system 210, a control system 220, a sensing system 230, and a processing system 240.
  • Power system 210 is used to power the mobile device 200.
  • the power system of the drone may include an electronic governor (referred to as an electric current), a propeller, and a motor corresponding to the propeller.
  • the motor is connected between the electronic governor and the propeller, and the motor and the propeller are disposed on the corresponding arm; the electronic governor is used for receiving the driving signal generated by the control system, and providing driving current to the motor according to the driving signal to control the motor Rotating speed.
  • the motor is used to drive the propeller to rotate to power the drone's flight.
  • the sensing system 230 can be used to measure attitude information of the mobile device 200, that is, position information and state information of the mobile device 200 in space, for example, three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, three-dimensional angular velocity, and the like.
  • the sensing system 230 may include, for example, at least one of a gyroscope, an electronic compass, an Inertial Measurement Unit (IMU), a vision sensor, a Global Positioning System (GPS), a barometer, an airspeed meter, and the like.
  • IMU Inertial Measurement Unit
  • GPS Global Positioning System
  • barometer an airspeed meter
  • sensing system 230 can also be used to acquire images, i.e., sensing system 230 includes sensors for acquiring images, such as cameras and the like.
  • Control system 220 is used to control the movement of mobile device 200.
  • the control system 220 can control the mobile device 200 in accordance with program instructions that are set in advance.
  • control system 220 can control the movement of mobile device 200 based on the attitude information of mobile device 200 as measured by sensing system 230.
  • Control system 220 can also control mobile device 200 based on control signals from the remote control.
  • the control system 220 can be a flight control system (flying control) or a control circuit in a flight control.
  • Processing system 240 can process the images acquired by sensing system 230.
  • processing system 240 can be an Image Signal Processing (ISP) type of chip.
  • ISP Image Signal Processing
  • Processing system 240 may be system 100 of FIG. 1, or processing system 240 may include system 100 of FIG.
  • removable device 200 may also include other components not shown in FIG. 2, which are not limited by the embodiments of the present invention.
  • FIG. 3 shows a schematic flow diagram of a method 300 of processing an image in accordance with one embodiment of the present invention.
  • the method 300 can be applied to a scene in which a shooting lens (camera) may be blocked.
  • the method 300 can be performed by the system 100 shown in FIG. 1; or by the removable device 200 shown in FIG. 2. In particular, when executed by the removable device 200, it can be performed by the processing system 240 of FIG.
  • an image obtained by photographing the target scene at different angles at the same time may have an occlusion region.
  • the occlusion regions in the first image and the second image are first determined.
  • the image may be first partitioned, that is, a high resolution large image is divided into low resolution small image processing, which can further save computing resources, facilitate parallel processing, and reduce hardware limitation.
  • the first image and the second image may be first divided into blocks; and the matching of the blocks corresponding to the first image and the second image may be detected. And then determining an occlusion region in the first image and the second image according to a matching degree of the block corresponding to the first image and the second image.
  • a semi-global matching (SGM) algorithm may be used to detect the matching degree. If the matching degree is low, that is, the cost is high, Make sure the block is in the occlusion area.
  • SGM semi-global matching
  • an occlusion region in the first image and the second image may also be determined according to sources of the first image and the second image.
  • the source of the image may determine that some areas of the image are occluded areas.
  • the camera may be blocked by a propeller cover, a propeller, a tripod, a pan/tilt, etc., so the camera shoots Some areas of the image may be occluded areas.
  • the image is from a front/back/down view sensor, etc., the occlusion area in the image can be determined.
  • the occlusion area can also be pre-calibrated. That is to say, for different positions of the visual sensor (camera), the occlusion area of the captured image can be pre-calibrated, so that the occlusion area in the first image and the second image can be determined according to the prior calibration. For example, a certain area of a binocular image may be occluded and can be calibrated and unchanged. For example, in the area covered by the propeller cover, once the propeller cover is detected, the area can be directly determined as an occlusion area, and the pixels in the area are set to random points.
  • a random point of a Gaussian distribution or a randomly distributed random point may be used, but the embodiment of the present invention does not limit this.
  • pixels in the blocks in the first image and the second image that are in the occlusion region may be Point replacement is a random point.
  • the depth information is calculated.
  • the cost corresponding to the points in the occlusion area is naturally large, so that when calculating the depth information, the surrounding points are used to estimate the depth information of the current point in the occlusion area.
  • the depth information obtained by using the surrounding points is used. It is more accurate than the depth information obtained by directly using the occluded points.
  • the depth information may be acquired using an SGM algorithm.
  • r is the direction, for example, there may be 8 directions of left and right, right and left, up and down, bottom up, left upper right, lower right upper left, upper right lower left, lower left right upper.
  • L r (p,d) represents the minimum cost value along the current direction r when the disparity of the current pixel p is d.
  • L r (p,d) is the minimum selected from the four possible candidate values:
  • L r (p, d) also needs to subtract the minimum cost when the previous pixel takes different disparity values. This is because L r (p,d) will grow with the right shift of the current pixel. To prevent the value from overflowing, keep it at a small value.
  • the minimum value of the two pixel point gradation or the RGB difference value is sought as the value of C(p, d).
  • the grayscale/RGB value of pixel p be I(p), first from I(p), (I(p)+I(p-1))/2, (I(p)+I( Among the three values p+1))/2, the smallest difference from I(q) is selected, that is, d(p, pd). Then select I(p) from three values of I(q), (I(q)+I(q-1))/2, (I(q)+I(q+1))/2 The smallest difference is d(pd,p). Finally, the minimum value is chosen from two values, which is C(p,d).
  • the matching degree parameter of the matching process of the first image and the second image may be calculated.
  • each point p in the whole graph is in each direction r, and finally the sum of the costs of the parallax d is selected as the adaptation parameter of the entire matching process:
  • the number has a large deviation, so when calculating the adaptation parameter of the entire matching process, these pixels are removed, that is, the pixels do not participate in the calculation.
  • the depth information is used if the fitness degree parameter is less than a fitness degree predetermined value.
  • the repair is considered successful, and the repaired depth map can be used for other applications, for example, obstacle avoidance navigation.
  • the technical solution of the embodiment of the present invention calculates the depth information after replacing the pixel points in the occlusion region with the random points, so that the obtained depth information is more accurate than the depth information obtained by directly using the occluded pixel points, thereby improving the acquisition.
  • the accuracy of the depth information is more accurate than the depth information obtained by directly using the occluded pixel points, thereby improving the acquisition.
  • FIG. 4 shows a schematic flow diagram of a method 400 of processing an image in accordance with another embodiment of the present invention.
  • the method 400 can be applied to situations where high frequency component details are present in an image.
  • the high frequency component details may include at least one of raindrops, snowflakes, fogs, or noise.
  • the method 400 can be performed by the system 100 shown in FIG. 1; or by the removable device 200 shown in FIG. 2. In particular, when executed by the removable device 200, it can be performed by the processing system 240 of FIG.
  • the first image and the second image are divided into blocks, wherein the first image and the second image are images obtained by shooting a target scene at different angles at the same time.
  • the image when processing images (first image and second image) obtained by shooting a target scene at different angles at the same time, the image is first divided, that is, a high resolution is large.
  • the graph is divided into low-resolution small image processing, which can further save computing resources, facilitate parallel processing, and reduce hardware limitations.
  • the degree of matching is detected for each chunk. For example, for each partition of the first image and the second image, the SGM algorithm can be used to detect the degree of matching.
  • Corresponding processing is performed for the detected block matching degree. If the cost corresponding to the matching degree is greater than the cost threshold, that is, the matching degree is relatively poor, indicating that the high-frequency component details may be included in the block, in which case, removing the first block and the second block is performed. Processing of high frequency component details.
  • the high frequency component details in the image to be processed may be removed in the following manner, wherein the image to be processed represents the first partition or the second partition:
  • a deep detail network may be used to remove high frequency component details.
  • the depth detail neural network may be trained first by samples including high frequency component details and samples not including the high frequency component details.
  • the depth detail neural network can be trained by the following objective function:
  • N is the number of samples trained
  • the function f( ⁇ ) is the residual network ResNet
  • W, b is the parameter that needs training learning
  • X i is the image with the details of the high frequency components
  • Y i is the image without the details of the high frequency components.
  • (Y i -X i ) is the detail of the high-frequency component in the image.
  • X i, detail is the detail image of X i , which can be obtained by the following decomposition process:
  • the original image X can be filtered by a filtered filter to obtain a reference image X base from which the high-frequency component is removed, and the low-pass filtered reference image X base is subtracted from the original image X to obtain a detail image X detail.
  • a filtered filter to obtain a reference image X base from which the high-frequency component is removed
  • the low-pass filtered reference image X base is subtracted from the original image X to obtain a detail image X detail.
  • X detail can be obtained by the above decomposition process, and then input into the depth detail neural network to obtain an output negative residual image, and then the image to be processed is compared with the negative residual image. Plus, the image after removing the details of the high frequency component is obtained.
  • FIG. 5 is a schematic flow chart of removing details of high frequency components according to an embodiment of the present invention.
  • the decomposition process 502 in FIG. 5 may be the decomposition process described above, and the depth detail neural network 504 may be a depth detail neural network trained in the manner described above.
  • the image to be processed 501 obtains a detail image 503 through the decomposition process 502.
  • the detail image 503 serves as an input to the depth detail neural network 504, and a negative residual image 505 is obtained through the depth detail neural network 504, and the image to be processed 501 is further processed. Adding to the negative residual image 505 yields the final output, i.e., the image 506 after the high frequency component detail is removed.
  • the depth information is calculated. Since the details of the high-frequency components may cause the difference between the two blocks, thereby affecting the accuracy of the depth information, the accuracy of the depth information obtained by calculating the depth information after removing the details of the high-frequency components may be obtained.
  • the fourth block obtains depth information of the target scene.
  • the original block calculates the depth information.
  • the adaptation parameter of the matching process of the first image and the second image after removing the high frequency component details may also be calculated;
  • the depth information is used if the parameter is less than the fitness predetermined value.
  • whether the repair of the image is successful may be determined according to the fitness parameter. If the fitness parameter is less than the predetermined value of the fitness, the repair is considered successful, and the repaired depth map can be used for other applications, for example, obstacle avoidance navigation.
  • the depth information is calculated after removing the details of the high-frequency component, and the obtained depth information is more accurate than the depth information obtained by removing the high-frequency component details, thereby improving the accuracy of acquiring the depth information.
  • FIG. 6 shows a schematic block diagram of an apparatus 600 for image processing according to an embodiment of the present invention.
  • the apparatus 600 can perform the method 300 of image processing of the embodiments of the present invention described above.
  • the apparatus 600 can include:
  • a determining unit 610 configured to determine an occlusion region in the first image and the second image, wherein the first image and the second image are images obtained by capturing a target scene at different angles at the same time;
  • the processing unit 620 is configured to replace pixel points in the first image and the second image that are in the occlusion region with random points;
  • the obtaining unit 630 is configured to acquire depth information of the target scene according to the first image and the second image after the replacement of the random point.
  • the device 600 further includes:
  • a segmentation unit 640 configured to divide the first image and the second image into blocks
  • the processing unit 620 is specifically configured to:
  • the pixel points in the blocks in the occlusion area of the first image and the second image are replaced with random points.
  • the determining unit 610 is specifically configured to:
  • the determining unit 610 is specifically configured to:
  • the determining unit 610 is specifically configured to:
  • the occlusion regions in the first image and the second image are determined according to a prior calibration.
  • the random point is a random point of a Gaussian distribution or a randomly distributed random point.
  • the device 600 further includes:
  • the calculating unit 650 is configured to calculate an adaptation parameter of the matching process of the first image and the second image after removing the pixel replaced by the random point.
  • the device 600 further includes:
  • the application unit 660 is configured to use the depth information when the adaptation degree parameter is less than a predetermined value of the adaptation degree.
  • FIG. 7 shows a schematic block diagram of an apparatus 700 for image processing in accordance with an embodiment of the present invention.
  • the apparatus 700 can perform the method 400 of image processing of the embodiments of the present invention described above.
  • the apparatus 700 can include:
  • a segmentation unit 710 configured to divide the first image and the second image into segments, wherein the first image and the second image are images obtained by capturing a target scene at different angles at the same time;
  • the detecting unit 720 is configured to detect a matching degree of the block corresponding to the first image and the second image;
  • the processing unit 730 is configured to remove the first block when a cost corresponding to a matching degree of the first block in the first image and a second block in the corresponding second image is greater than a cost threshold And high frequency component details in the second block;
  • the obtaining unit 740 acquires depth information of the target scene according to the first block and the second block after removing the high frequency component details.
  • processing unit 730 is specifically configured to:
  • the high frequency component details include at least one of raindrops, snowflakes, fogs, or noise.
  • the obtaining unit 740 is further configured to:
  • the third block and the The fourth block acquires depth information of the target scene.
  • the device 700 further includes:
  • a calculation unit 750 configured to calculate an adaptation parameter of a matching process of the first image and the second image after removing the high frequency component details
  • the application unit 760 is configured to use the depth information when the fitness degree parameter is less than a predetermined degree of fitness.
  • the apparatus for image processing may be a chip, which may be implemented by a circuit, and the processor may use the chip, but the specific implementation manner of the embodiment of the present invention is not limited.
  • FIG. 8 shows a schematic block diagram of a computer system 800 in accordance with an embodiment of the present invention.
  • the computer system 800 can include a processor 810 and a memory 820.
  • computer system 800 may also include components that are generally included in other computer systems, such as input and output devices, communication interfaces, and the like, which are not limited by the embodiments of the present invention.
  • Memory 820 is for storing computer executable instructions.
  • the memory 820 may be various kinds of memories, for example, may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory, which is implemented by the present invention. This example is not limited to this.
  • RAM high speed random access memory
  • non-volatile memory such as at least one disk memory
  • the processor 810 is configured to access the memory 820 and execute the computer executable instructions to perform the operations in the method of image processing of the various embodiments of the present invention described above.
  • the processor 810 can include a microprocessor, a field-programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), etc., and is implemented by the present invention. This example is not limited to this.
  • Embodiments of the present invention also provide a removable device, which may include the apparatus or computer system for image processing of the various embodiments of the present invention described above.
  • the apparatus, computer system, and mobile device of the image processing according to the embodiments of the present invention may correspond to an execution subject of the image processing method of the embodiment of the present invention, and the above-described apparatus of the image processing apparatus, the computer system, and each of the movable devices And other operations and/or functions, respectively, in order to implement the corresponding processes of the foregoing various methods, for brevity, no further details are provided herein.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores program code, and the program code can be used to indicate a method for performing image processing of the embodiment of the invention.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into 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, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and 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 objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention 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 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 storage medium.
  • the technical solution of the present invention contributes in essence or 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 storage medium.
  • 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 methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Abstract

公开了一种图像处理的方法、装置、计算机系统和可移动设备。该方法包括:确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点;根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。本发明实施例的技术方案,能够提高获取深度信息的准确性。

Description

图像处理的方法、装置、计算机系统和可移动设备
版权申明
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。
技术领域
本发明涉及信息技术领域,并且更具体地,涉及一种图像处理的方法、装置、计算机系统和可移动设备。
背景技术
人类正在进入信息时代,计算机将越来越广泛地进入几乎所有领域。作为智能计算的重要领域,计算机视觉得到了极大的开发应用。计算机视觉是依靠成像系统代替视觉器官作为输入敏感手段,最常用的是摄像头,由双摄像头即可组成一个基础的视觉系统,称为双目摄像头系统(Stereo Vision System)。
双目摄像头系统通过两个摄像头,拍摄同一时刻,不同角度的两张照片,再通过两张照片的差异,以及双摄像头之间的位置、角度关系,利用三角关系,即可计算出场景与摄像头的距离关系,画在一张图上即为深度图(Depth Map)。也就是说,双目摄像头系统是通过同一时刻不同角度的两张照片的差异,来获取场景的深度信息。这个差异可能是由于不同角度拍摄造成的,这种情况下计算出来的场景深度是正确的。然而,也有可能是两个摄像头本身成像有差异引起的,例如,摄像头被遮挡或者恶劣天气等情况,这时候算出来的深度信息就是错误的。
发明内容
本发明实施例提供了一种图像处理的方法、装置、计算机系统和可移动设备,能够提高获取深度信息的准确性。
第一方面,提供了一种图像处理的方法,包括:确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同 角度拍摄目标场景得到的图像;将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点;根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。
第二方面,提供了一种图像处理的方法,包括:将第一图像和第二图像切分为分块,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;检测所述第一图像和所述第二图像对应的分块的匹配度;在所述第一图像中的第一分块和对应的所述第二图像中第二分块的匹配度所对应的代价大于代价阈值时,去除所述第一分块和所述第二分块中的高频分量细节;根据去除所述高频分量细节后的所述第一分块和所述第二分块,获取所述目标场景的深度信息。
第三方面,提供了图像处理的装置,包括:确定单元,用于确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;处理单元,用于将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点;获取单元,用于根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。
第四方面,提供了图像处理的装置,包括:切分单元,用于将第一图像和第二图像切分为分块,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;检测单元,用于检测所述第一图像和所述第二图像对应的分块的匹配度;处理单元,用于在所述第一图像中的第一分块和对应的所述第二图像中第二分块的匹配度所对应的代价大于代价阈值时,去除所述第一分块和所述第二分块中的高频分量细节;获取单元,根据去除所述高频分量细节后的所述第一分块和所述第二分块,获取所述目标场景的深度信息。
第五方面,提供了一种计算机系统,包括:存储器,用于存储计算机可执行指令;处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行上述第一或第二方面的方法中的操作。
第六方面,提供了一种可移动设备,包括:上述第三或第四方面的图像处理的装置;或者,上述第五方面的计算机系统。
第七方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述第一或第二方面的方法。
本发明实施例的技术方案,在将遮挡区域内的像素点置换为随机点后再计算深度信息,这样得到的深度信息比直接采用被遮挡的像素点得到的深度信息更准确,从而能够提高获取深度信息的准确性。
附图说明
图1是应用本发明实施例的技术方案的架构图。
图2是本发明实施例的可移动设备的示意性架构图。
图3是本发明一个实施例的图像处理的方法的示意性流程图。
图4是本发明另一个实施例的图像处理的方法的示意性流程图。
图5为本发明实施例的去除高频分量细节的流程示意图。
图6是本发明一个实施例的图像处理的装置的示意性框图
图7是本发明另一个实施例的图像处理的装置的示意性框图。
图8是本发明实施例的计算机系统的示意性框图。
具体实施方式
下面将结合附图,对本发明实施例中的技术方案进行描述。
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理解本发明实施例,而非限制本发明实施例的范围。
还应理解,本发明实施例中的公式只是一种示例,而非限制本发明实施例的范围,各公式可以进行变形,这些变形也应属于本发明保护的范围。
还应理解,在本发明的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可以组合实施,本发明实施例对此并不限定。
除非另有说明,本发明实施例所使用的所有技术和科学术语与本发明的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。本申请所使用的术语“和/或”包括一个或多个相关的所列项的任意的和所有的组合。
图1是应用本发明实施例的技术方案的架构图。
如图1所示,系统100可以接收待处理图像102,对待处理图像102 进行处理,得到处理结果108。例如,系统100可以接收双目摄像头系统拍摄的两张图像,对这两张图像进行处理得到深度信息。在一些实施例中,系统100中的部件可以由一个或多个处理器实现,该处理器可以是计算设备中的处理器,也可以是移动设备(例如无人机)中的处理器。该处理器可以为任意种类的处理器,本发明实施例对此不做限定。系统100中还可以包括一个或多个存储器。该存储器可用于存储指令和数据,例如,实现本发明实施例的技术方案的计算机可执行指令,待处理图像102、处理结果108等。该存储器可以为任意种类的存储器,本发明实施例对此也不做限定。
本发明实施例的技术方案可以应用于具有双摄像头或多摄像头的电子设备,例如,可移动设备、VR/AR眼镜或双摄像头手机等。该可移动设备可以是无人机、无人驾驶船、自动驾驶车辆、机器人或航拍飞行器等,但本发明实施例对此并不限定。
图2是本发明一个实施例的可移动设备200的示意性架构图。
如图2所示,可移动设备200可以包括动力系统210、控制系统220、传感系统230和处理系统240。
动力系统210用于为该可移动设备200提供动力。
以无人机为例,无人机的动力系统可以包括电子调速器(简称为电调)、螺旋桨以及与螺旋桨相对应的电机。电机连接在电子调速器与螺旋桨之间,电机和螺旋桨设置在对应的机臂上;电子调速器用于接收控制系统产生的驱动信号,并根据驱动信号提供驱动电流给电机,以控制电机的转速。电机用于驱动螺旋桨旋转,从而为无人机的飞行提供动力。
传感系统230可以用于测量可移动设备200的姿态信息,即可移动设备200在空间的位置信息和状态信息,例如,三维位置、三维角度、三维速度、三维加速度和三维角速度等。传感系统230例如可以包括陀螺仪、电子罗盘、惯性测量单元(Inertial Measurement Unit,IMU)、视觉传感器、全球定位系统(Global Positioning System,GPS)、气压计、空速计等传感器中的至少一种。
在本发明实施例中,传感系统230还可用于采集图像,即传感系统230包括用于采集图像的传感器,例如相机等。
控制系统220用于控制可移动设备200的移动。控制系统220可以按照预先设置的程序指令对可移动设备200进行控制。例如,控制系统220可 以根据传感系统230测量的可移动设备200的姿态信息控制可移动设备200的移动。控制系统220也可以根据来自遥控器的控制信号对可移动设备200进行控制。例如,对于无人机,控制系统220可以为飞行控制系统(飞控),或者为飞控中的控制电路。
处理系统240可以处理传感系统230采集的图像。例如,处理系统240可以为图像信号处理(Image Signal Processing,ISP)类芯片。
处理系统240可以为图1中的系统100,或者,处理系统240可以包括图1中的系统100。
应理解,上述对于可移动设备200的各组成部件的划分和命名仅仅是示例性的,并不应理解为对本发明实施例的限制。
还应理解,可移动设备200还可以包括图2中未示出的其他部件,本发明实施例对此并不限定。
图3示出了本发明一个实施例的处理图像的方法300的示意性流程图。该方法300可以应用于拍摄镜头(摄像头)可能被遮挡的场景。该方法300可以由图1所示的系统100执行;或者由图2所示的可移动设备200执行。具体地,在由可移动设备200执行时,可以由图2中的处理系统240执行。
310,确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像。
在拍摄镜头可能被遮挡的情况下,在相同时刻以不同角度拍摄目标场景得到的图像(第一图像和第二图像)可能会存在遮挡区域。在本发明实施例中,在利用第一图像和第二图像获取深度信息前,先判断第一图像和第二图像中的遮挡区域。
可选地,可以先对图像进行分块,即,将一张高分辨的大图分块成低分辨率的小图处理,这样可以进一步节省计算资源,便于并行处理,降低硬件的限制性。
因此,对于第一图像和第二图像,可以先将所述第一图像和所述第二图像切分为分块;再检测所述第一图像和所述第二图像对应的分块的匹配度;然后再根据所述第一图像和所述第二图像对应的分块的匹配度,确定所述第一图像和所述第二图像中的遮挡区域。
例如,对于第一图像和第二图像的每个分块(Patch),可以采用半全 局匹配(Semi-global Matching,SGM)算法检测匹配度,若匹配度比较低,即代价较高,则可以确定该分块处于遮挡区域。
可选地,还可以根据所述第一图像和所述第二图像的来源,确定所述第一图像和所述第二图像中的遮挡区域。
具体而言,图像的来源可能决定了图像的某些区域为遮挡区域,例如,对于无人机来说,摄像头可能受到螺旋桨保护罩、螺旋桨、脚架、云台等的遮挡,因此该摄像头拍摄的图像的某些区域可能为遮挡区域。这样,根据图像的来源,例如,图像来自前/后/下视传感器等,就可以确定图像中的遮挡区域。
可选地,该遮挡区域还可以预先标定。也就是说,对于不同位置的视觉传感器(摄像头),其拍摄的图像的遮挡区域可以预先标定,这样,可以根据预先的标定,确定所述第一图像和所述第二图像中的遮挡区域。举例来说,双目图像的某块区域可能会被遮挡是可以标定出来的,而且是不变的。比如对于安装螺旋桨保护罩后遮挡的区域,一旦检测到已安装螺旋桨保护罩,就可以直接将该区域确定为遮挡区域,并将该区域内的像素点置为随机点。
320,将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点。
对于图像中的遮挡区域,在本发明实施例中,我们进行置换处理,即,将图像中处于遮挡区域内的像素点置换为随机点。
可选地,可以采用高斯分布的随机点或平均分布的随机点,但本发明实施例对此并不限定。
可选地,在将所述第一图像和所述第二图像切分为分块的情况下,可以将所述第一图像和所述第二图像中处于遮挡区域内的分块内的像素点置换为随机点。
330,根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。
在本发明实施例中,在将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点后,再计算深度信息。
由于随机点是无法匹配上的,所以遮挡区域内的点对应的代价(Cost)自然就会很大,这样,在计算深度信息时就会使用周围的点推算遮挡区域内当前点的深度信息。
换句话说,由于双摄像头的遮挡情况不一致,若直接采用拍摄的图像计算深度信息,可能会出现较大的错误。而将遮挡区域内的点置换为随机点后,再计算深度信息时,会采用遮挡区域周围的点推算遮挡区域内点的深度信息,由于图像中特征的连续性,采用周围点得到的深度信息要比直接采用被遮挡的点得到的深度信息更准确。
可选地,可以采用SGM算法获取深度信息。
在SGM算法中,对于像素p,其视差disparity为d时,代价为:
Figure PCTCN2018075847-appb-000001
其中,r表示方向,例如,可以有左右,右左,上下,下上,左上右下,右下左上,右上左下,左下右上这8个方向。
Figure PCTCN2018075847-appb-000002
L r(p,d)表示沿着当前方向r,当目前像素p的disparity取值为d时,其最小cost值。
以当前方向r为从左向右为例,L r(p,d)中的第二项是从4种可能的候选值中选取的最小值:
1.前一个像素(左相邻像素)disparity取值为d时,其最小的cost值;
2.前一个像素(左相邻像素)disparity取值为d-1时,其最小的cost值+惩罚系数P1;
3.前一个像素(左相邻像素)disparity取值为d+1时,其最小的cost值+惩罚系数P1;
4.前一个像素(左相邻像素)disparity取值为其他时,其最小的cost值+惩罚系数P2。
另外,L r(p,d)中还需要减去前一个像素取不同disparity值时最小的cost。这是因为L r(p,d)是会随着当前像素的右移不停增长的,为了防止数值溢出,所以要让它维持在一个较小的数值。
C(p,d)=min(d(p,p-d,I L,I R),d(p-d,p,I R,I L))
Figure PCTCN2018075847-appb-000003
即,当前像素p和移动d之后的像素q之间,经过半个像素插值后,寻找两个像素点灰度或者RGB差值的最小值,作为C(p,d)的值。
具体来说:设像素p的灰度/RGB值为I(p),先从I(p),(I(p)+I(p-1))/2,(I(p)+I(p+1))/2三个值中选择出和I(q)差值最小的,即d(p,p-d)。然后再从I(q),(I(q)+I(q-1))/2,(I(q)+I(q+1))/2三个值中选择出和I(p)差值最小的,即d(p-d,p)。最后从两个值中选取最小值,就是C(p,d)。
在将遮挡区域内的点置换为随机点后,最终反映在SGM的结果上就是使用计算路径(Path)上的前序点推算当前遮挡区域的深度信息。
可选地,在本发明一个实施例中,可以将置换为随机点的像素去除后,再计算所述第一图像和所述第二图像的匹配过程的适配度参数。
例如,以SGM算法为例,全图中每个点p在各方向r上,最终选取视差d的cost的总和,作为整个匹配过程的适配度参数:
Figure PCTCN2018075847-appb-000004
由于置为随机点的像素的C(p,d)为一个较大数字,会引起适配度参
数有较大偏差,故在计算整个匹配过程的适配度参数的时候,去除这些像素,即这些像素不参与计算。
可选地,若所述适配度参数小于适配度预定值,则使用所述深度信息。
也就是说,若根据上式得到的结果比较好,即∑ pS(p,d)小于适配度预定值,则认为修复成功,修复后的深度图可以用于其他应用,例如,避障导航。
本发明实施例的技术方案,在将遮挡区域内的像素点置换为随机点后再计算深度信息,这样得到的深度信息比直接采用被遮挡的像素点得到的深度信息更准确,从而能够提高获取深度信息的准确性。
以上描述了双目摄像头系统中对有遮挡区域的图像的处理方法,除了有遮挡区域的情况,恶劣天气等情况也可能导致双目摄像头系统得到的两张图像的差异,下面描述针对该情况的图像处理方法。
图4示出了本发明另一个实施例的处理图像的方法400的示意性流程图。该方法400可以应用于图像中存在高频分量细节的情况。例如,该高频分量细节可以包括雨滴、雪花、雾滴或噪点中至少一种。该方法400可以由图1所示的系统100执行;或者由图2所示的可移动设备200执行。具体 地,在由可移动设备200执行时,可以由图2中的处理系统240执行。
410,将第一图像和第二图像切分为分块,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像。
在本发明实施例中,在对在相同时刻以不同角度拍摄目标场景得到的图像(第一图像和第二图像)进行处理时,先对图像进行分块,即,将一张高分辨的大图分块成低分辨率的小图处理,这样可以进一步节省计算资源,便于并行处理,降低硬件的限制性。
420,检测所述第一图像和所述第二图像对应的分块的匹配度。
在将图像切分为分块后,针对每个分块检测匹配度。例如,对于第一图像和第二图像的每个分块,可以采用SGM算法检测匹配度。
430,在所述第一图像中的第一分块和对应的所述第二图像中第二分块的匹配度所对应的代价大于代价阈值时,去除所述第一分块和所述第二分块中的高频分量细节。
针对检测的分块匹配度情况,进行相应的处理。若匹配度所对应的代价大于代价阈值,即匹配度比较差,表明分块中可能包括高频分量细节,这种情况下,进行去除所述第一分块和所述第二分块中的高频分量细节的处理。
可选地,可以采用以下方式去除待处理图像中的所述高频分量细节,其中所述待处理图像表示所述第一分块或所述第二分块:
对所述待处理图像进行低通滤波处理,得到基准图像;
将所述待处理图像减去所述基准图像,得到细节图像;
根据所述细节图像和深度细节神经网络,得到负残差图像,其中,所述深度细节神经网络为通过包括所述高频分量细节的样本和不包括所述高频分量细节的样本训练得到的;
将所述待处理图像与所述负残差图像相加,得到去除所述高频分量细节后的图像。
具体而言,在本发明实施例中,可以采用深度细节神经网络(Deep detail network)去除高频分量细节。可以先通过包括高频分量细节的样本和不包括所述高频分量细节的样本训练得到的该深度细节神经网络。
例如,可以通过如下目标函数(objective function)训练该深度细节神经网络:
Figure PCTCN2018075847-appb-000005
其中N为训练的样本数量,函数f(·)为残差网络ResNet,W,b是需要训练学习的参数,X i是有高频分量细节的图像,Y i是无高频分量细节的图像,(Y i-X i)就是图像中的高频分量细节,这里需要通过学习,让f(X i,detail,W,b)趋近于(Y i-X i)。X i,detail为X i的细节图像,可以通过以下分解过程得到:
X detail=X-X base
可以先通过低通滤波器(guided filtering)对原图X滤波,得到去除高频分量的基准图像X base,再用原图X减去低通滤波后的基准图像X base,得到细节图像X detail。由于雨滴、雾滴、雪花等基本在图像中是高频分量(因为雨、雪、雾都不可能在画面中只有一两滴,一般在全图很多地方反复多次出现),所以可以通过这种方法初步得到含有高频分量细节的粗略的细节图像X detail
对于样本X i,可以通过上述分解过程得到X i,detail,进而通过上述目标函数训练得到该深度细节神经网络。
对于包括高频分量细节的待处理图像,可以通过上述分解过程先得到X detail,再将其输入该深度细节神经网络,得到输出负残差图像,再将待处理图像与该负残差图像相加,得到去除高频分量细节后的图像。
图5为本发明一个实施例的去除高频分量细节的流程示意图。图5中的分解过程502可以为上述的分解过程,深度细节神经网络504可以为通过上述的方式训练得到的深度细节神经网络。
如图5所示,待处理图像501通过分解过程502得到细节图像503,细节图像503作为深度细节神经网络504的输入,通过深度细节神经网络504得到负残差图像505,再将待处理图像501与负残差图像505相加即可得到最终的输出,即,去除高频分量细节后的图像506。
440,根据去除所述高频分量细节后的所述第一分块和所述第二分块,获取所述目标场景的深度信息。
在本发明实施例中,在将第一分块和第二分块去除高频分量细节后,再计算深度信息。由于高频分量细节可能会导致两个分块的差异,进而影响深度信息的准确性,在去除高频分量细节后再计算深度信息可以通过获取的深度信息的准确性。
可选地,在所述第一图像中的第三分块和对应的所述第二图像中第四分块的匹配度所对应的代价不大于所述代价阈值时,根据所述第三分块和所述第四分块,获取所述目标场景的深度信息。
也就是说,若匹配度所对应的代价不大于代价阈值,即匹配度比较高,表明分块中不包括高频分量细节或高频分量细节的影响不大,这种情况下,可以直接根据原分块计算深度信息。
可选地,在本发明一个实施例中,还可以计算去除所述高频分量细节后的所述第一图像和所述第二图像的匹配过程的适配度参数;若所述适配度参数小于适配度预定值,则使用所述深度信息。
具体而言,在去除高频分量细节后,可以根据适配度参数确定对图像的修复是否成功。若适配度参数小于适配度预定值,则认为修复成功,修复后的深度图可以用于其他应用,例如,避障导航。
本发明实施例的技术方案,在去除高频分量细节后再计算深度信息,这样得到的深度信息比不去除高频分量细节得到的深度信息更准确,从而能够提高获取深度信息的准确性。
上文中详细描述了本发明实施例的图像处理的方法,下面将描述本发明实施例的图像处理的装置、计算机系统和可移动设备。
图6示出了本发明一个实施例的图像处理的装置600的示意性框图。该装置600可以执行上述本发明实施例的图像处理的方法300。
如图6所示,该装置600可以包括:
确定单元610,用于确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;
处理单元620,用于将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点;
获取单元630,用于根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。
可选地,所述装置600还包括:
切分单元640,用于将所述第一图像和所述第二图像切分为分块;
所述处理单元620具体用于:
将所述第一图像和所述第二图像中处于遮挡区域内的分块内的像 素点置换为随机点。
可选地,所述确定单元610具体用于:
检测所述第一图像和所述第二图像对应的分块的匹配度;
根据所述第一图像和所述第二图像对应的分块的匹配度,确定所述第一图像和所述第二图像中的遮挡区域。
可选地,所述确定单元610具体用于:
根据所述第一图像和所述第二图像的来源,确定所述第一图像和所述第二图像中的遮挡区域。
可选地,所述确定单元610具体用于:
根据预先的标定,确定所述第一图像和所述第二图像中的遮挡区域。
可选地,所述随机点为高斯分布的随机点或平均分布的随机点。
可选地,所述装置600还包括:
计算单元650,用于将置换为随机点的像素去除后,计算所述第一图像和所述第二图像的匹配过程的适配度参数。
可选地,所述装置600还包括:
应用单元660,用于在所述适配度参数小于适配度预定值时,使用所述深度信息。
图7示出了本发明一个实施例的图像处理的装置700的示意性框图。该装置700可以执行上述本发明实施例的图像处理的方法400。
如图7所示,该装置700可以包括:
切分单元710,用于将第一图像和第二图像切分为分块,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;
检测单元720,用于检测所述第一图像和所述第二图像对应的分块的匹配度;
处理单元730,用于在所述第一图像中的第一分块和对应的所述第二图像中第二分块的匹配度所对应的代价大于代价阈值时,去除所述第一分块和所述第二分块中的高频分量细节;
获取单元740,根据去除所述高频分量细节后的所述第一分块和所述第二分块,获取所述目标场景的深度信息。
可选地,所述处理单元730具体用于:
采用以下方式去除待处理图像中的所述高频分量细节,其中所述待处理图像表示所述第一分块或所述第二分块:
对所述待处理图像进行低通滤波处理,得到基准图像;
将所述待处理图像减去所述基准图像,得到细节图像;
根据所述细节图像和深度细节神经网络,得到负残差图像,其中,所述深度细节神经网络为通过包括所述高频分量细节的样本和不包括所述高频分量细节的样本训练得到的;
将所述待处理图像与所述负残差图像相加,得到去除所述高频分量细节后的图像。
可选地,所述高频分量细节包括雨滴、雪花、雾滴或噪点中至少一种。
可选地,所述获取单元740还用于:
在所述第一图像中的第三分块和对应的所述第二图像中第四分块的匹配度所对应的代价不大于所述代价阈值时,根据所述第三分块和所述第四分块,获取所述目标场景的深度信息。
可选地,所述装置700还包括:
计算单750,用于计算去除所述高频分量细节后的所述第一图像和所述第二图像的匹配过程的适配度参数;
应用单元760,用于在所述适配度参数小于适配度预定值时,使用所述深度信息。
应理解,上述本发明实施例的图像处理的装置可以是芯片,其具体可以由电路实现,处理器可以采用该芯片,但本发明实施例对具体的实现形式不做限定。
图8示出了本发明实施例的计算机系统800的示意性框图。
如图8所示,该计算机系统800可以包括处理器810和存储器820。
应理解,该计算机系统800还可以包括其他计算机系统中通常所包括的部件,例如,输入输出设备、通信接口等,本发明实施例对此并不限定。
存储器820用于存储计算机可执行指令。
存储器820可以是各种种类的存储器,例如可以包括高速随机存 取存储器(Random Access Memory,RAM),还可以包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器,本发明实施例对此并不限定。
处理器810用于访问该存储器820,并执行该计算机可执行指令,以进行上述本发明各种实施例的图像处理的方法中的操作。
处理器810可以包括微处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA),中央处理器(Central Processing unit,CPU),图形处理器(Graphics Processing Unit,GPU)等,本发明实施例对此并不限定。
本发明实施例还提供了一种可移动设备,该可移动设备可以包括上述本发明各种实施例的图像处理的装置或者计算机系统。
本发明实施例的图像处理的装置、计算机系统和可移动设备可对应于本发明实施例的图像处理的方法的执行主体,并且图像处理的装置、计算机系统和可移动设备中的各个模块的上述和其它操作和/或功能分别为了实现前述各个方法的相应流程,为了简洁,在此不再赘述。
本发明实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述本发明实施例的图像处理的方法。
应理解,在本发明实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中 的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (28)

  1. 一种图像处理的方法,其特征在于,包括:
    确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;
    将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点;
    根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    将所述第一图像和所述第二图像切分为分块;
    所述将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点,包括:
    将所述第一图像和所述第二图像中处于遮挡区域内的分块内的像素点置换为随机点。
  3. 根据权利要求2所述的方法,其特征在于,所述确定第一图像和第二图像中的遮挡区域,包括:
    检测所述第一图像和所述第二图像对应的分块的匹配度;
    根据所述第一图像和所述第二图像对应的分块的匹配度,确定所述第一图像和所述第二图像中的遮挡区域。
  4. 根据权利要求1或2所述的方法,其特征在于,所述确定第一图像和第二图像中的遮挡区域,包括:
    根据所述第一图像和所述第二图像的来源,确定所述第一图像和所述第二图像中的遮挡区域。
  5. 根据权利要求1或2所述的方法,其特征在于,所述确定第一图像和第二图像中的遮挡区域,包括:
    根据预先的标定,确定所述第一图像和所述第二图像中的遮挡区域。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述随机点为高斯分布的随机点或平均分布的随机点。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    将置换为随机点的像素去除后,计算所述第一图像和所述第二图像的匹 配过程的适配度参数。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    若所述适配度参数小于适配度预定值,则使用所述深度信息。
  9. 一种图像处理的方法,其特征在于,包括:
    将第一图像和第二图像切分为分块,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;
    检测所述第一图像和所述第二图像对应的分块的匹配度;
    在所述第一图像中的第一分块和对应的所述第二图像中第二分块的匹配度所对应的代价大于代价阈值时,去除所述第一分块和所述第二分块中的高频分量细节;
    根据去除所述高频分量细节后的所述第一分块和所述第二分块,获取所述目标场景的深度信息。
  10. 根据权利要求9所述的方法,其特征在于,所述去除所述第一分块和所述第二分块中的高频分量细节,包括:
    采用以下方式去除待处理图像中的所述高频分量细节,其中所述待处理图像表示所述第一分块或所述第二分块:
    对所述待处理图像进行低通滤波处理,得到基准图像;
    将所述待处理图像减去所述基准图像,得到细节图像;
    根据所述细节图像和深度细节神经网络,得到负残差图像,其中,所述深度细节神经网络为通过包括所述高频分量细节的样本和不包括所述高频分量细节的样本训练得到的;
    将所述待处理图像与所述负残差图像相加,得到去除所述高频分量细节后的图像。
  11. 根据权利要求9或10所述的方法,其特征在于,所述高频分量细节包括雨滴、雪花、雾滴或噪点中至少一种。
  12. 根据权利要求9至11中任一项所述的方法,其特征在于,所述方法还包括:
    在所述第一图像中的第三分块和对应的所述第二图像中第四分块的匹配度所对应的代价不大于所述代价阈值时,根据所述第三分块和所述第四分块,获取所述目标场景的深度信息。
  13. 根据权利要求9至12中任一项所述的方法,其特征在于,所述方 法还包括:
    计算去除所述高频分量细节后的所述第一图像和所述第二图像的匹配过程的适配度参数;
    若所述适配度参数小于适配度预定值,则使用所述深度信息。
  14. 一种图像处理的装置,其特征在于,包括:
    确定单元,用于确定第一图像和第二图像中的遮挡区域,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;
    处理单元,用于将所述第一图像和所述第二图像中处于遮挡区域内的像素点置换为随机点;
    获取单元,用于根据置换随机点后的所述第一图像和所述第二图像,获取所述目标场景的深度信息。
  15. 根据权利要求14所述的装置,其特征在于,所述装置还包括:
    切分单元,用于将所述第一图像和所述第二图像切分为分块;
    所述处理单元具体用于:
    将所述第一图像和所述第二图像中处于遮挡区域内的分块内的像素点置换为随机点。
  16. 根据权利要求15所述的装置,其特征在于,所述确定单元具体用于:
    检测所述第一图像和所述第二图像对应的分块的匹配度;
    根据所述第一图像和所述第二图像对应的分块的匹配度,确定所述第一图像和所述第二图像中的遮挡区域。
  17. 根据权利要求14或15所述的装置,其特征在于,所述确定单元具体用于:
    根据所述第一图像和所述第二图像的来源,确定所述第一图像和所述第二图像中的遮挡区域。
  18. 根据权利要求14或15所述的装置,其特征在于,所述确定单元具体用于:
    根据预先的标定,确定所述第一图像和所述第二图像中的遮挡区域。
  19. 根据权利要求14至18中任一项所述的装置,其特征在于,所述随机点为高斯分布的随机点或平均分布的随机点。
  20. 根据权利要求14至19中任一项所述的装置,其特征在于,所述装 置还包括:
    计算单元,用于将置换为随机点的像素去除后,计算所述第一图像和所述第二图像的匹配过程的适配度参数。
  21. 根据权利要求20所述的装置,其特征在于,所述装置还包括:
    应用单元,用于在所述适配度参数小于适配度预定值时,使用所述深度信息。
  22. 一种图像处理的装置,其特征在于,包括:
    切分单元,用于将第一图像和第二图像切分为分块,其中所述第一图像与所述第二图像为在相同时刻以不同角度拍摄目标场景得到的图像;
    检测单元,用于检测所述第一图像和所述第二图像对应的分块的匹配度;
    处理单元,用于在所述第一图像中的第一分块和对应的所述第二图像中第二分块的匹配度所对应的代价大于代价阈值时,去除所述第一分块和所述第二分块中的高频分量细节;
    获取单元,根据去除所述高频分量细节后的所述第一分块和所述第二分块,获取所述目标场景的深度信息。
  23. 根据权利要求22所述的装置,其特征在于,所述处理单元具体用于:
    采用以下方式去除待处理图像中的所述高频分量细节,其中所述待处理图像表示所述第一分块或所述第二分块:
    对所述待处理图像进行低通滤波处理,得到基准图像;
    将所述待处理图像减去所述基准图像,得到细节图像;
    根据所述细节图像和深度细节神经网络,得到负残差图像,其中,所述深度细节神经网络为通过包括所述高频分量细节的样本和不包括所述高频分量细节的样本训练得到的;
    将所述待处理图像与所述负残差图像相加,得到去除所述高频分量细节后的图像。
  24. 根据权利要求22或23所述的装置,其特征在于,所述高频分量细节包括雨滴、雪花、雾滴或噪点中至少一种。
  25. 根据权利要求22至24中任一项所述的装置,其特征在于,所述获取单元还用于:
    在所述第一图像中的第三分块和对应的所述第二图像中第四分块的匹 配度所对应的代价不大于所述代价阈值时,根据所述第三分块和所述第四分块,获取所述目标场景的深度信息。
  26. 根据权利要求22至25中任一项所述的装置,其特征在于,所述装置还包括:
    计算单元,用于计算去除所述高频分量细节后的所述第一图像和所述第二图像的匹配过程的适配度参数;
    应用单元,用于在所述适配度参数小于适配度预定值时,使用所述深度信息。
  27. 一种计算机系统,其特征在于,包括:
    存储器,用于存储计算机可执行指令;
    处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行根据权利要求1至13中任一项所述的方法中的操作。
  28. 一种可移动设备,其特征在于,包括:
    根据权利要求14至26中任一项所述的装置;或者,
    根据权利要求27所述的计算机系统。
PCT/CN2018/075847 2018-02-08 2018-02-08 图像处理的方法、装置、计算机系统和可移动设备 WO2019153196A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/075847 WO2019153196A1 (zh) 2018-02-08 2018-02-08 图像处理的方法、装置、计算机系统和可移动设备
CN201880012612.9A CN110326028A (zh) 2018-02-08 2018-02-08 图像处理的方法、装置、计算机系统和可移动设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/075847 WO2019153196A1 (zh) 2018-02-08 2018-02-08 图像处理的方法、装置、计算机系统和可移动设备

Publications (1)

Publication Number Publication Date
WO2019153196A1 true WO2019153196A1 (zh) 2019-08-15

Family

ID=67548672

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075847 WO2019153196A1 (zh) 2018-02-08 2018-02-08 图像处理的方法、装置、计算机系统和可移动设备

Country Status (2)

Country Link
CN (1) CN110326028A (zh)
WO (1) WO2019153196A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060029272A1 (en) * 2004-08-09 2006-02-09 Fuji Jukogyo Kabushiki Kaisha Stereo image processing device
CN101321299A (zh) * 2007-06-04 2008-12-10 华为技术有限公司 视差生成方法、生成单元以及三维视频生成方法及装置
CN103295229A (zh) * 2013-05-13 2013-09-11 清华大学深圳研究生院 视频深度信息恢复的全局立体匹配方法
CN103686125A (zh) * 2012-08-29 2014-03-26 Jvc建伍株式会社 深度推测装置、方法及程序、图像处理装置、方法及程序
CN103796004A (zh) * 2014-02-13 2014-05-14 西安交通大学 一种主动结构光的双目深度感知方法
CN107016698A (zh) * 2017-03-20 2017-08-04 深圳格兰泰克汽车电子有限公司 基于斜平面平滑的双目立体匹配方法及装置
CN107360354A (zh) * 2017-07-31 2017-11-17 广东欧珀移动通信有限公司 拍照方法、装置、移动终端和计算机可读存储介质

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6865289B1 (en) * 2000-02-07 2005-03-08 Canon Kabushiki Kaisha Detection and removal of image occlusion errors
US7330593B2 (en) * 2004-06-25 2008-02-12 Stmicroelectronics, Inc. Segment based image matching method and system
US8106924B2 (en) * 2008-07-31 2012-01-31 Stmicroelectronics S.R.L. Method and system for video rendering, computer program product therefor
KR101502362B1 (ko) * 2008-10-10 2015-03-13 삼성전자주식회사 영상처리 장치 및 방법
JP2011060216A (ja) * 2009-09-14 2011-03-24 Fujifilm Corp 画像処理装置および画像処理方法
US8643701B2 (en) * 2009-11-18 2014-02-04 University Of Illinois At Urbana-Champaign System for executing 3D propagation for depth image-based rendering
KR101683164B1 (ko) * 2010-09-10 2016-12-05 삼성전자주식회사 폐색 영역 복원 장치 및 방법
JP5464129B2 (ja) * 2010-11-17 2014-04-09 コニカミノルタ株式会社 画像処理装置および視差情報生成装置
JPWO2012114975A1 (ja) * 2011-02-24 2014-07-07 ソニー株式会社 画像処理装置および画像処理方法
CN102878982A (zh) * 2011-07-11 2013-01-16 北京新岸线移动多媒体技术有限公司 一种获取场景三维信息的方法和系统
ITTO20120413A1 (it) * 2012-05-08 2013-11-09 Sisvel Technology Srl Metodo per la generazione e ricostruzione di un flusso video tridimensionale, basato sull'utilizzo della mappa delle occlusioni, e corrispondente dispositivo di generazione e ricostruzione.
JP2014072809A (ja) * 2012-09-28 2014-04-21 Dainippon Printing Co Ltd 画像生成装置、画像生成方法、画像生成装置用プログラム
EP2965506A1 (en) * 2013-03-08 2016-01-13 Affaticati, Jean-Luc Method of replacing objects in a video stream and computer program
EP2884460B1 (en) * 2013-12-13 2020-01-01 Panasonic Intellectual Property Management Co., Ltd. Image capturing apparatus, monitoring system, image processing apparatus, image capturing method, and non-transitory computer readable recording medium
US9514523B2 (en) * 2014-11-18 2016-12-06 Intel Corporation Method and apparatus for filling images captured by array cameras
WO2016172960A1 (en) * 2015-04-30 2016-11-03 SZ DJI Technology Co., Ltd. System and method for enhancing image resolution
WO2018086050A1 (zh) * 2016-11-11 2018-05-17 深圳市大疆创新科技有限公司 深度图生成方法和基于该方法的无人机
CN106960454B (zh) * 2017-03-02 2021-02-12 武汉星巡智能科技有限公司 景深避障方法、设备及无人飞行器
CN107194963A (zh) * 2017-04-28 2017-09-22 努比亚技术有限公司 一种双摄像头图像处理方法及终端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060029272A1 (en) * 2004-08-09 2006-02-09 Fuji Jukogyo Kabushiki Kaisha Stereo image processing device
CN101321299A (zh) * 2007-06-04 2008-12-10 华为技术有限公司 视差生成方法、生成单元以及三维视频生成方法及装置
CN103686125A (zh) * 2012-08-29 2014-03-26 Jvc建伍株式会社 深度推测装置、方法及程序、图像处理装置、方法及程序
CN103295229A (zh) * 2013-05-13 2013-09-11 清华大学深圳研究生院 视频深度信息恢复的全局立体匹配方法
CN103796004A (zh) * 2014-02-13 2014-05-14 西安交通大学 一种主动结构光的双目深度感知方法
CN107016698A (zh) * 2017-03-20 2017-08-04 深圳格兰泰克汽车电子有限公司 基于斜平面平滑的双目立体匹配方法及装置
CN107360354A (zh) * 2017-07-31 2017-11-17 广东欧珀移动通信有限公司 拍照方法、装置、移动终端和计算机可读存储介质

Also Published As

Publication number Publication date
CN110326028A (zh) 2019-10-11

Similar Documents

Publication Publication Date Title
EP3517997B1 (en) Method and system for detecting obstacles by autonomous vehicles in real-time
CN108961327B (zh) 一种单目深度估计方法及其装置、设备和存储介质
US9916689B2 (en) Apparatus and method for estimating camera pose
US10789719B2 (en) Method and apparatus for detection of false alarm obstacle
CN105627932B (zh) 一种基于双目视觉的测距方法及装置
US8571354B2 (en) Method of and arrangement for blurring an image
CN111436216A (zh) 用于彩色点云生成的方法和系统
EP2894602A1 (en) A method of using image warping for geo-registration feature matching in vision-aided positioning
CN110988912A (zh) 自动驾驶车辆的道路目标与距离检测方法、系统、装置
JP2018535402A (ja) 異なる分解能を有するセンサーの出力を融合するシステム及び方法
CN111433818A (zh) 目标场景三维重建方法、系统及无人机
US11082633B2 (en) Method of estimating the speed of displacement of a camera
CN108603933B (zh) 用于融合具有不同分辨率的传感器输出的系统和方法
US20240013423A1 (en) Lane detection and distance estimation using single-view geometry
EP2175237A1 (en) System and methods for image-based navigation using line features matching
CN111308415B (zh) 一种基于时间延迟的在线估计位姿的方法和设备
US10679376B2 (en) Determining a pose of a handheld object
KR20200037502A (ko) 포즈 정보를 출력하는 방법 및 장치
CN114248778A (zh) 移动设备的定位方法和定位装置
CN116503566B (zh) 一种三维建模方法、装置、电子设备及存储介质
WO2019153196A1 (zh) 图像处理的方法、装置、计算机系统和可移动设备
CN111433819A (zh) 目标场景三维重建方法、系统及无人机
CN111161357B (zh) 信息处理方法及装置、增强现实设备和可读存储介质
CN114612875A (zh) 目标检测方法、装置、存储介质及电子设备
KR20200122967A (ko) 복수 영상 센서로부터 취득한 영상 정보와 위치 정보 간 연계를 통한 도로 공간 정보 구축을 위한 시스템 및 방법

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: 18905407

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: 18905407

Country of ref document: EP

Kind code of ref document: A1