CV_Project 1 计算机视觉项目一
Project 1: Cartoonifier and Skin Changer For Android
- How to convert a real-life image to a sketch drawing
- How to convert to a painting and overlay the sketch to product a cartoon
- A basic skin detector and skin color changer, to give someone green “alien” skin
- How to convert the project from a desktop app to a mobile app
Basic idea: Fill the flat parts with some color and then draw thick lines on the strong edges -> the flat areas should become much more flat and the edges should become much more distinct. We will detect edges and smooth the flat areas, draw enhanced edges back on top to product a cartoon or comic book effect.
Steps:
- Accessing the webcam : cv:: VideoCapture open() ; camera.set ()
- Generating a black-and-white sketch: use an edge-detection filter : Sobel, Scharr, Laplacian filter, Canny-edge detector. -> the laplacian filter produces edges with varying brightness, so make the edges look more like a sketch we apply a binary threshold to make the edges either white or black.
- Need to reduce the noise in the image before we use a laplacian edge filter. -> Use a Median filter (because bilateral filter is slow)
- Convert OpenCV default BGR format to Greyscale