Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Computer Vision with TensorFlow 2.x

You're reading from   Mastering Computer Vision with TensorFlow 2.x Build advanced computer vision applications using machine learning and deep learning techniques

Arrow left icon
Product type Paperback
Published in May 2020
Publisher Packt
ISBN-13 9781838827069
Length 430 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Krishnendu Kar Krishnendu Kar
Author Profile Icon Krishnendu Kar
Krishnendu Kar
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Introduction to Computer Vision and Neural Networks
2. Computer Vision and TensorFlow Fundamentals FREE CHAPTER 3. Content Recognition Using Local Binary Patterns 4. Facial Detection Using OpenCV and CNN 5. Deep Learning on Images 6. Section 2: Advanced Concepts of Computer Vision with TensorFlow
7. Neural Network Architecture and Models 8. Visual Search Using Transfer Learning 9. Object Detection Using YOLO 10. Semantic Segmentation and Neural Style Transfer 11. Section 3: Advanced Implementation of Computer Vision with TensorFlow
12. Action Recognition Using Multitask Deep Learning 13. Object Detection Using R-CNN, SSD, and R-FCN 14. Section 4: TensorFlow Implementation at the Edge and on the Cloud
15. Deep Learning on Edge Devices with CPU/GPU Optimization 16. Cloud Computing Platform for Computer Vision 17. Other Books You May Enjoy

Image inpainting using OpenCV

OpenCV provides two image inpainting methods, as follows:

  • cv.INPAINT_TELEA is based on the paper An Image Inpainting Technique Based on the Fast Marching Method, by Alexandru Telea in 2004. This method replaces the pixel in the neighborhood to be inpainted by the normalized weighted sum of all the known pixels in the neighborhood. More weight is given to those pixels lying near to the point and on the boundary contours. Once a pixel has been inpainted, it moves to the next nearest pixel using the fast marching method:
import numpy as np
import cv2 as cv
img = cv.imread('/home/.../krishmark.JPG')
mask = cv.imread('/home/.../markonly.JPG',0)
dst = cv.inpaint(img,mask,3,cv.INPAINT_TELEA)
cv.imshow('dst',dst)
cv.waitKey(0)
cv.destroyAllWindows()
  • cv.INPAINT_NS is based on the paper Navier-Stokes, Fluid Dynamics, and Image and...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime