The authors set up a partial differential equation (PDE) to update image intensities inside the region with the above constraints. Continue to propagate color information in smooth regions.The above two constraints essentially state The other constraint we may want is that the region on the right of the curve joining A and B should be white, and the region on the left should be blue. How do we fill this black region? One constraint we would like is the edge entering point A should continue to the edge leaving point B. In the image below, our objective is to fill the dark region and obtain an image that looks like the one on the right. So it isn’t surprising that theories developed for fluid dynamics also make their way into computer vision. On the other hand, a mathematician may see an image as a connected graph and solve computer vision problems using graph theory. An electrical engineer may see an image as a 2D signal and apply the theories of signal processing to solve computer vision problems. They bring their ideas to the field and solve the same problem in very interesting and unique ways. Sometimes I feel like the field of Computer Vision is a field of immigrants from other fields like electrical engineering, computer science, physics, and mathematics. This method was published in 2001 in a paper titled “Navier-Stokes, Fluid Dynamics, and Image and Video Inpainting”
INPAINT_NS : Navier-Stokes based Inpainting In this section, we will briefly discuss two inpainting algorithms implemented in OpenCV. It is also used for removing small unwanted objects in an image. The most common application of image inpainting is restoration of old scanned photos. The region is identified using a binary mask, and the filling is usually done by propagating information from the boundary of the region that needs to be filled. Image inpainting is a class of algorithms in computer vision where the objective is to fill regions inside an image or a video.
If your friends do not look sufficiently impressed, you can tell them the method is based on the Navier Stokes equation they might have encountered in fluid dynamics!īut to be that cool, you need to read this post first.
You open your favorite editor and write 10 lines of code to solve the problem using an inpainting algorithm in OpenCV. You are a super cool engineer! You have a reputation to live up to. Of course you can load the photo in Photoshop and fix the scratches. You scan it and it looks great except for a few scratches. Imagine finding an old family photograph.