Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
coordp1 = [float(xp1),float(yp1)]
coordp2 = [float(xp2),float(yp2)]
coordu1 = [float(xu1),float(yu1)]
coordu2 = [float(xu2),float(yu2)]
coordt1 = [float(xt1),float(yt1)]
coordt2 = [float(xt2),float(yt2)]
coordw1 = [float(xw1),float(yw1)]
coordw2 = [float(xw2),float(yw2)]
pointg1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg1, depthg1)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
coordo2 = [float(xo2),float(yo2)]
coordp1 = [float(xp1),float(yp1)]
coordp2 = [float(xp2),float(yp2)]
coordu1 = [float(xu1),float(yu1)]
coordu2 = [float(xu2),float(yu2)]
coordt1 = [float(xt1),float(yt1)]
coordt2 = [float(xt2),float(yt2)]
coordw1 = [float(xw1),float(yw1)]
coordw2 = [float(xw2),float(yw2)]
pointg1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg1, depthg1)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointu1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu1, depthu1)
pointu2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu2, depthu2)
pointt1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt1, deptht1)
pointt2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt2, deptht2)
pointw1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw1, depthw1)
pointw2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw2, depthw2)
# Fixes problem if there is only one dot of a color visible
if pointg1 == pointg2:
depthg2 = 0
coordg2 = [0,0]
pointg2 = [0,0,0]
badframe = 1
if pointb1 == pointb2:
depthb2 = 0
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointu1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu1, depthu1)
pointu2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu2, depthu2)
pointt1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt1, deptht1)
pointt2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt2, deptht2)
pointw1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw1, depthw1)
pointw2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw2, depthw2)
# Fixes problem if there is only one dot of a color visible
if pointg1 == pointg2:
depthg2 = 0
coordg2 = [0,0]
pointg2 = [0,0,0]
badframe = 1
if pointb1 == pointb2:
depthb2 = 0
coordb2 = [0,0]
pointb2 = [0,0,0]
badframe = 1
if pointy1 == pointy2:
coordt1 = [float(xt1),float(yt1)]
coordt2 = [float(xt2),float(yt2)]
coordw1 = [float(xw1),float(yw1)]
coordw2 = [float(xw2),float(yw2)]
pointg1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg1, depthg1)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointu1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu1, depthu1)
pointu2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu2, depthu2)
pointt1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt1, deptht1)
pointt2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt2, deptht2)
coordp2 = [float(xp2),float(yp2)]
coordu1 = [float(xu1),float(yu1)]
coordu2 = [float(xu2),float(yu2)]
coordt1 = [float(xt1),float(yt1)]
coordt2 = [float(xt2),float(yt2)]
coordw1 = [float(xw1),float(yw1)]
coordw2 = [float(xw2),float(yw2)]
pointg1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg1, depthg1)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointu1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu1, depthu1)
pointu2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu2, depthu2)
coordw1 = [float(xw1),float(yw1)]
coordw2 = [float(xw2),float(yw2)]
pointg1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg1, depthg1)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointu1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu1, depthu1)
pointu2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu2, depthu2)
pointt1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt1, deptht1)
pointt2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt2, deptht2)
pointw1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw1, depthw1)
pointw2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw2, depthw2)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
pointu1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu1, depthu1)
pointu2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordu2, depthu2)
pointt1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt1, deptht1)
pointt2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordt2, deptht2)
pointw1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw1, depthw1)
pointw2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordw2, depthw2)
# Fixes problem if there is only one dot of a color visible
if pointg1 == pointg2:
depthg2 = 0
coordg2 = [0,0]
pointg2 = [0,0,0]
badframe = 1
coordp1 = [float(xp1),float(yp1)]
coordp2 = [float(xp2),float(yp2)]
coordu1 = [float(xu1),float(yu1)]
coordu2 = [float(xu2),float(yu2)]
coordt1 = [float(xt1),float(yt1)]
coordt2 = [float(xt2),float(yt2)]
coordw1 = [float(xw1),float(yw1)]
coordw2 = [float(xw2),float(yw2)]
pointg1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg1, depthg1)
pointg2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordg2, depthg2)
pointb1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb1, depthb1)
pointb2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordb2, depthb2)
pointy1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy1, depthy1)
pointy2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordy2, depthy2)
pointr1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr1, depthr1)
pointr2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordr2, depthr2)
pointo1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo1, deptho1)
pointo2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordo2, deptho2)
pointp1 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp1, depthp1)
pointp2 = rs.rs2_deproject_pixel_to_point(depth_intrin, coordp2, depthp2)
def get_point(x, y):
p = rs.rs2_deproject_pixel_to_point(intrinsics, [x, y], d)
line3d(out, orig, view(p), color)
return p