Computer-Vision:计算机视觉项目

  • X0_371388
    了解作者
  • 1MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-23 13:30
    上传日期
计算机视觉 计算机视觉项目
Computer-Vision-master.zip
  • Computer-Vision-master
  • Facial_Filters
  • README.md
    289B
  • face_blur.py
    1.3KB
  • mirror_2.py
    1.2KB
  • mirror.py
    519B
  • Air_Drawing
  • common.py
    6.5KB
  • img_proc.py
    4.4KB
  • README.md
    1.4KB
  • train_digits.py
    4KB
  • model_pickle.pkl
    714.4KB
  • digits.png
    704.2KB
  • motion_tracker.py
    2.7KB
  • Morphing
  • affleck.txt
    183B
  • keaton.txt
    181B
  • get_points.py
    1.5KB
  • README.md
    1.9KB
  • batman_keaton.txt
    183B
  • trilist.txt
    321B
  • morph.py
    4.1KB
  • affleck.jpg
    25.8KB
  • bale.txt
    184B
  • keaton.jpg
    24.9KB
  • batman_keaton.jpg
    23.5KB
  • bale.jpg
    35.3KB
  • batman_affleck.txt
    182B
  • batman_bale.jpg
    25KB
  • batman_affleck.jpg
    31.3KB
  • delaunay.py
    2.6KB
  • batman_bale.txt
    179B
  • README.md
    43B
  • LICENSE
    1KB
内容介绍
### MORPH MULTIPLE IMAGES -------------------------------------------------------------------------- #### USAGE Code uses OpenCV 3.3.1, numpy. Download all files in the same directory. For the images and stored points in this directory, run morph.py If you want to select your own points, run get_points.py to select and store points and delaunay.py to store the delaunay triangles. It is assumed that all images are of the same size and format is '.jpg'. If not, you will have to modify the codes accordingly. #### 1) Run get_points.py to choose the points you want. Give the image name without the format as the command line argument. For eg: python .\get_points.py --image batman_affleck When the image opens, you can select and store points by clicking left mouse button on the point location. #### 2) Run delaunay.py You will get a text file of the triangles calculated using Delaunay triangulation. To ensure that you get the same triangles every time, use any two images. #### 3) Run morph.py to see the animation. You can change the sequence of images from the code. -------------------------------------------------------------------------- #### WORKING get_points.py uses a mouse callback function to store selected points plus four corners and the midpoint of the upper edge in a text file. delaunay.py calculates the weighted average of the selected points of two images, and creates Delaunay triangles using averaged points as vertices. This ensures that same triangles are created for each image. This list of vertices is stored in a text file. morph.py morphs individual triangular regions of the images using the text file created in delaunay.py. Then images are morphed using alpha blending. By varying the value of alpha, we can see the animation. <p align="center"> <img src="https://user-images.githubusercontent.com/37167529/42116605-dbdc8b22-7bac-11e8-8f29-4ee8b60c976f.jpg"/> </p>
评论
    相关推荐