To do so, I opened up Photoshop ( GIMP or another photo editing/manipulation tool would work just as well), and then used the Magic Wand tool and manual selection tool to select the damaged areas of the image. ![]() “Adrian, how did you create the mask? Was that created programmatically? Or did you manually create it?”įor Figure 2 above (in the previous section), I had to manually create the mask. How do we create the mask for inpainting with OpenCV? Our old, faded, damaged image has now been partially restored. Notice how white pixels in the mask mark where the damage is in the input image (left).įinally, on the bottom, we have our output image after applying inpainting with OpenCV. The image on the right is our mask image. Notice how this image is old, faded, and damaged/ripped. ![]() The image on the left is our original input image. Non-zero pixels correspond to areas that should be inpainted (i.e., fixed), while zero pixels are considered “normal” and do not need inpaintingĪn example of these images can be seen in Figure 2 above. This image should have the same spatial dimensions (width and height) as the input image.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |