D | image_processing_utils.py | 844 y3 = numpy.dstack([y_plane, y_plane, y_plane]) 846 rgb.reshape(w * h * 3)[:] = y3.reshape(w * h * 3)[:] 1430 def area_of_triangle(x1, y1, x2, y2, x3, y3): argument 1444 area = abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0) 1448 def point_in_triangle(x1, y1, x2, y2, x3, y3, xp, yp, abs_tol): argument 1465 a = area_of_triangle(x1, y1, x2, y2, x3, y3) 1466 a1 = area_of_triangle(xp, yp, x2, y2, x3, y3) 1467 a2 = area_of_triangle(x1, y1, xp, yp, x3, y3)
|