0

I have markers on an object and gave certain colors to them individually(using some function) now I have to color the whole object by selecting each and every pixel of the object and interpolating it to the nearest four markers.This process is taking a lot of time. I want to know if there is any other way to color. i just want to colour the object in a way so that it depends on the color of the markersthe white things are the markersthe image i get after interpolating the markers colorsIn the first image the markers are all white but when i perform the operation they are given different colors

I want to know if there is a way to imagine colors between the markers

  • 1
    See grid mesh interpolation https://scikit-image.org/docs/stable/api/skimage.transform.html#skimage.transform.PiecewiseAffineTransform – fmw42 Mar 24 '22 at 21:23
  • You could also implement a Shepards (inverse square warp), but it would be very slow. Alternately, divide the grid into rectangles and divide each into two triangles, then do barycentric interpolation of the 3 corner colors. See https://en.wikipedia.org/wiki/Barycentric_coordinate_system and https://stackoverflow.com/questions/61854897/how-to-apply-a-three-point-triangle-gradient-in-opencv/61862324#61862324 – fmw42 Mar 24 '22 at 21:26

0 Answers0