GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — RotateCode/angle_image.py at master · ShortCJL/RotateCode

Expand file tree

/

angle_image.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
19 lines (18 loc) · 700 Bytes
/

angle_image.py

Copy path

File metadata and controls

19 lines (18 loc) · 700 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import cv2
import os
from utils import generate_rotated_image
import random
root_path="H:\\Downloads\\Compressed\\baidu_login\\some_demo"
create_path="H:\\Downloads\\Compressed\\baidu_login\\angle_demo"
filenames=os.listdir(root_path)
for filename in filenames:
image = cv2.imread(os.path.join(root_path,filename), 1)
h, w = image.shape[:2]
if h != 224 or w != 224:
image = cv2.resize(image, (224, 224), interpolation=cv2.INTER_CUBIC)
rotation_angle = random.randint(0,360)
rotated_image = generate_rotated_image(
image,
rotation_angle
)
cv2.imwrite(f"{create_path}\\{rotation_angle}_{filename}", rotated_image)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.