일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
- opencv apt설치
- Winform
- libopencv-dev
- 아두이노
- opengl
- apt update
- google drive 업로드
- 정보처리기사후기
- vim
- opencv
- 우분투 opencv 설치
- 고정ip할당
- google drive upload
- c#
- vtk
- vim명령어
- Google Drive API
- rotation
- sshkey
- esp32
- api사용해서 google drive에 폴더만들기
- ubuntu
- vi
- annotating
- opencv resize
- translation
- NodeMCU
- 아두이노 설치
- 정보처리기사
- Python
- Today
- Total
목록Python (2)
내가 보려고 만든 블로그
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/oXlWW/btsHx8hj7BQ/4uikraAmH0akWOFhKtHKMK/img.png)
cropped.py# Import packagesimport cv2import numpy as np img = cv2.imread('Lenna.png')print(img.shape) # Print image shapecv2.imshow("original", img) # Cropping an imagecropped_image = img[80:280, 150:330] # Display cropped imagecv2.imshow("cropped", cropped_image) # Save the cropped imagecv2.imwrite("CroppedImage.jpg", cropped_image) cv2.waitKey(0)cv2.destroyAllWindows() python3 cropped.py
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/lHg4h/btsHyCbbrkf/PbAITzeiXPf42F9dNv2U91/img.png)
resizeImg.py # let's start with the Imports import cv2import numpy as np # Read the image using imread functionimage = cv2.imread('Lenna.png')cv2.imshow('Original Image', image) # let's downscale the image using new width and heightdown_width = 300down_height = 200down_points = (down_width, down_height)resized_down = cv2.resize(image, down_points, interpolation= cv2.INTER_LINEAR) # let's upscal..