WO2022170895A1 - 图像处理方法和装置 - Google Patents

图像处理方法和装置 Download PDF

Info

Publication number
WO2022170895A1
WO2022170895A1 PCT/CN2022/070486 CN2022070486W WO2022170895A1 WO 2022170895 A1 WO2022170895 A1 WO 2022170895A1 CN 2022070486 W CN2022070486 W CN 2022070486W WO 2022170895 A1 WO2022170895 A1 WO 2022170895A1
Authority
WO
WIPO (PCT)
Prior art keywords
line segment
image
mask image
target
coordinate system
Prior art date
Application number
PCT/CN2022/070486
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 北京沃东天骏信息技术有限公司
Publication of WO2022170895A1 publication Critical patent/WO2022170895A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Definitions

  • the present disclosure relates to the field of information processing, and in particular, to an image processing method and device.
  • image display has been widely used as a means of publicity.
  • the publicity effect can be effectively improved. For example, by pasting the floor template image to the floor area in the scene image through perspective transformation, so that the virtual image looks like it was taken in the real scene.
  • an image processing method including: extracting a first mask image of a target in a scene image and a normal of the target in a camera coordinate system; according to the first mask The image acquires the first boundary line segment set of the target in the pixel coordinate system; according to the normal and the preset parameters of the camera, the first mask image and each boundary line segment in the first boundary line segment set are mapped into the camera plane coordinate system to generate a second mask image and a second boundary line segment set; in the plane coordinate system, generate the target's the minimum circumscribed rectangle; the preset template image is mapped to the minimum circumscribed rectangle of the target to generate a transformed image; the target in the scene image is replaced with the transformed image to generate a virtual image.
  • acquiring the first boundary line segment set of the target in the pixel coordinate system according to the first mask image includes: performing line detection on the first mask image to generate a first candidate line segment set ; delete the boundary line segment of the scene image in the first candidate line segment set to generate a second candidate line segment set; delete the boundary line segment of the object located in the target area in the second candidate line segment set to generate the first candidate line segment A set of boundary line segments.
  • deleting the boundary line segment of the scene image in the first candidate line segment set includes: judging whether the ith line segment in the first candidate line segment set satisfies a first condition or a second condition, wherein the The first condition is
  • deleting the boundary line segment of the object located in the target area in the second candidate line segment set includes: judging whether the jth line segment in the second candidate line segment set satisfies a third condition, wherein the third The condition is abs(mean(reg 1 )-mean(reg 2 )) ⁇ , and mean(reg 1 ) is the minimum circumscribed convex polygon of the first mask image which is located on the side of the jth line.
  • mean(reg 2 ) is the average value of the pixels in the second region on the other side of the jth line in the minimum circumscribed convex polygon of the first mask image mean pixel value
  • abs is the function of taking the absolute value
  • is a preset parameter
  • 1 ⁇ j ⁇ n 2 is the number of candidate line segments in the second candidate line segment set; if the jth line segment satisfies the third condition , the jth line segment is deleted from the second candidate line segment set.
  • mapping the first mask image and each boundary line segment in the first boundary line segment set to the camera plane coordinate system according to the normal and camera preset parameters includes: according to the normal and camera preset parameters, map the first coordinates of the foreground pixels in the first mask image to the camera coordinate system to obtain the corresponding second coordinates; map the second coordinates to in the plane coordinate system to obtain the corresponding third coordinate; calculate the first transformation sub-matrix from the first coordinate to the third coordinate; use the first transformation sub-matrix to transform the first mask
  • the code image is mapped into the plane coordinate system to generate a second mask image; using the first transformation sub-matrix, each line segment in the first boundary line segment set is mapped into the plane coordinate system, to A second set of boundary line segments is generated.
  • generating a minimum circumscribed rectangle of the target according to the second mask image and the second set of boundary line segments includes: selecting a length in the second set of boundary line segments The largest line segment is used as a reference line segment; the included angle ⁇ between the reference line segment and the horizontal direction is calculated; the second mask image is rotated along the first direction by an angle ⁇ to generate a third mask image, so that the rotated reference line segment parallel to the horizontal direction; generating a minimum circumscribed rectangle of the foreground area in the third mask image; moving the minimum circumscribed rectangle of the foreground area generated in the third mask image along a second direction opposite to the first direction Rotate the angle ⁇ to get the minimum circumscribed rectangle of the target.
  • mapping the preset template image into the minimum circumscribed rectangle of the target to generate the transformed image comprises: transforming the minimum circumscribed rectangle of the target into a square; and computing the mapping of the template image into the square The second transformation sub-matrix of Transform the image.
  • the transformation matrix is a product of the inverse matrix of the first transformation sub-matrix and the second transformation sub-matrix.
  • replacing the target in the scene image with the conversion image includes: in the case that the pixel value of the pixel point in the ith row and the jth column in the first mask image is greater than 0, The pixel values of the pixel points in the i-th row and the j-th column in the scene image are replaced with the pixel values of the pixel points in the i-th row and the j-th column in the converted image.
  • an image processing apparatus comprising: a first processing module configured to extract a first mask image of a target in a scene image and a normal of the target in a camera coordinate system ; a second processing module, configured to obtain the first boundary line segment set of the target in the pixel coordinate system according to the first mask image; a third processing module, configured to preset according to the normal and the camera parameters, map the first mask image and each boundary line segment in the first boundary line segment set to the camera plane coordinate system to generate a second mask image and a second boundary line segment set; the fourth processing module, is configured to generate a minimum circumscribed rectangle of the target according to the second mask image and the second boundary line segment set in the plane coordinate system; a fifth processing module is configured to map the preset template image into the smallest circumscribed rectangle of the object to generate a transformed image; an image updating module configured to replace the object in the scene image with the transformed image to generate a virtual image.
  • an image processing apparatus comprising: a memory configured to store instructions; a processor coupled to the memory, the processor configured to execute any of the above-mentioned instructions based on the instructions stored in the memory methods described in the examples.
  • a non-transitory computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, any of the foregoing embodiments is implemented methods involved.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the disclosure
  • FIGS. 2A to 2C are schematic diagrams of scene images and mask images according to some embodiments of the disclosure.
  • 3A and 3B are schematic diagrams of mask images according to some embodiments of the present disclosure.
  • FIG. 4 is a schematic diagram of a mask image according to another embodiment of the disclosure.
  • FIG. 5 is a schematic diagram of a mask image according to still another embodiment of the disclosure.
  • FIG. 6 is a schematic diagram of a mask image according to still another embodiment of the disclosure.
  • FIG. 7 is a schematic diagram of a mask image according to still another embodiment of the disclosure.
  • FIG. 8 is a schematic diagram of a template image according to an embodiment of the disclosure.
  • FIG. 9 is a schematic diagram of a template image according to another embodiment of the disclosure.
  • FIG. 10 is a schematic diagram of a virtual image according to an embodiment of the disclosure.
  • FIG. 11 is a schematic structural diagram of an image processing apparatus according to an embodiment of the disclosure.
  • FIG. 12 is a schematic structural diagram of an image processing apparatus according to another embodiment of the disclosure.
  • the present disclosure provides an image processing solution, which can conveniently and quickly replace a designated target in a scene image, thereby effectively improving user experience.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present disclosure. In some embodiments, the following image processing method steps are performed by an image processing apparatus.
  • step 101 a first mask image of the target in the scene image and the normal of the target in the camera coordinate system are extracted.
  • the LiteSeg network is utilized to extract the first mask image M1 of the object in the scene image I0.
  • the intermediate layer feature f of the LiteSeg network after convolution operation, global pooling operation is performed to obtain a feature map with a predetermined size (for example, 1 ⁇ 1 ⁇ 1024), and finally through the fully connected layer Get the normal N of the target in the camera coordinate system.
  • a predetermined size for example, 1 ⁇ 1 ⁇ 1024
  • the object in the scene image I0 is the floor.
  • the normal N can be expressed as:
  • (a,b,c) represents the unit normal of the plane. If the coordinates of a point on the target plane in the camera coordinate system are (x, y, z), then:
  • step 102 a first boundary line segment set of the target in the pixel coordinate system is obtained according to the first mask image.
  • line detection is first performed on the first mask image to generate a first set of candidate line segments.
  • n 1 boundary line segments in the first mask image M1 are obtained to obtain the first candidate line segment set
  • the boundary line segments of the scene image in the first candidate line segment set are deleted to generate a second candidate line segment set.
  • the i-th line segment in the first candidate line segment set L 1 satisfies the first condition or the second condition, where the first condition is
  • boundary line segments of the objects located in the target area in the second candidate line segment set are deleted to generate a first boundary line segment set.
  • the third condition is abs(mean(reg 1 )-mean(reg 2 )) ⁇
  • mean(reg 1 ) is in the first mean pixel value of the pixels located in the first area on the side of the jth line in the minimum circumscribed convex polygon of the mask image
  • mean(reg 2 ) is the pixel value located at the jth in the minimum circumscribed convex polygon of the first mask image
  • abs is the absolute value function
  • is a preset parameter
  • n 2 is the number of candidate line segments in the second candidate line segment set .
  • step 103 map the first mask image and each boundary line segment in the first boundary line segment set to the camera plane coordinate system according to the normal and the camera preset parameters to generate a second mask image and a second boundary line segment set.
  • the first coordinates of the foreground pixels in the first mask image are first mapped to the camera coordinate system according to the normal and the preset camera parameters, so as to obtain the corresponding second coordinates.
  • the camera plane coordinate system is the XOY plane under the camera coordinate system.
  • the transformation matrix B is used to ensure that the Z-axis coordinate in the transformed point coordinates is 0.
  • a first transformation sub-matrix from the first coordinate P1 to the third coordinate P3 is calculated.
  • the first mask image is mapped into the plane coordinate system to generate the second mask image.
  • the first mask image M1 is shown in FIG. 3A
  • the second mask image M2 is shown in FIG. 3B .
  • each line segment in the first boundary line segment set is mapped into a plane coordinate system to generate a second boundary line segment set.
  • step 104 in the plane coordinate system, a minimum circumscribed rectangle of the target is generated according to the second mask image and the second set of boundary line segments.
  • the line segment 4 with the longest length is selected from the second boundary line segment set L4 as the reference line segment, and then the included angle ⁇ between the reference line segment 4 and the horizontal direction is calculated.
  • the second mask image M2 is rotated along the first direction by an angle ⁇ to generate a third mask image M3 so that the rotated reference line segment is parallel to the horizontal direction.
  • the third mask image M3 is obtained by rotating the second mask image shown in FIG. 4 by an angle ⁇ clockwise, as shown in FIG. 5 .
  • the minimum circumscribed rectangle of the foreground region generated in the third mask image is rotated by an angle ⁇ along a second direction opposite to the first direction to obtain the minimum circumscribed rectangle of the target.
  • the rectangle B1 in FIG. 5 is rotated counterclockwise by the angle ⁇ to obtain the minimum circumscribed rectangle of the target, as shown by the rectangle B2 in FIG. 6 .
  • step 105 the preset template image is mapped into the minimum circumscribed rectangle of the target to generate a transformed image.
  • the smallest circumscribed rectangle of the target is first transformed into a square. As shown in Fig. 7, the minimum circumscribed rectangle B2 of the target is transformed into a square B3.
  • a second transformation sub-matrix that maps the template image to a square is calculated, and a transformation matrix is obtained according to the first transformation sub-matrix and the second transformation sub-matrix.
  • the transformation matrix is the product of the inverse matrix of the first transformation sub-matrix and the second transformation sub-matrix.
  • the transformation matrix is A -1 D.
  • the template image I1 is shown in FIG. 8
  • the corresponding transformed image I2 is shown in FIG. 9 .
  • the objects in the scene image are replaced with the transition image to generate a virtual image.
  • the pixel value of the pixel point in the ith row and the jth column in the first mask image is greater than 0, the pixel value of the pixel point in the ith row and the jth column in the scene image is replaced is the pixel value of the pixel point in the i-th row and the j-th column in the converted image.
  • the target in the scene image I0 is changed to the converted image I2 by using the following formula, so as to obtain the virtual image I3, as shown in FIG. 10 .
  • FIG. 11 is a schematic structural diagram of an image processing apparatus according to an embodiment of the disclosure. As shown in FIG. 11 , the image processing apparatus includes a first processing module 1101 , a second processing module 1102 , a third processing module 1103 , a fourth processing module 1104 , a fifth processing module 1105 and an image updating module 1106 .
  • the first processing module 1101 is configured to extract the first mask image of the target in the scene image and the normal of the target in the camera coordinate system.
  • the LiteSeg network is utilized to extract the first mask image M1 of the object in the scene image I0.
  • global pooling operation is performed to obtain a feature map with a predetermined size (for example, 1 ⁇ 1 ⁇ 1024), and finally through the fully connected layer Get the normal N of the target in the camera coordinate system.
  • the second processing module 1102 is configured to obtain a first set of boundary line segments of the target in the pixel coordinate system according to the first mask image.
  • the second processing module 1102 first performs line detection on the first mask image to generate a first candidate line segment set.
  • the second processing module 1102 deletes the boundary line segments of the scene image in the first candidate line segment set to generate a second candidate line segment set.
  • the i-th line segment in the first candidate line segment set L 1 satisfies the first condition or the second condition, where the first condition is
  • boundary line segments of the objects located in the target area in the second candidate line segment set are deleted to generate a first boundary line segment set.
  • the second processing module 1102 determines whether the jth line segment in the second candidate line segment set satisfies the third condition, where the third condition is abs(mean(reg 1 )-mean(reg 2 )) ⁇ , mean(reg 1 ) is the pixel value mean of the pixels located in the first area on the side of the jth line in the minimum circumscribed convex polygon of the first mask image, mean(reg 2 ) is the minimum circumscribed convexity of the first mask image
  • abs is the absolute value function
  • is the preset parameter
  • n 2 is the second candidate line segment The number of candidate line segments in the set. If the jth line segment satisfies the third condition, delete the jth line segment from the second candidate line segment set.
  • the third processing module 1103 is configured to map the first mask image and each boundary line segment in the first boundary line segment set to the camera plane coordinate system according to the normal and the camera preset parameters, so as to generate the second mask image and The second boundary line segment set.
  • the third processing module 1103 first maps the first coordinates of the foreground pixels in the first mask image to the camera coordinate system according to the normal and the camera preset parameters to obtain the corresponding second coordinates .
  • the third processing module 1103 maps the second coordinates into the camera plane coordinate system to obtain the corresponding third coordinates.
  • the camera plane coordinate system is the XOY plane under the camera coordinate system.
  • the third processing module 1103 calculates a first transformation sub-matrix from the first coordinate to the third coordinate. Using the first transformation sub-matrix, the first mask image is mapped into the plane coordinate system to generate the second mask image.
  • the third processing module 1103 uses the first transformation sub-matrix to map each line segment in the first boundary line segment set into a plane coordinate system to generate a second boundary line segment set.
  • the fourth processing module 1104 is configured to generate a minimum circumscribed rectangle of the target according to the second mask image and the second set of boundary line segments in the plane coordinate system.
  • the fourth processing module 1104 first selects the line segment with the longest length in the second boundary line segment set as the reference line segment, and then calculates the included angle ⁇ between the reference line segment and the horizontal direction.
  • the fourth processing module 1104 rotates the second mask image along the first direction by an angle ⁇ to generate a third mask image M3, so that the rotated reference line segment is parallel to the horizontal direction.
  • the fourth processing module 1104 generates the minimum circumscribed rectangle of the foreground region in the third mask image.
  • the fourth processing module 1104 rotates the minimum circumscribed rectangle of the foreground region generated in the third mask image by an angle ⁇ along a second direction opposite to the first direction to obtain the minimum circumscribed rectangle of the target.
  • the fifth processing module 1105 is configured to map the preset template image into the minimum circumscribed rectangle of the target to generate the transformed image.
  • the fifth processing module 1105 first transforms the minimum circumscribed rectangle of the target into a square.
  • the fifth processing module 1105 calculates a second transformation sub-matrix that maps the template image to a square, and obtains the transformation matrix according to the first transformation sub-matrix and the second transformation sub-matrix.
  • the transformation matrix is the product of the inverse matrix of the first transformation sub-matrix and the second transformation sub-matrix.
  • the image update module 1106 is configured to replace objects in the scene image with the transition image to generate a virtual image.
  • the pixel value of the pixel point in the ith row and the jth column in the first mask image is greater than 0, the pixel value of the pixel point in the ith row and the jth column in the scene image is replaced is the pixel value of the pixel in the i-th row and the j-th column in the converted image.
  • FIG. 12 is a schematic structural diagram of an image processing apparatus according to another embodiment of the disclosure. As shown in FIG. 12 , the image processing apparatus includes a memory 1201 and a processor 1202 .
  • a memory 1201 is used to store instructions, and a processor 1202 is coupled to the memory 1201, and the processor 1202 is configured to execute a method as involved in any of the embodiments of FIG. 1 based on the instructions stored in the memory.
  • the image processing apparatus further includes a communication interface 1203 for exchanging information with other devices. Meanwhile, the image processing apparatus further includes a bus 1204 , the processor 1202 , the communication interface 1203 , and the memory 1201 communicate with each other through the bus 1204 .
  • the memory 1201 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory. Memory 1201 may also be a memory array. The storage 1201 may also be partitioned, and the blocks may be combined into virtual volumes according to certain rules.
  • the processor 1202 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the present disclosure also relates to a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor to implement the method involved in any of the embodiments in FIG. 1 .
  • the functional unit modules described above may be implemented as a general-purpose processor, a programmable logic controller (Programmable Logic Controller, PLC for short), a digital signal processor ( Digital Signal Processor (referred to as: DSP), Application Specific Integrated Circuit (referred to as: ASIC), Field-Programmable Gate Array (referred to as: FPGA) or other programmable logic devices, discrete gates or transistors Logic devices, discrete hardware components, or any suitable combination thereof.
  • a programmable logic controller Programmable Logic Controller, PLC for short
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本公开提供一种图像处理方法和装置。图像处理方法包括:提取场景图像中目标的第一掩码图像和目标在相机坐标系下的法线;根据第一掩码图像获取目标在像素坐标系下的第一边界线段集;根据法线及相机预设参数,将第一掩码图像和第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集;在平面坐标系中,根据第二掩码图像和第二边界线段集生成目标的最小外接矩形;将预设模板图像映射到目标的最小外接矩形中以生成变换图像;将场景图像中的目标更换为转换图像,以生成虚拟图像。

Description

图像处理方法和装置
相关申请的交叉引用
本公开是以CN申请号为202110177274.8,申请日为2021年2月9日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本公开中。
技术领域
本公开涉及信息处理领域,特别涉及一种图像处理方法和装置。
背景技术
目前,将图像展示作为宣传手段以得到了广泛应用,通过展示在不同装修场景下的地板、地毯等物品,可有效提升宣传效果。例如,通过将地板模板图像通过透视变换粘贴到场景图像中的地板区域,以使得虚拟图像看起来像是在真实场景中拍摄的。
发明内容
根据本公开实施例的第一方面,提供一种图像处理方法,包括:提取场景图像中目标的第一掩码图像和所述目标在相机坐标系下的法线;根据所述第一掩码图像获取所述目标在像素坐标系下的第一边界线段集;根据所述法线及相机预设参数,将所述第一掩码图像和所述第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集;在所述平面坐标系中,根据所述第二掩码图像和所述第二边界线段集生成所述目标的最小外接矩形;将预设模板图像映射到所述目标的最小外接矩形中以生成变换图像;将所述场景图像中的目标更换为所述转换图像,以生成虚拟图像。
在一些实施例中,根据所述第一掩码图像获取所述目标在像素坐标系下的第一边界线段集包括:对所述第一掩码图像进行直线检测,以生成第一候选线段集;删除所述第一候选线段集中的所述场景图像的边界线段,以生成第二候选线段集;删除所述第二候选线段集中的位于目标区域中的物体的边界线段,以生成所述第一边界线段集。
在一些实施例中,删除所述第一候选线段集中的所述场景图像的边界线段包括:判断所述第一候选线段集中的第i条线段是否满足第一条件或第二条件,其中所述第一条件为|x 1-x 2|<β且|x 1+x 2-W|>αW,所述第二条件为|y 1-y 2|<β且|y 1+ y 2-H|>αH,所述第i条线段的两个端点的坐标分别为x 1、y 1和x 1、y 2,所述第一掩码图像的大小为H×W,α、β为预设参数,1≤i≤n 1,n 1为所述第一候选线段集中的候选线段数;若所述第i条线段满足所述第一条件或所述第二条件,则从所述第一候选线段集中删除所述第i条线段。
在一些实施例中,删除所述第二候选线段集中的位于目标区域中的物体的边界线段包括:判断所述第二候选线段集中的第j条线段是否满足第三条件,其中所述第三条件为abs(mean(reg 1)-mean(reg 2))<γ,mean(reg 1)为在所述第一掩码图像的最小外接凸多边形中位于所述第j条线一侧的第一区域内的像素点的像素值均值,mean(reg 2)为在所述第一掩码图像的最小外接凸多边形中位于所述第j条线另一侧的第二区域内的像素点的像素值均值,abs为取绝对值函数,γ为预设参数,1≤j≤n 2,n 2为所述第二候选线段集中的候选线段数;若所述第j条线段满足第三条件,则从所述第二候选线段集中删除所述第j条线段。
在一些实施例中,根据所述法线及相机预设参数,将所述第一掩码图像和所述第一边界线段集中的每条边界线段映射到相机平面坐标系中包括:根据所述法线及相机预设参数,将所述第一掩码图像中的前景像素点的第一坐标映射到所述相机坐标系中,以得到对应的第二坐标;将所述第二坐标映射到所述平面坐标系中,以得到对应的第三坐标;计算从所述第一坐标到所述第三坐标的第一变换子矩阵;利用所述第一变换子矩阵,将所述第一掩码图像映射到所述平面坐标系中,以生成第二掩码图像;利用所述第一变换子矩阵,将所述第一边界线段集中的每条线段映射到所述平面坐标系中,以生成第二边界线段集。
在一些实施例中,在所述平面坐标系中,根据所述第二掩码图像和所述第二边界线段集生成所述目标的最小外接矩形包括:在所述第二边界线段集中选择长度最大的线段以作为参照线段;计算所述参照线段与水平方向的夹角θ;将所述第二掩码图像沿第一方向旋转θ角以生成第三掩码图像,使得旋转后的参照线段与水平方向平行;在所述第三掩码图像中生成前景区域的最小外接矩形;将在所述第三掩码图像中生成的前景区域的最小外接矩形沿与第一方向相反的第二方向旋转θ角,以得到所述目标的最小外接矩形。
在一些实施例中,将预设模板图像映射到所述目标的最小外接矩形中以生成变换图像包括:将所述目标的最小外接矩形变换为正方形;计算将所述模板图像映射为所述正方形的第二变换子矩阵;根据所述第一变换子矩阵和所述第二变换子矩阵得到变 换矩阵;根据所述变换矩阵将所述模板图像映射到所述像素坐标系中,以生成所述变换图像。
在一些实施例中,所述变换矩阵为所述第一变换子矩阵的逆矩阵和所述第二变换子矩阵的乘积。
在一些实施例中,将所述场景图像中的目标更换为所述转换图像包括:在所述第一掩码图像中第i行、第j列的像素点的像素值大于0的情况下,将所述场景图像中第i行、第j列的像素点的像素值更换为所述转换图像中第i行、第j列的像素点的像素值。
根据本公开实施例的第二方面,提供一种图像处理装置,包括:第一处理模块,被配置为提取场景图像中目标的第一掩码图像和所述目标在相机坐标系下的法线;第二处理模块,被配置为根据所述第一掩码图像获取所述目标在像素坐标系下的第一边界线段集;第三处理模块,被配置为根据所述法线及相机预设参数,将所述第一掩码图像和所述第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集;第四处理模块,被配置为在所述平面坐标系中,根据所述第二掩码图像和所述第二边界线段集生成所述目标的最小外接矩形;第五处理模块,被配置为将预设模板图像映射到所述目标的最小外接矩形中以生成变换图像;图像更新模块,被配置为将所述场景图像中的目标更换为所述转换图像,以生成虚拟图像。
根据本公开实施例的第三方面,提供一种图像处理装置,包括:存储器,被配置为存储指令;处理器,耦合到存储器,处理器被配置为基于存储器存储的指令执行实现如上述任一实施例所述的方法。
根据本公开实施例的第四方面,提供一种非瞬态计算机可读存储介质,其中,非瞬态计算机可读存储介质存储有计算机指令,指令被处理器执行时实现如上述任一实施例涉及的方法。
通过以下参照附图对本公开的示例性实施例的详细描述,本公开的其它特征及其优点将会变得清楚。
附图说明
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前 提下,还可以根据这些附图获得其他的附图。
图1为本公开一个实施例的图像处理方法的流程示意图;
图2A至图2C为本公开一些实施例的场景图像和掩码图像的示意图;
图3A和图3B为本公开一些实施例的掩码图像的示意图;
图4为本公开另一个实施例的掩码图像的示意图;
图5为本公开又一个实施例的掩码图像的示意图;
图6为本公开又一个实施例的掩码图像的示意图;
图7为本公开又一个实施例的掩码图像的示意图;
图8为本公开一个实施例的模板图像的示意图;
图9为本公开另一实施例的模板图像的示意图;
图10为本公开一个实施例的虚拟图像的示意图;
图11为本公开一个实施例的图像处理装置的结构示意图;
图12为本公开另一个实施例的图像处理装置的结构示意图。
具体实施方式
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为授权说明书的一部分。
在这里示出和讨论的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它示例可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
发明人注意到,在相关技术中,通过人工方式选择地板的贴图位置,人力成本高且耗时长,用户体验较差。
据此,本公开提供一种图像处理方案,能够方便快捷地更换场景图像中的指定目标,有效提升用户体验。
图1为本公开一个实施例的图像处理方法的流程示意图。在一些实施例中,下列的图像处理方法步骤由图像处理装置执行。
在步骤101,提取场景图像中目标的第一掩码图像和目标在相机坐标系下的法线。
在一些实施例中,利用LiteSeg网络来提取场景图像I0中目标的第一掩码图像M1。此外,通过提取出LiteSeg网络的中间层特征f,经过卷积运算后再进行全局池化(pooling)操作,以得到具有预定大小(例如1×1×1024)的特征图,最后通过全连接层得到目标在相机坐标系下的法线N。例如,场景图像I0中为图2A所示,第一掩码图像M1如图2B所示。
例如,如图2A所示,场景图像I0中的目标是地板。
例如,法线N可表示为:
N={a,b,c,d}    (1)
在公式(1)中,(a,b,c)表示平面的单位法线。若相机坐标系下目标平面上一点的坐标为(x,y,z),则:
ax+by+cx+d=0      (2)
这里需要说明的是,由于LiteSeg网络本身并不是本公开的发明点所在,因此这里不展开描述。
在步骤102,根据第一掩码图像获取目标在像素坐标系下的第一边界线段集。
在一些实施例中,首先对第一掩码图像进行直线检测,以生成第一候选线段集。
例如,通过使用霍夫直线检测,得到第一掩码图像M1中的n 1个边界线段,以得到第一候选线段集
Figure PCTCN2022070486-appb-000001
接下来,删除第一候选线段集中的场景图像的边界线段,以生成第二候选线段集。
例如,判断第一候选线段集L 1中的第i条线段是否满足第一条件或第二条件,其中第一条件为|x 1-x 2|<β且|x 1+x 2-W|>αW,第二条件为|y 1-y 2|<β且|y 1+y 2-H|>αH,第i条线段的两个端点的坐标分别为x 1、y 1和x 1、y 2,第一掩码图像的大小为H×W,α、β为预设参数,1≤i≤n 1,n 1为第一候选线段集中的候选线段数。若第i条线段满足第一条件或第二条件,则从第一候选线段集中删除第i条线段。
即利用下列公式(3)、(4)从第一候选线段L 1集中删除场景图像I0的边界线段,以生成第二候选线段集L 2
Figure PCTCN2022070486-appb-000002
Figure PCTCN2022070486-appb-000003
然后,删除第二候选线段集中的位于目标区域中的物体的边界线段,以生成第一边界线段集。
例如,判断第二候选线段集中的第j条线段是否满足第三条件,其中第三条件为abs(mean(reg 1)-mean(reg 2))<γ,mean(reg 1)为在第一掩码图像的最小外接凸多边形中位于第j条线一侧的第一区域内的像素点的像素值均值,mean(reg 2)为在第一掩码图像的最小外接凸多边形中位于第j条线另一侧的第二区域内的像素点的像素值均值,abs为取绝对值函数,γ为预设参数,1≤j≤n 2,n 2为第二候选线段集中的候选线段数。若第j条线段满足第三条件,则从第二候选线段集中删除第j条线段。第一掩码图像的最小外接凸多边形如图2C所示。
即利用下列公式(5)、(6)从第二候选线段集L 2集中删除位于目标区域中的物体的边界线段,以生成第一边界线段集L 3
Figure PCTCN2022070486-appb-000004
Figure PCTCN2022070486-appb-000005
在步骤103,根据法线及相机预设参数,将第一掩码图像和第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集。
在一些实施例中,首先根据法线及相机预设参数,将第一掩码图像中的前景像素点的第一坐标映射到相机坐标系中,以得到对应的第二坐标。
例如,法线N={a,b,c,d},相机预设参数如下:
Figure PCTCN2022070486-appb-000006
若第一掩码图像M1中所有的前景像素点的坐标为
Figure PCTCN2022070486-appb-000007
其中
Figure PCTCN2022070486-appb-000008
Figure PCTCN2022070486-appb-000009
将P 1映射到相机坐标系下所得到的坐标
Figure PCTCN2022070486-appb-000010
其中:
Figure PCTCN2022070486-appb-000011
Figure PCTCN2022070486-appb-000012
Figure PCTCN2022070486-appb-000013
Figure PCTCN2022070486-appb-000014
Figure PCTCN2022070486-appb-000015
接下来,将第二坐标映射到相机平面坐标系中,以得到对应的第三坐标。相机平面坐标系为相机坐标系下的XOY平面。
例如,利用下列公式,将第二坐标P 2映射到相机平面坐标系中以得到第三坐标
Figure PCTCN2022070486-appb-000016
Figure PCTCN2022070486-appb-000017
Figure PCTCN2022070486-appb-000018
在上述公式(13),变换矩阵B用于确保变换后的点坐标中的Z轴坐标为0。
接下来,计算从第一坐标P 1到第三坐标P 3的第一变换子矩阵。利用第一变换子矩阵,将第一掩码图像映射到平面坐标系中,以生成第二掩码图像。例如,第一掩码图像M1如图3A所示,第二掩码图像M2如图3B所示。
接下来,利用第一变换子矩阵,将第一边界线段集中的每条线段映射到平面坐标系中,以生成第二边界线段集。
例如,将L 3中每条线段的端点坐标p映射到相机平面坐标系中,以得到坐标p′,则
[p′,1] T=A[p,1] T      (15)
将L 3中的每条线段映射到相机平面坐标系中得到第二边界线段集
Figure PCTCN2022070486-appb-000019
Figure PCTCN2022070486-appb-000020
在步骤104,在平面坐标系中,根据第二掩码图像和第二边界线段集生成目标的最小外接矩形。
在一些实施例中,如图4所示,首先在第二边界线段集L 4中选择长度最大的线段4以作为参照线段,然后计算参照线段4与水平方向的夹角θ。
接下来,将第二掩码图像M2沿第一方向旋转θ角以生成第三掩码图像M3,使得旋转后的参照线段与水平方向平行。
例如,通过对图4所示的第二掩码图像顺时针旋转θ角,以得到第三掩码图像M3,如图5所示。
接下来,在第三掩码图像中生成前景区域的最小外接矩形。如图5中的B1所示。
接下来,将在第三掩码图像中生成的前景区域的最小外接矩形沿与第一方向相反的第二方向旋转θ角,以得到目标的最小外接矩形。
例如,将图5中的矩形B1逆时针旋转θ角,以得到目标的最小外接矩形,如图6 中的矩形B2所示。
在步骤105,将预设模板图像映射到目标的最小外接矩形中以生成变换图像。
在一些实施例中,首先将目标的最小外接矩形变换为正方形。如图7所示,将目标的最小外接矩形B2变换为正方形B3。
接下来,计算将模板图像映射到正方形的第二变换子矩阵,并根据第一变换子矩阵和第二变换子矩阵得到变换矩阵。
接下来,根据变换矩阵将模板图像映射到像素坐标系中,以生成变换图像。例如,变换矩阵为第一变换子矩阵的逆矩阵和第二变换子矩阵的乘积。
若第一变换子矩阵为A,第二变换子矩阵为D,则变换矩阵为A -1D。
若模板图像I1中的某一点的坐标为
Figure PCTCN2022070486-appb-000021
则其在变换图像I2中的坐标
Figure PCTCN2022070486-appb-000022
为:
Figure PCTCN2022070486-appb-000023
例如,模板图像I1如图8所示,相应的变换图像I2如图9所示。
在步骤106,将场景图像中的目标更换为转换图像,以生成虚拟图像。
在一些实施例中,在第一掩码图像中第i行、第j列的像素点的像素值大于0的情况下,将场景图像中第i行、第j列的像素点的像素值更换为转换图像中第i行、第j列的像素点的像素值。
即利用下列公式将场景图像I0中的目标更为转换图像I2,以得到虚拟图像I3,如图10所示。
Figure PCTCN2022070486-appb-000024
图11为本公开一个实施例的图像处理装置的结构示意图。如图11所示,图像处理装置包括第一处理模块1101、第二处理模块1102、第三处理模块1103、第四处理模块1104、第五处理模块1105和图像更新模块1106。
第一处理模块1101被配置为提取场景图像中目标的第一掩码图像和目标在相机坐标系下的法线。
在一些实施例中,利用LiteSeg网络来提取场景图像I0中目标的第一掩码图像M1。此外,通过提取出LiteSeg网络的中间层特征f,经过卷积运算后再进行全局池化(pooling)操作,以得到具有预定大小(例如1×1×1024)的特征图,最后通过全连接层得到目标在相机坐标系下的法线N。
第二处理模块1102被配置为根据第一掩码图像获取目标在像素坐标系下的第一 边界线段集。
在一些实施例中,第二处理模块1102首先对第一掩码图像进行直线检测,以生成第一候选线段集。
接下来,第二处理模块1102删除第一候选线段集中的场景图像的边界线段,以生成第二候选线段集。
例如,通过判断第一候选线段集L 1中的第i条线段是否满足第一条件或第二条件,其中第一条件为|x 1-x 2|<β且|x 1+x 2-W|>αW,第二条件为|y 1-y 2|<β且|y 1+y 2-H|>αH,第i条线段的两个端点的坐标分别为x 1、y 1和x 1、y 2,第一掩码图像的大小为H×W,α、β为预设参数,1≤i≤n 1,n 1为第一候选线段集中的候选线段数。若第i条线段满足第一条件或第二条件,则从第一候选线段集中删除第i条线段。
然后,删除第二候选线段集中的位于目标区域中的物体的边界线段,以生成第一边界线段集。
例如,第二处理模块1102判断第二候选线段集中的第j条线段是否满足第三条件,其中第三条件为abs(mean(reg 1)-mean(reg 2))<γ,mean(reg 1)为在第一掩码图像的最小外接凸多边形中位于第j条线一侧的第一区域内的像素点的像素值均值,mean(reg 2)为在第一掩码图像的最小外接凸多边形中位于第j条线另一侧的第二区域内的像素点的像素值均值,abs为取绝对值函数,γ为预设参数,1≤j≤n 2,n 2为第二候选线段集中的候选线段数。若第j条线段满足第三条件,则从第二候选线段集中删除第j条线段。
第三处理模块1103被配置为根据法线及相机预设参数,将第一掩码图像和第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集。
在一些实施例中,第三处理模块1103首先根据法线及相机预设参数,将第一掩码图像中的前景像素点的第一坐标映射到相机坐标系中,以得到对应的第二坐标。
接下来,第三处理模块1103将第二坐标映射到相机平面坐标系中,以得到对应的第三坐标。相机平面坐标系为相机坐标系下的XOY平面。
接下来,第三处理模块1103计算从第一坐标到第三坐标的第一变换子矩阵。利用第一变换子矩阵,将第一掩码图像映射到平面坐标系中,以生成第二掩码图像。
接下来,第三处理模块1103利用第一变换子矩阵,将第一边界线段集中的每条线段映射到平面坐标系中,以生成第二边界线段集。
第四处理模块1104被配置为在平面坐标系中,根据第二掩码图像和第二边界线段集生成目标的最小外接矩形。
在一些实施例中,第四处理模块1104首先在第二边界线段集中选择长度最大的线段以作为参照线段,然后计算参照线段与水平方向的夹角θ。
接下来,第四处理模块1104将第二掩码图像沿第一方向旋转θ角以生成第三掩码图像M3,使得旋转后的参照线段与水平方向平行。
接下来,第四处理模块1104在第三掩码图像中生成前景区域的最小外接矩形。
接下来,第四处理模块1104将在第三掩码图像中生成的前景区域的最小外接矩形沿与第一方向相反的第二方向旋转θ角,以得到目标的最小外接矩形。
第五处理模块1105被配置为将预设模板图像映射到目标的最小外接矩形中以生成变换图像。
在一些实施例中,第五处理模块1105首先将目标的最小外接矩形变换为正方形。
接下来,第五处理模块1105计算将模板图像映射到正方形的第二变换子矩阵,并根据第一变换子矩阵和第二变换子矩阵得到变换矩阵。
接下来,根据变换矩阵将模板图像映射到像素坐标系中,以生成变换图像。例如,变换矩阵为第一变换子矩阵的逆矩阵和第二变换子矩阵的乘积。
图像更新模块1106被配置为将场景图像中的目标更换为转换图像,以生成虚拟图像。
在一些实施例中,在第一掩码图像中第i行、第j列的像素点的像素值大于0的情况下,将场景图像中第i行、第j列的像素点的像素值更换为转换图像中第i行、第j列的像素点的像素值。
图12为本公开另一个实施例的图像处理装置的结构示意图。如图12所示,图像处理装置包括存储器1201和处理器1202。
存储器1201用于存储指令,处理器1202耦合到存储器1201,处理器1202被配置为基于存储器存储的指令执行实现如图1中任一实施例涉及的方法。
如图12所示,该图像处理装置还包括通信接口1203,用于与其它设备进行信息交互。同时,该图像处理装置还包括总线1204,处理器1202、通信接口1203、以及存储器1201通过总线1204完成相互间的通信。
存储器1201可以包含高速RAM存储器,也可还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1201也可以是存储器阵列。存储器1201 还可能被分块,并且块可按一定的规则组合成虚拟卷。
此外,处理器1202可以是一个中央处理器CPU,或者可以是专用集成电路ASIC,或是被配置成实施本公开实施例的一个或多个集成电路。
本公开同时还涉及一种非瞬态计算机可读存储介质,其中计算机可读存储介质存储有计算机指令,指令被处理器执行时实现如图1中任一实施例涉及的方法。
在一些实施例中,在上面所描述的功能单元模块可以实现为用于执行本公开所描述功能的通用处理器、可编程逻辑控制器(Programmable Logic Controller,简称:PLC)、数字信号处理器(Digital Signal Processor,简称:DSP)、专用集成电路(Application Specific Integrated Circuit,简称:ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称:FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件或者其任意适当组合。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
本公开的描述是为了示例和描述起见而给出的,而并不是无遗漏的或者将本公开限于所公开的形式。很多修改和变化对于本领域的普通技术人员而言是显然的。选择和描述实施例是为了更好说明本公开的原理和实际应用,并且使本领域的普通技术人员能够理解本公开从而设计适于特定用途的带有各种修改的各种实施例。

Claims (12)

  1. 一种图像处理方法,包括:
    提取场景图像中目标的第一掩码图像和所述目标在相机坐标系下的法线;
    根据所述第一掩码图像获取所述目标在像素坐标系下的第一边界线段集;
    根据所述法线及相机预设参数,将所述第一掩码图像和所述第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集;
    在所述平面坐标系中,根据所述第二掩码图像和所述第二边界线段集生成所述目标的最小外接矩形;
    将预设模板图像映射到所述目标的最小外接矩形中以生成变换图像;
    将所述场景图像中的目标更换为所述转换图像,以生成虚拟图像。
  2. 根据权利要求1所述的方法,其中,根据所述第一掩码图像获取所述目标在像素坐标系下的第一边界线段集包括:
    对所述第一掩码图像进行直线检测,以生成第一候选线段集;
    删除所述第一候选线段集中的所述场景图像的边界线段,以生成第二候选线段集;
    删除所述第二候选线段集中的位于目标区域中的物体的边界线段,以生成所述第一边界线段集。
  3. 根据权利要求2所述的方法,其中,删除所述第一候选线段集中的所述场景图像的边界线段包括:
    判断所述第一候选线段集中的第i条线段是否满足第一条件或第二条件,其中所述第一条件为|x 1-x 2|<β且|x 1+x 2-W|>αW,所述第二条件为|y 1-y 2|<β且|y 1+y 2-H|>αH,所述第i条线段的两个端点的坐标分别为x 1、y 1和x 1、y 2,所述第一掩码图像的大小为H×W,α、β为预设参数,1≤i≤n 1,n 1为所述第一候选线段集中的候选线段数;
    若所述第i条线段满足所述第一条件或所述第二条件,则从所述第一候选线段集中删除所述第i条线段。
  4. 根据权利要求3所述的方法,其中,删除所述第二候选线段集中的位于目标区 域中的物体的边界线段包括:
    判断所述第二候选线段集中的第j条线段是否满足第三条件,其中所述第三条件为abs(mean(reg 1)-mean(reg 2))<γ,mean(reg 1)为在所述第一掩码图像的最小外接凸多边形中位于所述第j条线一侧的第一区域内的像素点的像素值均值,mean(reg 2)为在所述第一掩码图像的最小外接凸多边形中位于所述第j条线另一侧的第二区域内的像素点的像素值均值,abs为取绝对值函数,γ为预设参数,1≤j≤n 2,n 2为所述第二候选线段集中的候选线段数;
    若所述第j条线段满足第三条件,则从所述第二候选线段集中删除所述第j条线段。
  5. 根据权利要求1所述的方法,其中,根据所述法线及相机预设参数,将所述第一掩码图像和所述第一边界线段集中的每条边界线段映射到相机平面坐标系中包括:
    根据所述法线及相机预设参数,将所述第一掩码图像中的前景像素点的第一坐标映射到所述相机坐标系中,以得到对应的第二坐标;
    将所述第二坐标映射到所述平面坐标系中,以得到对应的第三坐标;
    计算从所述第一坐标到所述第三坐标的第一变换子矩阵;
    利用所述第一变换子矩阵,将所述第一掩码图像映射到所述平面坐标系中,以生成第二掩码图像;
    利用所述第一变换子矩阵,将所述第一边界线段集中的每条线段映射到所述平面坐标系中,以生成第二边界线段集。
  6. 根据权利要求5所述的方法,其中,在所述平面坐标系中,根据所述第二掩码图像和所述第二边界线段集生成所述目标的最小外接矩形包括:
    在所述第二边界线段集中选择长度最大的线段以作为参照线段;
    计算所述参照线段与水平方向的夹角θ;
    将所述第二掩码图像沿第一方向旋转θ角以生成第三掩码图像,使得旋转后的参照线段与水平方向平行;
    在所述第三掩码图像中生成前景区域的最小外接矩形;
    将在所述第三掩码图像中生成的前景区域的最小外接矩形沿与第一方向相反的第二方向旋转θ角,以得到所述目标的最小外接矩形。
  7. 根据权利要求5所述的方法,其中,将预设模板图像映射到所述目标的最小外接矩形中以生成变换图像包括:
    将所述目标的最小外接矩形变换为正方形;
    计算将所述模板图像映射为所述正方形的第二变换子矩阵;
    根据所述第一变换子矩阵和所述第二变换子矩阵得到变换矩阵;
    根据所述变换矩阵将所述模板图像映射到所述像素坐标系中,以生成所述变换图像。
  8. 根据权利要求7所述的方法,其中,
    所述变换矩阵为所述第一变换子矩阵的逆矩阵和所述第二变换子矩阵的乘积。
  9. 根据权利要求1-8中任一项所述的方法,其中,将所述场景图像中的目标更换为所述转换图像包括:
    在所述第一掩码图像中第i行、第j列的像素点的像素值大于0的情况下,将所述场景图像中第i行、第j列的像素点的像素值更换为所述转换图像中第i行、第j列的像素点的像素值。
  10. 一种图像处理装置,包括:
    第一处理模块,被配置为提取场景图像中目标的第一掩码图像和所述目标在相机坐标系下的法线;
    第二处理模块,被配置为根据所述第一掩码图像获取所述目标在像素坐标系下的第一边界线段集;
    第三处理模块,被配置为根据所述法线及相机预设参数,将所述第一掩码图像和所述第一边界线段集中的每条边界线段映射到相机平面坐标系中,以生成第二掩码图像和第二边界线段集;
    第四处理模块,被配置为在所述平面坐标系中,根据所述第二掩码图像和所述第二边界线段集生成所述目标的最小外接矩形;
    第五处理模块,被配置为将预设模板图像映射到所述目标的最小外接矩形中以生成变换图像;
    图像更新模块,被配置为将所述场景图像中的目标更换为所述转换图像,以生成虚拟图像。
  11. 一种图像处理装置,包括:
    存储器,被配置为存储指令;
    处理器,耦合到存储器,处理器被配置为基于存储器存储的指令执行实现如权利要求1-9中任一项所述的方法。
  12. 一种非瞬态计算机可读存储介质,其中,非瞬态计算机可读存储介质存储有计算机指令,指令被处理器执行时实现如权利要求1-9中任一项所述的方法。
PCT/CN2022/070486 2021-02-09 2022-01-06 图像处理方法和装置 WO2022170895A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110177274.8 2021-02-09
CN202110177274.8A CN113781571A (zh) 2021-02-09 2021-02-09 图像处理方法和装置

Publications (1)

Publication Number Publication Date
WO2022170895A1 true WO2022170895A1 (zh) 2022-08-18

Family

ID=78835577

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/070486 WO2022170895A1 (zh) 2021-02-09 2022-01-06 图像处理方法和装置

Country Status (2)

Country Link
CN (1) CN113781571A (zh)
WO (1) WO2022170895A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228854A (zh) * 2022-12-29 2023-06-06 中科微至科技股份有限公司 一种基于深度学习的包裹自动分拣方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781571A (zh) * 2021-02-09 2021-12-10 北京沃东天骏信息技术有限公司 图像处理方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103759669A (zh) * 2014-01-03 2014-04-30 河南科技大学 一种大型零件的单目视觉测量方法
CN107301646A (zh) * 2017-06-27 2017-10-27 深圳市云洲创新科技有限公司 基于单目视觉的无人船智能避障方法和装置
US20180253889A1 (en) * 2017-03-06 2018-09-06 Canon Kabushiki Kaisha Information processing apparatus, storage medium, and information processing method for processing clipping rendering instruction
CN109947110A (zh) * 2019-04-02 2019-06-28 吉林大学 面向自动驾驶的车道自检算法在环仿真控制方法和系统
CN112164013A (zh) * 2020-10-14 2021-01-01 上海影卓信息科技有限公司 人像换装方法、系统及介质
CN113781571A (zh) * 2021-02-09 2021-12-10 北京沃东天骏信息技术有限公司 图像处理方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103759669A (zh) * 2014-01-03 2014-04-30 河南科技大学 一种大型零件的单目视觉测量方法
US20180253889A1 (en) * 2017-03-06 2018-09-06 Canon Kabushiki Kaisha Information processing apparatus, storage medium, and information processing method for processing clipping rendering instruction
CN107301646A (zh) * 2017-06-27 2017-10-27 深圳市云洲创新科技有限公司 基于单目视觉的无人船智能避障方法和装置
CN109947110A (zh) * 2019-04-02 2019-06-28 吉林大学 面向自动驾驶的车道自检算法在环仿真控制方法和系统
CN112164013A (zh) * 2020-10-14 2021-01-01 上海影卓信息科技有限公司 人像换装方法、系统及介质
CN113781571A (zh) * 2021-02-09 2021-12-10 北京沃东天骏信息技术有限公司 图像处理方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228854A (zh) * 2022-12-29 2023-06-06 中科微至科技股份有限公司 一种基于深度学习的包裹自动分拣方法
CN116228854B (zh) * 2022-12-29 2023-09-08 中科微至科技股份有限公司 一种基于深度学习的包裹自动分拣方法

Also Published As

Publication number Publication date
CN113781571A (zh) 2021-12-10

Similar Documents

Publication Publication Date Title
WO2022170895A1 (zh) 图像处理方法和装置
WO2020206903A1 (zh) 影像匹配方法、装置及计算机可读存储介质
CN111144242B (zh) 一种三维目标检测方法、装置及终端
WO2020199478A1 (zh) 图像生成模型训练方法、图像生成方法、装置、设备及存储介质
US20130127847A1 (en) System and Method for Interactive Image-based Modeling of Curved Surfaces Using Single-view and Multi-view Feature Curves
US20210256763A1 (en) Method and device for simplifying three-dimensional mesh model
CN106997613B (zh) 根据2d图像的3d模型生成
US9330466B2 (en) Methods and apparatus for 3D camera positioning using a 2D vanishing point grid
US20190057532A1 (en) Realistic augmentation of images and videos with graphics
US10977767B2 (en) Propagation of spot healing edits from one image to multiple images
KR102178654B1 (ko) 정보 예측을 위한 시스템, 방법 및 프로그램
WO2018082308A1 (zh) 一种图像处理方法及终端
CN112085033A (zh) 一种模板匹配方法、装置、电子设备及存储介质
US11893685B2 (en) Landform map building method and apparatus, electronic device and readable storage medium
JP2002288687A (ja) 特徴量算出装置および方法
TWI778895B (zh) 顯著性檢測方法及其模型的訓練方法、設備及電腦可讀儲存介質
CN115439607A (zh) 一种三维重建方法、装置、电子设备及存储介质
CN110598717A (zh) 图像特征的提取方法、装置及电子设备
Dinesh et al. Local 3D point cloud denoising via bipartite graph approximation & total variation
Dinesh et al. Fast 3D point cloud denoising via bipartite graph approximation & total variation
US10937236B1 (en) Mesh smoothing for visual quality and analysis improvement
CN113077477B (zh) 图像矢量化方法、装置及终端设备
WO2022166506A1 (zh) 图像处理方法和装置
WO2022170890A1 (zh) 图像处理方法和装置
CN113610864B (zh) 图像处理方法、装置、电子设备及计算机可读存储介质

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27.11.2023)