This snippet of code attempts to put triangle pixelation effect on images.
Project description
imTriangle
This snippet of code attempts to put triangle pixelation effect on images.
Usage
import cv2
import numpy as np
from imTriangle import triangle
img_fullname = 'assets/lotus.jpg'
img = cv2.imread(img_fullname)
img_out = img.copy()
[h, w, d] = img.shape
for i in range(d):
img_out[:, :, i] = triangle(img[:, :, i].copy())
cv2.imwrite('assets/lotus-triangled.jpg', img_out)
Output
This is a sample image:
The sample image after tirangle pixelation effect:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imTriangle-0.0.1.tar.gz
(952.0 kB
view hashes)
Built Distribution
Close
Hashes for imTriangle-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3999953c4512d7c9e1d4661becba8b30bb8b34315c66520c34885599bab399f5 |
|
MD5 | fcecdbabde76de502f32c9367e922ddd |
|
BLAKE2b-256 | f33e90b60096004b7fcd4128b49f889383dbf7d5feef20e46402c283d8ef7431 |