JizhiziLi / generate-close-view

Generate close view and paste on original image with any ratio, can be used in writing papers or making slides

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

generate-close-view

This repository is created to generate close view of original image and paste it to the original one.

Can be used in paper writing or slides making.


Required config(can be changed in config.py):

  • original_path: path to load the original image
  • result_path: path to save the result
  • colo_hex: color to draw the border(hex format)
  • crop_left_bottom: coordinate of the left bottom point, denoted as (x1, y1) in following image
  • crop_right_top: coordinate of the right top point, denoted as (x2, y2) in following image
  • paste_ratio: ratio to resize the crop_img
  • thickness: thickness of the border
  • paste_left_bottom: coordinate of the left bottom point to paste crop_img, denoted as (x3, y3) in following image

Required: python3, cv2

Output: an image with close-view at any location with any ratio and any color of border.


How to run:

  • Edit config.py for any paths/settings
  • run python crop_and_paste.py

About

Generate close view and paste on original image with any ratio, can be used in writing papers or making slides


Languages

Language:Python 100.0%